Runtime Asset Overlays
Space resolves assets through ordered roots. Earlier roots shadow later roots, so projects can override built-in runtime assets by mirroring the same relative path under assets/.
Search order:
- Each non-empty
SPACE_ASSETS_PATHentry, in order. <cwd>/assets.- User data assets:
get_user_data_dir("space") / "assets". <exe_dir>/assets.<exe_dir>/../share/space/assets.<exe_dir>/../Resources/assets./usr/share/space/assets.
SPACE_ASSETS_PATH entries are asset roots, not project roots. On Unix-like systems the separator is ::
SPACE_ASSETS_PATH=/game/assets:/shared/assets space -m mainRequested asset paths remain relative to roots. Absolute paths and traversal that escapes a root are rejected loudly. Missing assets report the requested relative path and the candidate paths searched.
Normal project launch uses:
project/
assets/
lua/main.fnlRunning space --no-dotenv -m main from project/ loads project/assets/lua/main.fnl before built-in modules. Lua and Fennel module search paths include every asset root in overlay order, so project modules can override built-ins while dependencies not present in the project still fall back to packaged runtime assets.
