Google's Pixel team shares how they integrated a memory-safe Rust DNS parser into the Pixel 10 modem firmware, marking the first use of a memory-safe language in a Pixel baseband. The post covers the selection of the hickory-proto crate, adding no_std support for bare-metal environments, integrating Rust into the existing Pigweed/GN build system, handling global allocation and panic handlers via FFI, and resolving linker issues with weak symbols from compiler_builtins. The project reduces attack surface from memory-unsafe DNS parsing (referencing CVE-2024-27227) and lays groundwork for broader Rust adoption in modem firmware.

9m read timeFrom security.googleblog.com
Post cover image
Table of contents
Adding no_std supportCode size studyCompile Rust code to staticlibBuild core, alloc, and compiler_builtinsLink Rust staticlibExpose Rust API and calling back to C++Build third-party crates

Sort: