iet-stack-web-axum
stack preset official
Names the web wiring once so applications do not repeat it; the RestApi builder stays as the escape hatch.
CoreFeaturesIntegrationsStacksTooling
Used byno framework crate yetexamples/htmx-starterexamples/skills-only-appexamples/skills-only-app-task-tracker
iet-stack-web-axumpresetWeb composition presetDepends oniet-http-axumcontract
How to use it
This crate is a backend-neutral composition preset: it re-exports iet_http_axum::RestApi as WebStack, so no listener or providers are installed and the existing builder stays the escape hatch. Applications build a WebStack with rate-limiting policy, hand it to an auth stack's register, add their own modules, and call finish(state) to obtain the axum::Router passed to the HTTP host.
// examples/htmx-starter/servers/web/src/main.rs
use WebStack;
let mut stack = new
.rate_limit
.rate_limits_enabled;
// ...
let api = login
.account
.configuration
.register?; // the stack is the RestApi the auth stack mounts onto
let router = api
.module?
.finish;
rate_policy(name, RateLimitConfig::fixed(limit, window))registers a named limit before modules are added.module(name, Router)andfinish(state)come fromRestApi;WebStackadds nothing on top of them.
How it works
It is a compile-time alias: pub use iet_http_axum::RestApi as WebStack; means every method and the resulting type are the upstream ones, so the crate installs no listener, state, or providers of its own.
flowchart LR W["WebStack"] -->|re-exports| R["iet_http_axum::RestApi"] R --> B["new + rate_limit + rate_policy"] B --> G["AuthStack register"] G --> M["module name Router"] M --> F["finish state"] F --> X["axum::Router"]
What it implements
- Concrete mechanism; see the public API below.
What's inside
Modules
src/lib.rs
Public API
Depends on
Used by
- No other framework crate depends on it directly.
In this repository
examples/htmx-starterexamples/skills-only-appexamples/skills-only-app-task-tracker
Source: crates/stacks/iet-stack-web-axum