Skip to content

Doc building for ios

Valerii Hiora edited this page Jun 17, 2014 · 102 revisions

Rust on iOS

You need XCode 5.

Build Rust cross-compiler:

mkdir build_ios; cd build_ios
../configure --target=arm-apple-ios,i386-apple-ios
make VERBOSE=1

Once compilation complete you can use it.

To target device:

rustc --target=arm-apple-ios foo.rs

To target simulator:

rustc --target=i386-apple-ios foo.rs

What you get

  • all Rust superpowers
  • exception handling
  • LLDB debugging
  • green tasks

Known limitations

  • works only for armv7 architecture, armv7s and arm64 will be added soon.
  • segmented stack is disabled that means no stack protection available

Resources

  • Sample of using Rust from Objective C + Makefile for simulateous compiling for both device and simulator

All Categories:

Clone this wiki locally