Skip to content

feat!: make parsing and formatting no-alloc - #193

Draft
robjtede wants to merge 2 commits into
masterfrom
agent/readd-no-alloc-support
Draft

feat!: make parsing and formatting no-alloc#193
robjtede wants to merge 2 commits into
masterfrom
agent/readd-no-alloc-support

Conversation

@robjtede

@robjtede robjtede commented Aug 2, 2026

Copy link
Copy Markdown
Member

Prepares no-alloc support for the breaking v3 release.

  • Adds the alloc feature and a no-alloc compatibility target.
  • Keeps parsing and formatting available when all features are disabled.
  • Replaces the String error from ByteSize::from_str() with
    ByteSizeParseError.
  • Makes ByteSizeParseError and UnitParseError implement
    core::error::Error without allocation.
  • Formats width and precision directly through core::fmt, without an
    intermediate String.

The ByteSize::from_str() error type change is the intentional breaking change
for v3. No version files change; release-plz will prepare the release after
merge.

Validated with:

  • just check
  • just test
  • just test-msrv
  • just build-no-std
  • just build-no-alloc

@robjtede
robjtede force-pushed the agent/readd-no-alloc-support branch from 92458b2 to e801357 Compare August 2, 2026 03:40
@robjtede robjtede changed the title feat: re-add no-alloc support feat!: make parsing and formatting no-alloc Aug 2, 2026
BREAKING CHANGE: ByteSize::from_str now returns ByteSizeParseError instead of String.
@robjtede
robjtede force-pushed the agent/readd-no-alloc-support branch from e801357 to bcab7f6 Compare August 2, 2026 03:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant