Turtle logo

Turtle

a browser engine written from scratch in Zig
pre-alpha 0.01.4 · now downloadable

A web browser with a rendering engine written completely from scratch in Zig, paired with Google’s V8 for JavaScript. Two years of solo work — extremely lightweight, and about 2× faster than Chrome in early testing.

No Chromium, no WebKit, no Gecko. The HTML parser, CSS cascade, layout engine, and paint pipeline are all hand-written in Zig; only the JavaScript virtual machine is borrowed from Google’s V8. The result is a browser small enough to reason about end to end, and fast enough to beat the mainstream engines on the same hardware.

Download Turtle 0.01.4 How it’s built macOS 14+ · Apple Silicon
pre-alpha — expect bugs
100 / 100
Acid3 conformance test — a perfect score
~2×
faster than Google Chrome in early benchmarking
From scratch
parser, CSS, layout, paint — all hand-written in Zig
2 years
of solo engineering on the rendering engine

Download

Turtle 0.01.4, pre-alpha

It is early — an honest look at a from-scratch engine in progress, not a browser to switch to.

Download for macOS

Version 0.01.4 — pre-alpha

Expect bugs, missing features, and crashes. Plenty of the web will render imperfectly or not at all. This is an early look, not a daily driver.

Turtle-0.01.4-pre-alpha.dmg

  • macOS 14 (Sonoma) or laterEarlier versions of macOS are not supported.
  • Apple Silicon onlyAn arm64 build — M-series Macs. There is no Intel build.
  • Pre-alpha, version 0.01.4No auto-update, no installer — just a DMG you drag to Applications.
First launch: macOS will ask you to confirm

The DMG is ad-hoc signed — not signed with an Apple Developer ID and not notarized, because there is no paid Apple Developer certificate behind this project yet. So the first time you open it, macOS may say Turtle is damaged or from an unidentified developer. Nothing is wrong with the download; this is Gatekeeper doing its job. To get past it:

  1. Open Turtle-0.01.4-pre-alpha.dmg and drag Turtle into your Applications folder.
  2. In Applications, right-click (or Control-click) Turtle and choose Open — don’t just double-click it.
  3. Click Open in the dialog that appears.

You only need to do this once. After that, Turtle opens normally.

Found a bug? Tell me. At this stage every crash report and broken page is useful — a URL and what went wrong is plenty.

haojng@gmail.com

Conformance

It passes Acid3, and it renders the real web

Acid3 — 100/100

As of today, Turtle passes the Acid3 test with a perfect 100/100 — the same conformance bar the mainstream engines cleared, met by a from-scratch engine.

HTML5 test — 425/588

On html5test.co Turtle scores 425 out of 588, against its own implementations of the APIs the test probes. Plenty is still missing — WebRTC, service workers, MathML and most media codecs among it — and the score is climbing build by build.

Turtle running the Acid3 test at acid3.acidtests.org and showing a perfect 100/100 score, with the coloured animation rectangles rendered correctly and a status bar reading 'Loaded http://acid3.acidtests.org/ — 2265 ms, 481 px'
Turtle on acid3.acidtests.org — a clean 100/100, drawn entirely by its own engine. The status bar tells the rest of the story: the full page loaded and laid out in 2265 ms.
Turtle running the HTML5 test at html5test.co, showing a score of 425 out of 588 points, with the semantics section below scoring 3 out of 5 and a status bar reading 'Loaded https://html5test.co — 521 ms, 0 px'
The same engine on html5test.co425 of 588 points, every one of them scored by Turtle’s own code. The test names the browser as Chrome because Turtle sends a Chrome user-agent string so sites do not turn it away; the engine underneath is entirely its own.
Turtle rendering the real Hacker News homepage at news.ycombinator.com — the orange header bar, the numbered story list with points, authors, and comment counts, all laid out correctly, with a status bar reading 'Loaded https://news.ycombinator.com/ — 332 ms, 0 px'
A conformance test is one thing; the real web is another. This is the live news.ycombinator.com homepage — table-based markup as old as the web itself — laid out by Turtle’s own engine in 332 ms.
Turtle's Preferences window: a Home page field set to https://news.ycombinator.com/, an Appearance menu set to System, a Default zoom menu set to 100%, a Search engine menu set to DuckDuckGo, and a Privacy checkbox labelled 'Block ads and trackers', which is ticked
Preferences — a real AppKit window, not a web page pretending to be one. Appearance follows the system light/dark setting, zoom is full-page rather than text-only, and ad and tracker blocking is built in, filtering requests from EasyList rules before they leave the browser rather than hiding elements after they arrive.

What it is

An engine of its own

Turtle — previously called cwbrowser — is a desktop web browser built on a rendering engine I wrote from nothing over the last two years. Where Chrome ships Blink, Safari ships WebKit, and Firefox ships Gecko, Turtle ships an engine of its own: the tokenizer, DOM, CSS parser and cascade, the box-model layout pass, and the painting stage are all original code in Zig — a small, fast, memory-careful systems language.

The one piece it doesn’t reinvent is the JavaScript engine. Re-implementing a modern, JIT-compiling JS VM is a decade-scale project, so Turtle embeds Google’s V8 — the same engine inside Chrome and Node — and wires it to the from-scratch DOM. You get a real, standards-following browser where the parts that decide how the web looks are entirely hand-built.

How it’s built

Hand-written top to bottom — except the JS VM

Language

Zig for the whole rendering engine — manual memory management, no garbage collector, no hidden runtime.

HTML & DOM

A from-scratch tokenizer and tree builder producing a live DOM that the engine and V8 both operate on.

CSS

Original parser and cascade — selectors, specificity, inheritance, the box model — feeding the layout pass.

Layout & paint

Hand-written block/inline layout and a paint pipeline that renders pixel-for-pixel to match the Acid3 reference.

JavaScript

Google’s V8, embedded and bound to the DOM — the same VM that powers Chrome and Node.

Performance

Roughly 2× Chrome on the same machine in early tests; the whole engine is lightweight by design.

Why

Why build a browser from scratch?

The modern web runs on three rendering engines, all enormous, and all descended from code written more than twenty years ago. Turtle is a bet that a browser engine can be rebuilt today — smaller, faster, and understandable by one person — using a modern systems language and only borrowing the one component (the JS VM) that genuinely isn’t worth reinventing. Passing Acid3 at 100/100 is the first proof the approach holds up against real standards.