TGViewer
C++ - Reddit C++ - Reddit @r_cpp · 229 subscribers
Post #24489 28
C++ Module Packaging Should Standardize on .pcm Files, Not Sources

Some libraries, such as fmt, ship their module sources at install time. This approach is problematic for several reasons:

If a library is developed using a modules-only approach (i.e., no headers), this forces the library to declare and ship every API in module source files. That largely defeats the purpose of modules: you end up maintaining two parallel representations of the same interface—something we are already painfully familiar with from the header/source model.
It is often argued that pcm files are unstable. But does that actually matter? Operating system packages should not rely on C++ APIs directly anyway, and how a package builds its internal dependencies is irrelevant to consumers. In a sane world, everything except libc and user-mode drivers would be statically linked. This is exactly the approach taken by many other system-level languages.

I believe pcm files should be the primary distribution format for C++ module dependencies, and consumers should be aware of the compiler flags used to build those dependencies. Shipping sources is simply re-introducing headers in a more awkward form—it’s just doing headers again, but worse

https://redd.it/1pmh814
@r_cpp
Reddit From the cpp community on Reddit Explore this post and more from the cpp community
More from @r_cpp
  1. Oct 10, 2026I’m Building Bursztyn OS a Polish Operating System From Scratch I’m building Bursztyn OS,…
  2. Oct 9, 2026std::variant, operator== and pattern matching I was thinking, wouldn't adding equality com…
  3. Oct 8, 2026Profiles for simplicity and guarantees - Bjarne Stroustrup - CppCon 2026 https://youtu.be/…
  4. Oct 8, 2026How to Fix autoconf-style Configuration Probing https://build2.org/blog/fix-autoconf.xhtml…
  5. Oct 8, 2026owl – a header-only C++23 HTTP framework where route patterns and handler extractors are c…
  6. Oct 8, 2026Removed by Reddit Removed by Reddit on account of violating the [content policy. ] https:/…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →