Oh FFS!
Oh FFS!
Posted Nov 25, 2024 12:14 UTC (Mon) by pizza (subscriber, #46)In reply to: Oh FFS! by Wol
Parent article: NonStop discussion around adding Rust to Git
In the short term, you're cross-compiling anyway.
But it's a lot simpler to just port the parts of GCC/LLVM necessary for cross-compilation of C (including a very minimal libc) than it is to _also_ port the inftastructure neeed for C++ (and Rust) including their respective standard/runtime libraries.
Once you have the basics going, then you can go back and port a full-featured libc, then move on to the infrastructure needed for C++, Rust, and so forth as needed.
Posted Nov 25, 2024 18:04 UTC (Mon)
by Cyberax (✭ supporter ✭, #52523)
[Link] (2 responses)
Oh, absolutely. Interestingly, adding Rust is _easier_ than C++. You don't need to worry about a lot of gnarly stuff like multiple inheritance, member pointers, and so on.
Posted Nov 30, 2024 14:35 UTC (Sat)
by mathstuf (subscriber, #69389)
[Link] (1 responses)
Posted Nov 30, 2024 21:01 UTC (Sat)
by Cyberax (✭ supporter ✭, #52523)
[Link]
Virtual table layouts, virtual tables during object construction, and so on. For member pointers: the way you represent pointers to virtual functions (via offsets in a vtable). Also various small things, like allocating storage for the array length so that delete[] can properly run destructors.
Nothing too complicated, but still a fair bit of work. And I assume that you don't want to just re-use the existing ABI for some reason, because it equally applies to Rust as well as C++.
Oh FFS!
Oh FFS!
Oh FFS!