feat: add server-only build

it's drastically faster to build,
mostly due to only including 1/10th of the dependencies
This commit is contained in:
electria 2026-08-16 14:13:41 -07:00
commit 1546c67fa3
Signed by: electria
SSH key fingerprint: SHA256:8LlB3ucPbBHqozqkhsNbaV5oG3SlzzqUj8FZDL6IPQs
3 changed files with 24 additions and 4 deletions

View file

@ -1,5 +1,6 @@
use std::env;
#[cfg(feature = "app")]
mod app;
mod server;
mod sysinfo_snapshot;
@ -7,10 +8,12 @@ mod utils;
fn main() {
match env::args().nth(1).as_deref() {
Some("server") => server::run().unwrap(),
#[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}"),
}
}