Building Rust libraries for iOS in 2021

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

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • 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 😕

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

  • 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