pragma-common 0.2.11

Pragma Common types for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
fn main() {
    if std::env::var("CARGO_FEATURE_CAPNP").is_ok() {
        // Notify Cargo to re-run this script if the schema file changes
        println!("cargo:rerun-if-changed=schema/schema.capnp");

        // Compile the Cap'n Proto schema and output to OUT_DIR
        capnpc::CompilerCommand::new()
            .src_prefix("schema")
            .file("schema/schema.capnp")
            .run()
            .expect("Failed to compile Cap'n Proto schema");
    }
}