News for hackers. Stuff that matters.
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.
Re:Swift is a more convenient Rust by sgt on Friday September 06, 2024 @06:40AM (#41464831)
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.
Re:Swift is a more convenient Rust by Klonoar on Friday September 06, 2024 @07:37AM (#41465182)
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)