MCPcopy Create free account
hub / github.com/VSCodeConfigHelper/v4 / get_arch

Function get_arch

src-tauri/src/utils/sysctl.rs:30–38  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28pub use Arch::*;
29
30pub fn get_arch() -> Result<Arch> {
31 let ctlval = sysctl::Ctl::new("kern.version")?.value()?.to_string();
32 trace!("sysctl by name 'kern.version': {}", ctlval);
33 if ctlval.contains("ARM64") {
34 Ok(Aarch64)
35 } else {
36 Ok(X64)
37 }
38}

Callers 1

c_cpp_properties_jsonFunction · 0.85

Calls 1

to_stringMethod · 0.80

Tested by

no test coverage detected