Synadia and TigerBeetle Pledge $512,000 to the Zig Software Foundation
Synadia and TigerBeetle are jointly donating $512,000 to the Zig Software Foundation over two years, with no strings attached. The post explains why TigerBeetle chose Zig over Rust and C in 2020. TigerBeetle uses static allocation per NASA's Power of Ten rules and runs single-threaded because transaction contention defeats partitioning, so Rust's borrow checker mattered less than Zig's bounds checking, checked arithmetic by default and absence of hidden allocations or control flow. Three bugs the borrow checker would have prevented were caught by fuzzing on 1,000 dedicated cores, and the upgrade to Zig 0.15.2 made debug builds 2x faster and LLVM release builds 1.6x faster.
Related posts
- Rewriting Bun in Rust
Bun mediumAdept
Bun, a 535k-line Zig JavaScript runtime, was mechanically ported to Rust over 11 days using about 50 continuously running Claude Code workflows. The motivation was a steady stream of use-after-free, double-free and leak bugs that came from mixing JavaScriptCore's garbage-collected values with manually managed Zig memory. The port was done all at once in a deliberately Zig-shaped style, guided by a porting guide and a lifetimes map, and validated against Bun's language-independent TypeScript test suite. Adversarial review in separate context windows caught bugs such as Box drops before async uv_close, negative-time timespec errors, and eager unwrap_or evaluation; cleanup toward idiomatic, less-unsafe Rust is planned after v1.4.
- Bringing Rust to the Pixel Baseband
Google Online Security Blog hardMasterPixel 10 ships the first memory-safe code in Pixel's cellular baseband: a Rust DNS response parser built on hickory-proto, replacing a risky untrusted-input parser in the modem firmware. The team added no_std support upstream to hickory-proto and its dependencies (including rust-url and ipnet), then built all crates as rlibs via rustc driven by Pigweed/GN instead of cargo, using cargo-gnaw to generate build rules for 30+ dependencies. Integration details include a GlobalAlloc backed by the firmware's C allocator, a panic handler routed to Pigweed's crash backend, and bindgen-generated FFI callbacks into existing C code. The Rust footprint is about 371KB, with 350KB from hickory-proto. Stripping compiler_builtins was necessary because its weak memset/memcpy symbols displaced the modem's optimized versions and caused power and performance regressions.
- Bun v1.1.7
Bun mediumAdept
Bun v1.1.7 fixes 28 bugs and adds glob patterns in package.json workspaces (via Bun.Glob), asymmetric matcher support in expect.extend's this.equals, and a working bunx --version. Several fixes come with root causes: a SIMD invalid memory access in Zig's std.mem.indexOfScalarPos crashing Windows startup, a misassumed 8-byte alignment of FILE_DIRECTORY_INFORMATION, threadlocal destructors running during std::quick_exit with live Workers, an uninitialized C++ integer corrupting stacktrace line numbers, and a memory leak from unread Bun.serve() request bodies since v1.0.30. Smaller changes include WebSocket close code 1015 on TLS failures, a ServerWebSocket shrink from 32 to 24 bytes, and adding clang-analyzer to CI.
- Bun 1.4
Bun mediumAdept
Bun 1.4 adds 1,517 newly passing Node.js test-suite tests, fixes over 2,900 issues, and rewrites Bun from Zig to Rust. JavaScriptCore now uses an extended mimalloc instead of libpas, adding a scavenger thread, partial page clearing and better lazy zeroing. Together with GC timer tuning, segmented-array Strong roots and fewer futex calls, this cuts idle CPU 5x, HTTP server peak memory 13–48%, and Linux startup time in half. New APIs include Bun.Image, Bun.WebView, Bun.markdown, Bun.cron and Bun.Terminal, plus Markdown CPU, heap and bundle profiles and a cross-platform memoryPressure event built on kqueue, PSI and Windows resource notifications.
- A Database Without Dynamic Memory Allocation
TigerBeetle mediumAdeptTigerBeetle allocates all memory once at startup and never again, using fixed limits for connections, in-flight messages per client, replicas, message size and queries per message so that total memory is a simple compile-time sum. Beyond avoiding GC and use-after-free, static allocation bounds overload, makes resource use predictable for operators, and lets assertions on pool availability surface sizing mistakes under fuzzing rather than as production resource exhaustion. Supporting choices include fixed-size, cache-line-aligned 128-byte account and transfer structs sent zero-copy over the wire, batched queries (up to 8191 per message), and an LSM forest whose in-memory portion is preallocated and kept bounded by small incremental flushes to disk.