Platform
zune.platform
A library that provides information about the platform the runtime is running on, and some system information.
Properties
os
The operating system the runtime was built for.
os:
| "linux"
| "windows"
| "macos"
| "freebsd"
abi
The ABI that the runtime was built for.
abi:
| "none"
| "gnu"
| "gnuabin32"
| "gnuabi64"
| "gnueabi"
| "gnueabihf"
| "gnuf32"
| "gnusf"
| "gnux32"
| "code16"
| "eabi"
| "eabihf"
| "ilp32"
| "android"
| "androideabi"
| "musl"
| "muslabin32"
| "muslabi64"
| "musleabi"
| "musleabihf"
| "muslf32"
| "muslsf"
| "muslx32"
| "msvc"
| "itanium"
| "cygnus"
| "simulator"
| "macabi"
| "ohos"
| "ohoseabi"
cpu
The CPU architecture.
cpu: <<table> = {
arch:
| "aarch64"
| "x86_64"
| "riscv64"
| "powerpc64le",
endian: "big" | "little",
}table<table> = {
arch:
| "aarch64"
| "x86_64"
| "riscv64"
| "powerpc64le",
endian: "big" | "little",
}>
async
The async I/O backend that the runtime is currently using.
async: "io_uring" | "epoll" | "kqueue" | "iocp"
Functions
getFreeMemory
Gets the total amount of free memory available.
getFreeMemory(): number
Throws
- Platform Error
getTotalMemory
Gets the total amount of memory currently allocated by the runtime.
getTotalMemory(): number
Throws
- Platform Error
getPageSize
Gets the page size of the system.
getPageSize(): number
getKernelVersion
Gets the kernel version of the operating system.
getKernelVersion(): string
Throws
- Memory Error
- Platform Error
getHostName
Gets the hostname of the current machine.
getHostName(): string
Throws
- Memory Error
- Platform Error
Last updated on