You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- WasmVM and Python are experimental surfaces in this repo
29
+
- all docs for WasmVM, Python, or other experimental runtime features must live under the `Experimental` section of the docs navigation, not the main getting-started/reference sections
27
30
- the WasmVM runtime requires a WASM binary at `wasmvm/target/wasm32-wasip1/release/multicall.wasm`
28
31
- build it locally: `cd wasmvm && make wasm` (requires Rust nightly + wasm32-wasip1 target + rust-src component + wasm-opt/binaryen)
29
32
- the Rust toolchain is pinned in `wasmvm/rust-toolchain.toml` — rustup will auto-install it
@@ -84,6 +87,7 @@ Follow the style in `packages/secure-exec/src/index.ts`.
84
87
85
88
## Documentation
86
89
90
+
- WasmVM and Python docs are experimental docs and must stay grouped under the `Experimental` section in `docs/docs.json`
87
91
- docs pages that must stay current with API changes:
88
92
-`docs/quickstart.mdx` — update when core setup flow changes
89
93
-`docs/api-reference.mdx` — update when any public export signature changes
<h3align="center">Secure Node.js Execution Without a Sandbox</h3>
4
6
5
-
A lightweight library for secure Node.js execution. No containers, no VMs — just npm-compatible sandboxing out of the box. Powered by the same tech as Cloudflare Workers.
7
+
<palign="center">
8
+
A lightweight library for secure Node.js execution.<br />
9
+
No containers, no VMs — just npm-compatible sandboxing out of the box.<br />
Give your AI agent the ability to write and run code safely.
52
62
53
63
-**No infrastructure required** — No Docker daemon, no hypervisor, no orchestrator. Runs anywhere Node.js, Bun, or an HTML5 browser runs. Deploy to Lambda, a VPS, or a static site — your existing deployment works.
54
-
-**Node.js & npm compatibility** — fs, child_process, http, dns, process, os — bridged to real host capabilities, not stubbed. Run Express, Hono, Next.js, and any npm package. [Compatibility matrix →](https://secure-exec.dev/docs/node-compatability)
64
+
-**Node.js & npm compatibility** — fs, child_process, http, dns, process, os — bridged to real host capabilities, not stubbed. Run Express, Hono, Next.js, and any npm package. [Compatibility matrix →](https://secureexec.dev/docs/node-compatability)
55
65
-**Built for AI agents** — Give your AI agent the ability to write and run code safely. Works with the Vercel AI SDK, LangChain, and any tool-use framework.
56
66
-**Deny-by-default permissions** — Filesystem, network, child processes, and env vars are all blocked unless explicitly allowed. Permissions are composable functions — grant read but not write, allow fetch but block spawn.
57
67
-**Configurable resource limits** — CPU time budgets and memory caps. Runaway code is terminated deterministically with exit code 124 — no OOM crashes, no infinite loops, no host exhaustion.
@@ -69,7 +79,19 @@ V8 isolates vs. sandboxes.
69
79
| p95 | 17.9 ms | 950 ms |
70
80
| p99 | 17.9 ms | 3,150 ms |
71
81
72
-
**What's measured:** Time from requesting an execution to first code running. Secure Exec spins up a V8 isolate inside the host process — no container, no VM, no network hop. Sandbox baseline: [e2b](https://www.computesdk.com/benchmarks/), the fastest provider on ComputeSDK as of March 18, 2026. Secure Exec numbers: median of 10,000 runs (100 iterations × 100 samples) on Intel i7-12700KF.
82
+
<details>
83
+
<summary>Methodology</summary>
84
+
85
+
**What's measured:** Time from requesting an execution to first code running.
86
+
87
+
**Why the gap:** Secure Exec spins up a V8 isolate inside the host process. No container, no VM, no network hop. Sandboxes must boot an entire container or microVM, allocate memory, and establish a network connection before code can run.
88
+
89
+
**Sandbox baseline:**[e2b](https://www.computesdk.com/benchmarks/), the fastest provider on ComputeSDK as of March 18, 2026.
90
+
91
+
**Secure Exec:** Median of 10,000 runs (100 iterations × 100 samples) on Intel i7-12700KF.
**75x smaller.** V8 isolates share the host process and its V8 engine. Each additional execution only adds its own heap and stack. On a 1 GB server, you can run ~210 concurrent Secure Exec executions vs. ~4 sandboxes.
103
+
<details>
104
+
<summary>Methodology</summary>
105
+
106
+
**What's measured:** Memory footprint added per concurrent execution.
107
+
108
+
**Why the gap:** V8 isolates share the host process and its V8 engine. Each additional execution only adds its own heap and stack (~3.4 MB). Sandboxes allocate a dedicated container with a minimum memory reservation, even if the code inside uses far less.
109
+
110
+
**What this means:** On a 1 GB server, you can run ~210 concurrent Secure Exec executions vs. ~4 sandboxes.
111
+
112
+
**Sandbox baseline:** 256 MB, the smallest minimum among popular providers (Modal, Cloudflare Containers) as of March 18, 2026.
113
+
114
+
**Secure Exec:** 3.4 MB, the converged average per execution under sustained load.
Each execution uses ~3.4 MB instead of a 256 MB container minimum, and you run on your own hardware. Sandbox baseline: Cloudflare Containers, billed at $0.0000025/GiB·s with 256 MB minimum.
128
+
<details>
129
+
<summary>Methodology</summary>
130
+
131
+
**What's measured:**`server price per second ÷ concurrent executions per server`
132
+
133
+
**Why it's cheaper:** Each execution uses ~3.4 MB instead of a 256 MB container minimum. And you run on your own hardware, which is significantly cheaper than per-second sandbox billing.
134
+
135
+
**Sandbox baseline:** Cloudflare Containers, the cheapest sandbox provider benchmarked. Billed at $0.0000025/GiB·s with a 256 MB minimum (March 18, 2026).
136
+
137
+
**Secure Exec:** 3.4 MB baseline per execution, assuming 70% utilization.
Secure Exec runs untrusted code inside [V8 isolates](https://v8.dev/docs/embed) — the same isolation primitive that powers every Chromium tab and Cloudflare Workers. Each execution gets its own heap, its own globals, and a deny-by-default permission boundary. There is no container, no VM, and no Docker daemon — just fast, lightweight isolation using battle-tested web technology. [Architecture →](https://secure-exec.dev/docs/sdk-overview)
162
+
Secure Exec runs untrusted code inside [V8 isolates](https://v8.dev/docs/embed) — the same isolation primitive that powers every Chromium tab and Cloudflare Workers. Each execution gets its own heap, its own globals, and a deny-by-default permission boundary. There is no container, no VM, and no Docker daemon — just fast, lightweight isolation using battle-tested web technology. [Architecture →](https://secureexec.dev/docs/sdk-overview)
122
163
</details>
123
164
124
165
<details>
@@ -136,7 +177,7 @@ We are actively validating serverless platforms, but Secure Exec should work eve
136
177
<details>
137
178
<summary>When should I use a sandbox vs. Secure Exec?</summary>
138
179
139
-
Use **Secure Exec** when you need fast, lightweight code execution — AI tool calls, code evaluation, user-submitted scripts — without provisioning infrastructure. Use a **sandbox** (e2b, Modal, Daytona) when you need a full operating-system environment with persistent disk, root access, or GPU passthrough. [Full comparison →](https://secure-exec.dev/docs/sandbox-vs-secure-exec)
180
+
Use **Secure Exec** when you need fast, lightweight code execution — AI tool calls, code evaluation, user-submitted scripts — without provisioning infrastructure. Use a **sandbox** (e2b, Modal, Daytona) when you need a full operating-system environment with persistent disk, root access, or GPU passthrough. [Full comparison →](https://secureexec.dev/docs/comparison/sandbox)
140
181
</details>
141
182
142
183
<details>
@@ -170,7 +211,7 @@ Yes. For orchestrating stateful, long-running processes efficiently, we recommen
170
211
<details>
171
212
<summary>Does this have Node.js compatibility?</summary>
172
213
173
-
Yes. Most Node.js core modules work — including fs, child_process, http, dns, process, and os. These are bridged to real host capabilities, not stubbed. [Compatibility matrix →](https://secure-exec.dev/docs/node-compatability)
214
+
Yes. Most Node.js core modules work — including fs, child_process, http, dns, process, and os. These are bridged to real host capabilities, not stubbed. [Compatibility matrix →](https://secureexec.dev/docs/node-compatability)
174
215
</details>
175
216
176
217
<details>
@@ -187,7 +228,7 @@ WASM-based runtimes like [QuickJS](https://bellard.org/quickjs/) (via quickjs-em
0 commit comments