On Wednesday, the libs-team discussed reorganizing the platform-specific modules inside std, namely sys and sys_common into a new structure. These modules will be merged into one sys module with a feature-first organization:
- the submodules of
sys, named after the feature they implement, contain all the implementations of the different platforms and provide a uniform interface that the rest of std may depend on. E.g. sys::thread_local, sys::fs or sys::thread_parking.
sys::pal contains platform-specific generic API wrappers like FileDesc cvt (UNIX) used to implement these features. E.g. sys::pal::unix, sys::pal::windows or (perhaps) sys::pal::apple.
The rest of std, modulo std::os, should now only depend on sys::feature_name and not sys::pal. The implementations themselves may however depend on other parts of std as necessary.
@rustbot label +T-libs +E-help-wanted
@rustbot claim
On Wednesday, the libs-team discussed reorganizing the platform-specific modules inside
std, namelysysandsys_commoninto a new structure. These modules will be merged into onesysmodule with a feature-first organization:sys, named after the feature they implement, contain all the implementations of the different platforms and provide a uniform interface that the rest ofstdmay depend on. E.g.sys::thread_local,sys::fsorsys::thread_parking.sys::palcontains platform-specific generic API wrappers likeFileDesccvt(UNIX) used to implement these features. E.g.sys::pal::unix,sys::pal::windowsor (perhaps)sys::pal::apple.The rest of
std, modulostd::os, should now only depend onsys::feature_nameand notsys::pal. The implementations themselves may however depend on other parts ofstdas necessary.sys::pal#117285sys#119996sys#120109sys#120776sys#121177sys#121758Onceimplementations tosys#122386sys_common::thread#123807sys::sync#124159sys_common::backtracetosys#126546sys#128134iomodule out ofpal, get rid ofsys_common::io#135696sys#136449fsintosys#137650sys#136780sys#136929sys_common::process#140393fdintostd::sys#139092argsintostd::sys#139710pal::envtostd::sys::env_consts#139868sys::pal::os::Envintosys::env#140143threadintosys#145177pipeintosys#146801)kernel_copytosys#147077sysrefactor #149930sys::pal::commonandsys_commonintosys::helpers#150047sys#151161exitout of PAL #152657getpidtosys::process#153130sys::palintosys@rustbot label +T-libs +E-help-wanted
@rustbot claim