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

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

#5 in #protoc-gen-rust

Download history 69/week @ 2023-12-14 64/week @ 2023-12-21 20/week @ 2023-12-28 36/week @ 2024-01-04 76/week @ 2024-01-11 55/week @ 2024-01-18 16/week @ 2024-01-25 12/week @ 2024-02-01 45/week @ 2024-02-08 93/week @ 2024-02-15 126/week @ 2024-02-22 162/week @ 2024-02-29 203/week @ 2024-03-07 195/week @ 2024-03-14 167/week @ 2024-03-21 189/week @ 2024-03-28

761 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–13MB
~135K SLoC