Game API¶
Every public type and member of the game (KSA.dll) that mods can use, as oxidizer --bindgen generates them: the C# member, the typed Rust binding, and how to reach it from Rhai.
Loading the game's APIā¦
Reading it¶
- Rust is the function in the bindings file that
oxidizer --bindgenwrites. Paths start at the generated module (ksa::Vehicle); objects of other types are passed and returned as their wrapper types, orObjwhen the type has no wrapper. - Rhai is the typed access Rhai mods get:
ksa::Type::member()for static members,obj.memberandobj.method()on objects. Static overloads with the same number of arguments get_2,_3, ... in Rhai in their own order; the definition files have the exact names. - Members that can't cross to mods (pointers,
refparameters, open generics) aren't listed. The by-name API (static_call,obj.invokein Rhai,Obj::callin Rust) reaches everything else, including private members.
This page shows the game version named above the results. After a game update, it is regenerated with oxidizer --bindgen book/src/assets/game-api.json.