Re:Swift is a more convenient Rust
by pjmlp on Friday September 06, 2024 @06:38AM
(#41464818)
Try to make Rust interop with C++, C and Objective-C as easy as Swift does it.
[ Parent
| on HN ]
This is a big deal. In reality, most of the code that powers your systems (phones, tablets, any computers) is built using C and C++, regardless what OS you use.
Re:Swift is a more convenient Rust
by galangalalgol on Friday September 06, 2024 @06:57AM
(#41464935)
Agreed, and rust-c interop is as good as any other I've used. The c++ interop was clunky but getting much better with crates like zngur. That is what was holding back its use on chrome for a while. Oddly its python interop is way better with pyo3 and maturin making it super easy.
C++ is (IME) an order of magnitude more annoying from Rust than C or Objective-C. I've dealt with interop of the latter two on a number of projects and frankly found them to be fine.
(Though I wouldn't fault anyone for making an argument that Swift is still more ergonomic here)