Iron isn't maintained anymore. It would be good to replace it.
Try rocket.rs
I think Rocket is a no-go until it can be used on stable. Unless this project isn't aiming for stable Rust.
What do you mean stable rust. Some people have already used it in production two weeks after rocket's release
You're right about Rocker being used in production. But let me try to explain my point more clearly:
Rocket requires Nightly Rust to compile because of the features it depends on. By adopting it, gutenberg will stop building on Stable Rust. That's what I meant on the my comment above.
However, if it is okay for gutenberg to be restricted to Nightly Rust, there is no problem replacing Iron by Rocket. But some people values the ability to use a library on Stable Rust, since it conveys... well... more stability.
makes sense
what about just using hyper (which seems to be fairly well maintained / not going anywhere in the near future)? I like Rocket and a few other solutions but switching to another library could end up unmaintained soon just like iron.
Rocket is a no-go as it only works in nightly. Using hyper directly sounds ok but seeing how little code we currently need, I wouldn't mind a wrapper around it to make it shorter. I just saw https://github.com/stephank/hyper-staticfile but that's still 70 lines vs 4 currently
That's the problem with Hyper. But other than requiring more lines of code, it will do the same job, it is more up-to-date, and it seems to be the de facto server engine. Other options that build on Stable Rust are:
I am giving it a try with actix-web. Hyper is still a huge mess and far from getting to 1.0.
actix-web (or any other web framework) is at least a stack above. I'd say it is better to use Hyper directly once its API and implementation settles down.
This isn't as straight-forward as I thought. It will take time for me since I'm a Rust beginner. If anyone wants to tackle this, feel free to.
I got a clumsy version working with actix-web. Then it occurred to me that we don't know the future of it either. The crate that has a higher chance to stay is hyper. So I made a version with it.
All good, until I realized hyper's tutorial uses futures 0.1, whereas 0.2 was just released. Before I got a hang of 0.2 so I could make the right changes, I read it's announcement and realized that 0.3 will get released pretty soon.
At this point I'm thinking two things:
hyper and futures. Pinned types and async/await are "close" to be part of Rust, which would change said APIs somewhat.I suggest we leave this issue open (maybe put it in a milestone) for future development _when_ hyper and futures and Pin/Unpin and async/await are more stable so they can be used.
actix-web is a very interesting project, but apart from being actively developed, it isn't different than using iron as a solution. Lastly, hyper has a nice low-level API that isn't too complex. It would justify the extra lines of code, in my opinion.
I agree @andradei , I keep wanting to look at doing http in Rust but it's always waiting for X before tons of breaking changes
:wave: I was looking for an excuse to try out actix-web, and also to familiarize myself a bit with how gutenberg works. I gave it a swing, and I think I've got a version that is on parity with the status quo. PR submitted for your consideration!
Most helpful comment
what about just using hyper (which seems to be fairly well maintained / not going anywhere in the near future)? I like Rocket and a few other solutions but switching to another library could end up unmaintained soon just like iron.