Zod 4.4.3 · LilScript port · @itslil/zod

Zod,
compiled.

The zod@4.4.3 classic API, rewritten in LilScript. Internals can be mangled via config; only the public API stays named. Every size row is the same official v4 bundle, then Oxc or Terser, mangling on and off. LilScript rows compare closer-world (mangle on) and normal (mangle off).

npm install @itslil/zod
Brotli-11 vs Vite 8 Oxc of official zod/v4

classic tests passing
gzip-9 vs Oxc
raw vs Oxc
Chromium parse vs official

Official rows are an esbuild bundle of zod@4.4.3 v4, then Oxc or Terser. LilScript rows compare closer-world (mangle on) and normal (mangle off). Sizes are lilscript-codec raw / gzip-9 / Brotli-11. Ratios are lane / Oxc closer-world (lower is smaller).

string number object array enum union optional coerce refine pipe lazy ZodError

Measured in Chromium and Node

Parse,
not inferred.

Same 48-object batch, 400 rounds per sample. Quiet median after discarding the first 3. Output must match official zod@4.4.3. Ratio is lane / official (lower is faster).

Lane Chromium vs official Node vs official

The compiled runtime, in the browser

Live
parse.

Left is JSON. Right is .parse() from @itslil/zod or official zod@4.4.3. Both must produce the same object.


          

The receipts

Raw, gzip,
and Brotli.

Official 4.4.3 v4, then Oxc and Terser with mangling on and off. LilScript is not post-minified. Closer-world mangles internals; normal does not. The public API stays named in both. Ratios are lane / official Oxc closer-world.

Brotli-11

The wire number. LilScript closer-world is the published core.

Lane Brotli-11 vs Oxc

gzip-9

Same artifacts, gzip-9.

Lane gzip-9 vs Oxc

Raw

Uncompressed bytes.

Lane Raw vs Oxc

All three

One row per lane, every codec, with the Brotli ratio against Oxc.

Lane Raw gzip-9 Brotli-11 vs Oxc raw / gzip / Brotli

Why two LilScript lanes. Closer-world turns mangling on (lilscript.dev.toml). Normal turns it off (lilscript.nomangle.toml). public_aggregate_abi = "named" in both, so z.string().parse stays the developer API.

README ↗

Zero runtime dependencies

Install the
current port.

npm install @itslil/zod