4 ms·
One problem with the current Rust ecosystem is that you can't really create framework-agnostic solutions because the popular frameworks (actix, rocket, tide, wa
by ibraheemdev 6y ago
One problem with the current Rust ecosystem is that you can't really create framework-agnostic solutions because the popular frameworks (actix, rocket, tide, warp) all have different http types (albeit very similar). Unlike other languages like Go, there is not http implementation in the standard library. A standardized http crate would be a huge win for the ecosystem.
- hckr1292 6y agoThe http crate seems to be used by many popular frameworks: https://crates.io/crates/http/reverse_dependencies https://crates.io/crates/http/reverse_dependencies It's used by at least Actix-web, Tide, Hyper, and Warp. Generally, this crate's types aree re-exported from the main framework so you can avoid adding extra dependencies to your application, but AFAIK the compiler can "see through" the type alias to see that the types are the same. I think the older generations of web frameworks (like Iron, Nickel, and Gotham) might not have leveraaged the http crate, so your point still stands.
- ibraheemdev 6y agoHyper and Warp both use the http crate because they were written by the same person who wrote the http crate. All the other frameworks, including actix-web, tide, and rocket only use it for repetitive types (headers, statuscode) but have their own request, response, etc. types