javascript for 🐜's, a tiny runtime with big ambitions https://antjs.org
  • C 76.6%
  • JavaScript 14.9%
  • Zig 4.7%
  • TypeScript 1.2%
  • Objective-C++ 0.7%
  • Other 1.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-12 01:57:01 -07:00
.agents regen x86 profdata 2026-09-13 10:39:20 -07:00
.github Update VOUCHED list 2026-10-09 17:29:57 +00:00
docs tier up cheap code, keep object slip, keep shapes stable (#136) 2026-10-12 01:43:46 -07:00
examples tier up cheap code, keep object slip, keep shapes stable (#136) 2026-10-12 01:43:46 -07:00
include tidy review nits in spread jit, env names, and rest keys 2026-10-12 01:48:30 -07:00
meson regen pgo + fix stale tests 2026-10-12 01:57:01 -07:00
packages update nix vendor hash 2026-10-12 01:50:17 -07:00
src tidy review nits in spread jit, env names, and rest keys 2026-10-12 01:48:30 -07:00
tests regen pgo + fix stale tests 2026-10-12 01:57:01 -07:00
tools fix arm64 bench 2026-09-15 21:29:37 -07:00
vendor errors: lazy stacks with compiled frames (#135) 2026-10-10 11:16:36 -07:00
.dockerignore Merge pull request #29 from theMackabu/sandbox 2026-05-24 21:51:04 -07:00
.gitattributes add node differential, score benchmark base (#84) 2026-08-29 23:22:59 -07:00
.gitignore derive max_stack from the opcode table (#103) 2026-09-11 15:07:01 -07:00
AGENTS.md update stale agent exec-plans 2026-09-10 15:53:13 -07:00
ARCHITECTURE.md rewrite symbol module (#120) 2026-10-04 14:46:15 -07:00
BUILDING.md precise interpreter roots, event-loop stack reserve, linear sweep, gc pacing (#118) 2026-09-22 18:57:51 -07:00
CODE_OF_CONDUCT.md add CODE_OF_CONDUCT.md with community standards and enforcement policy 2026-02-07 02:23:28 -08:00
CONTRIBUTING.md rename to src/jit 2026-09-08 10:16:30 -07:00
Dockerfile add docker container + build (#86) 2026-09-04 14:49:14 -07:00
flake.lock pin rust in nix flake 2026-08-15 02:19:26 -07:00
flake.nix pin rust in nix flake 2026-08-15 02:19:26 -07:00
GOVERNANCE.md add CODE_OF_CONDUCT.md with community standards and enforcement policy 2026-02-07 02:23:28 -08:00
LICENSE.txt add MIT License 2026-01-02 11:49:18 -08:00
maidfile.toml add 64-bit BigInt read and write methods 2026-09-09 16:25:45 -07:00
meson.build move timers to isolate (#128) 2026-10-07 00:07:46 -07:00
meson_options.txt fix handled async errors being reported as uncaught exceptions (#112) 2026-09-20 13:06:29 -07:00
package.json fix deploy script 2026-09-03 20:08:20 -07:00
README.md run test262 2026-09-13 12:59:34 -07:00
SECURITY.md add security policy and contributing guidelines 2026-02-07 02:19:28 -08:00
sources.json add revision for sandbox 2026-09-10 00:51:27 -07:00
tsconfig.json deduplicate snapshot generator 2026-08-25 00:41:23 -07:00

🐜 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.6M⠀ant*

# built with -Os
-rwxr-xr-x⠀4.5M⠀ant*

Table of contents

Why Ant?

Ant Node Bun Deno
Binary size 9 MB ~140 MB ~61 MB ~77 MB
Cold start ~4 ms ~30 ms ~10 ms ~18 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.

Ant Silver is an independent engine, not a wrapper around V8, JSC, or SpiderMonkey. The JIT compiler uses a fork of MIR, a lightweight backend that enables near-native 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 ~66% 35590/53578 at revision 2026-09-13

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 3.9 ms 2.1 ms 5.3 ms 1.00
Bun 8.8 ms 6.7 ms 10.7 ms 2.26× slower
Deno 18.6 ms 16.2 ms 20.8ms 4.74× slower
Node 29.4 ms 27.3 ms 32.6 ms 7.50× slower
Environment
Detail Value
Hardware Apple M5 Pro, 64 GB RAM, 18 cores
OS macOS 27.0 Golden Gate (26A5406e)
Ant 14.1.aa53d9d1.0
Node 26.5.1
Bun 1.4.0
Deno 2.9.5

Building Ant

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

Docker Images

Pull the published image for linux/amd64 or linux/arm64.

docker pull themackabu/ant:latest
docker run --rm themackabu/ant:latest --version
docker run --rm -v "$PWD:/app" themackabu/ant:latest index.js

You can also build the container from source:

docker build -t ant .
docker run --rm ant --version
docker run --rm -v "$PWD:/app" ant index.js

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.