Skip to content

pipewire, libspa: Rework module hierarchy so that items are in (or near) the location of their corresponding header

Tom Wagner requested to merge ryuukyu/pipewire-rs:module-reorganization into main

Our previous strategy of organizing modules and their items was simply to put stuff whereever it roughtly fit. Some items were pub used to the crate root, other things were in random modules, and some things even appeared in multiple locations due to their module being pub, but the module also being pub used in the crate root.

The new strategy is that most things should be in a module which is in a location that corresponds to their C headers location in the upstream pipewire and spa libraries.

For example, an item in pipewire/core.h will be in pipewire::core, while an item in spa/utils/dict.h will be in spa::utils::dict.

Some items where the exact header doesn't really add any information, things may be moved to a slightly different location, e.g. spa_direction from spa/utils/defs.h is contained directly in spa::utils.

Merge request reports