#version-info #rustc-version #build #file #cargo #tree #generate

build rust-version-info-file

generating one file includes rustc version and cargo tree

11 releases

0.1.10 Jun 9, 2024
0.1.9 Feb 12, 2023
0.1.8 Jan 31, 2023
0.1.6 Jun 13, 2022
0.1.2 Jun 3, 2021

#119 in Build Utils

Download history 28/week @ 2024-07-23 174/week @ 2024-07-30 49/week @ 2024-08-06 56/week @ 2024-08-13 47/week @ 2024-08-20 87/week @ 2024-08-27 63/week @ 2024-09-03 72/week @ 2024-09-10 56/week @ 2024-09-17 83/week @ 2024-09-24 58/week @ 2024-10-01 21/week @ 2024-10-08 43/week @ 2024-10-15 49/week @ 2024-10-22 52/week @ 2024-10-29 42/week @ 2024-11-05

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

MIT/Apache

11KB
117 lines

rust-version-info-file

crate Docs Rust Version Apache2/MIT licensed Test ubu Test mac Test win

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.58.1 (db9d1b20b 2022-01-20)

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