Splitting implementation and interface in C++
Splitting implementation and interface in C++
Posted Feb 24, 2025 14:26 UTC (Mon) by mathstuf (subscriber, #69389)In reply to: Splitting implementation and interface in C++ by farnz
Parent article: Rewriting essential Linux packages in Rust
Note that all modules used (transitively) need BMI-built in all consuming projects (e.g., if you use Boost and it uses, say, a modularized libarchive, your project needs BMIs for libarchive when importing the relevant Boost modules; consuming BMIs from an install tree is largely a dead end path due to how they work in practice), so it may be beneficial to completely hide module usage not otherwise needed in the interface.
Note that Windows is still only exposing a C ABI, so the fact that it is Rust, C, C++, or Fortran behind the scenes isn't really visible to consumers.
