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
Product
Tutorial
April 24, 2025
Engineering with Expo: Expanding Our JavaScript SDK
by
Teodor Ciuraru
In this article, we’ll detail how we introduced Expo Development Builds support for Ditto React Native and how the new Expo plugin helps developers skip several manual setup steps that React Native CLI users typically face.
Updates
Product
April 22, 2025
Flutter for Web Reaches General Availability in Record Time
by
Rae McKelvey
As of Ditto Flutter SDK v4.10.1, Flutter for Web has reached General Availability. In October 2024, when we shipped 4.8, Ditto developers started asking if we could extend Ditto to support Flutter web apps – and we took that challenge to heart. With the GA, let's take a closer look at what's included today, some key considerations, and how you can get started today.