rust
rust copied to clipboard
Tracking Issue for restructuring `std::sys`
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 ofstd
may depend on. E.g.sys::thread_local
,sys::fs
orsys::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.
### Tasks
- [ ] #117285
- [ ] https://github.com/rust-lang/rust/pull/119935
- [ ] https://github.com/rust-lang/rust/pull/119996
- [ ] https://github.com/rust-lang/rust/pull/120109
- [ ] https://github.com/rust-lang/rust/pull/120776
- [ ] https://github.com/rust-lang/rust/pull/121177
- [ ] https://github.com/rust-lang/rust/pull/121758
- [ ] https://github.com/rust-lang/rust/pull/122386
- [ ] Move remaining features from `sys_common` and `sys::pal` into `sys`
@rustbot label +T-libs +E-help-wanted @rustbot claim
Something that just occurred to me is that we might want to add commits to https://github.com/rust-lang/rust/blob/master/.git-blame-ignore-revs if they're purely moving files. This allows GitHub's blame interface to ignore them.