#protobuf #protoc #api #grpc #path #rust-protobuf

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

#9 in #rust-protobuf

Download history 216/week @ 2025-09-16 190/week @ 2025-09-23 319/week @ 2025-09-30 127/week @ 2025-10-07 245/week @ 2025-10-14 214/week @ 2025-10-21 128/week @ 2025-10-28 185/week @ 2025-11-04 341/week @ 2025-11-11 284/week @ 2025-11-18 122/week @ 2025-11-25 84/week @ 2025-12-02 59/week @ 2025-12-09 85/week @ 2025-12-16 103/week @ 2025-12-23 47/week @ 2025-12-30

308 downloads per month
Used in fewer than 12 crates

MIT/Apache

36KB
658 lines

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.

Dependencies

~4–17MB
~205K SLoC