Skip to content

Conversation

@tidefield
Copy link
Contributor

@tidefield tidefield commented Aug 16, 2023

This PR adds crate_name attribute to rust_proto_library and rust_grpc_library rules. This aligns with crate_name attribute provided in other rules to allow custom crate name different from label name.

Setting --crate-name flag to rustc_flags attribute is not an option because rustc does not allow --crate-name flag to be set twice.

@UebelAndre Would you mind reviewing this PR when you have a chance?

@tidefield tidefield force-pushed the add-crate-name-attr branch from fae679e to de45cf1 Compare August 16, 2023 22:10
@scentini scentini self-requested a review August 18, 2023 10:28
@scentini scentini requested a review from UebelAndre August 18, 2023 10:31
@scentini
Copy link
Collaborator

LGTM, waiting for @UebelAndre to review as per request.

Copy link
Collaborator

@scentini scentini left a comment

Choose a reason for hiding this comment

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

Thanks!

@scentini scentini merged commit d5505c8 into bazelbuild:main Aug 23, 2023
ttiurani pushed a commit to ttiurani/rules_rust that referenced this pull request Sep 15, 2023
This PR adds `crate_name` attribute to `rust_proto_library` and
`rust_grpc_library` rules. This aligns with `crate_name` attribute
provided in other rules to allow custom crate name different from label
name.

Setting `--crate-name` flag to `rustc_flags` attribute is not an option
because `rustc` does not allow `--crate-name` flag to be set twice.

@UebelAndre Would you mind reviewing this PR when you have a chance?

---------
@tidefield tidefield deleted the add-crate-name-attr branch October 9, 2023 14:20
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