1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//! 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:
//!
//! ```toml
//! bt-rs = { version = "0.1" }
//! ```
//!
//! # Components
//!
//! ## Types
//!
//! * [`ToolVersion`] — major, minor, patch, and build metadata parsed
//! from a tool `--version` line;
//! * [`VersionError`] — failure to run or parse a tool `--version`
//! invocation;
//!
//! ## Modules
//!
//! * [`rustc`] — `rustc` compiler version ([`rustc::compiler_version`]);
//!
//! # Examples
//!
//! ```
//! use bt_rs::rustc::compiler_version;
//!
//! # fn main() -> Result<(), bt_rs::VersionError> {
//! let version = compiler_version()?;
//! assert!(version >= (1, 74));
//! # Ok(())
//! # }
//! ```
//!
//! See the project [README](https://github.com/synesissoftware/bt-rs) for
//! further information.
// lib.rs : bt-rs
pub
declare_and_publish!;
// ///////////////////////////// end of file //////////////////////////// //