# process
An implementation of a Node.js-like process
global.
# Static members
const arch: string
String representing the CPU architecture for which the binary was compiled. Either
wasm32
orwasm64
.const platform: string
String representing the operating system platform for which the binary was compiled. Always
wasm
.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
0
.function exit(code?: i32): void
Terminates the process with either the given exit code, or
process.exitCode
if omitted.const stdin: ReadableStream const stdout: WritableStream const stderr: WritableStream
Streams connected to
stdin
(fd0
),stdout
(fd1
) andstderr
(fd2
) respectively.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.