Repository navigation
CWIST v3.6
CWIST v3.6 — WASM client-side support: from in-tree target to usable from JavaScript
Major changes compared to v3.5:
-
WASM correctness wave (issue #93 Phase 1, #176)
cwist_db(SQLite) compiles intolibcwist_wasm.a:cwist_db_open_memory()/cwist_db_serialize()work under Emscripten.- EM_JS clang-format corruption fixed and guarded so it cannot recur.
- Emscripten build + smoke test is a CI gate (
.github/workflows/wasm.yml). docs/api/wasm.md: scope, thedispatch_memorypattern, TypedArray helpers, the db round trip, session caveats.
-
JavaScript consumption (issue #93 Phase 2, #185)
cwist-wasmnpm package (wasm/npm/): fetch-style API over the WASM dispatch path,index.d.ts, README;make wasm-distbuilds the tarball and CI verifies a clean install.- First-party JS wrapper (
CWIST_WASM_DEFINE_ENTRY) so consumers do not hand-roll Emscripten glue.
-
Streaming, sessions, and WASI (issue #93 Phase 3, #195)
- Boundary streaming:
cwist_app_dispatch_stream+cwist_stream_req_begin/feed/end; the entry macro exports_cwist_wasm_dispatch_streampumpingModule.cwistStreamChunk. - Session persistence model: pin the signing secret, let the signed client-side cookie carry the state; sessions actually link under WASM via a bundled header-only SHA-256/HMAC.
- WASI targets land in-tree (experimental, see
docs/api/wasi.md): preview1 runs the in-memory dispatch surface under wasmtime; WASI 0.2 binds real sockets and serves cleartext HTTP throughwasi:sockets.
- Boundary streaming:
-
End-to-end example (issue #93 Phase 4, #198)
example/wasm-service-worker/: routing + zod validation + template rendering +cwist_db+ pinned-secret sessions served by a Service Worker fetch-interception layer with its own cookie jar; CI-gated build + node smoke.
-
Also in this release
- WebSocket non-blocking I/O on C1M reactors (issue #181, #182).
- RX-uring receive path on io_uring reactors (issue #179, #187).
- Per-event latency probe:
CWIST_LATENCY_PROBE=1histograms queue delay and callback runtime (issue #166, #186). CWIST_PROFILEpreset env var (issue #171, #188); C1M + drain-chunk 8 is the default baseline.- BDR per-connection cursor fast path for cached GET replies (#194).
- SQLite WASM bundle decision recorded: single bundle, no opt-out — db-less consumers link ~64.8 KB (per-object archive linking); the ~1 MB for db users is SQLite's reachable core (#199).
Notes:
lib/lsquicstays pinned to upstream master (2b30189), the same stable pin as v3.5.- Source tarball builds like v3.5: vendored dependencies included;
makeat the top level produces libcwist.a, the CLI, and cwist.pc. - Homebrew formula in this release line:
packaging/homebrew/cwist.rb(tap: c4punks/homebrew-cwist).