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. Two sides of the same coin. I clear
by 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