fabaccess-bffh/runtime/console-api/build.rs

22 lines
646 B
Rust
Raw Permalink Normal View History

2023-05-05 14:14:33 +02:00
fn generate_api() {
println!("cargo:rerun-if-changed=schema");
let mut compile_command = ::capnpc::CompilerCommand::new();
compile_command
.src_prefix("schema")
.default_parent_module(vec!["schema".to_string()])
.file("schema/async_ops.capnp")
.file("schema/common.capnp")
.file("schema/instrument.capnp")
.file("schema/resources.capnp")
.file("schema/streaming.capnp")
.file("schema/stream.capnp")
.file("schema/tasks.capnp")
.file("schema/trace.capnp")
.run()
.expect("Failed to generate API code");
}
fn main() {
generate_api()
}