Skip to content

fix(hu): use axum 0.8 wildcard route syntax in hu web - #318

Merged
YuanYuYuan merged 1 commit into
mainfrom
fix/hu-web-axum-routes
Aug 21, 2026
Merged

YuanYuYuan merged 1 commit into
mainfrom
fix/hu-web-axum-routes

Conversation

@YuanYuYuan

Copy link
Copy Markdown
Collaborator

Slice 2 of 5, splitting #311. Independent of the other four.

What this does

Uses axum 0.8 wildcard route syntax in hu web, and adds a test that builds the router.

What fails without this

The routes used the axum 0.7 form *path. Router::route validates path syntax by panicking at run time, not at compile time.

before after
hu web startup panics: Path segments must not start with '*' serves
compile clean clean — unchanged

The command was documented and shipped, and nothing caught it, because web-plugins is not a default feature and CI never compiled it.

Router construction moves into build_router so a test can exercise it without a Zenoh session or a bound socket. Building the router is the check: wrong path syntax panics there.

Important

The test only exists under --features web-plugins. Without that flag the same cargo test invocation reports 0 passed; 13 filtered out and exits 0. Any CI job meant to cover this must pass the feature, or it is green over nothing.

Breaking changes

None.

The plugin routes used the axum 0.7 form `*path`. `Router::route`
validates path syntax by panicking at run time, not at compile time, so
this compiled cleanly and aborted `hu web` the moment anyone started it.

Router construction moves into `build_router` so a test can exercise it
without a Zenoh session or a bound socket. Building the router is the
check: wrong path syntax panics there.
@YuanYuYuan
YuanYuYuan merged commit 5337c38 into main Aug 21, 2026
28 checks passed
@YuanYuYuan
YuanYuYuan deleted the fix/hu-web-axum-routes branch August 21, 2026 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant