Enable Cargo feature in BUILD.bazel rust_test #1869
-
|
Hey everyone! I have a I'm trying to enable this feature but only for an integration test without much success. I was expecting the following to work: If I add the What am I missing? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
|
What is the error you're seeing when building what you spelled out above? |
Beta Was this translation helpful? Give feedback.
-
|
This is working as intended - If you want to achieve what you're trying to do, you'd need a second copy of the (Alternatively, you could potentially use a transition to alter the |
Beta Was this translation helpful? Give feedback.
This is working as intended -
crate_featureapplies to the specific code it's compiling and nothing else.If you want to achieve what you're trying to do, you'd need a second copy of the
rust_librarywhich enables the feature, and to have therust_testdepend on that.(Alternatively, you could potentially use a transition to alter the
rust_library, but the effect is the same - effectively splitting therust_libraryinto two targets)