Skip to content

feat(router)!: Adopt matchit 0.9 route syntax and prepare Windmark 0.10.0 - #9

Merged
Fuwn merged 5 commits into
mainfrom
feat/route-syntax-and-dependencies
Oct 26, 2026
Merged

Fuwn merged 5 commits into
mainfrom
feat/route-syntax-and-dependencies

Conversation

@Fuwn

@Fuwn Fuwn commented Oct 26, 2026

Copy link
Copy Markdown
Member

Windmark's router used matchit 0.7.3, the last release before matchit changed its route syntax. This PR moves the router to matchit 0.9 and its braced route parameters. mount now panics on the old syntax, which would otherwise mount without error and never match. The PR also updates the remaining dependencies and bumps Windmark to 0.10.0 and Rossweisse to 0.0.5.

Changes

  • Adopt matchit 0.9. Routes capture a segment with {name} and the remaining path with a trailing {*name}. A parameter can now have a static prefix or suffix within its segment, such as /img-{id}.png.
  • Make mount panic on a route with a segment that starts with : or *. The panic message shows the braced form. Matchit 0.9 treats these segments as literal text, so /users/:id would match only the path /users/:id.
  • Apply percent-escape normalisation and case folding only to the static text of braced routes, and treat {{ and }} as literal braces.
  • Update syn to 3.0.9 in Rossweisse. Its source needed no changes.
  • Raise the minimum versions of async-trait, futures-util, log, openssl, quote, and tokio to their latest compatible releases.
  • Track Cargo.lock and tests/consumer/Cargo.lock so CI and local builds resolve the same dependency versions. Cargo ignores a dependency's lockfile, so applications using Windmark still resolve versions from its Cargo.toml.
  • Bump Windmark to 0.10.0 and Rossweisse to 0.0.5, the first Rossweisse release that uses syn 3.

Compatibility

Route parameters must use the braced syntax:

Before After
/users/:name /users/{name}
/files/*path /files/{*path}
/files/Prefix:Name /files/Prefix{Name}

mount panics on a route with a segment that starts with : or *, and the message shows the replacement.

Windmark can't tell a parameter in the middle of a segment, such as Prefix:Name, from a literal colon, such as /time/12:30. mount accepts both as static text, so rewrite these parameters by hand.

Write literal braces in routes as {{ and }}.

Fuwn added 5 commits October 26, 2026 05:38
Raises the floors for async-trait, futures-util, log, openssl, quote, and tokio, and keeps the consumer fixture's tokio and async-trait floors in step.
Routes now capture segments with {name} and the remaining path with {*name}. Matchit 0.9 reads the former :name and *name forms as literal text, so mount rejects segments that start with them rather than registering routes that never match.
@Fuwn
Fuwn merged commit 6247332 into main Oct 26, 2026
8 checks passed
@Fuwn
Fuwn deleted the feat/route-syntax-and-dependencies branch October 26, 2026 06:11
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