#protoc-gen-rust #path #grpc #api #protobuf #generate #proto

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

#83 in #proto

Download history 96/week @ 2024-07-21 183/week @ 2024-07-28 81/week @ 2024-08-04 127/week @ 2024-08-11 76/week @ 2024-08-18 81/week @ 2024-08-25 98/week @ 2024-09-01 100/week @ 2024-09-08 106/week @ 2024-09-15 233/week @ 2024-09-22 148/week @ 2024-09-29 53/week @ 2024-10-06 131/week @ 2024-10-13 65/week @ 2024-10-20 89/week @ 2024-10-27 81/week @ 2024-11-03

370 downloads per month
Used in fewer than 12 crates

MIT/Apache

1.5MB
29K 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

~2–11MB
~132K SLoC