Closed as not planned
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