Crate exo_wasm

Crate exo_wasm 

Source
Expand description

WASM bindings for EXO-AI 2025 Cognitive Substrate

This module provides browser bindings for the EXO substrate, enabling:

  • Pattern storage and retrieval
  • Similarity search with various distance metrics
  • Temporal memory coordination
  • Causal queries
  • Browser-based cognitive operations

Structs§

CausalQueryConfig
Causal query configuration
CausalResult
Result from causal query
ExoError
WASM-specific error type that can cross the JS boundary
ExoSubstrate
Main EXO substrate interface for browser deployment
Pattern
Pattern representation in the cognitive substrate
QueryConfig
JavaScript-compatible query configuration
SearchResult
Search result from substrate query
SubstrateConfig
Configuration for EXO substrate

Enums§

CausalConeType
Causal cone type for temporal queries
TopologicalQuery
Topological query types for advanced substrate operations

Functions§

create_js_error
Helper to create JavaScript error objects
debug
Log debug information (includes timing)
detect_simd
Detect SIMD support in the current environment
error
Log an error to the browser console
format_bytes
Format bytes to human-readable string
generate_uuid
Generate a random UUID v4
get_memory_info
Get available memory (if supported by browser)
get_performance_metrics
Get browser performance metrics
init
Initialize panic hook and tracing for better error messages
is_indexed_db_available
Check if IndexedDB is available
is_local_storage_available
Check if localStorage is available
is_wasm_supported
Check if running in a browser with WebAssembly support
is_web_worker
Check if running in a Web Worker context
js_array_to_vec_f32
Convert JavaScript array to Rust Vec
js_object_to_json
Convert JavaScript object to JSON value
json_to_js_object
Convert JSON value to JavaScript object
log
Log a message to the browser console
measure_time
Measure execution time of a function
set_panic_hook
Set up panic hook for better error messages in browser console
validate_dimensions
Helper to validate vector dimensions
validate_k
Helper to validate k parameter
validate_not_empty
Helper to validate vector is not empty
vec_f32_to_js_array
Convert Rust Vec to JavaScript Float32Array
version
Get version information
warn
Log a warning to the browser console