tenebrous-dicebot/rpc/build.rs

17 lines
451 B
Rust

fn main() -> Result<(), Box<dyn std::error::Error>> {
if cfg!(feature = "only-client") {
tonic_build::configure().build_server(false).compile(
&["protos/dicebot.proto", "protos/web-api.proto"],
&["protos/"],
)?;
Ok(())
} else {
tonic_build::configure().compile(
&["protos/dicebot.proto", "protos/web-api.proto"],
&["protos/"],
)?;
Ok(())
}
}