Skip to content
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

no_std support #21

Merged
merged 3 commits into from Oct 12, 2023
Merged

no_std support #21

merged 3 commits into from Oct 12, 2023

Conversation

marius-meissner
Copy link
Contributor

@marius-meissner marius-meissner commented Mar 19, 2022

This is an awesome crate, but unfortunately fails to build on no_std projects.
This PR adds support for no_std builds by adding a std feature, which when is disabled enables no_std environments.

bytes-utils dependency
To make this work, a similar change for bytes-utils was needed: vorner/bytes-utils#3
So I just pointed Cargo.toml to the PR fork
.
Feel free to suggest another approach if you are not happy with that (e.g. pinning to hash, using dependency patch, just wait for the other PR, etc.).

Code formatting
Seems cargo fmt was not executed for a while. So I skipped this step for not messing up this PR with code style changes.

Circle CI
In my opinion, it makes sense to add a CI step to check for successful no_std builds.
Unfortunately, cargo always compiles dev dependencies, even for release builds. Cargo flag avoid-dev-deps is fixing this, but is still unstable. So the CI job is testing only nighly Rust for now.

Looking forward to your feedback!

@marius-meissner
Copy link
Contributor Author

Notes regarding bytes-utils dependency are obsolete, as PR vorner/bytes-utils#3 has been already merged and published (v0.1.2) in the meanwhile.
Thanks to @vorner!

@aembke
Copy link
Owner

aembke commented Mar 22, 2022

Hi @marius-meissner, thanks for doing this! Just a heads up, I probably won't have a chance to look at this until this weekend, but I'll post an update then once I have a chance to take a look.

@marius-meissner
Copy link
Contributor Author

What is the status here? If I can support in any way, please let me know.
@aembke No need to rush, just a quick heads up.

@marius-meissner
Copy link
Contributor Author

Just rebased this PR to the latest main state.

@aembke
Copy link
Owner

aembke commented Oct 12, 2023

Hey @marius-meissner, apologies again for the really long delays here. I'm coming back around to updating this library, so I'll merge this and work it into a larger 5.0.0 release. Thanks again for your help and patience here.

@aembke aembke merged commit 747cc5d into aembke:main Oct 12, 2023
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.

None yet

2 participants