#rustc-version #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

#816 in Programming languages

Download history 276/week @ 2023-12-06 569/week @ 2023-12-13 572/week @ 2023-12-20 56/week @ 2023-12-27 563/week @ 2024-01-03 507/week @ 2024-01-10 642/week @ 2024-01-17 538/week @ 2024-01-24 302/week @ 2024-01-31 321/week @ 2024-02-07 588/week @ 2024-02-14 635/week @ 2024-02-21 479/week @ 2024-02-28 485/week @ 2024-03-06 452/week @ 2024-03-13 490/week @ 2024-03-20

1,952 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