Skip to content

Add support for injecting rust code into generated prost libraries #2045

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

Closed
UebelAndre opened this issue Jul 1, 2023 · 2 comments · Fixed by #3083
Closed

Add support for injecting rust code into generated prost libraries #2045

UebelAndre opened this issue Jul 1, 2023 · 2 comments · Fixed by #3083

Comments

@UebelAndre
Copy link
Collaborator

This is a continuation of #2033 (comment)

illicitonion:

I'm imagining this taking the form roughly of a new attribute on rust_*_library along the lines of:

extra_per_package_code = {
  "my.proto.package": "path/to:extra.rs",
}

or something like that? But very open to ideas!

@UebelAndre
Copy link
Collaborator Author

This sounds like a nice idea but how would the rust_prost_library attribute make it's way into the aspect, where the crate is ultimately compiled?

@UebelAndre
Copy link
Collaborator Author

I think this will probably need to be implemented on the rust_prost_toolchain where there’s a label_keyed_string_dict of filegroups containing extra sources and label patterns to use for filtering those sources into proto files.

github-merge-queue bot pushed a commit that referenced this issue Dec 13, 2024
#3083)

This new rule is to support granular modifications to existing
`proto_library` targets without adding duplicate actions to the build
graph depending on what `rust_prost_library` target was consumed.

closes #2045
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant