| Crates.io | rust-version-info-file |
| lib.rs | rust-version-info-file |
| version | 0.2.0 |
| created_at | 2021-04-22 06:54:17.394998+00 |
| updated_at | 2025-08-21 00:35:50.066772+00 |
| description | generating one file includes rustc version and cargo tree |
| homepage | |
| repository | https://github.com/aki-akaguma/rust-version-info-file |
| max_upload_size | |
| id | 388019 |
| size | 44,714 |
output rust version info into a file
This crate is the presents, the file output of rustc --version and cargo tree command.
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
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"],
]
$ cat target/rust-version-info-aki-gsub.txt
rustc 1.89.0 (29483883e 2025-08-04)
aki-gsub v0.1.34
├── anyhow v1.0.99
├── atty v0.2.14
│ └── libc v0.2.175
├── flood-tide v0.2.11
├── memx-cdy v0.1.13
│ ├── libc v0.2.175
│ └── memx v0.1.32
│ └── cpufeatures v0.2.17
├── regex v1.11.1
│ ├── aho-corasick v1.1.3
│ │ └── memchr v2.7.5
│ ├── memchr v2.7.5
│ ├── regex-automata v0.4.9
│ │ ├── aho-corasick v1.1.3 (*)
│ │ ├── memchr v2.7.5
│ │ └── regex-syntax v0.8.5
│ └── regex-syntax v0.8.5
└── runnel v0.3.19
[build-dependencies]
├── rust-version-info-file v0.1.10
└── rustc_version v0.4.1
└── semver v1.0.26
[dev-dependencies]
├── exec-target v0.2.9
└── indoc v1.0.9 (proc-macro)
This project is licensed under either of
at your option.