aembke / redis-protocol.rs

A Rust implementation of RESP2 and RESP3
Apache License 2.0
39 stars 13 forks source link

no_std support #21

Closed marius-meissner closed 11 months ago

marius-meissner commented 2 years ago

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: https://github.com/vorner/bytes-utils/pull/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 commented 2 years ago

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

aembke commented 2 years ago

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 commented 2 years ago

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 commented 1 year ago

Just rebased this PR to the latest main state.

aembke commented 11 months ago

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.