Rouille, Rust web server middleware
Documentation
Link to WIP book
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT) at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be dual licensed as above, without any additional terms or conditions.
FAQ
But I'm used to express-like frameworks!
Instead of doing this: (pseudo-code)
server.;
server.;
server.;
In rouille you just handle each request entirely manually:
// initialize everything here
start_server;
What about performances?
The state of async I/O, green threads, coroutines, etc. in Rust is still blurry.
The rouille library just ignores this optimization and focuses on providing an easy-to-use API instead.
Once async I/O has been figured out, rouille will be updated to take this into account. For the moment it favors usability over performances.
Are there plugins for features such as database connection, templating, etc.
It should be trivial to integrate a database or templates to your web server written with rouille. Moreover plugins need maintenance tend to create a dependency hell. It is generally just better not to use plugins.
How do you know there is no defect in the API?
I'm using this library to rewrite an existing medium-sized website.