Project Structure
jetwarp is a multi-module repository. Each adapter and driver lives in its own go.mod
so downstream users only download what they actually import.
Top-level layout
/
├── adapter/ # Core adapter + registry (root module)
├── compat/
│ └── routingpath/ # Public façade for path normalization (root module)
├── drv/ # Driver interface: drv.Drv, capabilities, kinds (root module)
├── drivers/v1/ # Concrete drivers — each is a separate Go module
│ ├── chi/
│ ├── echo/
│ ├── fiber/
│ ├── gin/
│ └── stdlib/
├── internal/
│ └── routingpath/ # Implementation (not importable from submodules)
├── openapi/
│ └── oas3/ # OpenAPI 3.2 generator (separate module)
│ └── validate/ # Dev-only spec validator (separate module)
├── tests/
│ ├── suite/ # Conformance suite: RunDriver, RunAdapter, RunDriverSmoke
│ └── testkit/ # Mock drivers used by the suite
├── tools/ # Shell scripts: test-all.sh, lint-all.sh, release.sh, …
├── docs/ # This documentation site (mdBook)
├── examples/ # Runnable example applications
├── go.mod # Root module: codeberg.org/iaconlabs/jetwarp
├── errors.go # Sentinel errors (ErrJetwarp, ErrNilDriver, …)
├── version.go # Version constant
├── STABILITY.md # Public API stability policy
├── CHANGELOG.md # Release notes
└── RELEASE_GUIDE.md # Operator runbook for releases
go.workis not committed. Contributors create it locally withgo work init.
What lives in which module
| Package path | Module | Notes |
|---|---|---|
adapter/ | root | Core router, middleware composition, registry |
adapter/chi/ | adapter/chi | Chi adapter wrapper (one-liner: core.New(driver.New())) |
adapter/echo/ | adapter/echo | Echo adapter wrapper |
adapter/fiber/ | adapter/fiber | Fiber adapter wrapper |
adapter/gin/ | adapter/gin | Gin adapter wrapper |
adapter/stdlib/ | adapter/stdlib | Stdlib adapter wrapper |
compat/routingpath/ | root | Stable façade for submodules to import |
drv/ | root | drv.Drv interface, Capability, Kind, Method |
drivers/v1/chi/ | drivers/v1/chi | chi driver implementation |
drivers/v1/echo/ | drivers/v1/echo | Echo v5 driver |
drivers/v1/fiber/ | drivers/v1/fiber | Fiber v3 driver |
drivers/v1/gin/ | drivers/v1/gin | Gin driver |
drivers/v1/stdlib/ | drivers/v1/stdlib | stdlib (net/http) driver |
internal/routingpath/ | root | Path normalization + validation (implementation) |
openapi/oas3/ | openapi/oas3 | OpenAPI 3.2 generator |
openapi/oas3/validate/ | openapi/oas3/validate | pb33f-powered validator (dev-only) |
tests/suite/ | root | Conformance test entry points |
tests/testkit/ | root | Mock drivers |
Why compat/routingpath exists
Go’s internal/ visibility rules prevent submodules from importing packages under internal/
of the root module. Because drivers, adapters, and the OpenAPI module all need path normalization
helpers, there is a thin public façade at compat/routingpath that re-exports the relevant functions.
compat/routingpath is classified as “Internal-stability” in STABILITY.md. It is not a primary
user-facing API but is stable enough for drivers built inside or alongside this repo.
Key files in the root module
errors.go— all sentinel errors (ErrJetwarp,ErrNilDriver,ErrNativeMWUnsupported, …)adapter/adapter.go— theAdapterandRegistryProviderinterfacesadapter/router_implementation.go— core adapter implementationdrv/driver.go— theDrvinterfacedrv/capabilities.go— capability bitmask and constantstests/suite/driver_suite.go—RunDriverentry pointtests/suite/adapter_suite.go—RunAdapterentry point
Tools
| Script | Purpose |
|---|---|
tools/test-all.sh | Run go test ./... for every module |
tools/lint-all.sh | Run golangci-lint for every module |
tools/open_api_smoke.sh | Smoke-test OpenAPI output |
tools/release.sh | Create and (optionally) push lockstep tags |
The release runbook is in RELEASE_GUIDE.md.