Toolchains & packages
A session ships six toolchains: node, bun, python, ruby, clang,
and tsc. Compile and run C without leaving the shell.
$ cat > hello.c <<'EOF'#include <stdio.h>int main(void) { printf("hello from clang on the edge\n"); return 0; }EOF$ clang hello.c -o hello.wasm && ./hello.wasmhello from clang on the edgenode and bun run on workerd’s nodejs_compat V8 with Nimbus shims for
fs, child_process, HTTP, and streams. They are not the upstream Node or
Bun binaries. python is CPython 3.13 cross-compiled to wasm32-wasi.
ruby is ruby.wasm 3.3. clang is LLVM 8 with a modern wasi-libc sysroot.
It compiles C in the session to wasm32-wasi-nimbus, including multi-file
builds, user headers, and fopen against session files. -pthread is
refused, because that sysroot ships no wasm32-wasip1-threads libc to link
against. Nimbus runs pthread programs correctly. To run one, build it
with a full wasi-sdk and the futex shim from
the design note,
then run the .wasm in a session.
tsc type-checks and compiles TypeScript with nothing installed. When no
node_modules/.bin from the working directory up has a tsc, tsc (and
tsrs) run tsrs 0.18.0, the experimental Rust port of TypeScript 7.1
(7.1.0-dev.20260929) built to WebAssembly. It checks and emits as tsc does,
including --build and incremental .tsbuildinfo, but has no --watch. A
project that installs typescript runs its own; a typescript 7 runs
tsrs instead, because its compiler is a native binary.
$ tsc --noEmitsrc/bad.ts(1,14): error TS2322: Type 'string' is not assignable to type 'number'.Package installers check the ABI:
npm install zod # ~6 s cold; warm installs 9–16× fasternpx cowsay hello # shebang dispatch + auto-install fallbackpip install flask # pure wheels from PyPI (alpha)gem install rack # pure gems from RubyGems (alpha)npm works against the live registry. Tarballs cache in R2 across sessions,
large dependency trees shard across peer DOs, and a 611-package app installs
in ~165 s cold. pip and gem are alpha. Pure packages work end to end, and
Flask and Rack apps run in preview tabs. Curated source artifacts also work.
wasm32-wasi has no dlopen, so a compiled Python package works only when it
is linked into the interpreter: numpy and MarkupSafe’s C speedups are, and
pip refuses other extension wheels with an ABI diagnostic. Runtimes are
packages too. Run python
before installing it and the shell prints the install hint.
The terminal below asks for a runtime that is not installed, installs it
with nimbus install, and opens the CPython REPL it just fetched. The
install pulls both interpreters (11 MiB, and 19 MiB with numpy) and the stdlib, ~34 MiB, from the content-addressed cache, usually
seconds, up to a minute cold.
Live sandbox — connecting…
Native artifacts do not work. Manylinux wheels, native gems, .node
addons, and ELF files fail before import with an exact ABI diagnostic.