#axum #controller #macro #routing

axum-controller

A controller & route macro for axum

2 releases

new 0.1.1 Mar 4, 2025
0.1.0 Mar 4, 2025

#1735 in Web programming

AGPL-3.0-or-later

13KB

Crates.io Documentation

Axum-Controller

Helper macro for axum-typed-routing.

Adds a #[controller(...)] & #[route(...)] macro for less boilerplate when wiring up axum routes.

See example here.

See the docs for more information.

Licensing

This repository, like all my personal projects, is licensed under the GNU Affero General Public License v3.0 or later (AGPL-3.0-or-later). This ensures that modifications to the code remain open source when used in network services.

If the AGPL license doesn't suit your needs, a version under more permissive terms (like MIT, Apache, or BSD license) is available. Please contact me directly via the email in the crate metadata for licensing inquiries.

Inspiration & Influences

This crate is inspired by and uses/used axum-typed-routing & route_controller . I basically just merged their public API into a single coherent one to get the best of both worlds.

Dependencies

~5–12MB
~130K SLoC