2021-06-02 21:09:58 +00:00
|
|
|
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
2021-07-15 15:04:50 +00:00
|
|
|
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(())
|
|
|
|
}
|
2021-06-02 21:09:58 +00:00
|
|
|
}
|