dropbox / pb-jelly

A protobuf code generation framework for the Rust language developed at Dropbox.
Apache License 2.0
611 stars 25 forks source link

Make pb-gen and encapsulated example #12

Closed ParkMyCar closed 4 years ago

ParkMyCar commented 4 years ago

This PR does a couple big things:

  1. This builds on top of #11 and beings to flush out pb-gen to provide a nice user interface to generate proto bindings.
  2. Also I added a new crate in the workspace pb-types which include the generated Rust code for Google Protobuf WellKnownTypes. We previously generated this code by messing with the path of protoc to find the source .proto files, now users no longer need to do this
  3. Adds a new crate examples (ignored from the workspace) that includes an encapsulated example. The example doesn't need to copy any code, and solely relies on crates from the workspace, pulled from git!
ParkMyCar commented 4 years ago

Looks like I actually pulled in the changes from #11, I'll fix this later 🙂

ParkMyCar commented 4 years ago

@nipunn1313 sorry for such a large change! A lot of these changed files are generated code (not sure why GitHub doesn't collapse them) or files moving around. What would really be worth reviewing are the small changes I made to codegen.py and the new pb-gen/src/lib.rs