Rust playground on iOS

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

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • miri

    An interpreter for Rust's mid-level intermediate representation

  • rust-lang/miri#722

  • pbzx

    Discontinued Fork of the pbzx stream parser (www.tonymacx86.com/general-help/135458-pbzx-stream-parser.html)

  • xar -xf ~/Downloads/Xcode_13.4.1.xip git clone https://github.com/nrosenstein-stuff/pbzx cd pbzx gcc pbzx.c -o pbzx -llzma -lxar cd .. ./pbz/pbzx -n Content | cpio -i

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • cctools-port

    Apple cctools port for Linux and *BSD

  • fake-uname

    bash script to fake the output of uname

  • 3) This is where I ultimately got stuck, but I tried building the Rust compiler as outlined in this guide, but it turns out the scripts try grabbing the architecture from uname (I think) but instead of getting aarch64, they get a name like iPad13,4, and fail on that. I tried using something like fake-uname to overcome this issue, but unfortunately, I couldn't convince the scripts to pick up aarch64 that way.

  • swift-bridge

    swift-bridge facilitates Rust and Swift interop.

  • 4) Another route that I tried is to develop a simple terminal app using SwiftUI with a Xcode project to build that app + link against a Rust library compiled for iOS with the actual logic. I used swift-bridge for this and it works really well, to the point where I have a custom logger that you can simply use the print stuff to SwiftUI from Rust using the log crate. Once I have a bit more time, I will probably try figuring out how to clean this up a bit more.

  • log

    Logging implementation for Rust (by rust-lang)

  • 4) Another route that I tried is to develop a simple terminal app using SwiftUI with a Xcode project to build that app + link against a Rust library compiled for iOS with the actual logic. I used swift-bridge for this and it works really well, to the point where I have a custom logger that you can simply use the print stuff to SwiftUI from Rust using the log crate. Once I have a bit more time, I will probably try figuring out how to clean this up a bit more.

  • qemu-t8030

    Discontinued iPhone 11 emulated on QEMU

  • 6) I haven't tried this one either, but there is a QEMU fork with T8030 support with a tutorial/guide too. I think this is enough to get you a shell, and maybe it can be used to run native binaries just like on a jailbroken device.

  • 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.

    InfluxDB logo
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