Get Rust compiler version at compilation time
⚓ Rust 📅 2026-06-04 👤 surdeus 👁️ 8There is a thread regarding rustc_version at the board. I also found another crate, as rustversion on crates.io. However, after looking in the code of the solutions, I concluded that there is no built-in constant like std::env::consts::CompilerVer for the purpose. Is it true, or I missed other constants block?
PS AI response was similar, either use crates.io, or just run rustc -V>ver_info.txt and then insert the version using include.
1 post - 1 participant
🏷️ Rust_feed