Move std::io into alloc and core #156527
Open
bushrat011899 wants to merge 42 commits into
Open
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.
34a887d to
2458471
Compare
This comment has been minimized.
This comment has been minimized.
2458471 to
5a1fb6a
Compare
This comment has been minimized.
This comment has been minimized.
5a1fb6a to
ccb4dd6
Compare
This comment has been minimized.
This comment has been minimized.
e8e89b9 to
8ca7764
Compare
This comment has been minimized.
This comment has been minimized.
8ca7764 to
246b5cd
Compare
This comment has been minimized.
This comment has been minimized.
246b5cd to
c72b57c
Compare
This comment has been minimized.
This comment has been minimized.
c72b57c to
b27e709
Compare
This comment has been minimized.
This comment has been minimized.
b27e709 to
4d60996
Compare
ce186b8 to
e9eb976
Compare
This comment was marked as resolved.
This comment was marked as resolved.
std::io into alloc and core std::io into alloc and core
Contributor
Author
|
This PR is ready, but blocked on the two PRs mentioned in the description. If/when they are merged, I will split off more commits into other PRs. |
Collaborator
|
rustbot has assigned @Mark-Simulacrum. Use Why was this reviewer chosen?The reviewer was selected based on:
|
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. This PR itself is likely too large to be reasonably reviewed and merged in one go, so I'm dividing it into multiple smaller ones. Each commit in this PR is intended to be as small as possible while still being able to pass CI.Notable Changes
std::io::Errorintocore#155625 for changes required to facilitatestd::io::Errorbeing moved intocore::ioCursorincore::iorequires a blanket implemented trait to allow implementation foralloctypes, such as&mut Vec<u8>. This is done byWriteThroughCursor.ReadandWriteimplementations that have been moved toallochave been altered to account for theno_global_oom_handlingconfiguration option. The only observable change is cases where an OOM event would occur will cause the relevant IO operation to return anOutOfMemorykind ofio::Error, rather than deferring to the global OOM error handler.WriteandSeekare available incore::io, whileReadandBufReadare moved toalloc::io. SinceBufReaddepends onRead, andReadhas methods that containVecandStringin their signature, it would require substantial changes to move everything intocore.Notes