rustc_plugin 0.8.0-nightly-2024-01-06

A framework for writing plugins that integrate with the Rust compiler
1
2
3
4
5
6
7
fn main() {
  let toolchain_toml = include_str!("rust-toolchain.toml");
  let toolchain_table = toolchain_toml.parse::<toml::Table>().unwrap();
  let toolchain = toolchain_table["toolchain"].as_table().unwrap();
  let channel = toolchain["channel"].as_str().unwrap();
  println!("cargo:rustc-env=RUSTC_CHANNEL={channel}");
}