#rustc #version

rustc-simple-version

Access the rustc version used to build your project using a simple constant

1 unstable release

0.1.0 Jun 18, 2020

#75 in #rustc

Download history 30/week @ 2022-06-10 34/week @ 2022-06-17 31/week @ 2022-06-24 31/week @ 2022-07-01 31/week @ 2022-07-08 32/week @ 2022-07-15 32/week @ 2022-07-22 32/week @ 2022-07-29 34/week @ 2022-08-05 32/week @ 2022-08-12 33/week @ 2022-08-19 32/week @ 2022-08-26 33/week @ 2022-09-02 41/week @ 2022-09-09 162/week @ 2022-09-16 151/week @ 2022-09-23

392 downloads per month
Used in gerrit-grr

Apache-2.0

4KB

rustc-simple-version

crates.io docs.rs pipeline status coverage report

The rustc-simple-version crate provides a simple constant that exposes the version of rustc used to compile your project.

use rustc_simple_version::RUSTC_VERSION;

println!("Built using {}", RUSTC_VERSION);

License

rustc-simple-version is (C) 2020 Kunal Mehta, released under the Apache 2.0 or any later version, see LICENSE for details.


lib.rs:

rustc-simple-version

Access the version of rustc used to build your application as a straightforward constant, no extra build script needed.

use rustc_simple_version::RUSTC_VERSION;

println!("Built using {}", RUSTC_VERSION);

The value will be the exact same output as rustc --version.

No runtime deps