16 lines
476 B
Rust
16 lines
476 B
Rust
|
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||
|
tonic_build::configure()
|
||
|
.build_server(true)
|
||
|
.out_dir("src/proto")
|
||
|
.compile_well_known_types(true)
|
||
|
.include_file("mod.rs")
|
||
|
.type_attribute(".", "#[derive(serde::Deserialize)]")
|
||
|
.type_attribute(".", "#[derive(serde::Serialize)]")
|
||
|
.compile(&[
|
||
|
"proto/grpc_stdio.proto",
|
||
|
"proto/bao.proto"
|
||
|
], &["bao"])
|
||
|
.unwrap();
|
||
|
Ok(())
|
||
|
}
|