Replace yanked core2 dependency with no_std_io2#86
Merged
sile merged 1 commit intosile:masterfrom Apr 15, 2026
Merged
Conversation
sile
approved these changes
Apr 15, 2026
Owner
sile
left a comment
There was a problem hiding this comment.
LGTM. Thank you.
MEMO
This is a breaking change for no_std users, since the public io types move from core2::io to no_std_io2::io. However, core2 has been yanked across all released versions, so continuing to rely on the current dependency is no longer practical.
In that sense, this looks more like an exceptional migration driven by the dependency situation than a routine API change.
It should not affect std users in the same way, because with the std feature enabled, no_std_io2::io resolves to std::io.
So while this is a compatibility break for no_std, the plan is to treat it as a minor version update rather than a major one when releasing it.
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.
Disclaimer: I am not very knowledgeable in these parts of the ecosystem and used coding agents for support (GLM 5.1 on company hardware). I worked closely with the agent and reviewed the code. To the best of my knowledge and ability, this PR is clean and makes sense.
Context
All versions of
core2have been yanked from crates.io and its repo is archived. The author suggests "usecoredirectly," butcore::iodoesn't provideRead/Write/Error/ErrorKindetc. yet, so that's not viable today.no_std_io2seems like the most actively maintained drop-in replacement with an identical API. TheReadandWritetraits are byte-for-byte identical tocore2's, and all needed types (Error,ErrorKind,Cursor,Take,Result) are present with the same semantics. Thestdfeature flag works the same way — it re-exportsstd::iowhen enabled.The only differences are additive:
Error::new()is generic (accepts any error type, not just&str),ErrorKindhas two extra variants (Unsupported,OutOfMemory),Cursor<Vec<u8>>implementsWrite, and there's amemchrtransitive dep.Summary of changes
Migration was a simple
core2 → no_std_io2rename — no logic changes. All 43 unit tests and 70 doc tests pass. Bothstdandno_stdbuilds compile cleanly.Alternatives
There is also
no_std_ioof whichno_std_io2is the direct fork.no_std_iohas slightly more stars (10 vs 8) but the last commit is 3 years old vs. 4 months forno_std_io2. This is why I went withno_std_io2Close #85