hyperium / http

Rust HTTP types
Apache License 2.0
1.14k stars 284 forks source link

Add `no_std` support #551

Open Stupremee opened 2 years ago

Stupremee commented 2 years ago

Hello,

I'm currently in need of a correct Uri parser, and I believe the best URI implementation is the one in this crate. However, I don't want to add the whole http crate as a dependency. So, it would be very helpful if there was an additional crate just for URI parsing.

LucioFranco commented 2 years ago

Is there a reason you don't want to just bring in the whole http crate? The dependency is already quite light. I don't think moving things to their own crate makes anyone's life easier.

Stupremee commented 2 years ago

The reason is that http does not have support for no_std environments.

LucioFranco commented 2 years ago

Maybe a better goal would be to allow http to support no_std similar to how bytes has no_std support. I don't think the correct solution is to create another crate.

Stupremee commented 2 years ago

Sure, that would work as well!

Erik1000 commented 2 years ago

+1 for this

olanod commented 2 years ago

My use case is an HTTP client running in embedded hardware, hope this PR(https://github.com/hyperium/http/pull/563) can get some feedback :) Ideally it would be nice if http works without alloc but that seemed like a mayor refactor and possibly breaking change.