#protobuf #grpc #serialization #protocol-buffers #proto #api #protoc

build protoc-rust-grpc

protoc --rust-grpc_out=... available as API. protoc needs to be in $PATH, protoc-gen-rust-grpc does not.

16 releases

0.8.3 Mar 28, 2021
0.8.2 Sep 20, 2020
0.8.1 May 25, 2020
0.6.2 Jan 14, 2020
0.2.1 Jul 10, 2017

#141 in #protobuf

Download history 152/week @ 2022-12-01 461/week @ 2022-12-08 133/week @ 2022-12-15 202/week @ 2022-12-22 192/week @ 2022-12-29 310/week @ 2023-01-05 163/week @ 2023-01-12 308/week @ 2023-01-19 252/week @ 2023-01-26 481/week @ 2023-02-02 247/week @ 2023-02-09 459/week @ 2023-02-16 233/week @ 2023-02-23 205/week @ 2023-03-02 314/week @ 2023-03-09 286/week @ 2023-03-16

1,114 downloads per month
Used in fewer than 12 crates

MIT/Apache

1.5MB
28K SLoC

API to generate .rs files

API to generate .rs files to be used e. g. from build.rs.

Example code:

fn main() {
    protoc_rust_grpc::run(protoc_rust_grpc::Args {
        out_dir: "src",
        includes: &["proto"],
        input: &["proto/aaa.proto", "proto/bbb.proto"],
        rust_protobuf: true, // also generate protobuf messages, not just services
        ..Default::default()
    }).expect("protoc-rust-grpc");
}

Note this API requires protoc command present in $PATH. Although protoc-gen-rust-grpc command is not needed.


lib.rs:

API to generate .rs files.

Dependencies

~0.8–6.5MB
~112K SLoC