Re:Interoperating Between Objective-C and Rust
by comex on Sunday November 30, 2014 @12:39AM
(#8676088)
Just to bring up something I've been thinking about, Rust would have a lower impedance mismatch with Swift interfaces - memory safe APIs, with a more C-like method syntax, more strongly typed in general (optionals, generics...), more functional (although AFAIK there aren't currently many Swift-specific APIs, as opposed to Objective-C ports), and so on. Its binary module system also matches Rust somewhat better than Objective-C's basically #include based system. Unfortunately, Swift's runtime, aside from being more complicated than Objective-C's, is completely undocumented (and closed-source), so it would take a good bit of reverse engineering to create a bridge.
[ Parent
| on HN ]
Re:Interoperating Between Objective-C and Rust
by sjwright on Sunday November 30, 2014 @05:08AM
(#8676487)
You can do this sort of thing with Objective C precisely because the layer between ObjC and C is so clean and concise. It's a strict superset of the C language; the C at its core is pure and entirely unmolested.
What makes interoperability possible is Rust's existing C interop.
Rust doesn't have any Swift interop.