πͺΆ Feather
Feather is a lightweight, DX-first web framework for Rust β inspired by the simplicity of Express.js, but designed for Rustβs performance and safety.
π§ No async.
π§± Middleware-first.
β‘ Just works.
β¨ Why Feather?
-
π§± Middleware-First Architecture
Everything is a middleware β route handlers, auth, logging, error handling β all composable and clean. -
πͺΆ Lightweight and Fast
Feather uses traditional threads instead of async, avoiding the overhead and complexity of Rustβs async model. -
π¦ Easy State Management Using Context
In the recent version Feather implemented the Context API that allows it have easy state managment without the use of Extractors/Macros -
π§βπ» Developer Experience First
Featherβs API is minimal, ergonomic, and readable β no lifetimes, no.await, -
π¦ Modular and Extensible
Build the framework you want with plug-and-play middleware, simple traits, and clear primitives. -
π¨ Great Tooling Out Of the Box
With the use of the Feather-CLI Creating API's and Web Servers Become a Breeze.
π Getting Started
Add Feather to your Cargo.toml:
[]
= "0.3.1"
π§ Quick Example
use ;
βοΈ Thatβs all β no async, no magic.
π Middleware in Feather
Middleware is the heart of Feather. Write it as a closure, a struct, or chain them together:
use ;
use builtins;
use ;
// Implementors of the Middleware trait are middleware that can be used in a Feather app.
;
π¦ State Management using the Context API
Feather's new Context API allows you to manage application-wide state without extractors or macros. Here's an example:
use ;
Context Is more useful when combined with Database/File Accesses
π Built-in JWT Authentication
Feather has native JWT middleware activated using a cargo feature jwt:
[]
= { = "0.3.1", = ["jwt"] }
use ;
use ;
No need to reach out for 3rd Party Crates Feather Got you Covered!
π§± Goals
- πͺΆ Be the simplest Rust web framework to get started with
- π§© Be modular and easy to extend
- π‘ Focus on DX without sacrificing Rust's safety and performance
π€ Contributing
PRs welcome!
If youβve got ideas or bugs, open an issue or submit a pull request.
# Getting started with dev
π License
Feather is MIT licensed. See LICENSE.
π Acknowledgments
Feather is inspired by Express.js and exists to bring that same productivity to Rust.
Thanks to the Rust community for the incredible ecosystem this project builds on.
π£ Spread the Word
If you like Feather:
- β Star it on GitHub
- π° Share it on Reddit, HN, or Discord
- π Build something and show us!