rust icon indicating copy to clipboard operation
rust copied to clipboard

Tracking Issue for restructuring `std::sys`

Open joboet opened this issue 1 year ago • 1 comments

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.

### 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

joboet avatar Oct 27 '23 11:10 joboet

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.

ChrisDenton avatar Jan 22 '24 09:01 ChrisDenton