Crates.io | pb-jelly-gen |
lib.rs | pb-jelly-gen |
version | 0.0.17 |
source | src |
created_at | 2020-09-16 01:13:38.719683 |
updated_at | 2024-11-21 00:50:11.754408 |
description | A protobuf binding generation framework for the Rust language developed at Dropbox |
homepage | https://github.com/dropbox/pb-jelly |
repository | https://github.com/dropbox/pb-jelly/tree/main/pb-jelly-gen |
max_upload_size | |
id | 289282 |
size | 721,138 |
pb-jelly-gen
This crate provides a tool to generate Rust
code from .proto
files.
You'll need the protobuf compiler which you can get by:
brew install protobuf
or...protobuf
A binary is included that can be passed directly to protoc
:
% cargo build --bin protoc-gen-jellyrust
% protoc --plugin=protoc-gen-jellyrust=target/debug/protoc-gen-jellyrust --jellyrust_out=out foo/bar.proto...
Add this crate as a dependency in your Cargo.toml
and then call gen_protos
:
Cargo.toml
[dependencies]
pb-jelly-gen = "0.0.17"
main.rs
use pb_jelly_gen::gen_protos;
fn main() {
// Replace `./protos` with a path to your proto files.
gen_protos(vec!["./protos"]).unwrap()
}