aboutsummaryrefslogtreecommitdiff
path: root/karld/src/interface/mod.rs
blob: 3c465d4335291c84039cdbeebb4af137f3da34a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#[cfg(feature = "stdio")]
mod stdio;
#[cfg(feature = "tcp")]
mod tcp;
#[cfg(feature = "unix")]
mod unix;
#[cfg(feature = "websocket")]
mod websocket;

pub mod generic;

pub fn start() {
    #[cfg(feature = "unix")]
    std::thread::spawn(|| unix::run());
    #[cfg(feature = "websocket")]
    std::thread::spawn(|| websocket::run());
    #[cfg(feature = "stdio")]
    std::thread::spawn(|| stdio::run());
    #[cfg(feature = "tcp")]
    std::thread::spawn(|| tcp::run());

    #[cfg(not(feature = "websocket"))]
    #[cfg(not(feature = "unix"))]
    log::warn!("no interfaces enabled, daemon will be inaccesssible")
}