E2B Firecracker Cloud Sandboxes: 150ms Cold-Start MicroVMs for Heavy Compute
Seamlessly offload tasks exceeding in-browser Wasm limits (native C/C++, Docker, headless browsers).
While WebContainers handle 90% of web development workloads client-side, certain tasks—such as executing compiled native binaries, running headless Chromium for end-to-end tests, or processing heavy machine learning models—require native Linux kernel capabilities. Unchained Code dynamically offloads these workloads to E2B Firecracker microVMs.
Unchained Code connects transparently to E2B Cloud Sandboxes. Spinning up in ~150ms, these hardware-isolated Firecracker microVMs execute arbitrary terminal commands, native Python/C++ scripts, and headless browser tests, streaming output back to your local IDE in real time.
Step-by-Step Walkthrough & User Guide
Heavy Workload Auto-Detection
The builder identifies tasks requiring native kernel access (e.g., Puppeteer, PyTorch, Docker).
150ms MicroVM Initialization
An isolated E2B Firecracker sandbox is allocated on-demand with dedicated CPU/RAM resources.
Bidirectional File Syncing
Your WebContainer file tree is synchronized with the sandbox over a secure WebSocket tunnel.
Command Execution & Output Streaming
Terminal output, logs, and artifacts stream back into your browser terminal at near zero latency.
💡Pro Tips & Engineering Best Practices
- •MicroVMs terminate automatically after inactivity to prevent unnecessary compute costs.
- •Supports running full Python data science scripts with NumPy, Pandas, and Matplotlib.
- •Completely isolated at the hardware KVM hypervisor level for absolute security.
Code & Technical Integration
import { Sandbox } from '@e2b/code-interpreter';
// Spin up Firecracker microVM in ~150ms
export async function runHeavyTask(code: string) {
const sandbox = await Sandbox.create();
const execution = await sandbox.runCode(code);
await sandbox.kill();
return execution.logs;
}