[WIP]: Move std::io into alloc and core #156527
Draft
bushrat011899 wants to merge 16 commits into
Draft
Conversation
This comment has been minimized.
This comment has been minimized.
4 tasks
This comment has been minimized.
This comment has been minimized.
bushrat011899
commented
May 13, 2026
This comment has been minimized.
This comment has been minimized.
8896564 to
066b445
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
- Unsafe core must be documented. - Types from dependencies must be inlined. - These types are only used within `core` so `pub` must be replaced with `pub(crate)`.
Viewing internals wont be possible from `std` once moved into `core`.
Adjust `Error` documentation `core` is more restrictive with documentation quality and linking to other items. Methods that will be implemented through incoherence must also be explicitly linked.
Personal preference that will be used for another module in a later commit. Purely stylistic.
They'll be moved into `core` but must be accessible from `std`.
Incoherence is required to define inherit methods on `Error` from `alloc` and `std` once it is moved into `core`. This is required because: 1. `Box` is part of `Error`'s public API and that is only accessible from `alloc`. 2. `RawOsError` methods must ensure the `OsFunctions` atomic pointer is appropriately set, which can only be done from `std`.
Required to allow `std` access from `core`
This allows `Error` to be moved into `core` while still retaining the ability to store custom error data. This may have performance implications!
Stored in a `static` `AtomicPtr` to allow definition in `core` and setting in `std`. Should be replaced with Externally Implemented Items (EII) or similar once stable.
Now that `Error` lives in `core::io`, doc links to it from `core` can be simplified.
34a887d to
2458471
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
View all comments
ACP: rust-lang/libs-team#755
Tracking issue: #154046
Blocked on: #155625
Blocked on: #155849
Description
Moves as much of
std::iointocore::ioandalloc::ioas practically possible. Work In Progress until the prerequisite PRs are merged. Likely has documentation issues that will need to be resolved. Will almost certainly be split into smaller PRs as +/- 5000 LoC is a bit much for a single PR IMO.Notes