rive_wasm_scripting library
The wasm scripting backend as the editor drives it: a VM booted from a
baked module, and hosts that run a stage scripted object on it through the
runtime's own ScriptBackend seam. Only available when the native library
was built with --scripting_vm=wasm or both; see riveScriptingWasm.
Classes
- GamepadWire
- A gamepad invocation as the editor's stage sees it.
- PathEffectPaint
- The paint snapshot a path effect script reads from its node argument.
- ScriptDataResult
- ScriptedHost
- One stage scripted object running on a file's wasm VM. The Dart core object owns it and forwards every protocol call.
- WasmScriptingVM
- WasmVMBoot
- Outcome of WasmScriptingVM.boot: a VM, or the boot error.
Enums
- ScriptDataKind
- WasmExecutionTier
- What a booted module executes on: the interpreter, native code wamrc compiled ahead of time at -O0 or -O3, or the browser's own engine.
Constants
- riveScriptingFlavor → const String
-
Which scripting backend the native library carries, fixed at build time:
luau(default),wasm, orboth. Every Luau only or wasm only code path branches on these constants so the other backend's bindings are never looked up in a library that does not export them. - riveScriptingLuau → const bool
- True when the library links the Luau VM.
- riveScriptingWasm → const bool
- True when the library links the wasm VM.
Properties
- wasmScriptingAvailable → bool
-
Whether the loaded native library carries the wasm scripting backend.
no setter
Functions
-
configureWasmAotCompiler(
{required String wamrcPath, required String cacheDir}) → void -
Points the AOT compiler at
wamrcPathand the directory its artifacts persist in. An emptywamrcPathfalls back to RIVE_WAMRC. -
pollWasmAsyncWork(
) → void - Polls completed async work (image decodes) for every wasm VM in the process; the stage calls it once per frame like artboard advance does.