Open
Description
RUSTFLAGS is a low level mechanism
- Harder for users to discover features
- Harder for cargo to reason about like in Per-user compiled artifact cache #5931, add a RUSTLINKFLAGS environment variable #4349
This is meant to track the RUSTFLAGS that should have a cargo-native way of being exposed. This won't always be one-to-one mappings and won't necessarily cover every rustc CLI feature.
-
--allow
,--deny
,--warn
- Use case: package-level control over warnings
- Tracking Issue for
[lints]
table RFC 3389 #12115
-
--allow
,--deny
,--warn
- Interactively denying/allowing warnings
- Add
--deny-warnings
functionality for all commands. #8424
-
--target-cpu=native
-
--cfg
-
-Cinstrument-coverage
-
-C target-feature
Note: Keep in mind the cargo-native solution could live in:
Cargo.toml
: if this is something considered static for the project.cargo/config.toml
(which includes env, cli): if this is something that changes between environments (including users and platforms) or is transient- CLI: if this is something that changes from run to run and needs the extra visibility
See also