Conversation
bmwill
force-pushed
the
no_std
branch
3 times, most recently
from
April 20, 2026 00:11
7e9760d to
4663482
Compare
added 5 commits
April 19, 2026 19:45
Previously, the crate unconditionally depended on `std`. With this commit, the crate is marked `#![no_std]` and uses `alloc` instead of `std` for its core functionality. An opt-in `std` feature gates the `io::Write`-based APIs (`Patch::to_bytes`, `PatchFormatter::write_*_into`) and the `std::error::Error` impls on error types. `HashMap` usage is now sourced from `hashbrown` rather than `std::collections` so line classification works without `std`. Tests now require `--all-features` to run since they exercise the `std`-gated APIs and rely on `alloc` prelude imports.
Enable the `std_instead_of_core`, `std_instead_of_alloc`, and `alloc_instead_of_core` clippy restriction lints so accidental reliance on `std::` in `no_std` code paths is caught at lint time.
Previously, nothing in CI proved the crate actually works in `no_std` environments — a desktop `cargo build` with `std` omitted from features still resolves `std` through the target's sysroot. With this commit, add a dedicated job that builds against `aarch64-unknown-none`, a bare-metal target without any `std` crate, so any accidental `std` reliance fails to link. The job builds both the default configuration and `--features color` to cover the feature matrix that is expected to work without `std`.
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.
No description provided.