You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #154654, we noted that core::io is currently gated with the feature gate core_io_borrowed_buf (code).
I would like to propose we stabilize core::io and alloc::ioexisting while leaving the contents unstable for now. That would avoid users needing to add multiple feature gates, and I think it's highly likely those names will remain in existence (and eventually have contents). Can libs-api approve that, either via FCP or just commenting here (since we're just stabilizing the modules not convinced a 10+ day wait is really needed).
We discussed this in the @rust-lang/libs-api meeting. We're not inclined to stabilize these modules before at least one item is stabilized inside them.
If excessive feature gates are a concern, this could be simplified by just having a single core_io feature that covers anything in core::io that is already stable today.
This seems to be non-breaking and allows new code to implement core::io::Read and alloc::io::Read while remaining compatible with the existing code that requires std::io::Read. It is quite close to the "perfect" solution that requires auto impl:
We could use the first solution until auto impl arrives and then switch the the second one. The switch should be non-breaking (at least I don't see what could break). The only issue I see is that the first solution encourages users to write
impl core::io::ReadforMyRead{ ... }impl alloc::io::ReadforMyRead{}// this line is not nice
Activity
[-]Tracking Issue for `alloc::io`[/-][+]Tracking Issue for `alloc::io` and `core::io`[/+]Move `std::io::ErrorKind` to `core::io::ErrorKind`
Mark-Simulacrum commentedon Apr 11, 2026
In #154654, we noted that
core::iois currently gated with the feature gate core_io_borrowed_buf (code).I would like to propose we stabilize
core::ioandalloc::ioexisting while leaving the contents unstable for now. That would avoid users needing to add multiple feature gates, and I think it's highly likely those names will remain in existence (and eventually have contents). Can libs-api approve that, either via FCP or just commenting here (since we're just stabilizing the modules not convinced a 10+ day wait is really needed).Amanieu commentedon Apr 14, 2026
We discussed this in the @rust-lang/libs-api meeting. We're not inclined to stabilize these modules before at least one item is stabilized inside them.
If excessive feature gates are a concern, this could be simplified by just having a single
core_iofeature that covers anything incore::iothat is already stable today.Rollup merge of rust-lang#154654 - bushrat011899:core_io_error_kind, …
Rollup merge of rust-lang#154654 - bushrat011899:core_io_error_kind, …
Rollup merge of rust-lang#154654 - bushrat011899:core_io_error_kind, …
Unrolled build for #154654
bushrat011899 commentedon Apr 23, 2026
Rollup merge of rust-lang#155684 - bushrat011899:blanket_io_seek_for_…
111 remaining items
nia-e commentedon Aug 11, 2026
Per today's libs meeting, we'd be happy to start FCP on a stabilisation PR for the above ^^ @bushrat011899 feel free to open one & ping us there
programmerjake commentedon Aug 11, 2026
I'm assuming by "above ^^" you mean #154046 (comment)?
bushrat011899 commentedon Aug 11, 2026
Excellent, will open one shortly!
That's how I interpret it as well, especially reading the meeting notes.
nia-e commentedon Aug 11, 2026
yep, that's correct
Rollup merge of rust-lang#160952 - bushrat011899:write_for_cursor_sta…
Rollup merge of rust-lang#160952 - bushrat011899:write_for_cursor_sta…
Unrolled build for #160952
Rollup merge of #160472 - bushrat011899:io_documentation_v2, r=nia-e
NamorNiradnug commentedon Aug 21, 2026
A thought on
Readincore. Consider the following solution:This seems to be non-breaking and allows new code to implement
core::io::Readandalloc::io::Readwhile remaining compatible with the existing code that requiresstd::io::Read. It is quite close to the "perfect" solution that requiresauto impl:We could use the first solution until
auto implarrives and then switch the the second one. The switch should be non-breaking (at least I don't see what could break). The only issue I see is that the first solution encourages users to writetisonkun commentedon Sep 7, 2026
I wonder after #160951, we may stablize
core::io::Writeas well since it doesn't have the issue asio::Readhas?It helps downstream project to avoid
stddependency if onlystd::io::Writeis involved. For example, https://github.com/fast/hashcrew/blob/dbf7916c5da3927edf4bef35c1b2d4db7ded866d/hashcrew/src/xxhash/xxh64.rs#L247-L259.rust: kbuild: add `no_io_statics` to `core-cfgs`
feat(library-config)!: make libdd-library-config no_std compatible (#…