chore: simplify grpc file descriptor codegen#1718
Draft
Mirko-von-Leipzig wants to merge 1 commit intonextfrom
Draft
chore: simplify grpc file descriptor codegen#1718Mirko-von-Leipzig wants to merge 1 commit intonextfrom
Mirko-von-Leipzig wants to merge 1 commit intonextfrom
Conversation
7a8abcb to
161680f
Compare
drahnr
reviewed
Feb 27, 2026
| FileDescriptorSet::decode(&bytes[..]) | ||
| .expect("bytes should be a valid file descriptor created by build.rs") | ||
| } | ||
| include!(concat!(env!("OUT_DIR"), "/file_descriptors.rs")); |
Contributor
There was a problem hiding this comment.
comment: it's unfortunate build-rs doesn't provide this as well
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is an experiment using the
codegencrate.Its a more type-safe way of generating rust code.
Other changes
We iterate through the gRPC service files, instead of hard-coding them. I'm not married to this; it was just easier to do at the time.
I've also merged the three store file descriptors into a single one. This is a remnant of when these three were in separate files, but since they got merged, the three were identical.
Note
We don't need to merge this; I'm experimenting with gRPC codegen using this crate.