Expand description
WASM platform layer for the Sage runtime.
Provides browser-compatible implementations of platform primitives:
spawn_localfor async task spawning (noSendrequired)sleepvia browsersetTimeout- Console logging via
web-sys web-timere-export forInstantshim- Thread-local LLM config injection for browser environments
Structs§
- Instant
- Re-export
web_time::Instantas the WASM-compatibleInstant. A measurement of a monotonically nondecreasing clock. Opaque and useful only withDuration. - Wasm
LlmConfig - LLM configuration for WASM environments.
Functions§
- console_
error - Log an error to the browser console.
- console_
log - Log a message to the browser console.
- console_
warn - Log a warning to the browser console.
- get_
llm_ config - Get the current WASM LLM configuration.
- sage_
configure - Configure the LLM endpoint from JavaScript.
- set_
panic_ hook - Re-export panic hook setup.
Set the
console.errorpanic hook the first time this is called. Subsequent invocations do nothing. - sleep
- Async sleep using browser
setTimeout. - spawn_
local - Re-export
wasm_bindgen_futures::spawn_local. Runs a RustFutureon the current thread.