Expand description
Build tools for Rust.
bt-rs provides helpers for build scripts and tooling that need to
inspect the Rust toolchain — starting with parsing rustc --version
output into a structured ToolVersion.
Tool-specific APIs live in submodules (e.g. rustc::compiler_version);
shared types are re-exported at the crate root.
§Installation
Reference in Cargo.toml in the usual way:
bt-rs = { version = "0.1" }§Components
§Types
ToolVersion— major, minor, patch, and build metadata parsed from a tool--versionline;VersionError— failure to run or parse a tool--versioninvocation;
§Modules
rustc—rustccompiler version (rustc::compiler_version);
§Examples
use bt_rs::rustc::compiler_version;
let version = compiler_version()?;
assert!(version >= (1, 74));See the project README for further information.
Modules§
Structs§
- Tool
Version - Semantic version components parsed from a tool’s
--versionoutput.
Enums§
- Version
Error - Failure to obtain or parse a tool’s
--versionoutput.