This page is about the JavaScript interpreter
environment inside the Riza Code Interpreter API.
If you’re looking to call the API from Node,
head over to the API Client Libraries page.
Runtime
Within our default WASI environment we run StarlingMonkey compiled to WASM. This is a browser-based runtime that includes most standard browser builtins includingfetch, 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.
Resource limits
There are no limitations beyond the general limits that apply to all Riza interpreter runtime environments. See our roadmap for planned future improvements.Standard I/O
You can write tostdout 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
The filesystem is read-only in all environments.
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.
Accessing the network
Network access is blocked by default, so you need to allow traffic to
individual hosts using the
http request parameter. See the HTTP
reference for a full example.In the WASI environment
You can make HTTP requests usingfetch. Protocols other
than HTTP are not supported, and code can’t access the network directly.
In the microVM and V8 environments
You can access the network any way you like, but you’ll need to set the (unfortunately named in this context)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.