Execute JavaScript or TypeScript in a secure and isolated runtime environment
fetch
, JSON.parse
and JSON.stringify
. TypeScript transpilation is handled automatically using
swc.
In our microVM
environment we run Node.js 22.13.0.
To add additional packages from npm, you’ll need to build a custom runtime. See
Adding Packages for more information.
stdout
and stderr
with the typical console
functions. Directly
writing to process.stdout
or process.stderr
will not work within the default WASI
environment, but does work within our microVM environment.
process.stdin
, process.argv
and process.env
to get input data.
Note that process.stdin
is just a string in our WASI environment, not a stream as it
is in our microVM and V8 environments.
process.argv
has two system arguments in the
array before user-supplied arguments, rather than one.
files
parameter in the WASI and V8
environments. This feature is not yet available in the microVM environment.
See the Files reference for more details.
http
request parameter. See the HTTP
reference for a full example.fetch
. Protocols other
than HTTP are not supported, and code can’t access the network directly.
http
request parameter appropriately to allow traffic to specific
hosts.
However, note that host-specific network controls are not yet supported in the microVM
environment. You can only allow all network traffic.