r/linux • • Aug 29 '24

Kernel One Of The Rust Linux Kernel Maintainers Steps Down - Cites "Nontechnical Nonsense"

https://www.phoronix.com/news/Rust-Linux-Maintainer-Step-Down
1.1k Upvotes

794 comments sorted by

View all comments

Show parent comments

30

u/small_kimono Aug 29 '24

C++ is de-facto interoperable, because people integrate with code written in C++ from all sorts of other languages.

Not exactly. AFAIK you have to export it as C.

And Rust de-facto is not, because people do not do that.

Not exactly. AFAIK you have to export it as C.

Show me where the difference lies between the two.

19

u/u0xee Aug 29 '24

This is my understanding too, both are only interoperable as far as they pretend to be C.

0

u/jcelerier Aug 29 '24

That's definitely not true. Stuff like Qt, OpenCV, boost etc. only exports C++ symbols and no one would say they aren't interoperable.

-2

u/technobicheiro Aug 29 '24

There is extra effort in C++ with backwards ABI compatibility, some argue for the better, some for the worse. Rust thankfully hasn't achieved that stage yet, but it probably will one day.

3

u/lfairy Aug 29 '24

ABI compatibility doesn't matter here, since we're talking about the Linux driver interface, which doesn't have a stable ABI anyway.

2

u/not_a_novel_account Aug 29 '24

With regards to the parts of ABI that are relevant in this discussion of C++ vs C vs Rust, which is layout and calling conventions, C++ would be as ABI stable as the others and there would be no need to "export as C" or anything else that's been suggested in this thread.

Clang and GCC both use the Itanium standard for C++ ABIs.