Axum Integration

Tower-compatible middleware and extractors for the Axum web framework.

Installation

Basic Setup

Add the PraxLayer middleware to your Axum application:

Using the Extractor

Extract the database connection in your handlers:

With State

Use Prax with Axum's shared state:

Features

🗼 Tower Compatible

Works with any Tower middleware stack.

📤 Type-Safe Extractors

DatabaseConnection extractor with proper error handling.

🔧 Flexible Configuration

Builder pattern for customizing pool and connection settings.

âš¡ Zero-Cost Layer

Minimal overhead in the request path.