Ant JS Runtime: 8MB Binary, Custom Engine, 5ms Cold Start
Technical Analysis

Ant JS Runtime: 8MB Binary, Custom Engine, 5ms Cold Start

A deep dive into Ant — a new JavaScript runtime built from scratch with a hand-crafted C engine. No V8, no JSC, no SpiderMonkey. Just C, NaN-boxed values, and a MIR JIT backend.

July 17, 2026 15 min read

What Is Ant and Why Does It Matter?

On July 12, 2026, a Show HN post for Ant hit 252 points and 107 comments within 12 hours. The pitch: a JavaScript runtime with its own engine — not wrapping V8, JavaScriptCore, or SpiderMonkey — shipping as a single 8.6MB binary that cold-starts in 5 milliseconds. For context, Node 26 is 120MB. Bun is 60MB. Deno is 90MB.

Built by solo developer Mack (theMackabu), Ant started as an experiment in January 2026 — "building a JavaScript runtime in one month" — and has since grown to 1,759 commits on GitHub with 861 stars. The engine, called Ant Silver, is written primarily in C (74% of the codebase). It includes a custom bytecode compiler, a MIR-based JIT backend, NaN-boxed value representation, and a generational garbage collector.

What makes Ant genuinely interesting is not the benchmark numbers alone — it's the architectural bet that a purpose-built engine can compete with decades of V8 optimization by being smaller, simpler, and more focused on server-side workloads. This matters for serverless computing, edge deployments, embedded systems, and any context where binary size and cold start time are hard constraints.

The Ant Silver Engine: Architecture Deep Dive

Ant Silver is not a wrapper. It is a complete JavaScript engine implemented in C from scratch. Here is how it differs from the established engines:

According to the project's architecture documentation, Ant Silver is designed for "predictable performance at small scales" — favoring fast startup and modest memory usage over peak throughput on multi-hour server processes. This is a deliberate trade-off that makes sense for serverless and edge use cases.

Compatibility and Standard Compliance

Ant passes 100% of the compat-table suite — 1,511 out of 1,511 tests spanning ES1 through ESNext. It is also WinterTC conformant, meaning it meets the Ecma TC55 Minimum Common API specification for server-side JavaScript. The full test262 conformance is approximately 64%, which covers everyday JavaScript but may miss edge cases in advanced language features like Temporal or RegExp Unicode property escapes.

Binary Size and Cold Start Benchmarks

The numbers published by the Ant project compare importing Hono, registering two routes, and exiting — no HTTP server is started, isolating module resolution and initialization overhead:

Runtime Binary Size Cold Start Engine
Ant ~8.6 MB 5.4 ms Ant Silver (C, custom)
Bun 1.3 ~60 MB 12.8 ms JavaScriptCore (Apple)
Deno 2.8 ~90 MB 24.8 ms V8 (Google)
Node 26 ~120 MB 31.1 ms V8 (Google)

The cold start advantage is felt immediately when running scripts. Ant is 6x faster cold-starting than Node for this workload. The binary size difference is also dramatic — Ant at 8.6MB fits on a floppy disk (yes, literally), while Node at 120MB is 14x larger. For Docker images, CI pipelines, and serverless deployments, that size delta translates directly to faster pulls and lower storage costs.

However, the benchmark intentionally avoids measuring long-running process performance. On sustained workloads with hot JIT compilation, V8's deeply optimized pipeline will outperform Ant's lighter JIT. The numbers are most relevant for short-lived processes like serverless function invocations.

Installation and First Steps

Installing Ant is a one-liner — no package manager, no Homebrew tap, no npm install:

curl -fsSL https://antjs.org/install | bash

The script detects your OS (macOS or Linux on arm64/x86_64) and drops a single binary into place. Verify it worked:

$ ant --version
Ant 12.1.15dd25d.1

No native Windows support yet (WSL works), but macOS and Linux are fully supported.

Running JavaScript and TypeScript

Ant runs plain JavaScript and TypeScript with no configuration. Here is a simple HTTP server using the standard fetch-based model:

// server.js
const handler = (req) => {
  const url = new URL(req.url);
  const name = url.searchParams.get('name') || 'World';
  return new Response(`Hello, ${name}! — from Ant`);
};

export default {
  port: 3000,
  fetch: handler
};
$ ant server.js
Listening on http://localhost:3000

$ curl http://localhost:3000/?name=Felix
Hello, Felix! — from Ant

TypeScript works natively — no tsconfig.json, no bundler, no dist folder:

// server.ts
import { Hono } from 'hono';

const app = new Hono();

app.get('/', (c) => c.text('Hello from Ant with TypeScript!'));

export default app;
$ ant server.ts
Listening on http://localhost:3000

Ant handles module resolution, type stripping, and compilation transparently. The type stripping uses a custom fast path that saves approximately 900KB of binary size compared to using the full TypeScript compiler.

Package Management: 40x Faster Than npm

Ant installs packages through its own registry at ants.land, which speaks the npm protocol. Any package you publish there also works with npm, yarn, pnpm, and bun.

$ ant i hono
installed  hono@latest
1 package installed  [155ms]

155 milliseconds from zero to a working Hono installation. The same operation in npm takes approximately 6 seconds on the same machine. Ant claims up to 40x faster package installs, and for small-to-medium dependency trees, the difference is genuinely noticeable.

Publishing packages works similarly:

$ ant land login
$ ant land publish
published  @you/[email protected]

Building a REST API with Hono

Hono works out of the box with Ant. Here is a REST-style API with CORS, route params, and POST body parsing:

import { Hono } from 'hono';
import { cors } from 'hono/cors';

const app = new Hono();

app.use('*', cors());

const todos = [
  { id: 1, title: 'Try Ant', done: true },
  { id: 2, title: 'Write a tutorial', done: true },
  { id: 3, title: 'Deploy something', done: false },
];

app.get('/api/todos', (c) => c.json(todos));

app.get('/api/todos/:id', (c) => {
  const todo = todos.find(t => t.id === Number(c.req.param('id')));
  return todo
    ? c.json(todo)
    : c.json({ error: 'Not found' }, 404);
});

app.post('/api/todos', async (c) => {
  const body = await c.req.json();
  const newTodo = { id: todos.length + 1, ...body };
  todos.push(newTodo);
  return c.json(newTodo, 201);
});

export default app;
$ ant todos.ts
Listening on http://localhost:3000

No adapter layer, no configuration file — just write Hono code and run it. Ant's default fetch export model means any framework that uses the standard fetch-based server pattern works without modifications.

VM-Isolated Sandbox: A Unique Security Feature

Neither Node.js nor Bun ships a built-in sandbox for running untrusted code. Ant does — and it is hardware-isolated using KVM (Linux) or Hypervisor.framework (macOS):

import { Sandbox } from 'ant:sandbox';

const box = new Sandbox({
  mount: '.:/workspace',  // read-only mount by default
});

await box.run('untrusted.js');
await box.close();

Sandbox security properties include:

This is meaningful for serverless platforms, code evaluation tools, plugin systems, and any workload where third-party code runs alongside your own. It provides defense-in-depth beyond npm audit or permission prompts.

Comparison: Ant vs Node vs Bun vs Deno

The JavaScript runtime landscape in 2026 is more diverse than ever. Here is how the four runtimes compare across dimensions that matter for production decisions:

Feature Ant Node 26 Bun 1.3 Deno 2.8
Engine Ant Silver (custom C) V8 JavaScriptCore V8
Binary size ~8.6 MB ~120 MB ~60 MB ~90 MB
Cold start (Hono) ~5 ms ~31 ms ~13 ms ~25 ms
npm compatible Yes (partial N-API) Yes Yes Via npm specifier
TypeScript native Yes Experimental Yes Yes
Built-in sandbox VM-isolated No No Permissions model
test262 conformance ~64% ~99% ~98% ~99%
Debugger/Profiler No Yes Partial Yes
Windows support WSL only Native Native (beta) Native
License MIT MIT MIT MIT

Current Limitations and Maturity Assessment

Ant is an impressive technical achievement, but it is early-stage software. Here are the limitations to be aware of:

The limitations are characteristic of a solo-developed runtime that is 6 months old. They do not invalidate the project — but they should inform where and how you evaluate it.

Where Ant Shines: Use Cases

Based on the architecture and current state, Ant is best suited for:

For context on how the runtime landscape is evolving, see my analysis of the Bun Rust rewrite, which covers a different approach to runtime optimization — porting an existing engine from Zig to Rust for better memory safety rather than building a new engine from scratch.

How to Get Started

If you want to try Ant today:

  1. Install: curl -fsSL https://antjs.org/install | bash
  2. Create a file: echo 'console.log("hello from ant")' > test.js
  3. Run it: ant test.js
  4. Install a framework: ant i hono
  5. Build a server: use the Hono example above

The official site at antjs.org has documentation, and the GitHub repository has the source code, examples, and benchmark scripts. The author's blog at themackabu.dev documents the project's development from the initial one-month sprint to the current ecosystem vision.

FAQ

What is the Ant JavaScript runtime?
Ant is a lightweight JavaScript runtime built from scratch with its own engine called Ant Silver. Unlike Node.js (V8), Deno (V8), or Bun (JavaScriptCore), Ant uses a hand-written C engine with a custom bytecode compiler, MIR JIT backend, NaN-boxed values, and a generational GC. The entire runtime ships as a single ~8.6MB binary.
How small is Ant compared to Node, Bun, and Deno?
Ant's binary is approximately 8.6MB, compared to ~120MB for Node 26, ~60MB for Bun, and ~90MB for Deno 2.8. This makes Ant roughly 14x smaller than Node and 7x smaller than Bun.
Can Ant run existing npm packages?
Yes. Ant speaks the npm protocol and can install packages from its own ants.land registry or from npm. Frameworks like Hono, Elysia, and React work out of the box. Package installation is up to 40x faster than npm. However, complex native addons (N-API) have partial support.
Does Ant have a security sandbox?
Yes — Ant ships with a VM-isolated sandbox using KVM or Hypervisor.framework. Each sandbox is a lightweight VM with read-only filesystem mounts, no network access by default, and explicit port forwarding. This is a unique feature not available out of the box in Node.js or Bun.
What are Ant's current limitations?
Ant is early-stage software. Key limitations include: no Windows native build (WSL only), approximately 64% test262 conformance, no debugger or profiler yet, partial N-API support for native addons, and a small community (861 GitHub stars, one primary maintainer as of July 2026).
Who built Ant and is it open source?
Ant was built by Mack (theMackabu), a solo developer who initially created the runtime in one month. It is MIT-licensed open source with 1,759 commits and 4 contributors as of July 2026. The source code is available at github.com/theMackabu/ant.
Should I use Ant for production?
Ant is best suited for serverless functions, edge computing, side projects, and lightweight APIs where cold start time and binary size matter. For production applications with complex dependency trees, native modules, or mature tooling requirements, Node.js or Bun remain more reliable choices. Evaluate Ant in a staging environment before considering it for production workloads.

Need Expert Web Development?

The JavaScript runtime landscape is expanding faster than ever — from Ant's custom engine to the AI-assisted Bun Rust rewrite, the tools available for web development continue to diversify. Choosing the right runtime for your project requires understanding the trade-offs between performance, ecosystem maturity, and operational constraints.

I'm a full-stack web developer with 20+ years of experience building production applications. Whether you're evaluating Ant for a serverless project, migrating an existing codebase, or need advice on the modern JavaScript ecosystem, I'm happy to help. Reach out to me for a free initial consultation.

I also write in-depth technical articles on the tools and frameworks that matter — follow my articles for the latest in web development.

Contact

Let's discuss your project

Need a web developer who stays on top of the ecosystem? Tell me about your project — I'll provide honest advice and a preliminary estimate. Free of charge.