tenebrous-sheets/build.rs

22 lines
615 B
Rust

fn main() {
//TODO
// - invoke npm install?
// - invoke protoc to build ts/js protos
// - invoke npm run webpack from ts directory
let mut config = prost_build::Config::new();
config.btree_map(&["."]);
config.type_attribute(".", "#[derive(Serialize)]");
config.type_attribute(".", "#[serde(rename_all = \"camelCase\")]");
tonic_build::configure()
.build_server(true)
.build_client(false)
.compile_with_config(
config,
&["proto/cofd.proto", "proto/cofd_api.proto"],
&["src/", "proto/"],
)
.unwrap();
}