4 ms·
Swift is more high-level. That's not an accident: Swift is designed to write the front end of an interactive application, while Rust is designed to build the ba
by notriddle 10y ago
Swift is more high-level. That's not an accident: Swift is designed to write the front end of an interactive application, while Rust is designed to build the back end thereof. But if you're coming from dynamic languages, Rust's biggest talking-point advantage over Swift is how easy it is to integrate Rust with other systems.
Rust doesn't have "special integration" like Swift does with Cocoa, but it will talk to anything that will talk to C. Which is basically everything. It will talk to Java's JNI (including Android NDK), it will talk to Ruby's MRI, it will talk to CPython, it will talk to Node, and I can even integrate Rust with Swift. [It's pretty much just a matter of converting the function declarations and asking to have your project compiled into a C shared library.](https://doc.rust-lang.org/book/ffi.html https://doc.rust-lang.org/book/ffi.html) ("rust-bindgen" and "rust-cheddar" automate this)