The Execute Code, Execute Function and Execute Tool endpoints are all backed by a set of execution environments. Every time you run code, it runs inside exactly one of these environments.

Unless you’ve created a Custom Runtime, your code will run inside the default WASI environment. When you create a custom runtime, the flags on your account determine which environment the custom runtime is associated with.

WASI

The default execution environment is WASI, which is a server-side interface for WebAssembly. This environment is extremely performant but has some limitations, notably limited support for third-party dependencies.

microVM

When you run code in a Custom Runtime for Python or JavaScript, by default that code runs inside our microVM execution environment. This environment is more flexible than WASI but isn’t quite as fast.

V8 (beta)

For JavaScript specifically, we are devleloping a new execution environment based on V8. This environment offers the flexibility of our microVM environment but with better performance. If you’re interested in trying it out please get in touch.