MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / has_rust_up

Function has_rust_up

crates/cli/src/detect.rs:15–24  ·  view source on GitHub ↗

Check if `rustup` is installed (aka: Is in the `PATH`).

()

Source from the content-addressed store, hash-verified

13
14/// Check if `rustup` is installed (aka: Is in the `PATH`).
15pub(crate) fn has_rust_up() -> bool {
16 match std::env::consts::OS {
17 "linux" | "freebsd" | "netbsd" | "openbsd" | "solaris" | "macos" => find_executable("rustup").is_some(),
18 "windows" => find_executable("rustup.exe").is_some(),
19 unsupported_os => {
20 eprintln!("This OS may be unsupported for `rustup`: {unsupported_os}");
21 false
22 }
23 }
24}
25
26/// Check if `rustfmt` is installed (aka: Is in the `PATH`).
27pub(crate) fn has_rust_fmt() -> bool {

Callers 2

build_rustFunction · 0.85
rustfmtFunction · 0.85

Calls 1

find_executableFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…