-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch to buf to generate code in cometbft-proto #3
Comments
The doc for the neoenstein-prost-serde provides an approach to generate serde implementations for all structures of interest. I think this is the answer to our proto-types woes. |
Switching to neoenstein-prost-serde to generate the bulk of serde impls is not possible now due to neoeinstein/protoc-gen-prost#84. We need at least a few custom impls (e.g. for An alternative is not using the serde plugin and carrying over the serde attribute options that are used by proto-compiler. |
At https://github.com/astriaorg/astria we started out with buf + protoc-gen-prost. We ultimately dropped protoc-gen-prost because we wanted to migrate to protoc 0.12 (and tonic 0.10) which protoc-gen-prost still does not support. We still use buf (among linting and pushing to the buf repo) for generating the Rust code via You can see the file descriptor set being generated here:
We enforce sync between our local proto spec and the generated Rust code through a github action here (the |
Thanks, good to know! |
Filed #16 to capture the architectural aspects. |
Pre-requisites
Description
The CometBFT protobuf files, complete with versioned definition variants corresponding to past releases, are published on Buf Schema Registry as per cometbft/cometbft#1733.
The code generation method for protobuf bindings in
cometbft-proto
can now use thebuf
tooling, instead of the current cumbersome method of checking out the CometBFT repository and runningtonic-build
for multiple successive revisions.Definition of "done"
The method of compiling protos is switched to using a buf plugin for tonic, tentatively neoenstein-tonic.
The hierarchy of generated modules in cometbft-proto is changed to match the versioned proto packages in buf.build/cometbft/cometbft.
The text was updated successfully, but these errors were encountered: