spt-reasoning-wasm
WASM bindings for browser and Node.js environments
Overview
Provides WebAssembly bindings that expose the ReasoningBank system to browser and Node.js environments via wasm-bindgen. Compiled as a cdylib for WASM targets; on native targets, the crate is a no-op placeholder to keep workspace builds working. The WASM implementation is currently a stub awaiting full binding implementation.
Key Features
- Browser Integration -- Designed for use in web applications via wasm-bindgen
- Node.js Support -- Compatible with Node.js WASM runtimes
- IndexedDB Storage -- Enables
wasm-adaptersonspt-reasoning-storageby default - Panic Hooks -- Includes
console_error_panic_hookfor debuggable WASM errors
Dependencies
Key internal dependencies:
spt-reasoning-core-- Core reasoning typesspt-reasoning-storage-- Storage layer with WASM adapter support
External: wasm-bindgen, wasm-bindgen-futures, js-sys, web-sys, console_error_panic_hook.
Usage
javascript
// In a browser or Node.js environment after building with wasm-pack
import init from 'spt-reasoning-wasm';
await init();
// WASM bindings will be available once implementedAPI Reference
Core Types
| Type | Description |
|---|---|
_placeholder() | No-op function for native builds |
Note: WASM bindings are under active development. The wasm_impl module will expose wasm_bindgen-annotated types once implemented.