System & I/O8 exports
Raw Markdown/os
Host operating system, CPU architecture, hostname, and environment introspection.
Functions & symbols#
arch#
function
Returns the CPU architecture (e.g. "x86_64", "aarch64").
Returns:
Any(let target-arch (os/arch))cpu-count#
function
Returns the number of logical CPU cores available to the current process.
Returns:
Any(let concurrency (os/cpu-count))family#
function
Returns the operating system family (e.g. "unix", "windows").
Returns:
Any(if (= (os/family) "unix") (writeln "POSIX compliant"))home-dir#
function
Returns the current user's home directory path, or () if not found.
Returns:
Any(let home (os/home-dir))host-name#
function
Returns the network hostname of the host system.
Returns:
Any(let host (os/host-name))os-name#
function
Returns the operating system name (e.g. "linux", "macos", "windows").
Returns:
Any(let os (os/os-name))temp-dir#
function
Returns the default directory path for temporary files.
Returns:
Any(let tmp (os/temp-dir))uptime#
function
Returns system uptime in seconds as a floating-point number.
Returns:
Any(let secs (os/uptime))