Skip to content

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-adapters on spt-reasoning-storage by default
  • Panic Hooks -- Includes console_error_panic_hook for debuggable WASM errors

Dependencies

Key internal dependencies:

  • spt-reasoning-core -- Core reasoning types
  • spt-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 implemented

API Reference

Core Types

TypeDescription
_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.

Released under the MIT License.