Skip to content

Repository files navigation

🐜 Ant

An ant carries 50× its weight. So does this one.

Ant is a lightweight, high-performance JavaScript runtime built from scratch.
Built to carry more than it weighs without compromising performance.

$ ls -lh ant
-rwxr-xr-x⠀8.5M⠀ant*# built with -Os
-rwxr-xr-x⠀4.1M⠀ant*

Table of contents

Why Ant?

AntNodeBunDeno
Binary size~8 MB~120 MB~60 MB~90 MB
Cold start~5 ms~31 ms~13 ms~25 ms
EngineAnt SilverV8JSCV8
JIT
WinterTC conformantpartial

Ant is designed for environments where size and startup time matter: serverless functions, edge computing, embedded systems, CLI tools, and anywhere you'd want JavaScript but can't afford a 50MB+ runtime.

The engine, Ant Silver is hand-built, not a wrapper around V8, JSC, or SpiderMonkey. The JIT compiler uses a fork of MIR, a lightweight backend that enables near compiled performance.

Installation

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

Spec conformance

Ant targets the WinterTC Minimum Common API specification, the standard for server-side JavaScript interoperability developed by Ecma TC55.

SuitePass rateNotes
compat-table100%1511/1511 (ES1–ES5, ES6, ES2016+, ESNext)
test262~64%Improving; focus is on real-world coverage

Benchmarks

Cold start

Measures the time to import Hono, register routes, and exit. Each runtime loads the same bench-coldstart.js script from examples/npm/hono/ that creates a Hono app with two routes, prints "ready", and calls process.exit(0). No HTTP server is actually started, this isolates module resolution and initialization overhead.

Measured with hyperfine (10 warmup runs, 100 timed runs):

hyperfine --warmup 10 --runs 100 \
'ant examples/npm/hono/bench-coldstart.js' \
'node examples/npm/hono/bench-coldstart.js' \
'bun examples/npm/hono/bench-coldstart.js' \
'deno run --allow-read --allow-env examples/npm/hono/bench-coldstart.js'
RuntimeMeanMinMaxRelative
Ant5.5 ms4.9 ms6.1 ms1.00
Bun10.6 ms9.5 ms13.8 ms1.93× slower
Deno24.8 ms22.2 ms29.4 ms4.51× slower
Node28.7 ms27.1 ms31.2 ms5.22× slower
Environment
DetailValue
HardwareApple M5 Pro, 64 GB RAM, 18 cores
OSmacOS 26.5.1 (arm64)
Ant12.1.15dd25d.1
Node26.2.0
Bun1.3.14
Deno2.8.3

Building Ant

See BUILDING.md for instructions on how to build Ant from source and a list of supported platforms.

Security

For information on reporting security vulnerabilities in Ant, see SECURITY.md.

Community

Contributing to Ant

We welcome contributions through pull request. See CONTRIBUTING.md for more details.
For information about the governance of Ant, see GOVERNANCE.md.

About

javascript for 🐜's, a tiny runtime with big ambitions

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages