Skip to content

Re-introduce http::router (opt-in)#148

Open
fibonacci1729 wants to merge 1 commit into
mainfrom
router
Open

Re-introduce http::router (opt-in)#148
fibonacci1729 wants to merge 1 commit into
mainfrom
router

Conversation

@fibonacci1729
Copy link
Copy Markdown
Collaborator

No description provided.

Signed-off-by: Brian Hardock <brian.hardock@fermyon.com>
@itowlson
Copy link
Copy Markdown
Contributor

I am confused. There are a gazillion Rust routers, and they all now work with Spin because of the http compatibility. If we want Rust apps to have a router out of the box, why not make it a template option to reference a choice of third-party routers, like we do in JavaScript? I don't see the case for baking a gazillion-and-one-th router into the SDK - but happy to understand what I'm missing.

@fibonacci1729
Copy link
Copy Markdown
Collaborator Author

fibonacci1729 commented May 27, 2026

I share the same feeling but unfortunately after surveying the ecosystem I see alot of framework specific routers. Im sure there are other that are more general but the uptake of these pales in comparison to the hyper /Tokio specific crates. Another benefit to providing a simple bultin is that it should ease migration of apps from pre v6.

@ThorstenHans
Copy link
Copy Markdown
Contributor

Love to see the re-introduction of the Spin HTTP router as it streamlines the DX for developers exploring Spin with little Rust knowledge.

Making the router optional, and adding a "idiomatic / common Router from the Rust ecosystem" would align with the JS/TS experience:

spin new foo-bar -t http-rust

Description []: Simple Sample
HTTP Path [/...]:
HTTP Router:
> spin
  axum
  none

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