The relationship between std::sys_common, std::sys and the rest of std is complex, with dependencies going in all directions: std depending on sys_common, sys_common depending on sys, and sys depending on sys_common and std. Ideally sys_common would be split into two and the dependencies between them all would form a dag.
There is a lot of interdependence between std, sys and sys_common, this is because sys_common contains several types of code:
- abstractions over the different platform implementations in std::sys (for example
std::sys_common::mutex)
- code shared between platforms (for example
std::sys_common::alloc)
- code that is not platform-dependent (for example
std::sys_common::poison)
In order to reduce the interdependence, sys_common will be restructured:
- A new module
sys::common is introduced; code that is shared by all platforms will be moved from sys_common to this new module.
- Code that is shared between some but not all platforms will be moved to
sys and shared using #[path] instead.
- Code that is not platform-dependent will be moved out of
sys_common to the appropriate place in std.
Ideally the end-result of this is sys_common again only containing platform-independent abstractions on top of sys.
There is a lot of interdependence between
std,sysandsys_common, this is becausesys_commoncontains several types of code:std::sys_common::mutex)std::sys_common::alloc)std::sys_common::poison)In order to reduce the interdependence,
sys_commonwill be restructured:sys::commonis introduced; code that is shared by all platforms will be moved fromsys_commonto this new module.sysand shared using#[path]instead.sys_commonto the appropriate place instd.Ideally the end-result of this is
sys_commonagain only containing platform-independent abstractions on top ofsys.