Updates for July 2024

Author: thothonegan
Tags: c++ modules wolf canis

More updates. With work and other projects, it's been a while before working on things. Finally, have some time again.

C++ Modules

A lot of the infrastructure is now being moved to c++20 modules. Specifically:

  • Catalyst: Now knows how to build modules with cmake 3.29.
  • Canis: Now knows how to process MIUs and translate them into the correct Okami files.
  • Wolf: Now has a 'wolf.cpp20' module style which tells Canis to import it as a module. Starting to convert modules over to the new format.

The plan specifically for Wolf is to convert modules slowly over to the new structure. Overall, the changes are pretty minimal:

  • On the user side, use import WolfModule and replace all the include directives.
  • If you need macros from the library, you can include them like normal.
  • On the developer side, you put your MIUs in Public like normal. With catalyst, you now have sections for each type, similar to PUBLIC/PUBLIC_HEADER_ONLY/etc.
catalyst_target_add_cppsources(WolfAnalytics 
    PUBLIC_HEADER_ONLY
    Macros

    PUBLIC_MODULE
    Manager
    Module

    PUBLIC_MIU_ONLY
    Driver/All
    Logger
    WolfAnalytics
)
  • MIUs use the .cppm extension. Source is still the same. Standard practice is the main MIU with the module name, then using module partitions for each source file.

The plan is to convert modules from the outside in for simplicity. It is easier for module code to use other modules, then mixing old code with modules - mostly because of Canis requirements. This will happen over the next couple versions.

Which leads into...

Wolf 2.8

This has been a long term coming. Soon it should be back on the 3-month release schedule. With a change in how internal development is doing, it'll be another cycle before its released. But theirs a lot of improvements and deprecations coming in it while cleaning up the code. Except for modules, it should remain mostly compatible through our normal deprecation process. But there's a lot of warnings that will be emitted for naming changes.

With the module support, this requires a massive bump in compiler requirements. MacOS support is also temporarily dropped due to older compiler. There should be a way to get it working again but that's for future plans.