An implementation of a Node.js-like
process global on top of WASI. Requires a WASI-enabled host and opting into WASI in the entry file with
# Static members
const arch: string
String representing the CPU architecture for which the binary was compiled. Either
const platform: string
String representing the operating system platform for which the binary was compiled. Always
const argv: string
Array of command line arguments passed to the binary upon instantiation.
const env: Map<string,string>
Map of variables in the binary's user environment.
var exitCode: i32
Process exit code to use when the process exits gracefully. Defaults to
function exit(code?: i32): void
Terminates the process with either the given exit code, or
const stdin: ReadableStream const stdout: WritableStream const stderr: WritableStream
Streams connected to
function time(): i64
Obtains the system's current time of day, in milliseconds since Unix epoch.
function hrtime(): u64
Obtains the system's monotonic high resolution time, in nanoseconds since an arbitrary time in the past.