dw2019rust
dw2019rust copied to clipboard
A tutorial for using Rust with Swift on iOS (Sep 2019)
Post-Workshop Update
A video walkthrough of this tutorial including some of the slides from the day is available on YouTube.
Workshop: Use Rust in iOS Apps
Welcome to /dev/world 2019! In this workshop we will:
- See why you might want to use Rust on iOS in the first place
- Write a simple Rust library and use public crates
- Cross-compile our code for iOS hardware and simulators
- Set up Xcode so we can use our Rust code easily from Swift
- Learn how to write Rust and Swift that interacts via a C ABI
This repository contains the written instructions and bonus exercises. There will also be some talking and slides, which are being presented at the /dev/world conference in Melbourne on 2 September 2019.
Getting Started
When you arrive, please open 00 - Setup Instructions
and get your computer ready to go! The remaining modules will be introduced and explained one at a time during the workshop.
- 00 - Setup Instructions
Modules
- 01 - Hello DevWorld - a Rust library
- 02 - Cross-compiling for Xcode
- 03 - Generating headers automatically
- 04 - Build automation
- 05 - Primitives, structs, enums
- 06 - Strings and heap memory
- 07 - Swift callbacks