#protobuf #protobuf-compiler #proto #google #dropbox #compiler-plugin

bin+lib pb-jelly-gen

A protobuf binding generation framework for the Rust language developed at Dropbox

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

Download history 9/week @ 2024-09-20 1/week @ 2024-09-27 108/week @ 2024-11-15 37/week @ 2024-11-22 3/week @ 2024-11-29

148 downloads per month

Apache-2.0

765KB
15K SLoC

pb-jelly-gen

It's working! It's working! - Anakin Skywalker

Crates.io Documentation Crates.io

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:

  1. Running brew install protobuf or...
  2. 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