Clever system !
Clever system !
Posted Dec 4, 2024 12:28 UTC (Wed) by mathstuf (subscriber, #69389)In reply to: Clever system ! by ebee_matteo
Parent article: Rust's incremental compiler architecture
Hmm. I'm not seeing the connections to your bullet points. C++20 modules certainly support distributing ABI-stable libraries (and roughly on the same order of magnitude of difficulty as pre-modules) better than Rust does. Care to elaborate?
Posted Dec 4, 2024 12:48 UTC (Wed)
by ebee_matteo (subscriber, #165284)
[Link] (1 responses)
There is an experimental draft of a cross-compiler ABI for this, but to my knowledge this is not part of any C++ standard but just some kind of gentlemen agreement among compiler writers. People are still working on this and nowhere near complete. ABI stability is not even guaranteed across different versions of the same compiler (same as Rust, actually).
C++ does NOT define a stable ABI, it just kinda happened to settle down after decades of use. And for modules, which are a new feature, there is nothing uniform.
Posted Dec 4, 2024 16:30 UTC (Wed)
by mathstuf (subscriber, #69389)
[Link]
No one has written anything about what this looks like in the Itanium ABI (or any other for that matter). AFAIK, modules still need to ship the module sources (just like headers before). Basically, PIMPL is still relevant and no, modules don't change the decl/impl file split. I don't see any appetite for no-module-interface library deployment from implementations, but maybe I'm just not listening in the right places.
> There is an experimental draft of a cross-compiler ABI for this
Are you talking about Microsoft's IFC format? That still doesn't resolve the "need to ship module source files" problem.
> C++ does NOT define a stable ABI
Nor will the language (in any likelihood). What is stable is the implementations' guarantees about how they generate ABIs when compiling. That has been sufficient so far.
(FD, should have mentioned in the prior comment, but I was rushing out the door: I implemented C++20 module support in CMake, co-chair WG21's SG15 Tooling, and am very involved in "how to build modules" processes as I hear about them.)
Clever system !
Clever system !