Skip to content
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

feat(build): Expose Prost generation plugin #947

Merged
merged 2 commits into from
Mar 31, 2022

Conversation

Tuetuopay
Copy link
Contributor

Exposing such plugin allows independent code generators (outside of the vanilla build.rs workflow) to use tonic-build to get gRPC code generation. This paves the way for a protoc-gen-tonic plugin, opening integration in e.g. buf.

And indeed, you can find the plugin over here: https://github.com/Tuetuopay/protoc-gen-tonic

This builds on my work on protoc-gen-prost, and allows integration in the wider protoc/buf/... ecosystem. You can read more on the motivation for such a change over on tokio-rs/prost#492, and more about the features in the prost plugin repository. The tonic plugin inherits from all nice features (like crate gen) from the prost plugin.

Exposing such plugin allows independent code generators (outside of the
vanilla `build.rs` workflow) to use tonic-build to get gRPC code
generation. This paves the way for a `protoc-gen-tonic` plugin, opening
integration in e.g. buf.
This simplifies the code as it allows to simply write
`configure() /* opts */ .service_generator()`.
@LucioFranco LucioFranco changed the title Expose Prost generation plugin feat(build): Expose Prost generation plugin Mar 31, 2022
@LucioFranco LucioFranco merged commit d4bd475 into hyperium:master Mar 31, 2022
@Tuetuopay Tuetuopay deleted the api-expose branch April 6, 2022 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants