Supported build targets
Go and operating systems
CI builds and tests every commit on Linux, macOS, and Windows with the
two most recent Go releases โ .github/workflows/ci.yml is the
authoritative matrix. The runtime package is standard-library only,
enforced by an import-isolation gate on every build.
htmx versions
The engine pins one htmx version per project and validates every
hx-* attribute against that version's surface.
| Default pinned version | 2.0.10 |
| Supported versions | 2.0.0 โ 2.0.10 and 4.0.0 (each with a pinned script asset and subresource-integrity hash) |
| Configure | htmxVersion in ghtmx.json or -htmx-version |
htmx 1.x and 3.x are not supported. A version outside the set fails
fast with GHTMX-E0502; a construct the pinned version lacks โ newer,
or removed and renamed by it โ reports GHTMX-E0501 naming the
replacement.
What each pin accepts, and how to move a project from htmx 2 to 4, is on the htmx versions page.
WebAssembly (NFR-014)
An application importing the runtime, its generated components, and a first-party router adapter is guaranteed to compile for:
GOOS=js GOARCH=wasmGOOS=wasip1 GOARCH=wasm
The guarantee is enforced on every build: a fixture application (runtime + generated components + the chi adapter) and every included adapter compile for both targets in CI, so a dependency unavailable on a WASM target is caught at the point of introduction.
Scope limits
- Compile-time guarantee only. Runtime behavior on WASM depends on
the host:
net/httpserving is unavailable underjs/wasm(browser hosts have no listening sockets), andwasip1socket support depends on the WASI host. Rendering to anyio.Writerworks everywhere. - Adapter matrix.
nethttp,chi,echo,gin, andmartinicompile for both targets.fiberis excluded on both: its fasthttp engine uses raw socket syscalls the WASM ports lack (SOCK_NONBLOCK/SOCK_CLOEXECon js;ForkLockon wasip1).fiberv3compiles forjs/wasmโ its newer fasthttp carries the needed port โ but stays excluded onwasip1, where fasthttp's tcplisten is excluded by build constraints.beegocompiles forwasip1/wasmbut is excluded onjs/wasm, where its secure-open and graceful-restart code need syscalls the js port lacks (O_NOFOLLOW,SIGHUP).irisandrevelare excluded on both: each pulls a terminal-detection logging dependency (kataras/pio,revel/log15) that does not compile on the WASM ports. The exclusion record is self-honest and per-target โ when an upstream gains a port, the matrix test demands the entry be updated. - Tooling is out of scope. The
ghtmxCLI, LSP, and dev server target the native platforms above, not WASM.
Performance envelope
The regeneration gate holds ~100 templates under 1 second, and the
render-throughput gate holds allocation counts exactly stable against
a recorded baseline (benchmarks/corpus/BASELINE.md).