Skip to content

theMackabu/ant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

1,450 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

๐Ÿœ 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 while delivering near-V8 speeds.

$ ls -lh ant
-rwxr-xr-xโ €8.7Mโ €ant*

# built with -Os
-rwxr-xr-xโ €5.9Mโ €ant*

Table of contents

Why Ant?

Ant Node Bun Deno
Binary size ~9 MB ~120 MB ~60 MB ~90 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://ant.themackabu.com/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)
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'
Runtime Mean Min Max Relative
Ant 5.4 ms 5.0 ms 7.1 ms 1.00
Bun 12.8 ms 11.6 ms 16.4 ms 2.37ร— slower
Deno 24.8 ms 22.2 ms 29.4 ms 4.59ร— slower
Node 31.1 ms 27.1 ms 151.7 ms 5.76ร— slower
Environment
Detail Value
Hardware Apple M4 Pro, 24 GB RAM, 14 cores
OS macOS 15.7.5 (arm64)
Ant 0.11.0
Node 25.9.0
Bun 1.3.13
Deno 2.7.12

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

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Contributors