Expand description
A deliberately small, sandbox-safe process, and the node:process
module form of it.
Node’s process is mostly ambient authority; this exposes only the
members that are either inert (platform/version/timing) or supplied by
the host (env, cwd, argv). Everything that could escape a sandbox
(binding, dlopen, chdir, kill, setuid, real exit) is absent
or neutered, and env carries exactly the variables the host passes —
empty unless it passes some.
The module form is not a second implementation: the object it hands
back IS globalThis.process, so import process from 'node:process',
require('process') and the bare global are one object, as in Node.
Structs§
- Process
Options - What the host supplies to
install.
Constants§
- PROCESS_
MEMBERS - The names the module re-exports.
processitself is installed by the host; anything it does not set simply does not appear.
Functions§
- install
- Install
globalThis.process. Called once per realm (the values are realm-stable:envis the host’s resolved allow-list,cwdits sandbox root, and the monotonic clock anchors here). The runtime’s name and version come fromcrate::identity. - process_
object globalThis.process.