#info #file #version #tree #rustc #cargo #output #generating

build rust-version-info-file

generating one file includes rustc version and cargo tree

3 releases

0.1.2 Jun 3, 2021
0.1.1 Apr 26, 2021
0.1.0 Apr 22, 2021

30 downloads per month
Used in 13 crates (12 directly)

MIT/Apache

5KB
80 lines

rust-version-info-file

output rust version info file

This crate is the presents, the file output of rustc --version and cargo tree command.

Examples

Please write the following code in the build.rs:

use rust_version_info_file::rust_version_info_file;

fn main() {
    rust_version_info_file("target/rust-version-info.txt", "Cargo.toml");
}

And you get the file as result it.

cat target/rust-version-info-file.txt

On debian package

In Cargo.toml

[package.metadata.deb]
assets = [
    ["target/rust-version-info.txt", "usr/share/doc/your_package/", "644"],
    ["README.md", "usr/share/doc/your_package/", "644"],
]

License: MIT OR Apache-2.0


lib.rs:

output rust version info file

This crate is the presents, the file output of rustc --version and cargo tree command.

Examples

Please write the following code in the build.rs:

use rust_version_info_file::rust_version_info_file;

fn main() {
    rust_version_info_file("target/rust-version-info.txt", "Cargo.toml");
}

And you get the file as result it.

cat target/rust-version-info-file.txt

On debian package

In Cargo.toml

[package.metadata.deb]
assets = [
    ["target/rust-version-info.txt", "usr/share/doc/your_package/", "644"],
    ["README.md", "usr/share/doc/your_package/", "644"],
]

No runtime deps