Not using cargo, I wrote a tool in rust to describe boards, modules, applications, and their dependencies in yaml, then generate Ninja files from that. Plus some bells and whistles.
Code is here: https://github.com/kaspar030/laze
Here’s how the buildfiles look for RIOT (on an outdated branch): https://github.com/kaspar030/RIOT/tree/add_laze_buildfiles
Warning: this currently produces broken binaries, auto_init is not getting all “-DMODULE_foo” defines.
It’s still missing some crucial but rather simple features (and, documentation), but the tool itself is otherwise very close to being able to completely replace RIOT’s make based build system (well, Kconfig style configuration is missing).
It is not optimized for CI, just optimized. One crucial difference to other build systems is that it was designed to manage and build multiple (like, thousands) configurations at once. That speeds up the CI use case, or “make buildtest”, significantly. For single builds, there’s no waiting for the build system at all (it is usually parsing all build files, determining dependencies and calling out to Ninja before a Python interpreter could print “hello world”).
I hope I can fix missing features and lack of documentation for the summit and present it there.
Building fast is extremely nice. On my (admittedly fast) workstation, an incremental rebuild of all (>250) apps/tests of one board, or rebuilding one application for all boards after touching one file (core/msg.c), takes less than a second. That alone would reduce CI times, as individual developers can now do these kinds of builds on their boxes before even pushing to CI, keeping CI queues shorter.
I don’t think building RIOT’s module system in cmake or meson would meet either simplicity or performance goals, I’m happy to be proven wrong. Personally, I wouldn’t accept >1k lines of cmake script as simple, neither I’d like to work with >1s (re-)configuration times per build that zephyr’s cmake+Kconfig implemented.