Crates.io | axum-server2 |
lib.rs | axum-server2 |
version | 0.7.2 |
source | src |
created_at | 2024-11-05 07:16:09.537536 |
updated_at | 2024-11-07 11:00:53.816154 |
description | High level server designed to be used with axum framework. |
homepage | |
repository | https://github.com/penumbra-x/axum-server2 |
max_upload_size | |
id | 1436145 |
size | 173,109 |
axum-server2 is a hyper server implementation designed to be used with axum framework.
This project is maintained by community independently from axum.
This branch applies a patched version of boringssl
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_server2::bind(addr)
.serve(app.into_make_service())
.await
.unwrap();
}
You can find more examples here.
axum-server2's MSRV is 1.66
.
This crate uses #![forbid(unsafe_code)]
to ensure everything is implemented in 100% safe Rust.
This project is licensed under the MIT license.
The project is based on a fork of axum-server.