Published OnApril 1, 2025October 10, 2019

We couldn't get Bitcode and Rust to play nice, until we did

At Ditto we build most of our software using Rust. It helps us make Ditto fast and reliable, and lets us reuse our code on every platform that we support including Apple iOS.

While the Rust project has excellent support for creating iOS libraries, Apple also encourages developers to provide Bitcode. This technology allows Apple to further optimize an app after the developer built it. Some of our customers have Bitcode enabled so Ditto needs to support it too. Unfortunately, Rust's version of Bitcode often doesn't work in Xcode.

Using the standard Rust distribution, you may see an error like this when you try to build your app for a physical iOS device—it suggests that the Bitcode is missing, even though it isn't. The real problem is that Rust and Xcode are using different versions of LLVM so the Bitcode is incompatible. The Rust project is discussing how to manage this problem moving forward.

For now, we can build a custom version of Rust that has exactly the right version of LLVM. At Ditto we have produced scripts that will automatically build a compatible Rust toolchain for use with physical iOS devices. We use this to ship Rust code for iOS—and you can use it too! Both our scripts and binary releases of the toolchain are freely available on GitHub. Bug reports and contributions are very welcome. We're excited to see Rust used more to build great mobile apps!

Rust Bitcode Github Repository

Read more
Stories
October 27, 2025
AWS Outage Reminds Us "Smart" Devices Are Only as Smart as Their Architecture
by
Ryan Ratner
When a 15-hour AWS outage turned $2,700 smart beds into saunas and left thousands of restaurants unable to process orders, it exposed the fatal flaw in how we're building edge applications—and why it's time to rethink everything
Product
October 24, 2025
Beyond GOTS: The Case for Commercial Edge Sync in Defense and Public Sector Operations
by
Mustafa Durrani
Leverage the scale, agility, and innovation velocity of the commercial market while maintaining the capability to integrate government-grade security requirements.