Skip to main content

Languages

Exec mode does not compile source code and does not use compilation plugins. What it runs depends on how you invoke it.

WebAssembly Binaries

wasmrun exec runs pre-built .wasm files through the built-in interpreter with WASI support. Any language that compiles to WASI-targeting WebAssembly works:

LanguageTypical toolchainCompile with
Rustwasm32-wasip1 targetwasmrust plugin or cargo build
GoTinyGowasmgo plugin or tinygo build
C/C++Emscripten / wasi-sdkC/C++ guide or clang --target=wasm32-wasi
AssemblyScriptascwasmasc plugin

The plugin-based compile step belongs to Server Mode; use wasmrun compile (or your own toolchain) to produce the .wasm, then run it:

wasmrun compile ./my-rust-project
wasmrun exec ./dist/output.wasm

Source Execution (Agent API)

The Agent API extends exec mode with direct source execution. Language runtimes are not compiled locally; they are WASM modules fetched from wasmhub and executed inside the same sandboxed interpreter:

LanguageAliasesRuntime
JavaScriptjs, nodejswasmhub nodejs runtime (CommonJS require(), Node built-ins, web globals)
TypeScriptts, tsxTranspiled in-sandbox by the wasmhub swc module, then run on the nodejs runtime

See JavaScript runtime capabilities for the supported built-ins and limits. Unsupported languages (for example python) return HTTP 400; more runtimes will arrive as they land on wasmhub.

What Goes Where