---
title: "Bringing Rust to the Pixel Baseband"
description: "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."
url: "https://swe.quest/articles/bringing-rust-to-the-pixel-baseband-9cf93d6447e3d2be"
canonical: "https://security.googleblog.com/2026/04/bringing-rust-to-pixel-baseband.html"
source: "Google Online Security Blog"
published: "2026-04-10"
difficulty: "hard"
kind: "Case study"
reading_minutes: 8
tags: ["rust","memory-safety","build-systems","mobile","dns"]
---

# Bringing Rust to the Pixel Baseband

A post on [Google Online Security Blog](https://swe.quest/sources/google-security.md), published 2026-04-10, 8 min read, Case study. Original: [https://security.googleblog.com/2026/04/bringing-rust-to-pixel-baseband.html](https://security.googleblog.com/2026/04/bringing-rust-to-pixel-baseband.html)

## Summary

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.

Written by swe.quest, not by the author.

**Difficulty:** Hard: written for specialists in the field

## Topics

- [Rust](https://swe.quest/tags/rust.md) (Languages)
- [Memory safety](https://swe.quest/tags/memory-safety.md) (Security)
- [Build systems](https://swe.quest/tags/build-systems.md) (Engineering practices)
- [Mobile](https://swe.quest/tags/mobile.md) (Web & mobile)
- [DNS](https://swe.quest/tags/dns.md) (Infrastructure)

## Prerequisites

- Rust no\_std ([easy posts on Rust](https://swe.quest/tags/rust.md?difficulty=easy))
- C/Rust FFI ([easy posts on Rust](https://swe.quest/tags/rust.md?difficulty=easy))
- embedded firmware build and linking ([easy posts on Build systems](https://swe.quest/tags/build-systems.md?difficulty=easy))

## Keywords

Pixel 10, hickory-proto, Pigweed, GN, cargo-gnaw, bindgen, compiler\_builtins, no\_std

## Related posts

- [Porting the Solana eBPF JIT compiler to ARM64](https://swe.quest/articles/porting-the-solana-ebpf-jit-compiler-to-arm64-2640f585a04d44ad.md): Trail of Bits · 2022-10-12 · Hard · 11 min read · Compilers, Runtimes & VMs, Rust, Sandboxing & isolation, Memory safety
  Solana'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.
- [Synadia and TigerBeetle Pledge $512,000 to the Zig Software Foundation](https://swe.quest/articles/synadia-and-tigerbeetle-pledge-512-000-to-the-zig-software-foundation-124e30142ae18e3c.md): TigerBeetle · 2025-10-25 · Easy · 8 min read · Zig, Language design, Memory safety, Open source
  Synadia and TigerBeetle are jointly donating $512,000 to the Zig Software Foundation over two years, with no strings attached.
- [Bun 1.4](https://swe.quest/articles/bun-1-4-fea28913dacb5d89.md): Bun · 2026-08-20 · Medium · 217 min read · Runtimes & VMs, JavaScript, Performance engineering, Memory management, Rust
  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.
- [Rewriting Bun in Rust](https://swe.quest/articles/rewriting-bun-in-rust-9aa67adf0dcbde60.md): Bun · 2026-07-08 · Medium · 29 min read · Rust, Zig, AI for coding, Refactoring & migrations, Memory safety
  Bun, a 535k-line Zig JavaScript runtime, was mechanically ported to Rust over 11 days using about 50 continuously running Claude Code workflows.
- [Rust at Scale: An Added Layer of Security for WhatsApp](https://swe.quest/articles/rust-at-scale-an-added-layer-of-security-for-whatsapp-fa325ff993e04dbf.md): Meta Engineering · 2026-01-27 · Easy · 5 min read · Memory safety, Rust, Application security, Communications, Mobile
  WhatsApp 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.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
