1

I would like to build my Rust library for the aarch64-apple-ios-sim target. This target is considered a Tier 3 target and does not appear in my list of available targets when I run rustup target list on either of the latest stable or nightly toolchains. I have tried running rustup target add aarch64-apple-ios-sim on the off chance that it's just a "hidden" target or something, but that did not work. What is the correct way to install a tier 3 target?

dalton_c
  • 6,876
  • 1
  • 33
  • 42
  • don't think it's currently available try `aarch64-apple-ios` should work to for `aarch64-apple-ios-sim` – Stargateur May 02 '21 at 04:03
  • @Stargateur I'm able to install `aarch64-apple-ios`, but libraries build with this target cannot be linked to iOS apps built for the simulator on M1 Macs. – dalton_c May 02 '21 at 04:12
  • You have to get the source and cross-compile it yourself -- there aren't any offical builds. – smitop May 02 '21 at 19:20

1 Answers1

3

You can do the following:

  • rustup +nightly component add rust-src
  • cargo +nightly build -Z build-std --target aarch64-apple-ios-sim

Here you can find more info: https://doc.rust-lang.org/nightly/rustc/platform-support/aarch64-apple-ios-sim.html#building-rust-programs

Ivan Sorokin
  • 201
  • 1
  • 7