-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed as not planned
Labels
A-editionsArea: edition-specific issuesArea: edition-specific issuesC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-triageStatus: This issue is waiting on initial triage.Status: This issue is waiting on initial triage.
Description
Problem
Some tools like bindgen
may need to know the Rust language edition of the root crate, especially when executing as part of build.rs
. For example, bindgen
needs to know if the -sys package uses edition 2021 (so it can use C-string literals), or older (in which case it must generate some unsafe code with the same literals). Requiring the user to always pass in bindgen args that match their environment is less than ideal if the default could be computed on the fly using environment variables.
See rust-lang/rust-bindgen#3000
Proposed Solution
Publish CARGO_PKG_EDITION
or CARGO_PKG_RUST_EDITION
or CARGO_PKG_LANG_EDITION
or ... (naming tbd)
Notes
No response
pvdrz
Metadata
Metadata
Assignees
Labels
A-editionsArea: edition-specific issuesArea: edition-specific issuesC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-triageStatus: This issue is waiting on initial triage.Status: This issue is waiting on initial triage.