Skip to content

chore: simplify grpc file descriptor codegen#1718

Draft
Mirko-von-Leipzig wants to merge 1 commit intonextfrom
mirko/build-codegen
Draft

chore: simplify grpc file descriptor codegen#1718
Mirko-von-Leipzig wants to merge 1 commit intonextfrom
mirko/build-codegen

Conversation

@Mirko-von-Leipzig
Copy link
Collaborator

This is an experiment using the codegen crate.

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.

@Mirko-von-Leipzig Mirko-von-Leipzig added the no changelog This PR does not require an entry in the `CHANGELOG.md` file label 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"));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment: it's unfortunate build-rs doesn't provide this as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no changelog This PR does not require an entry in the `CHANGELOG.md` file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants