6 ms·
Building an iOS App in Rust
- kibwen 11y agoNote that this is from 2015, the recent push to improve Rust's cross-compilation story may have made the info within obsolete.
- weinzierl 11y ago> Note that this is from 2015 That's true. The submission is only the first part of a series that spans several months. I pasted the links below for convenience[1]. The last part (so far) is from April 14, 2016. > he recent push to improve Rust's cross-compilation story may have made the info within obsolete. Now that we have rustup [2], what is described in the first part should be much easier. I find it still worthwhile because it helps to understand what rustup does for you automatically. Researching this topic is actually how I found the article. [1] https://www.bignerdranch.com/blog/building-an-ios-app-in-rust-part-1/ https://www.bignerdranch.com/blog/building-an-ios-app-in-rus... https://www.bignerdranch.com/blog/building-an-ios-app-in-rust-part-2/ https://www.bignerdranch.com/blog/building-an-ios-app-in-rus... https://www.bignerdranch.com/blog/building-an-ios-app-in-rust-part-3/ https://www.bignerdranch.com/blog/building-an-ios-app-in-rus... https://www.bignerdranch.com/blog/building-an-ios-app-in-rust-part-4/ https://www.bignerdranch.com/blog/building-an-ios-app-in-rus... [2] https://www.rustup.rs/ https://www.rustup.rs/
- santaclaus 11y agoWhat is the advantage of using Rust for an iOS app over Swift, especially now that Swift is open source? I doubt the overheard of reference counting is going to be an issue for most iOS apps (although I'd be super interested to hear where it might).
- danielvf 11y agoThe idea is to use it for cross platform libraries. Let's say you were building an RSS reader, you could reuse your same feed parsing code on Android, Windows, Mac, and Linux.
- santaclaus 11y agoBut with Swift riding on top of the LLVM infrastructure similar to Rust, cross platform libraries are also possible with the Swift toolchain, no?
- ultramancool 11y agoSure - this may be me more appealing if you prefer Rust as a language or wrote some existing code in it but still want to be able to target iOS.
- theresistor 11y agoNothing about LLVM makes Swift inherently cross-platform. LLVM bitcode is not target independent.
- Alphasite_ 11y agoI'm not sure I understand the relevance? Neither are rust libraries.
- smoothdeveloper 11y agoNot sure about exposing Swift to C itself, while Rust has a clear "call from C" story. I think that's what was referred to.
- weinzierl 11y agoI submitted this primarily because it gives a good overview what obstacle you have to overcome to actually integrate a native library (Rust, C or C++, all the same) into an iOS application. If that is a practical approach, I'm not sure. It's an interesting approach nevertheless. For the Rust over Swift aspect: What appeals to me about Rust (besides the safety first attitude) is that it is truly platform agnostic. With Swift I'd fear that I end up with primarily an iOS app that somehow runs on other platforms. Given the recent activities for bringing Swift to Non-Apple platforms my fear might be ill-founded?