Ant: A Lightweight JavaScript Runtime with the Silver Engine and 4 ms StartupArticle · digest for October 13
Engineering blueprint of the lightweight turbine microkernel for the Ant JavaScript runtime next to a 3.9-millisecond startup speedometer on a high-contrast graphite background.
Article4 sections≈ 5 min

Ant: A Lightweight JavaScript Runtime with the Silver Engine and 4 ms Startup

Server-side JavaScript has long been an oligopoly of engines. Almost every runtime used in production runs on either Google's V8 (Node.js, Deno, Cloudflare workerd) or Apple's JavaScriptCore (Bun). These engines have matured over decades and offer powerful JIT optimizations and battle-tested garbage collectors. Yet that power comes with heavy binaries: Node.js is around 140 MB, Bun is over 61 MB, and Deno crosses 77 MB.

For containerized microservices, CLI tools, or serverless and edge functions, that overhead gets in the way. If a function needs to run for 5 milliseconds and exit, spending tens of megabytes of RAM and dozens of milliseconds just to initialize V8 is wasteful. Developer theMackabu has introduced Ant, an independent server-side runtime for JavaScript and TypeScript with its own Ant Silver engine, built for minimal size and instant cold starts.

Ant Silver Architecture and MIR Compilation

The main technical story behind Ant is its break from established giants. Ant Silver is written from scratch with its own parser, AST interpreter, and compact garbage collector. Unlike lightweight embeddable engines such as QuickJS, which traditionally rely on pure bytecode interpretation, Ant was designed from the start for near-native performance using a JIT compiler.

Instead of pulling in heavyweight LLVM infrastructure, which would add tens of megabytes to the binary and slow down startup, the author used a fork of the MIR (Medium Internal Representation) backend created by Vladimir Makarov. MIR acts as a lightweight intermediate layer for JIT machine-code generation. It quickly translates Ant's internal bytecode into native CPU instructions with minimal register-analysis overhead.

As a result, the base Ant executable is just 8.6 MB, and compiling with the -Os size-optimization flag shrinks it to a record 4.5 MB. That puts it in the same weight class as small Go CLI tools or specialized utilities like the headless browser Lightpanda 1.0, which was also engineered for millisecond cold starts.

Cold Starts and Standards Compliance

Cold-start benchmarks tested a classic microservice scenario: spawning a process, initializing a Hono router with two endpoints, and exiting immediately without binding a socket. Ant averaged 3.9 ms (ranging from 2.1 to 5.3 ms). Bun on JavaScriptCore took 8.8 ms (2.26x slower), Deno needed 18.6 ms, and standard Node.js took 29.4 ms (7.5x longer).

Building a new engine always carries the risk of language fragmentation and spec incompatibility. Ant's creators chose to verify the runtime against official test suites:

  • compat-table: 100% pass rate (1,511 of 1,511 checks covering ES5 through ESNext);
  • Temporal specification: 100% pass rate (all 4,603 tests from the August 2026 revision);
  • test262 suite: around 66% pass rate (35,590 passing tests out of 53,578);
  • WinterTC (Ecma TC55 Minimum Common API): support for standard global interfaces including fetch, Request, Response, URL, and ReadableStream.

Ant also supports TypeScript out of the box. It strips types during lexical analysis, so you don't need to run tsc or external bundlers.

Practical Example: From Microservice to Benchmarking

Here is how a lightweight API service looks in Ant. The first snippet sets up an isolated Hono router:

import { Hono } from 'hono';

const app = new Hono();

// Register lightweight endpoints without V8 overhead
app.get('/api/health', (c) => c.json({ status: 'ok', engine: 'Ant Silver' }));
app.get('/api/users/:id', (c) => {
  const userId = c.req.param('id');
  return c.text(`User ID: ${userId}`);
});

console.log('Hono routes initialized in Ant Silver');
process.exit(0);

Next, you can measure cold-start latency and compare Ant against Bun and Node.js using the Hyperfine CLI benchmark:

# 1. Run the isolated script in Ant
ant bench-coldstart.js

# 2. Compare runtime initialization latency across 100 runs
hyperfine --warmup 10 --runs 100 \
  'ant bench-coldstart.js' \
  'bun bench-coldstart.js' \
  'node bench-coldstart.js'

Trade-Offs and Engineering Verdict

Despite its impressive 3.9 ms startup and 4.5 MB footprint, Ant isn't ready to replace Node.js across general production workloads. A 66% pass rate on test262 means obscure syntax edge cases or subtle prototype behaviors can still trigger unexpected failures. Ant also lacks support for native C++ add-ons (Node-API / NAN), so packages with binary bindings won't work.

Still, as a specialized tool, Ant looks very promising. It fits TypeScript CLI utilities, embedded IoT automation scripts, and edge functions where every millisecond of cold start and every megabyte of RAM counts. Ant Silver is worth watching closely, as independent engine competition always makes the ecosystem stronger.

Want a deep diveVotes help us choose what to break down in detail. This material has 0 votes.
Sources · 3