Rwf is a comprehensive framework for building web applications in Rust. Written using the classic MVC pattern (model-view-controller), Rwf comes standard with everything you need to easily build fast and secure web apps.
Getting started
Rwf is a Rust library built on top of Tokio, and can be added to any binary or library Rust project:
cargo add rwf
cargo add tokio@1 --features full
Rwf has many types and traits that make it ergonomic. You can include them all with just one import:
use *;
While not required, this makes things simpler.
Controllers
Rwf is an MVC framework, so Controllers are fundamental to serving HTTP requests. Defining controllers requires
imlementing the [controller::Controller] trait for a struct:
;
Most Rwf traits are asynchronous and use the async_trait crate to make it user-friendly.
HTTP server
Launching the Rwf HTTP server requires mapping routes to controllers, and can be done at application startup:
use Server;
async
Documentation
Rwf docs are primarily located here. While maintaining two sets of documentation can be challenging, we'll make every effort to maintain both versions. Most public methods have some documentation and examples.