Shared Rust transport crates and SDK packages for KalamDB clients.
This directory contains:
- the shared Rust implementation crate
link-common - the published native Rust SDK crate
kalam-client(link/sdks/rust) - the browser WebAssembly wrapper crate
kalam-link-wasm(@kalamdb/client) - the consumer-only WebAssembly wrapper crate
kalam-consumer-wasm - the publishable TypeScript CLI wrapper package in sdks/typescript/cli as
@kalamdb/cli - the publishable TypeScript app-facing package in sdks/typescript/client as
@kalamdb/client - the publishable TypeScript worker package in sdks/typescript/consumer as
@kalamdb/consumer - the publishable Dart/Flutter package in sdks/dart as
kalam_link
Use the package-specific READMEs as the source of truth for public APIs:
- TypeScript / JavaScript app client: sdks/typescript/client/README.md
- TypeScript / JavaScript worker client: sdks/typescript/consumer/README.md
- TypeScript / JavaScript CLI wrapper: sdks/typescript/cli/README.md
- Dart / Flutter SDK: sdks/dart/README.md
Older constructor-based examples, manual connect() walkthroughs, and raw WASM KalamClient(...) snippets are not accurate for the current SDKs.
- Use
@kalamdb/clientforcreateClient({ url, authProvider, ... }), SQL, auth flows, realtime subscriptions, live rows, and file helpers - Use
@kalamdb/consumerfor topic workers:consumer(),consumeBatch(),ack(), andrunConsumer();runAgent()remains as a deprecated compatibility alias - Use
@kalamdb/cliwhen you want npm-based distribution of the nativekalambinary without relying on the curl installer authProvideris required and can returnAuth.basic(...)orAuth.jwt(...)Auth.basic(...)is a login bootstrap only: the SDK exchanges those credentials onPOST /v1/api/auth/loginand uses JWT auth for subsequent protected traffic- WebSocket connection management is automatic; with
wsLazyConnect: truethe client connects on the first realtime call
- Call
KalamClient.init()once before first use - Create clients with
KalamClient.connect(url: ..., authProvider: ...) - Auth flows use
authProvider,login(...),refreshToken(...), andrefreshAuth(...) - The SDK exposes low-level events via
liveEvents(...)and materialized row helpers vialive(...)/liveTable(...) - Topic worker APIs are intentionally not part of the Dart SDK yet
link/
|-- link-common/ # shared Rust implementation
|-- kalam-link-wasm/ # wasm-pack entry for @kalamdb/client
|-- kalam-consumer-wasm/ # wasm-bindgen wrapper for @kalamdb/consumer
|-- kalam-link-dart/ # FRB bridge for kalam_link (Flutter)
`-- sdks/
|-- rust/ # kalam-client (native Rust SDK, crates.io)
|-- typescript/
| |-- cli/ # npm package: @kalamdb/cli
| |-- client/ # npm package: @kalamdb/client
| `-- consumer/ # npm package: @kalamdb/consumer
`-- dart/ # pub package: kalam_link
Package-specific build, test, and publish instructions live with each SDK:
- TypeScript / JavaScript app client: sdks/typescript/client/README.md
- TypeScript / JavaScript worker client: sdks/typescript/consumer/README.md
- TypeScript / JavaScript CLI wrapper: sdks/typescript/cli/README.md
- Dart / Flutter: sdks/dart/README.md
If you change the shared Rust implementation in link-common or the kalam-link-wasm entry crate, validate the affected SDK package afterward.
Licensed under the Apache License, Version 2.0 (Apache-2.0). See ../LICENSE.txt and ../NOTICE.
See the main KalamDB repository for contribution guidelines.