Skip to content

feat: add HTTP resolution and query string processing crates#584

Open
geeknoid wants to merge 1 commit into
mainfrom
routerama
Open

feat: add HTTP resolution and query string processing crates#584
geeknoid wants to merge 1 commit into
mainfrom
routerama

Conversation

@geeknoid

Copy link
Copy Markdown
Member

Introduce the routerama family of crates:

  • routerama: blazingly fast HTTP routing (static + dynamic routers).
  • routerama_build: build-time router code generator.
  • routerama_macros: procedural macros for the routerama crate.

These build on the http_path_template crate for path-template parsing.

Copilot-Session: 867c37d0-9e7a-46b0-b5a9-dc9f551ed128

Copilot AI review requested due to automatic review settings July 16, 2026 23:48
@github-actions

Copy link
Copy Markdown

✅ Version increments look sufficient

cargo semver-checks compared the 3 crate(s) this PR publishes against their previous version-bump commit in git history. Every version increment is sufficient for the detected API changes.

Crate Baseline Baseline commit This PR Minimum required Status
routerama new crate 0.1.0 0.1.0 ✅ ok
routerama_build new crate 0.1.0 0.1.0 ✅ ok
routerama_macros new crate 0.1.0 0.1.0 ✅ ok

This check is informational and does not block the merge.

View the check run

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Introduces the new routerama family of crates, providing a high-performance HTTP method+path router with both compile-time (#[resolver]) and runtime (dynamic) backends, plus benchmarking and differential/fuzz testing infrastructure. This expands the repo’s routing capabilities and builds on http_path_template for template parsing.

Changes:

  • Added routerama (runtime + #[resolver] API), routerama_build (build-time generator + shared trie IR), and routerama_macros (proc-macro front door).
  • Added extensive tests/benchmarks/docs to validate static vs dynamic parity, coercion behavior, verb routing, and performance comparisons vs ecosystem routers.
  • Updated http_path_template to support #![no_std] with an optional std feature (backtraces / Error integration behavior).

Reviewed changes

Copilot reviewed 65 out of 68 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
README.md Adds routerama to top-level crate index (repo overview).
crates/routerama/tests/verb_routing.rs Regression coverage for :verb splitting across static/dynamic halves.
crates/routerama/tests/routes_macro.rs Behavioral tests for #[resolver] macro routing/extraction cases.
crates/routerama/tests/resolver_coercion.rs Tests typed capture coercion (&str/String/Cow/FromStr).
crates/routerama/tests/dynamic_parity.rs Differential tests ensuring runtime RawResolver matches static resolver.
crates/routerama/tests/bolero_routerama_resolver.rs Bolero fuzz/property tests for divergence/panic resistance (non-Miri).
crates/routerama/tests/bench_router.rs Drift guard ensuring committed benchmark router stays in sync.
crates/routerama/src/route.rs Defines RouteMatch trait for match introspection/capture access.
crates/routerama/src/lib.rs Crate root, public API surface, docs, and hidden runtime re-exports.
crates/routerama/src/http_method.rs Adds HttpMethod type with token semantics and conversions.
crates/routerama/src/extract_helpers.rs Capture coercion helpers for static/dynamic extraction paths.
crates/routerama/src/error.rs Defines CaptureError for missing/parse/decode capture failures.
crates/routerama/src/decode.rs Percent-decoding logic for path-semantics decoding.
crates/routerama/src/codegen_helpers/mod.rs Exposes codegen plumbing APIs used by generated resolvers.
crates/routerama/src/captures.rs Captures adapter for dynamic extraction via RouteMatch.
crates/routerama/src/build_error.rs Aggregated dynamic registration/build error reporting.
crates/routerama/src/api.rs Sealed Resolver / ResolverBuilder traits for generated types.
crates/routerama/README.md Crate-level README (doc2readme output) for routerama usage.
crates/routerama/logo.png Routerama logo (LFS asset referenced by docs).
crates/routerama/favicon.ico Routerama favicon (LFS asset referenced by docs).
crates/routerama/examples/web_app.rs End-to-end async server example using routerama routing.
crates/routerama/examples/routing.rs In-source #[resolver] tour example (static routing).
crates/routerama/examples/hybrid_routing.rs Example composing static core + dynamic overlay routing.
crates/routerama/examples/dynamic_routing.rs Example showing fully dynamic route registration via builder.
crates/routerama/docs/PERF.md Performance report describing benchmark methodology/results.
crates/routerama/docs/ECOSYSTEM.md Positioning vs routing ecosystem + feature comparison table.
crates/routerama/CHANGELOG.md New crate changelog stub.
crates/routerama/Cargo.toml New crate manifest with deps, benches, and dev-deps for comparisons.
crates/routerama/benches/gungraun_routers.rs Callgrind instruction-count benchmark suite.
crates/routerama/benches/criterion_routers.rs Criterion wall-clock benchmark suite.
crates/routerama/benches/common/routes_data.rs Shared benchmark route table + lookup workload data.
crates/routerama/benches/common/harness.rs Shared benchmark harness for fair cross-router comparisons.
crates/routerama/benches/common/bench_router.rs Generated benchmark router(s) over the shared route table.
crates/routerama_macros/src/lib.rs Proc-macro entry point and shared validation helpers.
crates/routerama_macros/src/field.rs Field-type classification for capture coercion strategy.
crates/routerama_macros/README.md Crate README for the proc-macro crate.
crates/routerama_macros/logo.png Macros crate logo (LFS asset).
crates/routerama_macros/favicon.ico Macros crate favicon (LFS asset).
crates/routerama_macros/CHANGELOG.md New crate changelog stub.
crates/routerama_macros/Cargo.toml Proc-macro crate manifest and dependencies.
crates/routerama_build/src/trie.rs Shared trie IR + capture planning used by both backends.
crates/routerama_build/src/route.rs Route definition type used by generator/runtime trie build.
crates/routerama_build/src/lib.rs Build crate root with optional codegen feature.
crates/routerama_build/src/generator.rs Generator API emitting static router code from route set.
crates/routerama_build/README.md Crate README for build-time generator crate.
crates/routerama_build/logo.png Build crate logo (LFS asset).
crates/routerama_build/favicon.ico Build crate favicon (LFS asset).
crates/routerama_build/CHANGELOG.md New crate changelog stub.
crates/routerama_build/Cargo.toml Build crate manifest incl. codegen feature toggles.
crates/plurality/tests/bolero_plurality.rs Renames/introduces plurality Bolero property tests.
crates/plurality/scripts/correctness.rs Updates correctness script to new bolero test target name.
crates/plurality/docs/DESIGN.md Updates doc references to bolero test target filename.
crates/multitude/scripts/correctness.rs Updates correctness script to new bolero test target name.
crates/http_path_template/src/path_template.rs Alloc-related imports as part of no_std migration.
crates/http_path_template/src/lib.rs Switches crate to #![no_std] with optional std feature.
crates/http_path_template/src/error.rs Gates backtraces behind std feature; uses alloc boxing.
crates/http_path_template/README.md Documents new std feature / no_std usage.
crates/http_path_template/Cargo.toml Adds std feature (default) for backtrace + std integration.
CHANGELOG.md Adds routerama changelog link to repo-wide changelog index.
Cargo.toml Adds workspace deps and external benchmark router deps.
Cargo.lock Locks new dependencies for the router benchmark ecosystem.
.spelling Adds new terms related to routerama/docs/benchmarks.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread crates/routerama/docs/ECOSYSTEM.md Outdated
Comment thread crates/routerama/docs/ECOSYSTEM.md Outdated
Comment thread crates/routerama_macros/src/lib.rs Outdated
Comment thread crates/routerama/tests/dynamic_parity.rs Outdated
Comment thread crates/routerama/tests/dynamic_parity.rs Outdated
Comment thread crates/routerama/tests/dynamic_parity.rs Outdated
Comment thread README.md Outdated
Comment thread CHANGELOG.md
Comment thread crates/routerama/src/api.rs Outdated
Comment thread crates/routerama_macros/src/lib.rs Outdated
Copilot AI review requested due to automatic review settings July 17, 2026 00:09
@github-actions

Copy link
Copy Markdown

✅ Version increments look sufficient

cargo semver-checks compared the 3 crate(s) this PR publishes against their previous version-bump commit in git history. Every version increment is sufficient for the detected API changes.

Crate Baseline Baseline commit This PR Minimum required Status
routerama new crate 0.1.0 0.1.0 ✅ ok
routerama_build new crate 0.1.0 0.1.0 ✅ ok
routerama_macros new crate 0.1.0 0.1.0 ✅ ok

This check is informational and does not block the merge.

View the check run

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 67 out of 70 changed files in this pull request and generated 5 comments.

Comment thread crates/routerama_macros/src/lib.rs Outdated
Comment thread crates/routerama_macros/src/lib.rs Outdated
Comment thread crates/routerama/docs/ECOSYSTEM.md Outdated
Comment thread crates/routerama/docs/ECOSYSTEM.md Outdated
Comment thread crates/http_path_template/src/lib.rs Outdated
@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.95565% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 99.9%. Comparing base (ba34d62) to head (8799d20).

Files with missing lines Patch % Lines
crates/routerama_build/src/macro_impl/resolver.rs 99.6% 2 Missing ⚠️

❌ Your project check has failed because the head coverage (99.9%) is below the target coverage (100.0%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@           Coverage Diff            @@
##             main    #584     +/-   ##
========================================
- Coverage   100.0%   99.9%   -0.1%     
========================================
  Files         359     395     +36     
  Lines       27885   32380   +4495     
========================================
+ Hits        27885   32378   +4493     
- Misses          0       2      +2     
Flag Coverage Δ
linux ?
linux-arm ?
scheduled ?
windows ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI review requested due to automatic review settings July 17, 2026 00:25
@github-actions

Copy link
Copy Markdown

✅ Version increments look sufficient

cargo semver-checks compared the 3 crate(s) this PR publishes against their previous version-bump commit in git history. Every version increment is sufficient for the detected API changes.

Crate Baseline Baseline commit This PR Minimum required Status
routerama new crate 0.1.0 0.1.0 ✅ ok
routerama_build new crate 0.1.0 0.1.0 ✅ ok
routerama_macros new crate 0.1.0 0.1.0 ✅ ok

This check is informational and does not block the merge.

View the check run

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 67 out of 70 changed files in this pull request and generated 5 comments.

Comment thread crates/routerama/README.md
Comment thread crates/routerama_build/README.md
Comment thread crates/routerama_macros/README.md
Comment thread crates/routerama/docs/ECOSYSTEM.md Outdated
Comment thread crates/routerama/docs/ECOSYSTEM.md Outdated
Copilot AI review requested due to automatic review settings July 17, 2026 00:33
@github-actions

Copy link
Copy Markdown

✅ Version increments look sufficient

cargo semver-checks compared the 3 crate(s) this PR publishes against their previous version-bump commit in git history. Every version increment is sufficient for the detected API changes.

Crate Baseline Baseline commit This PR Minimum required Status
routerama new crate 0.1.0 0.1.0 ✅ ok
routerama_build new crate 0.1.0 0.1.0 ✅ ok
routerama_macros new crate 0.1.0 0.1.0 ✅ ok

This check is informational and does not block the merge.

View the check run

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 67 out of 70 changed files in this pull request and generated 2 comments.

Comment thread crates/routerama/tests/routes_macro.rs Outdated
Comment thread crates/http_path_template/Cargo.toml Outdated
Copilot AI review requested due to automatic review settings July 17, 2026 00:40
@github-actions

Copy link
Copy Markdown

✅ Version increments look sufficient

cargo semver-checks compared the 3 crate(s) this PR publishes against their previous version-bump commit in git history. Every version increment is sufficient for the detected API changes.

Crate Baseline Baseline commit This PR Minimum required Status
routerama new crate 0.1.0 0.1.0 ✅ ok
routerama_build new crate 0.1.0 0.1.0 ✅ ok
routerama_macros new crate 0.1.0 0.1.0 ✅ ok

This check is informational and does not block the merge.

View the check run

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 67 out of 70 changed files in this pull request and generated 1 comment.

Comment thread crates/routerama/src/error.rs Outdated
Copilot AI review requested due to automatic review settings July 17, 2026 01:11
@github-actions

Copy link
Copy Markdown

✅ Version increments look sufficient

cargo semver-checks compared the 3 crate(s) this PR publishes against their previous version-bump commit in git history. Every version increment is sufficient for the detected API changes.

Crate Baseline Baseline commit This PR Minimum required Status
routerama new crate 0.1.0 0.1.0 ✅ ok
routerama_build new crate 0.1.0 0.1.0 ✅ ok
routerama_macros new crate 0.1.0 0.1.0 ✅ ok

This check is informational and does not block the merge.

View the check run

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 67 out of 70 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings July 17, 2026 13:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 78 out of 81 changed files in this pull request and generated 1 comment.

Comment thread crates/routerama/src/lib.rs Outdated
Copilot AI review requested due to automatic review settings July 17, 2026 14:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 78 out of 81 changed files in this pull request and generated no new comments.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 78 out of 81 changed files in this pull request and generated no new comments.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 78 out of 81 changed files in this pull request and generated 1 comment.

Comment thread crates/routerama/src/http_method.rs Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 78 out of 81 changed files in this pull request and generated 1 comment.

Comment thread crates/http_path_template/src/variable.rs

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 78 out of 81 changed files in this pull request and generated no new comments.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 78 out of 81 changed files in this pull request and generated 2 comments.

Comment thread crates/routerama/docs/ECOSYSTEM.md Outdated
Comment thread crates/routerama/docs/ECOSYSTEM.md Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 78 out of 81 changed files in this pull request and generated no new comments.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 89 out of 92 changed files in this pull request and generated no new comments.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 94 out of 97 changed files in this pull request and generated no new comments.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 115 out of 118 changed files in this pull request and generated no new comments.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 115 out of 118 changed files in this pull request and generated 2 comments.

Comment thread crates/routerama/tests/resilience.rs
Comment thread crates/routerama/src/raw_resolver.rs

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 115 out of 118 changed files in this pull request and generated 1 comment.

Comment thread crates/routerama/tests/resilience.rs Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 115 out of 118 changed files in this pull request and generated 2 comments.

Comment thread crates/routerama/Cargo.toml Outdated
Comment thread docs/TODO.md Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 115 out of 118 changed files in this pull request and generated no new comments.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 121 out of 124 changed files in this pull request and generated 2 comments.

Comment thread crates/http_path_template/src/error.rs Outdated
Comment thread crates/http_path_template/src/error.rs Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 121 out of 124 changed files in this pull request and generated no new comments.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 121 out of 124 changed files in this pull request and generated no new comments.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 121 out of 124 changed files in this pull request and generated 1 comment.

Comment thread crates/routerama/tests/resilience.rs Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 121 out of 124 changed files in this pull request and generated no new comments.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 121 out of 124 changed files in this pull request and generated no new comments.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 121 out of 124 changed files in this pull request and generated no new comments.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 1407e83b-abc4-4345-b223-7ae6bcd1e74b

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 122 out of 125 changed files in this pull request and generated no new comments.

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.

3 participants