16 releases
0.0.17 | Nov 21, 2024 |
---|---|
0.0.16 | Jan 18, 2024 |
0.0.15 | Dec 14, 2023 |
0.0.14 | Oct 28, 2023 |
0.0.5 | Nov 20, 2020 |
#412 in Encoding
148 downloads per month
765KB
15K
SLoC
pb-jelly-gen
It's working! It's working! - Anakin Skywalker
This crate provides a tool to generate Rust
code from .proto
files.
How To Use
You'll need the protobuf compiler which you can get by:
- Running
brew install protobuf
or... - Download or build from source
protobuf
As a plugin for protoc
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...
As a library
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()
}
Dependencies
~1–10MB
~105K SLoC