feat: add support for #![no_std]
environments
#36
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.
Let me know if this interests you, feel free to close if not :)
Description
I was looking to use this crate with
#![no_std]
but it was not supported. I took a quick look at what it's doing and it doesn't look like it needsstd
at all - justcore
andalloc
.However this would bump the MSRV to 1.81.0 for
core::error::Error
so I created a new default featurestd
so this change is only opt-in (unless someone is usingdefault-features = false
already).Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
cargo check --target x86_64-unknown-none
(also added to CI)Environment (please complete the following information):
Linux mat 6.9.3-76060903-generic #202405300957~1732141768~22.04~f2697e1 SMP PREEMPT_DYNAMIC Wed N x86_64 x86_64 x86_64 GNU/Linux
Checklist:
cargo fmt
)