KO
|
EN
gitlite — search
Search
#typescript
#ai-agents
#ai
#dsh-plugin
#deepseek-harness
#open-source
#cli
#claude-code
#codex
#developer-tools
#react
#windows
mendes
★ 43
Open GitHub ↗
Rust web toolkit for impatient perfectionists
Download README (.md)
Explore Similar Repositories
pwnedOS11
:
WIP iOS 11 - 12.2 & 13b1,b2 Safari Jailbreak
SchoolCampusUsed
:
Vue+SSM的校园二手交易平台
write-your-llvm-backend
:
手を動かせばできるLLVMバックエンド チュートリアル(WIP)
Steger_line_algorithm
:
Simple implementation in python of Steger algorithm to find curvilinear structure in a image
shy
:
Shunting Yard Rule Engine in Rust
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
mendes
?
Download (.md)
# Mendes: web toolkit for impatient perfectionists [](https://docs.rs/mendes/) [](https://crates.io/crates/mendes) [](https://github.com/djc/mendes/actions?query=workflow%3ACI) [](https://codecov.io/gh/djc/mendes) [](https://raw.githubusercontent.com/djc/mendes/main/LICENSE-MIT) [](https://raw.githubusercontent.com/djc/mendes/main/LICENSE-APACHE) Mendes is a Rust web toolkit for impatient perfectionists (apologies to Django). It aims to be: * Modular: less framework, more library; pick and choose components * Async: async/await from the start * Low boilerplate: easy to get started, but with limited "magic" * Type-safe: leverage the type system to make error handling low effort * Secure: provide security by default; no unsafe code in this project * Run on stable Rust (no promises on MSRV though) Mendes is currently in an extremely early phase and probably not ready for anything but experiments for those who are curious. Feedback is always welcome though! ## Minimal example This should definitely become more minimal over time. ```rust use async_trait::async_trait; use hyper::Body; use mendes::application::IntoResponse; use mendes::http::request::Parts; use mendes::http::{Response, StatusCode}; use mendes::{handler, route, Application, Context}; #[handler(GET)] async fn hello(_: &App) -> Result<Response<Body>, Error> { Ok(Response::builder() .status(StatusCode::OK) .body("Hello, world".into()) .unwrap()) } struct App {} #[async_trait] impl Application for App { type RequestBody = (); type ResponseBody = Body; type Error = Error; async fn handle(mut cx: Context<Self>) -> Response<Body> { route!(match cx.path() { _ => hello, }) } } #[derive(Debug)] enum Error { Mendes(mendes::Error), } impl From<mendes::Error> for Error { fn from(e: mendes::Error) -> Self { Error::Mendes(e) } } impl From<&Error> for StatusCode { fn from(e: &Error) -> StatusCode { let Error::Mendes(e) = e; StatusCode::from(e) } } impl IntoResponse<App> for Error { fn into_response(self, _: &App, _: &Parts) -> Response<Body> { let Error::Mendes(err) = self; Response::builder() .status(StatusCode::from(&err)) .body(err.to_string().into()) .unwrap() } } ``` All feedback welcome. Feel free to file bugs, requests for documentation and any other feedback to the [issue tracker][issues]. Mendes was created and is maintained by Dirkjan Ochtman. [issues]: https://github.com/djc/mendes/issues