API to generate .rs files
API to generate .rs
files to be used e. g. from build.rs.
Example code:
With stable rust-protobuf:
extern crate protobuf_codegen_pure;
run.expect;
With rust-protobuf from master:
extern crate protobuf_codegen_pure;
new
.out_dir
.inputs
.include
.run
.expect;
And in Cargo.toml
:
[build-dependencies]
protobuf-codegen-pure = "2.3"
The alternative is to use
protoc-rust crate,
which relies on protoc
command to parse descriptors. Both crates should produce the same result,
otherwise please file a bug report.