http icon indicating copy to clipboard operation
http copied to clipboard

Add `no_std` support

Open Stupremee opened this issue 2 years ago • 6 comments

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.

Stupremee avatar May 10 '22 09:05 Stupremee

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.

LucioFranco avatar Jun 22 '22 18:06 LucioFranco

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

Stupremee avatar Jun 23 '22 12:06 Stupremee

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.

LucioFranco avatar Jun 23 '22 14:06 LucioFranco

Sure, that would work as well!

Stupremee avatar Jun 23 '22 15:06 Stupremee

+1 for this

Erik1000 avatar Jul 09 '22 12:07 Erik1000

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.

olanod avatar Aug 11 '22 10:08 olanod