Crate protobuf_codegen_pure[][src]

Expand description

API to generate .rs files.

This API does not require protoc command present in $PATH.

extern crate protoc_rust;

fn main() {
        .inputs(&["protos/a.proto", "protos/b.proto"])
        .expect("Codegen failed.");

It is advisable that protobuf-codegen-pure build-dependecy version be the same as protobuf dependency.

The alternative is to use protoc-rust crate.


Invoke pure rust codegen. See crate docs for example.

Specifies style of generated code. Generated files can be customized using this proto or using rustproto.proto options.