Crates.io | axum-server |
lib.rs | axum-server |
version | 0.7.1 |
source | src |
created_at | 2021-08-20 08:00:44.210326 |
updated_at | 2024-07-31 13:42:50.071001 |
description | High level server designed to be used with axum framework. |
homepage | https://github.com/programatik29/axum-server |
repository | https://github.com/programatik29/axum-server |
max_upload_size | |
id | 439910 |
size | 152,741 |
axum-server is a hyper server implementation designed to be used with axum framework.
This project is maintained by community independently from axum.
A simple hello world application can be served like:
use axum::{routing::get, Router};
use std::net::SocketAddr;
#[tokio::main]
async fn main() {
let app = Router::new().route("/", get(|| async { "Hello, world!" }));
let addr = SocketAddr::from(([127, 0, 0, 1], 3000));
println!("listening on {}", addr);
axum_server::bind(addr)
.serve(app.into_make_service())
.await
.unwrap();
}
You can find more examples here.
axum-server's MSRV is 1.63
.
This crate uses #![forbid(unsafe_code)]
to ensure everything is implemented in 100% safe Rust.
This project is licensed under the MIT license.