hono
hono copied to clipboard
Import / Export router state
What is the feature you are proposing?
Hono's RegExpRouter is fast, but it has the disadvantage that route registration is slow.
RegExpRouter is fast, but the route registration phase can be slightly slow.
Hono Docs - https://hono.dev/docs/concepts/routers#linearrouter
This proposal is part of the RegExpRouter acceleration.
- Export routes and RegExp when building Hono application.
- The built application imports routes and built RegExp.
- The route registration phase is skipped when the application boots.
- Very fast startup with RegExpRouter is achieved.
Roadmap
- [ ] Import / Export router state (this issue) https://github.com/akku1139/hono/tree/feat/import-export-router-state
- [ ]
@hono/vite-buildsupport - [ ] HonoX support
- [ ] Document
Hi, @akku1139, thanks for creating the issue. Just so you know, a pull request tried the same thing, so please refer to the discussion there as well. https://github.com/honojs/hono/pull/1796