Expand description
Host bridge — exposes Rust functions and objects to the scripting VM.
ScriptHost wraps a Vm and provides a clean API for:
- Registering host functions callable from scripts
- Binding host objects as script tables
- Executing scripts and retrieving results
- Event-driven scripting (hooks / callbacks)
Structs§
- Event
Bus - Simple event system for triggering script callbacks.
- Script
Component - A script component: holds a pre-compiled chunk + per-instance table.
- Script
Host - High-level scripting host. Owns the VM and provides ergonomic registration APIs.
Traits§
- Script
Object - A Rust-owned object exposed to scripts via a table interface.
Functions§
- object_
to_ table - Wrap a
ScriptObjectas a script table. Changes to the table are NOT reflected back to the Rust object — usebind_objectfor two-way binding.
Type Aliases§
- Host
Function - A Rust function callable from scripts.