3 ms·
What 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
by santaclaus 10y ago
What 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 10y 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 10y 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 10y 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 10y agoNothing about LLVM makes Swift inherently cross-platform. LLVM bitcode is not target independent.
- Alphasite_ 10y agoI'm not sure I understand the relevance? Neither are rust libraries.
- smoothdeveloper 10y 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 10y 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?