Skip to content
glastor-corePublic

About

Zero-Node, 100% Safe Rust frontend dev server & production bundler (oxc, lightningcss, redb, wasmtime). Single 16.6 MB binary with HMR, React Fast Refresh, Scope Hoisting, Edge SSR, Web Workers, SRI/CSP, and Vite migration.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

zerho — Zero-Node, 100% Safe Rust Frontend Dev Server & Production Bundler

zerho

Zero-Node, 100% Safe Rust frontend dev server, test runner, and production bundler.

Portal zerho.xyz Version v1.2.0 CI Status DevSecOps Audit 100% Safe Rust

Installation · Quick Start · Migrate from Vite · Benchmarks · Architecture · Live Demo · Docs


zerho ships as a single stripped native Rust binary (unsafe_code = "forbid", clippy::pedantic -D warnings, 76/76 passing unit + E2E tests + real Chromium React 19 + live HMR CI E2E) powered by oxc, lightningcss, oxc_resolver, redb v3, blake3, rayon, axum, tokio-rustls, and wasmtime v29.

Build, serve, test, and ship React, Preact, TypeScript, Web Workers, .wasm, and Edge SSR apps with declarative zerho.toml configuration — zero Node.js processes, zero Babel/PostCSS/Rollup glue, zero 400 MB node_modules toolchain tax.


Installation

Homebrew (macOS ARM64 & Linux x86_64)

brew install glastor-core/tap/zerho

Linux & macOS (1-line installer with SHA-256 verification)

curl -fsSL https://raw.githubusercontent.com/glastor-core/jester/main/scripts/install.sh | sh

Windows PowerShell (1-line installer with SHA-256 verification)

irm https://raw.githubusercontent.com/glastor-core/jester/main/scripts/install.ps1 | iex

From Source (Cargo · Rust 1.95+)

cargo install --git https://github.com/glastor-core/jester zerho-cli

Pre-compiled binaries with .sha256 checksums and CycloneDX SBOM are published on GitHub Releases. Homebrew (packaging/homebrew/zerho.rb) and Scoop (packaging/scoop/zerho.json) manifests are also included.


Quick Start

# Scaffold a Zero-Node React + TypeScript project in milliseconds
zerho init my-app --template react-tsx
cd my-app
zerho dev                    # axum dev server + React Fast Refresh + /__inspect Live Treemap

# Run built-in Zero-Node TS/JS tests (no Vitest, no Node.js)
zerho test

# Full-graph static audit (broken imports, cycles, missing .env, client secrets)
zerho check

# Scope-hoisted, minified, Brotli-compressed build + interactive dist/stats.html
zerho build --analyze

# Emit a DOM-free Edge SSR bundle (dist/server.mjs) for Cloudflare Workers / Deno / Node / Bun
zerho build --ssr

# Preview dist/ locally with automatic Accept-Encoding: br negotiation
zerho preview --port 4173

# Start a standalone pure-Rust HTTP remote team cache daemon
zerho cache-server --port 9000 --token "$ZERHO_CACHE_TOKEN"

Migrate from Vite in 1 Command

zerho migrate --dry-run   # preview generated zerho.toml
zerho migrate             # writes zerho.toml + zerho.schema.json

zerho migrate inspects vite.config.{ts,mts,js,mjs}, package.json, index.html, and tsconfig.json and generates a validated declarative zerho.toml replacing multiple Node plugins with native Rust defaults:

Capability Typical Vite Setup zerho v1.1.0 (Built-In)
Runtime & Footprint Node.js + npm plugins (~240 MB) Single native Rust binary (16.60 MB)
TS / JSX / Fast Refresh @vitejs/plugin-react + esbuild/oxc 100% in-process oxc + $RefreshReg$
tsconfig.json paths & ?raw/?url vite-tsconfig-paths + Vite asset queries Native oxc_resolver + ?raw / ?url in dev & build
Barrel & sideEffects: false Rollup/esbuild Native AST Barrel Bypass (lucide-react: 2,158 → 28 mods, 64.9 KB Brotli)
Brotli + Bundle Analyzer vite-plugin-compression + visualizer build.brotli = true + --analyze (dist/stats.html) + /__inspect Treemap
Security (SRI / CSP / Secrets) Multiple external plugins Native SHA-384 SRI, dist/csp.json, Gzip budgets & Secret Leak Guard
Plugin Isolation Full-privilege Node.js JS plugins Fuel-metered wasmtime v29 WASM (zerho:plugin@0.1.0) + prebuilt .wasm releases
Testing Vitest + Node.js Built-in zerho test (oxc evaluator with local TS imports, objects & functions)

Capabilities (v1.1.0)

  • Compiler & Assets (zerho-transform): Sub-millisecond oxc TS/JSX transforms, native React Fast Refresh, oxc_minifier + oxc_mangler + DCE, lexical Scope Hoisting, "sideEffects": false Barrel File Optimizer (lucide-react, lodash-es), singleton CommonJS ↔ ESM interop with dead NODE_ENV branch pruning, lightningcss CSS Modules + @import/url(...) rewriting, Vite-compatible ?raw & ?url asset queries, Web Worker new URL(..., import.meta.url) rewriting, and pure-Rust SVG/WebP optimization.
  • Dev Server & Cache Daemon (zerho-server): Zero-Node axum + tokio + notify dev server, granular WebSocket HMR (import.meta.hot), dev CSS @import inlining, dev Barrel Optimizer + singleton /@zerho/deps/* CJS pre-bundler (Chromium-verified with React 19 + Zustand + Lucide), Shadow DOM Error Overlay, zero-waterfall Dev Partial Bundling (/@zerho/bundle), HTTP reverse proxy ([server.proxy]), built-in /__inspect UI with Live Bundle Treemap, Brotli PreviewServer, and standalone zerho cache-server HTTP CAS daemon.
  • Bundler, MPA, Library & Edge SSR (zerho-bundler): rayon wave-parallel builds, configurable [build].base subpath/CDN URLs & [build].empty_out_dir = true, incremental ACID redb + HTTP remote team cache (cache.remote_url), Shared Chunks + <link rel="modulepreload">, Multi-Page Apps ([build.entries]), Library Mode ([build.lib] .mjs/.cjs), Web Worker chunks + .wasm WebAssembly.instantiateStreaming loaders, Edge SSR (--ssr), Brotli .br, SHA-384 SRI, dist/csp.json, Gzip budgets, zerho check, and dist/stats.html.
  • WASM Plugin Ecosystem (zerho-plugin): Fuel-metered wasmtime v29 sandbox with UTF-8 linear-memory hooks (zerho_alloc, zerho_resolve_id, zerho_load, zerho_transform), standalone Rust → wasm32-unknown-unknown plugins in examples/wasm-plugin/ and examples/plugins/ (vue-sfc, svelte, solid), plus precompiled .wasm + .sha256 binaries published on GitHub Releases.

Real-Browser Verified Stack: Both zerho dev and zerho build + zerho preview are continuously verified in real headless Chromium (CDP, scripts/verify-chromium-e2e.mjs) against live npm react 19, react-dom, zustand, and lucide-react (28 modules, 64.92 KB Brotli, 0 console errors, live DOM click state updates). Honest Scope: Ideal today for React, Preact, TypeScript SPAs, MPAs, libraries, Web Workers/.wasm, and Edge SSR without Node.js. If your app depends heavily on Vue SFC, SvelteKit, Nuxt, or legacy Rollup/Vite JS plugins, stay on Vite for now.


Real --release Benchmarks

Reference Environment: Windows 11 x86_64 (NT 10.0.26300.0) · AMD Zen 3 (16 logical threads) · rustc 1.96.1 · zerho --release (16.60 MB). Neutral zerho vs Vite CI benchmarks also run automatically on ubuntu-latest via .github/workflows/benchmarks.yml. Full methodology in benchmarks/BENCHMARKS.md and benchmarks/results.json.

Project Cold Oxc Transform Warm redb Lookup Cold Build (empty cache) Warm Build Min (redb hot) Entry Size (Raw / Gzip / Brotli)
examples/basic-ts (3 mods) 0.553 ms 0.0017 ms (1.7 µs) 43.04 ms 19.32 ms 804 B / 543 B / 458 B
examples/react-tsx (5 mods + split) 0.548 ms 0.0020 ms (2.0 µs) 60.27 ms 29.18 ms 2.28 KB / 1.09 KB / 1.00 KB
synthetic-500-modules (500 TS mods) 1.266 ms 0.0435 ms 1,254 ms 763.53 ms (655 mods/s) 17.37 KB / 2.73 KB / 1.53 KB

Reproduce on your own hardware in one command:

cargo build --release -p zerho-cli && ./target/release/zerho bench --synthetic 500 --iterations 5 --json

Architecture

flowchart LR
  CLI["zerho-cli (dev / build / test / migrate / cache-server)"]
  CFG["zerho-config (zerho.toml + JSON Schema)"]
  RES["zerho-resolver (oxc_resolver + tsconfig paths)"]
  TR["zerho-transform (oxc + lightningcss + SVG)"]
  PLG["zerho-plugin (wasmtime v29 WASM sandbox)"]
  GR["zerho-graph (DAG + ACID redb + HTTP Remote Cache)"]
  SRV["zerho-server (axum HMR + /__inspect + CacheServer)"]
  BND["zerho-bundler (rayon + Scope Hoisting + Brotli + SRI/CSP)"]

  CLI --> CFG
  CLI --> SRV
  CLI --> BND
  SRV --> RES & TR & GR & PLG
  BND --> RES & TR & GR & PLG
Loading
Crate Responsibility
zerho-core Core identifiers (ModuleId, blake3 ContentHash), ModuleKind, Framework, and typed error hierarchy
zerho-config Declarative zerho.toml parser, validator, MPA/SSR/budgets/security/lib/remote-cache config, and JSON Schema generator
zerho-resolver Native ESM/CJS & tsconfig.json paths resolution powered by oxc_resolver, package.json, and virtual modules
zerho-graph Incremental module graph, DFS cycle detector, embedded ACID redb cache, and HTTP remote team cache
zerho-plugin Native Plugin trait (DefinePlugin), fuel-metered wasmtime v29 host with UTF-8 string hooks, and zerho:plugin@0.1.0 WIT contract
zerho-transform oxc TS/JSX/React Fast Refresh compiler, oxc_minifier/oxc_mangler, Scope Hoisting, Barrel & CJS pre-bundler, Web Workers, CSS @import/url(), SVG optimizer
zerho-server Zero-Node axum + tokio + notify dev server, WebSocket HMR, /@zerho/bundle, /__inspect Live Treemap, Brotli PreviewServer, and CacheServer
zerho-bundler rayon parallel bundler, incremental redb cache, Shared Chunks + modulepreload, MPA, Library Mode, Web Workers/.wasm, Edge SSR (--ssr), WebP, zerho check, dist/stats.html
zerho-cli Single binary CLI (init, migrate, dev, build, check, preview, test, cache-server, bench, schema, wit)

Continuous DevSecOps & Supply-Chain Verification (GLASTOR® Core)

zerho dogfoods the GLASTOR® Core security and verification toolchain on every push, pull request, and tagged release (.github/workflows/audit.yml & .github/workflows/release.yml), with all actions pinned to 40-character commit SHAs:

Tool Role in zerho CI/CD Output / Gate
GLASTOR® Specter Zero-compiler Rust AST public API contract differ & Trojan Breaking-Change guard across all 9 crates SemVer gatekeeper + SARIF 2.1.0 + CycloneDX SBOM
GLASTOR® Byte-Gauge SIMD binary hardening auditor on compiled zerho release binaries (ASLR/PIE, NX/DEP, Shannon entropy, stripped symbols, < 25 MB budget) Release gate + zerho-x86_64-unknown-linux-gnu.sbom.cdx.json attached to GitHub Releases
GLASTOR® pii-veil Sub-millisecond Rust DLP scanner auditing crates/ for accidental PII or credential leaks Continuous DLP telemetry
GLASTOR® Nemesis Universal DevSecOps auditor (Gitleaks secret scan, Semgrep SAST, Trivy SCA, license compliance, repo hygiene) Weekly + PR/push SARIF upload to GitHub Security

License & Ecosystem

Dual-licensed under MIT OR Apache-2.0.

Part of the GLASTOR® Rust Toolchain — zerho.xyz · glastor.es · pii-veil · specter

About

Zero-Node, 100% Safe Rust frontend dev server & production bundler (oxc, lightningcss, redb, wasmtime). Single 16.6 MB binary with HMR, React Fast Refresh, Scope Hoisting, Edge SSR, Web Workers, SRI/CSP, and Vite migration.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages