Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is current state of iOS support of Rust?

Tags:

ios

rust

This document is saying the safe tasks are not supported on iOS target due to lack of segmented stack support. I looked into Rust's issue tracker, and this is somewhat related to thread-local-storage of 32-bit version of iOS. Well, I am not really familiar with this kind of topics.

Anyway, this text is saying the segmented stack approach is going to be abandoned. There's an HN entry which says it's not really required in 64-bit systems.

I am confusing on this. What is current state of iOS support of Rust? No stack protection at all on tasks? Or protected only in 64-bit?

like image 438
eonil Avatar asked Oct 11 '14 16:10

eonil


People also ask

Can rust be used for iOS?

Rustup installs Rust from the official release channels and enables you to easily switch between different release versions. It will be useful to you for all your future Rust development, not just here. Add the iOS architectures to rustup so we can use them during cross compilation.

Does Xcode support rust?

Rust libaries as Xcode projects. Generates Xcode project files from Cargo. toml allowing use of Rust libraries in Mac and iOS applications without leaving Xcode.


3 Answers

There is a blog post that claims

Rust is now completely ported to iOS: all architectures for device/simulator are supported. Since green threads were removed, adding support of arm64 was actually almost straightforward.

Github also has an example iOS app (written in Swift) that calls into a cross-compiled framework (written in Rust).

like image 140
Thilo Avatar answered Oct 16 '22 19:10

Thilo


Segmented stacks were abandoned, and there have been lots of 'fix iOS build' PRS: https://github.com/rust-lang/rust/search?q=ios&type=Issues&utf8=%E2%9C%93

I don't know more than that, though.

like image 36
Steve Klabnik Avatar answered Oct 16 '22 19:10

Steve Klabnik


iOS target (both armv7 and aarch64) is officially supported as a Tier 2 platform.

Tier 2 platforms can be thought of as "guaranteed to build". Automated tests are not run so it's not guaranteed to produce a working build, but platforms often work to quite a good degree and patches are always welcome!

Mac->iOS cross compiler is automatically built on every PR/merge.

The team is happy to improve support. It's mostly a matter of somebody making a reliable buildbot integration for automated tests.

like image 1
Kornel Avatar answered Oct 16 '22 20:10

Kornel