Skip to content

feat(routerama): add HTTP routing crates#570

Open
geeknoid wants to merge 1 commit into
mainfrom
routerama
Open

feat(routerama): add HTTP routing crates#570
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 AI review requested due to automatic review settings July 14, 2026 01:59
@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 to the Oxidizer workspace, providing compile-time generated HTTP routing (routes! / build-time generator) plus an optional runtime router (DynRouter) that is intended to match identically to the static backend by walking the same shared trie IR.

Changes:

  • Adds new crates: routerama (facade + runtime), routerama_build (generator + shared trie IR), and routerama_macros (proc-macro front door).
  • Adds correctness/differential tests, examples, and benchmarking/reporting infrastructure for static vs dynamic routing and comparisons vs other routers.
  • Wires the new crates into the workspace (dependencies, lockfile, top-level README/changelog links, spelling dictionary).

Reviewed changes

Copilot reviewed 47 out of 48 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
README.md Adds routerama to the workspace crate list.
crates/routerama/tests/routes_macro.rs Behavioral tests for routes! macro output.
crates/routerama/tests/generated_router.rs Drift-guard tests for the committed benchmark router fixture.
crates/routerama/tests/dynamic_parity.rs Differential tests asserting DynRouter matches static routing behavior.
crates/routerama/src/route.rs Defines core routing traits (Route, RouteMatch, Router).
crates/routerama/src/lib.rs Crate-level docs and re-exports for macros/build/dynamic APIs.
crates/routerama/src/dynamic.rs Runtime router implementation plus EitherRouter composition.
crates/routerama/src/codegen_helpers/scan.rs Shared scan/split primitives used by generated routers and runtime router.
crates/routerama/src/codegen_helpers/mod.rs Exposes codegen helper API surface for generated code.
crates/routerama/scripts/perf_report.rs Nightly -Zscript benchmark runner + PERF.md generator + router regeneration.
crates/routerama/README.md Crate README (doc2readme output).
crates/routerama/logo.png Adds crate logo asset (Git LFS pointer).
crates/routerama/favicon.ico Adds crate favicon asset (Git LFS pointer).
crates/routerama/examples/support/bookstore_router.rs Committed generated router used by build-script example.
crates/routerama/examples/routing.rs Static-routing example using routes!.
crates/routerama/examples/hybrid_routing.rs Example composing static router with dynamic overlay via EitherRouter.
crates/routerama/examples/dynamic_routing.rs Runtime-routing example using DynRouter.
crates/routerama/examples/build_script.rs Example showing build-time generation usage pattern.
crates/routerama/docs/PERF.md Committed performance report output.
crates/routerama/CHANGELOG.md Initial crate changelog content.
crates/routerama/Cargo.toml Crate manifest: features, deps, benches/examples, external-types allowlist.
crates/routerama/benches/gungraun_routers.rs Callgrind (gungraun) benchmark suite.
crates/routerama/benches/criterion_routers.rs Criterion benchmark suite.
crates/routerama/benches/common/routes_data.rs Shared benchmark route/lookup data.
crates/routerama/benches/common/harness.rs Shared benchmark harness building/comparing multiple routers.
crates/routerama/benches/common/generated_router.rs Committed generated router for benchmarks.
crates/routerama_macros/src/lib.rs routes! procedural macro implementation and parsing.
crates/routerama_macros/README.md Proc-macro crate README (doc2readme output).
crates/routerama_macros/logo.png Adds macros crate logo asset (Git LFS pointer).
crates/routerama_macros/favicon.ico Adds macros crate favicon asset (Git LFS pointer).
crates/routerama_macros/CHANGELOG.md Initial proc-macro crate changelog content.
crates/routerama_macros/Cargo.toml Proc-macro crate manifest.
crates/routerama_build/src/trie.rs Shared trie IR + precedence rules + capture planning.
crates/routerama_build/src/route_rule.rs RouteRule definition and template handling.
crates/routerama_build/src/lib.rs Build crate module structure + public re-exports (mostly doc-hidden).
crates/routerama_build/src/http_method.rs HttpMethod enum + helpers.
crates/routerama_build/src/generator.rs Generator API for producing router code (codegen feature).
crates/routerama_build/src/generator_builder.rs GeneratorBuilder configuration surface.
crates/routerama_build/README.md Build crate README (doc2readme output).
crates/routerama_build/logo.png Adds build crate logo asset (Git LFS pointer).
crates/routerama_build/favicon.ico Adds build crate favicon asset (Git LFS pointer).
crates/routerama_build/CHANGELOG.md Initial build crate changelog content.
crates/routerama_build/Cargo.toml Build crate manifest + codegen feature flag.
CHANGELOG.md Adds routerama to the workspace changelog index.
Cargo.toml Adds workspace deps for new crates and benchmark comparison crates.
Cargo.lock Locks new workspace deps and benchmark dependencies.
.spelling Adds router-related vocabulary to spellcheck dictionary.

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

Comment thread crates/routerama/README.md
Comment thread crates/routerama_build/README.md
Comment thread crates/routerama_macros/README.md
Comment thread crates/routerama/src/dynamic.rs
Comment thread crates/routerama/CHANGELOG.md Outdated
Comment thread crates/routerama_build/CHANGELOG.md Outdated
Comment thread crates/routerama_macros/CHANGELOG.md Outdated
@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.8%. Comparing base (dde8653) to head (16fd69d).

Additional details and impacted files
@@           Coverage Diff            @@
##             main    #570     +/-   ##
========================================
- Coverage   100.0%   99.8%   -0.2%     
========================================
  Files         360     369      +9     
  Lines       27886   29627   +1741     
========================================
+ Hits        27886   29573   +1687     
- Misses          0      54     +54     

☔ 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 14, 2026 02:54
@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 47 out of 48 changed files in this pull request and generated 2 comments.

Comment thread crates/routerama/tests/routes_macro.rs Outdated
Comment thread CHANGELOG.md
Copilot AI review requested due to automatic review settings July 14, 2026 03:35
@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 47 out of 48 changed files in this pull request and generated 1 comment.

Comment thread CHANGELOG.md
Copilot AI review requested due to automatic review settings July 14, 2026 04:02
@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 47 out of 48 changed files in this pull request and generated 3 comments.

Comment thread crates/routerama/README.md
Comment thread crates/routerama_build/README.md
Comment thread crates/routerama_macros/README.md
Copilot AI review requested due to automatic review settings July 14, 2026 04:31
@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 47 out of 48 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings July 14, 2026 05:16
@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 51 out of 54 changed files in this pull request and generated 7 comments.

Comment thread crates/routerama/README.md
Comment thread crates/routerama/README.md
Comment thread crates/routerama_macros/README.md
Comment thread crates/routerama_macros/README.md
Comment thread crates/routerama_build/README.md
Comment thread crates/routerama_build/README.md
Comment thread crates/routerama/src/dynamic.rs
Copilot AI review requested due to automatic review settings July 14, 2026 05:24
@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 51 out of 54 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/src/route.rs
Comment thread crates/routerama/src/lib.rs
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.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 867c37d0-9e7a-46b0-b5a9-dc9f551ed128
Copilot AI review requested due to automatic review settings July 14, 2026 05:35
@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 51 out of 54 changed files in this pull request and generated 3 comments.

Comment thread crates/routerama/README.md
Comment thread crates/routerama_macros/README.md
Comment thread crates/routerama_build/README.md
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.

2 participants