capnp-json 0.1.0

Cap'n Proto JSON codec for capnp-rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
fn main() {
  println!("cargo:rerun-if-changed=json.capnp");
  let root_dir =
    std::env::var("CARGO_MANIFEST_DIR").expect("getting manifest dir");

  // Compile the built-in json schema. `src_prefix` strips the manifest dir
  // from the generated module names.
  capnpc::CompilerCommand::new()
    .file(root_dir.clone() + "/json.capnp")
    .src_prefix(root_dir)
    .run()
    .expect("compiling json.capnp");
}