Skip to main content

quickjs_jit_stdlib/llrt/llrt_utils/
sysinfo.rs

1// Vendored from LLRT d9fd873e793c (libs/llrt_utils/src/sysinfo.rs); module paths and
2// feature names adapted by scripts/import-stdlib.py.
3#[cfg(target_os = "macos")]
4pub const PLATFORM: &str = "darwin";
5#[cfg(target_os = "windows")]
6pub const PLATFORM: &str = "win32";
7#[cfg(not(any(target_os = "macos", target_os = "windows")))]
8pub const PLATFORM: &str = std::env::consts::OS;
9
10#[cfg(any(target_arch = "x86_64", target_arch = "x86"))]
11pub const ARCH: &str = "x64";
12#[cfg(target_arch = "aarch64")]
13pub const ARCH: &str = "arm64";
14#[cfg(not(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64")))]
15pub const ARCH: &str = std::env::consts::ARCH;