Module process
Process information, command-line arguments, environment variables, and platform detection.
Functions
Get raw command-line arguments as a slice of C strings. The first element is the program name.
Returns: [*(u8)]
Get the number of command-line arguments (including program name).
Returns: i32
Get the raw argv pointer (*(*(u8))).
Returns: *(*(u8))
Exit the process with the given status code.
Parameters
| Name | Type | Notes |
|---|---|---|
code | usize |
Returns: unit
Constants
Current target platform as a compile-time string. One of: "linux", "macos", "windows", "freebsd", "emscripten", "wasi".
Value: "linux"
Platform constants for compile-time platform comparisons.
Value: _(Linux: "linux", Macos: "macos", Windows: "windows", FreeBSD: "freebsd", Emscripten: "emscripten", Wasi: "wasi")
Current target architecture as a compile-time string. One of: "x86_64", "aarch64", "x86", "arm", "wasm32".
Value: "x86_64"
Architecture constants for compile-time architecture comparisons.
Value: _(X86_64: "x86_64", Aarch64: "aarch64", X86: "x86", Arm: "arm", Wasm32: "wasm32")
Environment variable access and manipulation.
Value: env(get: <fn get>, set: <fn set>)