Crate capnpc [−] [src]
Cap'n Proto Schema Compiler Plugin Library
This library allows you to do Cap'n Proto code generation within a Cargo build.
In your Cargo.toml:
[build-dependencies] capnpc = "*"
In your build.rs, call
::capnpc::compile("schema", &["schema/foo.capnp", "schema/bar.capnp"]);
This will be equivalent to executing the shell command
capnp compile -orust:$OUT_DIR --src-prefix=schema schema/foo.capnp schema/bar.capnp
Modules
codegen | |
schema | |
schema_capnp |
Functions
compile |