Beyond Framework Maximalism: HTMX, Hono, and WebAssembly in Production
How Oxide uses HTMX, Hono, and WebAssembly to build a faster, clearer web architecture that optimizes for coherence over framework proliferation.
How Oxide uses HTMX, Hono, and WebAssembly to build a faster, clearer web architecture
Teams rarely lose velocity because they chose the wrong JavaScript framework. They lose velocity when UI state, business rules, data access, and deployment topology drift apart.
Oxide tests a different premise: keep the web's request-response model, move compute-heavy work into WebAssembly, and run the server layer on a portable edge runtime.
The Thesis
A modern web stack should optimize for four things:
- Architectural coherence
- Placement flexibility (browser vs edge vs region)
- Explicit trust boundaries
- Empirical performance over anecdotal claims
In Oxide, that leads to a four-layer model:
- HTMX + purpose-built client JS modules for hypermedia interactions and progressive enhancement
- Hono routes on Cloudflare Workers for edge-safe request handling
- Rust and Zig WebAssembly modules for compute-heavy and deterministic kernels
- Tiered storage with D1, Neon Postgres, and DuckDB-WASM for different analytical jobs
The result is a system that stays understandable as it grows.
What Oxide Actually Ships
Oxide is not a concept deck. It runs with these concrete capabilities:
- A collaborative editor powered by Rust
yrs, with SSE-based live sync and graceful degradation to text-sync when the WASM module fails to load - A benchmark suite that compares WASM and JavaScript across crypto and algorithm workloads
- A finance compute module in Rust WASM for pattern detection and forecasting
- A Zig WASM sorting module used as a comparative benchmark artifact in the multi-language WASM track
- A SQL analytics console with read-only validation that allows
SELECT/WITHand blocks mutation keywords and stacked statements - Dual analytics paths: edge D1 queries and in-browser DuckDB-WASM exploration
- Historical cross-session analysis through Neon Postgres sync
The app currently exposes four WASM modules in production routes and UI:
bench-wasmcrdt-wasmfinance-wasmsort-zig-wasm
Why This Model Works Better Than the Default SPA Reflex
The default SPA model over-indexes on the browser runtime. You can still win with that model, but only if your domain requires a long-lived local application shell.
For most products, the dominant needs are:
- reliable interaction flows
- low-latency server responses
- clear data ownership
- predictable security boundaries
HTMX keeps interaction close to HTTP and HTML semantics. Hono keeps the server layer compact and portable. WASM keeps heavy logic explicit and testable. Together, they reduce accidental complexity.
The Architectural Advantage: Boundary Clarity
In Oxide, boundaries are strict by design:
- Views do not import routes
- Services do not import views
- SQL execution for ad-hoc analytics is read-only validated
- Edge routes enforce input schemas with Zod
- Compute-heavy logic is isolated inside WASM modules
This separation has second-order effects:
- Smaller blast radius during change
- Easier security auditing
- Cleaner testing strategy
- More reliable onboarding for new engineers
Compute Placement as a First-Class Decision
The key insight from Oxide is not "WASM is always faster." The useful point is placement optionality for the same kernel.
You can run equivalent logic:
- in the browser (zero network, client CPU bound)
- at the edge (network cost, stronger control and governance)
- in region services (centralized integration and aggregation)
Oxide's edge finance endpoints apply hard request limits (transactionsJson up to 500 KB and transaction count capped at 2,500 for edge pattern detection) to keep runtime costs predictable. This is the level of resource-aware design production systems require.
Data Architecture: Three Engines, Three Jobs
Oxide does not force one database to solve every problem.
- D1 handles edge-local writes and operational benchmark data
- Neon Postgres supports cross-session historical aggregation and trend analysis
- DuckDB-WASM provides interactive client-side analytical queries with low iteration friction
The goal is not novelty. The goal is assigning each storage engine to its optimal workload.
Security and QA as Design Inputs, Not Cleanup Work
Oxide's QA posture is not bolted on:
- Typed boundaries are enforced through TypeScript and Zod
- SQL execution for user-entered analytics is restricted to validated read-only statements
- Error handling paths are explicit and fail loudly instead of silently
- Architecture constraints are covered by tests, including layer-validation checks that guard import direction and security rules
- SSE channels include bounded resource controls
The project carries a high test count across routes, services, WASM integrations, and architecture constraints. That discipline is not optional in an architecture that spans browser, edge, and compiled modules.
Where This Stack Is a Strong Fit
Use this architecture when you need:
- server-rendered architecture with hypermedia-driven interactions
- portable edge runtime behavior
- deterministic high-performance kernels
- smaller and more auditable client surfaces
- gradual capability growth without framework lock-in
Be cautious when your core product is fundamentally:
- offline-first with complex local state graphs
- heavy client-side visual editing
- deeply stateful interactions that truly require a persistent client app runtime
In those cases, a SPA or hybrid shell can be the right decision.
A Practical Adoption Path
Teams do not need to rewrite everything to use this model. A realistic sequence is:
- Move one high-value interaction to HTMX partial updates
- Introduce Hono for a bounded route surface
- Port one hot-path function to WASM
- Add explicit performance capture (
wasm_ms,js_ms,speedup) - Add architecture tests to protect boundaries
This creates measurable wins without a platform reset.
The Strategic Point
Framework churn is not the core risk. Coherence loss is.
If your stack keeps multiplying moving parts, your delivery system eventually becomes the bottleneck. Oxide shows a viable alternative: lean UI semantics, portable edge routing, compiled compute kernels, and disciplined data paths.
The goal is not to be anti-framework. The goal is to be pro-clarity, pro-control, and pro-change.
That is what full-stack teams should optimize for in 2026 and beyond.