Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> 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.



Swift 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


> 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: