Skip to content

Repository files navigation

Ignite

Ignite

Ultra-secure microVM sandboxing for JS/TS services, AI-generated code, and untrusted scripts.

Release License Build Rust

Overview

Ignite runs JavaScript/TypeScript code inside isolated, hardware-virtualized microVMs rather than containers. Execution currently requires a Linux host with KVM, using Firecracker as the hypervisor.

Status: pre-1.0. A macOS backend built on Apple's Virtualization.framework is planned but not implemented — the platform selector is stubbed and returns a clear error. Bun is the only runtime ignite setup provisions today.

It is designed for systems that execute code you do not fully trust:

  • AI agent generated code
  • Plugin or extension ecosystems
  • User submissions and sandboxed automation
  • Security-sensitive CI checks

Key Features

  • KVM-backed Firecracker: Each service runs in its own microVM with a separate guest kernel. (A macOS Virtualization.framework backend is planned; see Status above.)
  • Host-Reliant Disk Mounts: The guest microVM has no shell, utilities, or libraries. Service code and language runtimes (Bun, Node, Deno, QuickJS) are compiled on the host and attached as read-only virtual block devices (/dev/vdb and /dev/vdc).
  • VSOCK Multiplexing: Low-latency communication handshakes stream stdout/stderr and exit codes directly back to the host via virtual sockets, bypassing network interfaces.
  • Resource Enforcement: memoryMb and cpuLimit are applied to Firecracker machine config, while timeoutMs is enforced by a host-side watchdog that force-terminates timed-out VMs. cpuLimit is rounded up to whole vCPUs, which is the only granularity Firecracker accepts.
  • Preflight & Metric Timelines: Sub-millisecond logging of all VM lifecycle transitions (disk format, boot connect, execution, cleanup).

Quick Start

1) Prerequisites

  • Linux with KVM enabled (/dev/kvm accessible).
  • firecracker on your PATH.
  • e2fsprogs (provides mke2fs).
  • The musl target for the static guest agent: rustup target add x86_64-unknown-linux-musl.
  • An uncompressed ELF vmlinux. Distro /boot/vmlinuz-* files are compressed bzImages that Firecracker cannot boot; extract one with the kernel tree's scripts/extract-vmlinux, or use a prebuilt Firecracker kernel, then point IGNITE_KERNEL_PATH (or --kernel) at it.

Run ignite status to check KVM access and Firecracker availability.

2) Build from Source

git clone https://github.com/dev-dami/ignite.git
cd ignite
cargo build --release

Release binaries will be compiled under target/release/ignite-cli (installed as ignite).

3) Initialize a Service

ignite init hello-world
cd hello-world

4) Run the VM Sandbox

ignite run .

To run with trace timelines of startup transitions:

ignite run . --verbose

CLI at a Glance

Command Purpose
ignite init <name> Generate a new service scaffold
ignite run <path> Build + execute service in a microVM
ignite preflight <path> Run safety validator checks
ignite serve Start HTTP REST API server (listens on 9847 by default)

TypeScript SDK

A Bun-native client for the REST API lives in sdk/ts and targets the daemon's default port, so no configuration is needed on either side:

bun install                                # from the repository root
ignite serve --services ./examples &       # listens on 9847
import { IgniteClient } from '@ignite/sdk';

const client = new IgniteClient();
const result = await client.executeService('hello-bun', { input: { count: 2 } });
console.log(result.metrics?.stdout);

See sdk/ts/README.md for timeouts, cancellation, and error handling.

Runtime Support

Runtime Accepted versions Default Provisioned by ignite setup
Bun 1.0, 1.1, 1.2, 1.3 1.3 Yes
Node 18, 20, 22 20 No — install manually
Deno 1.40, 1.41, 1.42, 2.0 2.0 No — install manually
QuickJS 2024-01-13, 2023-12-09, latest latest No — install manually

Runtimes are read from ~/.ignite/runtimes/ (override with IGNITE_RUNTIMES_ROOT). A pinned spec such as bun@1.3 resolves to runtimes/bun@1.3/ and falls back to runtimes/bun/ with a warning. Runtime binaries must be statically linked or otherwise self-contained: the guest rootfs has no dynamic loader.

Only runtimes you install are available; ignite setup currently downloads Bun only.

Documentation

License

MIT (see LICENSE).

Releases

Packages

Contributors

Languages