Expand description
Wrappers to manipulate rustup
Examples
let rustup = Rustup::default().or_die();
// should only fail if rustup was moved/deleted after Rustup was constructed
assert!(rustup.is_available());
// If you're running these tests, surely you have a toolchain
assert!(rustup.toolchains().active().is_some());
assert!(rustup.toolchains().default().is_some());
assert!(rustup.toolchains().installed().len() > 0);
assert!(rustup.toolchains().get("nonexistant").is_none());
let active = rustup.toolchains().active().unwrap();
assert!(rustup.toolchains().get(active.as_str()).is_some());
assert!(active.targets().installed().len() > 0);
assert!(active.targets().all().len() > active.targets().installed().len());
active.cargo().arg("--version").status0().unwrap();
active.rustc().arg("--version").status0().unwrap();
Structs
Wrapper around a rustup
executable that existed at least at one point.
Result of rustup.toolchains()
A rustup
(and cargo
/rustc
) target
A rustup-installed rust toolchain
Result of toolchain.targets()