2 ms·
> IMO Rust has much better FFI than Swift, but that's primarily due to Apple. How so? Swift has a stable ABI that, among other things, enables it to expose FFI
by zozbot234 6y ago
> IMO Rust has much better FFI than Swift, but that's primarily due to Apple.
How so? Swift has a stable ABI that, among other things, enables it to expose FFI bindings to many other languages. Rust has made the pragmatic choice of having no stable FFI beyond the C one, so if you want to setup FFI to a Rust library you'll have to write C-compatible wrapping code in Rust and expose that.
- FlyingSnake 6y agoSwift got stable ABI in version 5, that’s bit late IMO. Also the community efforts to improve Rust interop (e.g. Rustler/Elixer) are way ahead when compared to Swift. That being said, I personally am happy that both languages to have first class FFI
- skohan 6y ago> that’s bit late IMO It's pretty rare for a language to have a stable ABI, no? I mean Rust still doesn't have one.