it's drastically faster to build, mostly due to only including 1/10th of the dependencies
19 lines
419 B
Rust
19 lines
419 B
Rust
use std::env;
|
|
|
|
#[cfg(feature = "app")]
|
|
mod app;
|
|
mod server;
|
|
mod sysinfo_snapshot;
|
|
mod utils;
|
|
|
|
fn main() {
|
|
match env::args().nth(1).as_deref() {
|
|
#[cfg(feature = "app")]
|
|
None | Some("client") => app::run().unwrap(),
|
|
|
|
#[cfg_attr(feature = "app", allow(unreachable_patterns))]
|
|
None | Some("server") => server::run().unwrap(),
|
|
|
|
Some(s) => panic!("invalid argument: {s}"),
|
|
}
|
|
}
|