rules_rust icon indicating copy to clipboard operation
rules_rust copied to clipboard

Cannot build a no_std crate that uses a proc macro that uses std

Open ernoc opened this issue 7 months ago • 1 comments

Given:

  • A crates index where all crates are no_std compatible
  • A crate we want to build for bare metal which uses a proc macro that depends on some other crate that needs std (e.g.: prost-types)

rules_rust will pull in the proc macro's dependencies and then propagate the std feature to all crates in the index, meaning no we can no longer build our crate for bare metal.

ernoc avatar Jul 16 '24 16:07 ernoc