In a dynamic editor build the game is a loadable module. The toolbar Recompile rebuilds that module and swaps it when Edit mode allows — without restarting the whole editor.
Deep reference: Assets and Shinra (recompile table), Frontends and drivers. Sample project: src/games/example/.
When Recompile is enough
- Changed game Zig under
src/games/example/src/(entities, session, config). - Added a new
*_entity.zig(manifest regenerates with the game build). - Tweaked gameplay logic that stays behind the thin
hikari_game/HostApisurface. - Editor-only menu/panel contributions (
registerEditor/hi.editor) when the module was compiled with-Deditor-contrib=true(always true on editor recompile).
Flow: Edit mode → Recompile → wait for success → scene stays open; missing archetypes soft-fail if you removed a type still referenced in the document.
When you must rebuild the editor
- Recompile build fails — previous dylib stays; fix compile errors and retry.
- Recompile succeeds but register/load fails — editor restores the previous module; panic only if restore itself fails.
Monolithic editor host linkage still loads game modules dynamically for recompile; a full product rebuild is only required for host/ABI changes.
Verify
- Dynamic editor: change a log line in
cube_entity.zig→ Recompile → Play → see the log. - Remove an archetype still placed in the open scene → soft placeholders + audit after recompile.
- After a
HostApi/GameModulesemantic change → fullbin/kaji/kaji editor --workspace=$PWD --project=$PWD/src/games/example …rebuild (not only Recompile).