Skip to content

no_std support. #740

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

no_std support. #740

wants to merge 1 commit into from

Conversation

sunfishcode
Copy link

This PR is similar to other no-std PRs, however it takes the approach of using the new core::error module in Rust 1.81. This means that no-std mode has an MSRV of Rust 1.81, while the existing MSRV of 1.49 is still supported for existing users, as suggested here.

This PR also preserves semver compatibility, and avoids adding any new dependencies or required features for existing users. And it avoids modifying the tests and benchmark sources, as those don't need to be no-std. And it avoids making any unrelated changes.

And, it adds CI coverage and README.md documentation.

Fixes #551.

@ivila
Copy link

ivila commented Apr 21, 2025

Just a suggestion, maybe you can create a compatible layer like serde-rs do: https://github.com/serde-rs/serde/blob/master/serde/src/lib.rs#L166-L287
image

This PR is similar to other no-std PRs, however it takes the approach of
using the new [`core::error`] module in Rust 1.81. This means that no-std
mode has an MSRV of Rust 1.81, while the existing MSRV of 1.49 is still
supported for existing users, as suggested [here].

This PR also preserves semver compatibility, and avoids adding any new
dependencies or required features for existing users. And it avoids
modifying the tests and benchmark sources, as those don't need to be no-std.
And it avoids making any unrelated changes.

And, it adds CI coverage and README.md documentation.

[here]: hyperium#563 (comment)
[`core::error`]: https://doc.rust-lang.org/stable/core/error/index.html

Fixes hyperium#551.
@sunfishcode
Copy link
Author

@ivila I can make that change, if the maintainers here would prefer it that way.

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.

Add no_std support
2 participants