Back to directory
theMackabu avatar

ant

javascript for 🐜's, a tiny runtime with big ambitions. Read more below about its uses, features, and usage.

Clone repository

git clone https://github.com/theMackabu/ant.git

1,217

Stars

31

Forks

2

Watchers

MIT

License

🐜 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.7Mβ €ant*

# built with -Os
-rwxr-xr-xβ €4.4Mβ €ant*

Table of contents

Why Ant?

Ant Node Bun Deno
Binary size ~9 MB ~140 MB ~61 MB ~77 MB
Cold start ~5 ms ~31 ms ~13 ms ~25 ms
Engine Ant Silver V8 JSC V8
JIT βœ“ βœ“ βœ“ βœ“
WinterTC conformant βœ“ partial βœ“ βœ“

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.

Suite Pass rate Notes
compat-table 100% 1511/1511 (ES1–ES5, ES6, ES2016+, ESNext)
Temporal 100% 4603/4603 at revision 2026-08-10
test262 ~65% 34758/53578 at revision 2026-08-10

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'
Runtime Mean Min Max Relative
Ant 5.5 ms 4.9 ms 6.1 ms 1.00
Bun 10.6 ms 9.5 ms 13.8 ms 1.93Γ— slower
Deno 24.8 ms 22.2 ms 29.4 ms 4.51Γ— slower
Node 28.7 ms 27.1 ms 31.2 ms 5.22Γ— slower
Environment
Detail Value
Hardware Apple M5 Pro, 64 GB RAM, 18 cores
OS macOS 26.5.1 (arm64)
Ant 12.1.15dd25d.1
Node 26.2.0
Bun 1.3.14
Deno 2.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.

Releases

Changes This release ships a complete Temporal implementation that passes 100% of the test262 Temporal suite, the new ant compile command for packing applications into standalone executables, inline C...

Changes A major release focused on sandboxes, Node compatibility, JavaScript correctness, runtime isolation, and Silver performance. This release makes Ant sandboxes message-driven and resource-aware....

Ant 12.2.1d8040ee.1 (Revised) A portability hotfix for Ant 12.2. You might have to use the install link if your previous install is broken.

Fixed macOS release binaries failing to start on machines w...

Ant 12.2.8f8451f4.0 Package installs and dependency resolution are more deterministic

Added platform-aware package filtering using npm-compatible operating-system, CPU, and Linux libc/ABI names. Upgr...

Ant 12.1.094641eb.1 A large package-management, REPL, installer, and runtime compatibility release. This release moves Ant onto the new hash-based version format, brings the package manager through a...

Contributors