Crates.io | protoc-rust-grpc |
lib.rs | protoc-rust-grpc |
version | 0.8.3 |
source | src |
created_at | 2017-06-24 18:43:16.174811 |
updated_at | 2021-03-28 23:09:22.733741 |
description | protoc --rust-grpc_out=... available as API. protoc needs to be in $PATH, protoc-gen-rust-grpc does not. |
homepage | https://github.com/stepancheg/rust-protobuf/protoc-rust/ |
repository | https://github.com/stepancheg/rust-protobuf/protoc-rust/ |
max_upload_size | |
id | 20498 |
size | 9,695 |
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.