[−][src]Crate protoc_rust
API to generate .rs
files.
This API requires protoc
command present in $PATH
or passed explicitly to Codegen
object.
extern crate protoc_rust; fn main() { protoc_rust::Codegen::new() .out_dir("src/protos") .inputs(&["protos/a.proto", "protos/b.proto"]) .include("protos") .run() .expect("Running protoc failed."); }
It is advisable that protoc-rust
build-dependecy version be the same as
protobuf
dependency.
The alternative is to use protobuf-codegen-pure
.
Structs
Args | Deprecated
|
Codegen |
|
Customize | Specifies style of generated code. |
Functions
run | Deprecated Like |
Type Definitions
Error | Alias for io::Error |
Result | Alias for io::Error |