MacMusic  |  PcMusic  |  440 Software  |  440 Forums  |  440TV  |  Zicos
rust
Search

The Rust Foundation Wants to Improve Rust and C++ Interoperability

Monday November 18, 2024. 01:34 PM , from Slashdot
The goal? 'Make C++ and Rust interoperability easily accessible and approachable to the widest possible audience.' And the Rust Foundation's 'Interop Initiative' is specifically focused on the goal of interoperability 'within the same executable,' through either inline embedding that allows 'integrated compilation', or foreign function interfaces.

To that end, a statement addressing 'the challenges and opportunities in C++ and Rust interoperability' was announced this week by the Rust Foundation. Pointing out that the 'Interop Initiative' was launched in February 2024 with a $1M contribution from Google, it now 'proposes a collaborative, problem-space approach engaging key stakeholders from both language communities.

'Rather than prescribing specific solutions, this problem statement serves as a foundation for community input and participation in shaping both the strategic direction and tactical implementation of improved C++/Rust interoperability.'

Their official problem statement outlines three 'key strategic approaches.'
- Improve existing tools and address tactical issues to reduce interoperability friction and risk in the short term.

- Build consensus around long-term goals requiring changes to Rust itself and develop the tactical approaches to begin pursuing them.

- Engage with the C++ community and committee to improve the quality of interoperation for both languages to help realize the mutual goals of safety and performance.



And it argues that interoperability 'is essential to pursuing safety and performance which is maintainable and scalable.'

A significant amount of development has gone into libraries to facilitate interoperability with both C and C++, but from the language and compiler level, the situation remains largely unchanged from the early days of Rust. As the desire to integrate Rust into more C++ codebases increases, the value of making C++/Rust interoperability safer, easier, and more efficient is rapidly increasing. While each language takes a different overall approach, both view safety as an essential concern in modern systems. Both Rust and C++ have language- and standard-library-level facilities to improve safety in seemingly compatible ways, but significant benefits are lost when transiting the foreign function interfaces (FFI) boundary using the C ABI...

The consequence of this increased cost to interoperate means both C++ and Rust codebases are less able to access valuable code that already exists in the other language, and the ability to transition system components from one language to another is reduced outside of existing C-like interface boundaries. Ultimately, this reduction in freedom leads to worse outcomes for all users since technologists are less free to choose the most effective solutions.

Read more of this story at Slashdot.
https://developers.slashdot.org/story/24/11/18/046228/the-rust-foundation-wants-to-improve-rust-and-...

Related News

News copyright owned by their original publishers | Copyright © 2004 - 2024 Zicos / 440Network
Current Date
Dec, Sun 22 - 20:45 CET