Skip to content
Projets

À propos

Du JavaScript pour les 🐜, un runtime minuscule aux grandes ambitions

Langages et environnements d’exécution

Comment ces chiffres sont mesurés

Progression mesurée des étoiles

in 24h
0
in 7 days
+4
in 15 days
+4
in 1 month
+20

Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.

README.md

Original

🐜 Ant

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

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

import { statSync } from "fs";

const { size } = statSync(process.execPath);
console.log(`${(size / 2 ** 20).toFixed(2)} MB`);
$ ant size.js
10.44 MB

Table of contents

Why Ant?

Ant Node Bun Deno
Binary size ~10 MB ~140 MB ~61 MB ~77 MB
Cold start ~5 ms ~45 ms ~10 ms ~17 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% 1509/1509 (ES1–ES5, ES6, ES2016+, ESNext)
Temporal 100% 4603/4603 at revision 2026-08-10
test262 ~91.5% 49033/53578 run on 2026-11-30

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 Memory Relative
Ant 4.6 ms 4.1 ms 5.5 ms 6.8 MiB 1.0
Bun 10.2 ms 8.1 ms 17.9 ms 18.1 MiB 2.2× slower
Deno 17.4 ms 15.4 ms 31.2 ms 31.2 MiB 3.8× slower
Node 44.5 ms 42.7 ms 48.0 ms 47.6 MiB 9.7× slower
Environment
Detail Value
Hardware Apple M5 Pro, 64 GB RAM, 18 cores
OS macOS 27.0.1 Golden Gate (26A434)
Ant 17.1.b9523ae1.0
Node 26.13.0
Bun 1.4.3
Deno 2.9.6

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

latest is a static musl build and can't load native addons. Use latest-glibc if you need them.

Both images run as nonroot (uid 65532). To write into a mounted directory, pass --user "$(id -u):$(id -g)".

You can also build the container from source:

docker build -f Dockerfile.musl -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.

Explorer des projets similaires

Chargement…