Skip to Content
🚀 KalamDB v0.3.0-alpha2 is out — Learn more
SDK & ClientWASM Entrypoint

WASM Entrypoint

Most users should consume kalam-link high-level APIs. This page covers advanced WASM access.

Import low-level bindings

import init, { KalamClient, WasmTimestampFormatter, parseIso8601, timestampNow, initSync, } from 'kalam-link/wasm';

Initialization patterns

// async init await init(); // or explicit module/path await init({ module_or_path: '/wasm/kalam_link_bg.wasm' });

initSync(...) is available for explicit bytes/module workflows.

Using KalamClient directly

const client = new KalamClient('http://localhost:8080', 'root', ''); await client.connect(); const out = await client.query('SELECT 1'); console.log(out);

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/wasm and dist/.wasm-out

If your bundler fails to serve WASM automatically, ensure kalam_link_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.

Last updated on