ArkType 3.0 Adds a Build-Step Compiler and Doubles the Dynamic Bundle to 98.1 kB
Software / news
ArkType 3.0 Adds a Build-Step Compiler and Doubles the Dynamic Bundle to 98.1 kB
The maintainer's benchmarks claim a median 15x speedup over Zod 4, with ajv still faster on 8 of 15 error-reporting rows.
ArkType 3.0, the TypeScript validation library, ships a build-time compiler called @ark/aot that turns each Type into a standalone validator, and in doing so grows the dynamic, no-plugin build from 47.8 kB gzipped in version 2.2.9 to 98.1 kB. Both figures are in the 3.0 announcement, published December 3, 2026 and apparently by the maintainer, whose @ssalbdivad handle is linked from its footer.
The npm registry shows 3.0.0 published on December 2 at 21:31 UTC, then 3.0.1 about two hours later and 3.0.2 on December 3. The package is MIT-licensed.
What the plugin does
@ark/aot supports Vite, Rollup, webpack, esbuild, Bun and others. Each Type becomes a validator that imports only arktype/runtime. Unions are switched on a discriminating key, redundant checks are dropped, and a contradictory definition fails the build instead of at runtime.
Definitions stay the same. type() still parses at runtime where the plugin is absent, and a "runtime island" keeps chosen definitions dynamic. The command npx arktype check lists definitions the build would refuse.
The same release adds codec and .encode, which pair a morph with its inverse, plus fromJsonSchema for reading Zod or JSON Schemas into Types so .extends() can compare them. number now rejects Infinity.
The benchmarks are the maintainer's
On Hacker News, the maintainer wrote that the output is "15x faster to validate, 21x smaller and 63x quicker to start than Zod 4", in the library's internal tests. The announcement gives the basis: precompiled ArkType was faster than Zod 4 in all 32 scenarios of its own benchmark, by a median of 15 times, and by a median of 5.3 times against Zod 4's z.compile.
Two comparisons use other projects' public benchmarks. Averaged over 22 results from two of them, ArkType runs 658 CPU instructions per validation against Typia's 2,097, a 68.6% reduction. The announcement also says ajv was faster on 8 of 15 rows that report errors for invalid data, a concession most launch posts would leave out.
- ArkType dynamic, 3.098.1 kB
- ArkType dynamic, 2.2.947.8 kB
- Typia, average1.52 kB
- ArkType precompiled, average1.19 kB
Source: ArkType 3.0 announcement, accessed 2026-12-04; maintainer-supplied
Who pays for the extra bytes
The size trade is the part to read twice. A project that upgrades to 3.0 without adding a build step ships a library roughly twice the size of 2.2.9's. The 1.19 kB average, 21.7% below Typia's 1.52 kB, applies only to code that goes through the plugin.
That favours teams with a bundler they control and penalises anyone importing ArkType straight into a script or an edge function with no build. The announcement says the startup benchmark, across 4 apps on Node 24, found precompiled ArkType ran fewer instructions than every other library measured, by 23.8% or more, in at least 17 of 20 paired runs.
Migration and open questions
For Zod users, the post pitches migration as one npx skills add arktypeio/arktype command and one prompt to an agent, which converts schemas, runs typecheck and tests, and compares uncovered schemas against their Zod originals before zod is removed. It lists the behaviour differences: undeclared keys, .optional() and undefined, synchronous validation, cross-key check order and default messages. The same skill-installer pattern drives the Superpowers plugin we covered, and agent-written code is the premise of Truss too.
The Hacker News thread raised older complaints. 0x696C6961 said compile times kept them away and asked whether a Go rewrite changes that; Benjamin_Dobell asked about mapped types, which the announcement text does not address. The GitHub repository has 7,911 stars.
The Upgrading page is where 2.2 users find the breaking changes, which the announcement does not itemise. Readers on 2.2 should check it before they touch their lockfile.
Sources
More in Software
- 01WireGuard v2 Is Under Investigation, Donenfeld Says, and the 256-Bit PSK Is the StopgapJason A. Donenfeld's December 2 mailing-list post names no algorithm and no date, but it tells worried users which setting to turn on today.
- 02Matt Pocock's skills Repo Is at 339,662 Stars, With 27 Agent Skills and an MIT LicenceThe README names four failure modes it is built to fix, and one install warning: use one method per agent or get every skill twice.
- 03Droidspaces Boots Full Linux Distros on Rooted Android, and Its Own README Warns Root Escapes the ContainerThe GPL-3.0 runtime has 3,125 stars and release v7.2.0, but most stock kernels lack the options it needs and it publishes no benchmarks.
- 04Weavon's Pandoc Clone Scores 99.93% on Its Own Tests, Not Pandoc'sThe Rust rewrite claims 15.3x to 49.7x speedups on one Apple Silicon Mac, and Hacker News is arguing about the GPL.