summaryrefslogtreecommitdiffstats
path: root/vendor/rustc_tools_util/README.md
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:03:36 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:03:36 +0000
commit17d40c6057c88f4c432b0d7bac88e1b84cb7e67f (patch)
tree3f66c4a5918660bb8a758ab6cda5ff8ee4f6cdcd /vendor/rustc_tools_util/README.md
parentAdding upstream version 1.64.0+dfsg1. (diff)
downloadrustc-upstream/1.65.0+dfsg1.tar.xz
rustc-upstream/1.65.0+dfsg1.zip
Adding upstream version 1.65.0+dfsg1.upstream/1.65.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/rustc_tools_util/README.md')
-rw-r--r--vendor/rustc_tools_util/README.md62
1 files changed, 0 insertions, 62 deletions
diff --git a/vendor/rustc_tools_util/README.md b/vendor/rustc_tools_util/README.md
deleted file mode 100644
index 18341ca2f..000000000
--- a/vendor/rustc_tools_util/README.md
+++ /dev/null
@@ -1,62 +0,0 @@
-# rustc_tools_util
-
-A small tool to help you generate version information
-for packages installed from a git repo
-
-## Usage
-
-Add a `build.rs` file to your repo and list it in `Cargo.toml`
-````
-build = "build.rs"
-````
-
-List rustc_tools_util as regular AND build dependency.
-````
-[dependencies]
-rustc_tools_util = "0.1"
-
-[build-dependencies]
-rustc_tools_util = "0.1"
-````
-
-In `build.rs`, generate the data in your `main()`
-````rust
-fn main() {
- println!(
- "cargo:rustc-env=GIT_HASH={}",
- rustc_tools_util::get_commit_hash().unwrap_or_default()
- );
- println!(
- "cargo:rustc-env=COMMIT_DATE={}",
- rustc_tools_util::get_commit_date().unwrap_or_default()
- );
- println!(
- "cargo:rustc-env=RUSTC_RELEASE_CHANNEL={}",
- rustc_tools_util::get_channel().unwrap_or_default()
- );
-}
-
-````
-
-Use the version information in your main.rs
-````rust
-use rustc_tools_util::*;
-
-fn show_version() {
- let version_info = rustc_tools_util::get_version_info!();
- println!("{}", version_info);
-}
-````
-This gives the following output in clippy:
-`clippy 0.0.212 (a416c5e 2018-12-14)`
-
-
-## License
-
-Copyright 2014-2019 The Rust Project Developers
-
-Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-<LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-option. All files in the project carrying such notice may not be
-copied, modified, or distributed except according to those terms.