IM
imbolc/axum-folder-router
Next.js inspired folder-based routing for axum.
axum-folder-router
#[folder_router(...)] is a procedural attribute macro for the Axum web framework that automatically generates router boilerplate based on your direcory & file structure.
Inspired by popular frameworks like next.js.
Features
- File System-Based Routing: Define your API routes using intuitive folder structures
- Reduced Boilerplate: Automatically generates route mapping code
- IDE Support: Generates proper module imports for better rust-analyzer integration
- Multiple Routers: Create separate folder-based routers in the same application
Usage
For detailed instructions see the examples or docs.rs.
License
This repository, is licensed permissively under the terms of the MIT license.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, shall be licensed as above, without any additional terms or conditions.
Attribution
This macro is based on the build.rs template by @richardanaya
On this page
Languages
Rust88.5%Nix10.6%Shell0.9%
Contributors
MIT License
Created May 31, 2025
Updated May 31, 2025