Frontend tooling at native Rust speed.
zerho is a Zero-Node, 100% Rust dev server and production bundler built on oxc, lightningcss, blake3, and wasmtime. Ship React, Preact, TypeScript, and modern web apps with sub-millisecond transforms and zero JS runtime overhead.
$ zerho build --analyze
✓ Graph resolved (5 modules) · redb cache hits: 5/5 (1.7 µs)
✓ Scope-hoisted & minified with oxc · Brotli .br emitted
dist/assets/index-8f4a9c.js 1.42 kB │ brotli: 0.61 kB │ sha384-SRI
dist/assets/chunk-3b1e2d.js 0.78 kB │ brotli: 0.39 kB │ modulepreload
dist/stats.html interactive treemap ready
✓ Built in 19.32 ms (0 Node.js processes · 0 secrets leaked) Everything modern web apps need, compiled to native code.
No Babel, no PostCSS plugins, no Rollup glue, and no 400 MB node_modules toolchain tax. Declarative zerho.toml configuration drives the entire pipeline.
Native Oxc & LightningCSS pipeline, zero JS bridges.
TypeScript, JSX, CSS Modules, SVG, and WebP optimization execute directly inside one Rust binary — no Babel, PostCSS, Rollup, or sharp.
[build]
minify = true # oxc_minifier + mangler + DCE
scope_hoisting = true # zero runtime module wrappers
sourcemap = "linked"
[assets]
optimize_svg = true # pure-Rust SVG minifier
optimize_images = true # PNG/JPG -> lossless WebP -
Oxc Compiler, Minifier & Scope Hoisting
Sub-millisecond TS/JSX transforms, lexical Scope Hoisting, AST constant folding/DCE, mangling, and Source Maps v3.
-
LightningCSS, @import & url() Rewriting
Built-in CSS nesting, *.module.css scoped class maps, @import inlining, and blake3-hashed font/image asset URLs.
-
Pure-Rust SVG & WebP Image Optimizer
Strips SVG metadata/comments and converts PNG/JPG assets to smaller WebP automatically without Node or native C++ addons.
Instant startup, React Fast Refresh & ACID redb cache.
Skip 400 MB node_modules waterfalls with in-memory Dev Partial Bundling, deep CJS-to-ESM pre-bundling, and 1.7 µs local/remote cache hits.
$ zerho migrate # auto-convert vite.config.*
$ zerho dev --port 5173 # HMR + /@zerho/bundle
# Open live module graph & treemap:
# -> http://127.0.0.1:5173/__inspect -
React Fast Refresh & Zero-Waterfall Dev
Native oxc Fast Refresh ($RefreshReg$), /@zerho/bundle partial bundling, granular WebSocket HMR, and Shadow DOM Error Overlay.
-
ACID redb B-Tree + HTTP Remote Team Cache
Single-file embedded redb cache with optional HTTP remote team cache (cache.remote_url) accelerating both zerho dev and zerho build.
-
Native tsconfig Paths, CJS Pre-Bundler & Barrel Optimizer
Zero-config @/* aliases, recursive multi-file CommonJS require() pre-bundling, and AST Barrel bypassing for unused exports.
Parallel multi-core builds for SPAs, MPAs, Libraries & Edge.
Emit Scope-Hoisted production bundles, hashed Web Workers, streaming .wasm modules, or DOM-free Edge SSR bundles from the same graph.
$ zerho build --analyze # dist/ + dist/stats.html
$ zerho build --ssr # DOM-free dist/server.mjs
$ zerho build --watch # incremental rebuilds
$ zerho preview --port 4173 # native Brotli .br server -
Rayon Parallel Bundler & Shared Chunks
Multi-core parallel graph builds, automatic shared chunk deduplication across dynamic import() and MPA entries, plus Brotli .br.
-
Web Workers & Streaming .wasm Imports
Auto-detects new Worker(new URL(..., import.meta.url)) and .wasm imports, emitting hashed worker chunks and instantiateStreaming loaders.
-
Edge SSR Target (--ssr) & Library Mode
Emit DOM-free dist/server.mjs for Cloudflare Workers, Deno, Node, and Bun, or dual .mjs/.cjs packages via [build.lib].
Memory-safe core with built-in security & WASM isolation.
Every workspace crate enforces unsafe_code = "forbid" and clippy::pedantic, while third-party plugins run inside fuel-metered wasmtime sandboxes.
[security]
sri = true # SHA-384 integrity in HTML
csp = true # strict dist/csp.json
secret_scan = true # block leaked API keys
[plugins]
wasm = ["plugins/my-plugin.wasm"]
fuel_limit = 1000000 # zerho:[email protected] -
Built-in SRI, CSP, Budgets & Secret Leak Guard
Native SHA-384 integrity attributes, strict dist/csp.json, Gzip/Brotli size budgets, and client-side secret scanning before ship.
-
zerho check, dist/stats.html & Live /__inspect Treemap
Full-graph static auditor catching broken imports, cycles, and missing .env vars, paired with live interactive bundle treemaps.
-
Fuel-Metered Wasmtime Plugins (UTF-8 String ABI)
Run resolve_id, load, and transform hooks inside isolated wasmtime v29 linear memory with a complete Rust -> .wasm example included.
Measured on real builds, not synthetic micro-loops.
Every number below includes exact hardware specs, cold vs. warm redb timings, and a 1-command zerho bench --json harness so any developer can verify on their own machine.
basic-ts (3 mods)
Scope HoistedTypeScript + CSS, Scope Hoisting, oxc_minifier, Brotli .br (458 B), SHA-384 SRI & CSP.
react-tsx (5 mods)
Code SplitReact TSX + CJS-to-ESM + dynamic import() splitting + 2 Source Maps v3 + Brotli (1.00 KB).
synthetic-500
499 ShakenDeterministic 500-module TS graph: rayon parallel + Scope Hoisting + oxc_minifier + Brotli (1.53 KB).
cargo build --release -p zerho-cli && ./target/release/zerho bench --synthetic 500 --iterations 5 --json | Dimension | zerho v0.9.0 | Vite 8 (Rolldown + Node.js) |
|---|---|---|
| Runtime Requirement | Zero-Node (single 16.60 MB native binary) | Node.js + npm/pnpm runtime required |
| Configuration & Migration | Declarative zerho.toml + JSON Schema + zerho migrate | Executable vite.config.ts evaluated in Node |
| JS / TS / JSX & CSS Engine | 100% in-process oxc (Fast Refresh, Minifier, Scope Hoisting) + lightningcss + WebP/SVG | N-API bridge between JS host & Rust crates |
| Persistent Transform Cache | ACID redb B-tree + blake3 + HTTP Remote Team Cache (0.0017 ms warm hits) | JS filesystem & dep pre-bundle cache |
| Web Platform & Edge SSR | Web Workers, .wasm streaming, MPA, Library Mode & --ssr Edge bundles | Requires extra SSR/worker/library plugins & Node config |
| Plugin Isolation | Fuel-metered wasmtime WASM (zerho:[email protected]) + UTF-8 string hooks | Full-privilege Node.js JS plugins |
| DevTools & Memory Safety | Built-in /__inspect + Live Treemap, dist/stats.html & unsafe_code = "forbid" | External plugin (vite-plugin-inspect) |
Migrate from Vite in 1 command.
Run zerho migrate inside any existing Vite project. It inspects vite.config.*, package.json, and tsconfig.json to generate a validated zerho.toml in milliseconds.
// vite.config.ts (requires Node.js + 6 npm plugins)
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import tsconfigPaths from 'vite-tsconfig-paths';
import compression from 'vite-plugin-compression';
import { visualizer } from 'rollup-plugin-visualizer';
export default defineConfig({
plugins: [react(), tsconfigPaths(), compression({ algorithm: 'brotliCompress' }), visualizer()],
server: { port: 5173, proxy: { '/api': 'http://127.0.0.1:8080' } },
build: { sourcemap: true, minify: 'esbuild' },
}); # zerho.toml — auto-generated by `zerho migrate` (0 Node plugins)
[project]
entry = "src/main.tsx"
framework = "react"
[server]
port = 5173
[server.proxy]
"/api" = "http://127.0.0.1:8080"
[build]
minify = true
scope_hoisting = true
brotli = true
sourcemap = "linked"
analyze = true 9 focused crates. 60/60 passing tests. Pedantic clean.
Every layer is cleanly decoupled in a Rust Edition 2024 workspace enforced with clippy::pedantic -D warnings and unsafe_code = "forbid".
- 01 zerho-core Core identifiers (ModuleId, blake3 ContentHash), ModuleKind, Framework, and typed error hierarchy.
- 02 zerho-config Declarative zerho.toml parser, validator, MPA/SSR/budgets/security config, and JSON Schema generator.
- 03 zerho-resolver Native ESM/CJS & tsconfig.json paths resolution powered by oxc_resolver, package.json exports, and virtual modules.
- 04 zerho-graph Incremental module graph, DFS circular dependency detector, embedded redb cache, and HTTP remote team cache.
- 05 zerho-plugin Native Plugin trait (DefinePlugin), fuel-metered wasmtime v29 host with UTF-8 string hooks, and zerho:[email protected] WIT.
- 06 zerho-transform Oxc TS/JSX compiler, Minifier/Mangler, Scope Hoisting, Barrel & CJS pre-bundler, Web Workers, CSS @import/url(), and SVG.
- 07 zerho-server Zero-Node axum + tokio + notify dev server, WebSocket HMR, /@zerho/bundle, /__inspect Live Treemap, and Brotli PreviewServer.
- 08 zerho-bundler Rayon parallel bundler with redb cache, Shared Chunks + modulepreload, MPA, SSR Edge target, WebP, SRI/CSP, and stats.html.
- 09 zerho-cli Single native CLI binary: dev, build (--analyze, --watch, --ssr), migrate, check (--strict), preview, bench, init, schema, and wit.
Great fit today (v0.9.0)
- •React, Preact, and TypeScript SPAs, MPAs, and dual-format libraries ([build.lib]).
- •Teams wanting zero Node.js in CI/CD, strict SRI/CSP security, and deterministic redb caching.
- •Web Workers, streaming .wasm imports, and Edge SSR bundles (--ssr).
Stay on Vite for now if…
- •Your app relies heavily on Vue SFCs, Svelte, Nuxt, SvelteKit, or Astro's Vite plugin graph.
- •You depend on legacy Rollup/Vite JavaScript plugins that have no WASM or declarative equivalent yet.