Registry / web-framework / axum-server

axum-server

JSON →
library0.8.0rscratesunverified

High level server designed to be used with the axum web framework.

# Cargo.toml [dependencies] axum-server = "0.8.0"
INSTALL
IMPORT
SIG · AXUM-SERVER
A
axum-server
web-frameworkrustv0.8.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Server
use axum_server::Server;

Starts an axum server on port 3000 with a hello route.

use axum::{Router, routing::get}; use axum_server::Server; async fn hello() -> &'static str { "Hello, World!" } #[tokio::main] async fn main() { let app = Router::new().route("/", get(hello)); Server::bind("0.0.0.0:3000").serve(app.into_make_service()).await.unwrap(); }
Debug
Known issues
gotchaRequires tokio runtime; not using tokio will cause panic at runtime.
fix
Ensure your application uses `#[tokio::main]` or manually creates a tokio runtime.
affects: >=0
Upgrade
Version history
0.8.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
13 hits · last 30 days
node
12
OpenAI (training)
1
Resources
axum-server — cargo add axum-server · libregistry