Rustic scripting API
The reference is organized by what game code needs to do. Core operation pages include purpose, timing, variables, return behavior, and equivalent calls for all ten supported script types. The Gameplay APIs navigation section provides dedicated references for actions, easing, animation, composition, physics, audio, events and the scene clock. API 1.1 gameplay actions have an explicit language support matrix in Use gameplay actions.
Execution model
Global scripts run before Scene scripts, then Object Component scripts. Mutation timing depends on the adapter: Lua host writes are immediate; JavaScript/Web core writes are deferred until callback completion or a synchronous query flush; canonical scene-target resolution and external SDK queries also flush earlier commands. Read Scopes, lifecycle and execution for the exact distinctions. Every gameplay language calls built-in functions. Lua, JavaScript, and Web use embedded bindings; external languages use engine-supplied SDKs with private transport.
Language support
| Languages | Integration |
|---|---|
| Lua 5.4, JavaScript, HTML / inline JS | bundled embedded API |
| Python, C#, C++, Luau, C, Java, PHP | engine-owned SDK and persistent external session |
Safety limits
Source and responses are limited to 1 MiB. External callbacks have a three-second deadline. Boundary values are booleans, integers, finite numbers, strings, vectors, and optional stable entity IDs.