os_checker_types/
toolchain.rs

1use crate::prelude::*;
2
3#[derive(Clone, Debug, Serialize, Deserialize)]
4pub struct RustToolchains {
5    // FIXME: 这个和 main.rs 中的 &'static 不一致
6    pub host: Rustc,
7    pub installed: Vec<RustToolchain>,
8}
9
10// [toolchain]
11// channel = "nightly-2020-07-10"
12// components = [ "rustfmt", "rustc-dev" ]
13// targets = [ "wasm32-unknown-unknown", "thumbv2-none-eabi" ]
14// profile = "minimal"
15#[derive(Deserialize, Serialize, Debug, Hash, PartialEq, Eq, PartialOrd, Ord, Clone)]
16pub struct RustToolchain {
17    pub channel: XString,
18    pub profile: Option<XString>,
19    pub targets: Option<Vec<String>>,
20    pub components: Option<Vec<String>>,
21    pub toml_path: Utf8PathBuf,
22}
23
24#[derive(Clone, Debug, Serialize, Deserialize)]
25pub struct Rustc {
26    pub version: String,
27    pub commit_hash: String,
28    pub commit_date: String,
29    pub host: String,
30    pub release: String,
31    pub llvm_version: String,
32}