Bringing Rust to the Pixel Baseband
Pixel 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.
Related posts
- Porting the Solana eBPF JIT compiler to ARM64
Trail of Bits hardMasterSolana's RBPF JIT compiler, which translates eBPF smart contracts to native code on validators, was ported from x86-only to ARM64, and its x86 backend gained Windows support. The port rewrote the register map, calling convention, shared subroutines (address translation, exceptions, indirect calls, instruction metering) and per-opcode translations. ARM64's fixed 4-byte instructions mean immediates often need several instructions, and the M1 enforces 16-byte stack alignment where QEMU does not. Running the port under MSAN exposed an uninitialized-memory bug: unsafe code read a Rust enum discriminant that was only a u8, so 7 bytes of stack garbage landed in JIT code and weakened its code-reuse mitigations. The fix adds #[repr(u64)] and layout tests, and both new targets remain behind feature gates until reviewed.
- Synadia and TigerBeetle Pledge $512,000 to the Zig Software Foundation
TigerBeetle easyNoviceSynadia 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.
- 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.
- 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.
- Rust at Scale: An Added Layer of Security for WhatsApp
Meta Engineering easyNoviceWhatsApp rewrote its cross-platform media consistency library, wamedia, from C++ to Rust and now ships it to billions of devices and browsers across Android, iOS, Mac, Web and wearables, which Meta calls the largest client-side Rust deployment it knows of. The library began after the 2015 Stagefright bug as a way to reject non-conformant MP4 files before vulnerable OS parsers saw them. It now underpins "Kaleidoscope," a set of checks for malformed structures, risky PDF features, spoofed file types and executables. The Rust version was built in parallel and validated with differential fuzzing. It replaced 160,000 lines of C++ with 90,000 lines of Rust and improved performance and memory use, with binary size and multi-platform build support as the main hurdles.