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

build rust-version-info-file

generating one file includes rustc version and cargo tree

7 releases

Uses new Rust 2021

0.1.6 Jun 13, 2022
0.1.5 May 21, 2022
0.1.4 Feb 8, 2022
0.1.3 Nov 14, 2021
0.1.1 Apr 26, 2021

#58 in Build Utils

Download history 55/week @ 2022-08-16 60/week @ 2022-08-23 58/week @ 2022-08-30 78/week @ 2022-09-06 70/week @ 2022-09-13 71/week @ 2022-09-20 98/week @ 2022-09-27 136/week @ 2022-10-04 37/week @ 2022-10-11 35/week @ 2022-10-18 97/week @ 2022-10-25 101/week @ 2022-11-01 98/week @ 2022-11-08 97/week @ 2022-11-15 42/week @ 2022-11-22 46/week @ 2022-11-29

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

MIT/Apache

8KB
94 lines

rust-version-info-file

output rust version info into a file

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

Features

  • minimum support rustc 1.56.1 (59eed8a2a 2021-11-01)

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"],
]

Output sample

$ cat target/rust-version-info-aki-gsub.txt
rustc 1.61.0 (fe5b13d68 2022-05-18)
aki-gsub v0.1.34
├── anyhow v1.0.57
├── atty v0.2.14
│   └── libc v0.2.126
├── flood-tide v0.2.4
├── memx-cdy v0.1.7
│   ├── libc v0.2.126
│   └── memx v0.1.20[build-dependencies]
│       └── rustc_version v0.4.0
│           └── semver v1.0.10
├── regex v1.5.6
│   ├── aho-corasick v0.7.18
│   │   └── memchr v2.5.0
│   ├── memchr v2.5.0
│   └── regex-syntax v0.6.26
└── runnel v0.3.10
    [build-dependencies]
    └── rustc_version v0.4.0 (*)
[build-dependencies]
├── rust-version-info-file v0.1.5
└── rustc_version v0.4.0 (*)
[dev-dependencies]
├── exec-target v0.2.6
└── indoc v1.0.6 (proc-macro)

Changelogs

This crate's changelog here.

License

This project is licensed under either of

at your option.

No runtime deps