WASM Entrypoint
Most users should consume @kalamdb/client high-level APIs. This page covers advanced WASM access.
Warning: this page documents the low-level generated WASM bindings, not the normal
@kalamdb/clientpackage API. If you want the supported high-level client, usecreateClient(...)from@kalamdb/clientand follow the package docs instead of constructingKalamClientfrom@kalamdb/client/wasmdirectly.
Recommended high-level docs:
/docs/ts-sdk/setup/docs/ts-sdk/subscriptions/docs/ts-sdk/client-lifecycle
Import low-level bindings
Initialization patterns
initSync(...) is available for explicit bytes/module workflows.
Using KalamClient directly
Use this only when you intentionally need the raw WASM interface.
You can also create an anonymous low-level client and supply auth dynamically:
When using raw WASM methods, some callbacks/events may come as JSON strings requiring manual parse.
Packaging notes
From SDK package metadata:
- package exports include
./wasm - build copies WASM artifacts into
dist/wasmanddist/.wasm-out
Repository builds target a size-first WASM pipeline:
wasm-pack build --profile release-dist ...wasm-opt -Oz --all-featuresas a post-build pass when Binaryen is installed
If your bundler fails to serve WASM automatically, ensure kalam_client_bg.wasm is accessible and provide explicit module/path.
Timestamp utilities
parseIso8601(isoString)timestampNow()WasmTimestampFormatter
Useful for low-level time conversions aligned with Rust implementation.