Return the arguments that were passed to program itself. Strips off the initial program from the unprocessed command line. i.e. If a program started as:
> node myprogram.js --flag bla
The arguments
list will be ["--flag","bla"]
.
The unprocessed command line that was used to start this program.
On ‘'Node’' the first arguments will often be of the form ["node","interactive.js",...]
.
The backend compiler name, like gcc
, clang
, cl
, clang-cl
, mingw
, or icc
(and js
for JavaScript).
The current compiler version.
Return the processor maximum address size in bits (8(*)std/core/int/(*): (int, int) -> intsizeof(vaddr_t)
). This is usually
equal to the get-cpu-pointer-bitsstd/os/env/get-cpu-pointer-bits: () -> ndet int
but may be smaller on capability architectures like ARM CHERI.
Return the main processor architecture: x64, x86, arm64, arm32, riscv32, riscv64, alpha64, ppc64, etc.
Return the size of boxed values in the heap (8(*)std/core/int/(*): (int, int) -> intsizeof(kk_box_t)
). This is usually
equal to 8(*)std/core/int/(*): (int, int) -> intsizeof(void*)
but can be less if compressed pointers are used (when
compiled with --target=c64c
for example).
Return the available CPU's. This is the logical core count including hyper-threaded cores.
Return the processor natural integer register size in bits.
Note: Usually this equals the get-cpu-size-bitsstd/os/env/get-cpu-size-bits: () -> ndet int
and get-cpu-pointer-bitsstd/os/env/get-cpu-pointer-bits: () -> ndet int
on modern cpu's
but they can differ on segmented architectures.
For example, on the old x86 FAR-NEAR model, the addresses are 32-bit but the integer register size is 16-bit.
Or on the more recent-x32 ABI
the addresses and object sizes are 32-bits but the architecture has 64-bit integer registers.
Is the byte-order little-endian? If not, it is big-endian; other byte orders are not supported.
Return the processor maximum pointer size in bits (8(*)std/core/int/(*): (int, int) -> intsizeof(void*)
). This is usually
equal to the get-cpu-address-bitsstd/os/env/get-cpu-address-bits: () -> ndet int
but may be larger on capability architectures like ARM CHERI.
Return the processor maximum object size in bits (8(*)std/core/int/(*): (int, int) -> intsizeof(size_t)
). This is usually
equal to the get-cpu-int-bitsstd/os/env/get-cpu-int-bits: () -> ndet int
but may be different on segmented architectures.
Get the environment variables for this program.
Returns the value of an environment variable name
(or Nothingstd/core/types/Nothing: forall<a> maybe<a>
if not present).
Return the main OS name: windows, linux, macos, unix, posix, ios, tvos, watchos, unknown. Sometimes has a dash subsystem, like: unix-<freebsd,openbsd,dragonfly,bsd>, and windows-mingw.
Access to the program environment and command line arguments.
Print the environment:
get-envstd/os/env/get-env: () -> ndet env().map(fn(p) { p.fst + "=" + p.snd }).join("\n").print
.