SYLEN
AboutNewsConferenceMembershipDonate

Email updates

Conference, news, and membership updates by email.

Site

  • About
  • News
  • Membership
  • Waitlist
  • Donate

Conference

  • Conference 2027
  • Call for papers

Account

  • Create account
  • Membership details

SYLEN

  • Guidelines
  • Privacy
  • Terms

© 2026 Systems Leadership and Engineering Network. sylen.org.

Membership details →
Back to news
Systems ArchitectureSource: ziggit.devJuly 23, 2026

Cruller Fork Strips 290k Lines of Bun to Deliver a Lightweight, Vanilla Zig 0.16 Production Runtime

A new systems-level project named Cruller forks the final Zig-based release of the Bun runtime, stripping development-oriented subsystems to optimize for production servers. By targeting Zig 0.16 and removing non-essential modules, the project achieves an 18% reduction in binary size while maintaining V8 crypto performance parity.

Architecture and Scope Reduction

Cruller is designed to execute pre-built JavaScript production applications rather than acting as a local development suite. Built as a specialized fork of the last Zig-based Bun release, the project discards developer-oriented subsystems. Eliminated components include the package manager, bundler, transpiler, shell, test runner, CLI dispatch, N-API, SQL clients, and archive support.

This code removal excised approximately 290,000 lines of Zig, shrinking the codebase from roughly 712,000 to 425,000 lines. The remaining runtime preserves JavaScriptCore (JSC), `Bun.serve`, HTTP/1-3, WebSockets, `fetch`, streams, `Blob`, Request/Response abstractions, static serving, and the module resolver for pre-built code.

Modernizing the Build Graph for Zig 0.16

A major engineering effort in Cruller is the migration of Bun’s historically complex build system to a vanilla Zig 0.16.0 build graph. The original Bun implementation relied on a heavily patched, forked version of the Zig compiler—partially to enforce private struct fields with `#` prefixes—and utilized suboptimal `comptime` configurations and deprecated features like `usingnamespace` which degraded compilation speeds.

Cruller replaces this setup with standard Zig toolchain components. To resolve bootstrapping on clean checkouts, Cruller's build file runs a code-generation target before executing semantic checks. To prevent the runtime from loading generated JS from a build directory, Cruller uses a generated-code embedding module to compile assets directly into the binary. Currently, the code generator still requires a local Bun installation due to lingering TypeScript dependencies, though migrating this codegen to native Zig is on the project roadmap.

Performance Metrics and Memory Engineering

Initial benchmarks against the official Bun 1.3.14 binary on Linux x64 demonstrate concrete efficiency gains. The Cruller ReleaseFast stripped runtime compiles to 73.0 MiB, representing an 18% size reduction from Bun's 88.5 MiB binary. Pure-JS execution remains highly optimized; a V8 Crypto benchmark indicates performance parity, with Cruller's median throughput registering about 2% higher than Bun, falling within normal run-to-run variance.

Addressing the historical memory overhead associated with JavaScriptCore and Zig's manual memory management, Cruller rejects the strategy of migrating to Rust, pointing to the high count of unsafe blocks required to interface with JSC. Instead, the maintainer plans to implement a dynamic memory controller utilizing a lightweight, separate QuickJS-based control plane. This control plane will tune JSC's internal configuration parameters dynamically to prevent the engine from consuming 200–300 MiB of RAM while idling.

Future Milestones and Ecosystem Integration

The development team intends to transition Cruller from a standalone execution engine to a reusable component. A primary objective is packaging the runtime as a dynamic library exposing a clean `.zig` interface, allowing other projects in the Zig ecosystem to embed a high-performance JavaScript runtime with minimal integration overhead.

Additional planned features include tightening HTTP/2 and HTTP/3 performance, implementing native ZeroMQ (ZMQ) plugins, and transitioning the remaining TypeScript-based bootstrap code generators into native Zig.

Read the original article at ziggit.dev.