Building Rust libraries for iOS in 2021

This page summarizes the projects mentioned and recommended in the original post on

Our great sponsors
  • Scout APM - Less time debugging, more time building
  • OPS - Build and Run Open Source Unikernels
  • SonarLint - Deliver Cleaner and Safer Code - Right in Your IDE of Choice!
  • cargo-lipo

    Cargo subcommand to automatically create universal libraries for iOS.

    When I created the library a few years ago, the go-to way for this was cargo-lipo. That worked fine when building for aarch64-apple-ios and x86_64-apple-ios, but when building both for ARM64 iOS and M1 the linker fails:

  • Cargo

    The Rust package manager

    It seems that the reason for this is this cargo bug and that fat binaries with both aarch64-apple-ios and aarch64-apple-darwin don't seem to work 😕

  • Scout APM

    Less time debugging, more time building. Scout APM allows you to find and fix performance issues with no hassle. Now with error monitoring and external services monitoring, Scout is a developer's best friend when it comes to application development.

  • glean

    Modern cross-platform telemetry (by mozilla)

    We do what cargo-lipo recommends: Adjust the library search path per target, build your library as normal per target and Xcode will figure out the rest. That works perfectly fine. We ship our library as an xcframework within a Swift package now. Applications can then rely on the Swift Package Manager to do its thing. (At some point I should write this up nicely in a blog post or something I guess...)

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts