Technology

Engineering record

FoundationsPartly changed

Replacing UniFFI with Nitro and cxx

UniFFI exports Rust functions to the app one by one, so the more functions we have, the bigger the boundary between Rust and React Native gets. We needed a way to keep the boundary small no matter how many functions there are.

In June, what we liked about UniFFI was that it generated the glue for 282 Rust functions, so we didn't have to write it. But keep adding features and the other side shows. Every new Rust function makes the glue bigger, and every change means regenerating it. Generating code automatically doesn't make the boundary any smaller.

Does React Native really need to know every Rust function? What a screen needs isn't a list of functions but a way to send a request and get an answer. So instead of cutting a door for each function, we'll have a single door. Nitro and cxx connect React Native and Rust, and commands and answers go back and forth as JSON. TypeScript types are generated from the Rust types, so the screen side can't drift by someone typing them out separately.

Removing REDDY's UniFFI glue deleted 2,367 lines. Before deleting, we checked that nothing else used this code.

Written from that day’s point of view, using the documents and change history of the time. Published 2026.12.01.