3 ms·
It's not that he's unwilling to make it run on stable, it's that he has to sacrifice ergonomics to make it run on stable. Despite it not being async, yet, Rocke
by Spartan-S63 8y ago
It's not that he's unwilling to make it run on stable, it's that he has to sacrifice ergonomics to make it run on stable. Despite it not being async, yet, Rocket is my go-to because it has the best ergonomics. Something like actix-web may be more performant, but it's ergonomics are poor in comparison.
Regardless, Rust is stabilizing procedural macros which just leaves the never type as the last stabilization required for Rocket to be able to run on stable Rust. Additionally, I believe their next release is targeting the rewrite to async. A lot of it has to do with Rust firming up its own story around async.
- coder543 8y ago> It's not that he's unwilling to make it run on stable, it's that he has to sacrifice ergonomics to make it run on stable. Two sides of the same coin. I clearly disagree about the amount of ergonomics that would have to be "sacrificed" in order to make the library usable in a production environment (on stable). So, it's simply an unwillingness to bring the library to stable, from my point of view. Take Tower Web for example: https://medium.com/@carllerche/tower-web-0-3-async-await-and-template-support-e0bb8ed47941 https://medium.com/@carllerche/tower-web-0-3-async-await-and... This has very similar ergonomics to Rocket in that it allows decorating handlers with their route, but it runs on Stable Rust. If you want to use `async fn`, that requires nightly for now since that's literally the nightly syntax for an async function, but the route decorators work on stable. As I previously mentioned, Tower Web is not mature, so I would not recommend it at this stage, but it shows what is possible. I don't personally think that decorating handlers with routes is significantly more ergonomic than defining a table of contents somewhere else, like Actix does it. Defining routes is usually a very small part of your code that you do once and move on. Beyond that, what ergonomics are we talking about? Actix can easily and automatically deserialize JSON into structs, for example: https://actix.rs/docs/extractors/#json https://actix.rs/docs/extractors/#json
- foldr 8y agoIs Rocket still on track to run on stable by the end of 2018, as per your comment here? https://news.ycombinator.com/item?id=16543914 https://news.ycombinator.com/item?id=16543914 Anecdotally, I've been hearing claims that Rocket will run on stable "real soon now" for quite a while now. It just doesn't look like it's going to happen.
- steveklabnik 8y agoLooks like not quite: https://github.com/SergioBenitez/Rocket/issues/19 https://github.com/SergioBenitez/Rocket/issues/19 Never type can use a crate. The hygiene and error APIs aren’t going to be stable soon. In theory it looks like rocket could use that package and accept worse error messages and build on stable. Sergio would have to weigh in on that, though, I could be wrong.