RUSTICDOCSSearch documentation

Native callback setup

Back to External process languages.

LanguageSetup
Pythonfrom rustic import rustic, instance, Game, run; define callback functions; run(globals())
C#using static Rustic;; Run((callback, dt) => { ... });
C#include "rustic.h"; rustic_run((RusticBehavior){.on_start=start})
C++#include "rustic.hpp"; rustic_run(RusticBehavior{.on_start=start})
Javaclass RusticBehavior extends Rustic; call run((callback, dt) -> { ... }) in main
PHPrequire __DIR__."/rustic.php"; rustic_run(["on_start"=>"on_start"])
Luaureturn {on_start=function() ... end, fixed_update=function(dt) ... end}

Each SDK handles omitted callbacks automatically. Supported names are on_create, on_start, on_enable, fixed_update, update, on_disable, on_destroy, and on_stop. Only frame callbacks take dt. Luau also accepts the capitalized Lua aliases. External collision callbacks remain unavailable. API 1.1 adds shared Events to every supported script type, backed by the same scene services. See Shared gameplay actions for coverage and setup. Use rustic.log for game diagnostics and run scripts through Play.

See the language guides for complete copyable examples, attachment steps, native return types, current limits, and troubleshooting.