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.
Why Feather?
-
Middleware-First Architecture
Everything is a middleware—even if it's not, it produces a middleware in the end.
The newmiddleware!macro makes writing route and middleware closures concise and ergonomic. -
Easy State Management Using Context
The Context API makes it very easy to manage state without the use of Extractors/Macros. -
All in One
Feather is a complete web framework that includes routing, middleware, logging, JWT authentication, and more, all in one package. -
Feel of Async Without Async
Feather is multithreaded by default, running on Feather-Runtime.
How it works behind the scenes
Feather is powered by Feather-Runtime, a custom runtime built for high concurrency and low latency without using Rust's async/await. Each request is handled by a lightweight coroutine, enabling thousands of concurrent connections with simple, synchronous code. For more technical details, see Feather-Runtime.
Getting Started
Add Feather to your Cargo.toml:
[]
= "~0.6"
Quick Example
use ;
That’s all — no async.
Middleware in Feather
Middleware is the heart of Feather. You may write it as a closure (using the middleware! macro), a struct, or chain them together:
use ;
Or as a struct:
use ;""
;
State Management using the Context API
Feather's Context API allows you to manage application-wide state without extractors or macros.
use ;
Context is especially useful when needing to access databases and files.
Built-in JWT Authentication
Feather has a native JWT module activated using a cargo feature jwt:
[]
= { = "*", = ["jwt"] }
use ;
use ;
Logging
When you create a new Feather application, it initializes the logger by default.
if you don't want it to be initialized, you can disable it by create a App with without_logger method
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 are welcome!
If you have ideas or bugs, please 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.
Huge thanks to the Rust community for their support and contributions!
Special thanks to the contributors who have helped make Feather better!
Spread the Word
If you like Feather:
- ⭐ Star it on GitHub,
- Share it on Reddit, HN, or Discord
- Build something and show up!