Part of #617. Blocks EngineSquared/xrepo#1.
Problem
The learning track consumes the engine as the enginesquared xrepo package, so a learner's first xmake run is that package's build. EngineSquared/xrepo#1 asks for a CoreOnly config on the package, but a package config only becomes an xmake f --CoreOnly=y flag on the engine build (package/tools/xmake.lua, install()), and this repository has no such option.
The root xmake.lua declares every dependency unconditionally (xmake.lua:12-30: joltphysics, wgpu-native, rmlui, freetype, zlib, glfw, glfw3webgpu, stb, miniaudio, lodepng, tinyobjloader) and includes every plugin (xmake.lua:34), so asking for EngineSquaredCore alone still pays for the whole graphics, physics, audio and UI stack. That first build is where a beginner quits.
What to build
A CoreOnly option in the root xmake.lua:
When it is on:
- only the dependencies the core and the utils need are required — entt, gtest, spdlog, glm, fmt
- src/engine and src/utils are included, src/plugin/* is not
- the EngineSquared aggregate target is skipped, since it depends on every plugin
When it is off, nothing changes.
Done when
- xmake f -y --CoreOnly=y resolves the five light packages only, and no plugin target is configured
- xmake f -y --CoreOnly=n resolves the full dependency set and the full target list, unchanged from today
- xmake build EngineSquaredCore succeeds in both configurations
- the core unit tests still build and pass with the option on
- verified on Linux, macOS and Windows
Part of #617. Blocks EngineSquared/xrepo#1.
Problem
The learning track consumes the engine as the enginesquared xrepo package, so a learner's first xmake run is that package's build. EngineSquared/xrepo#1 asks for a CoreOnly config on the package, but a package config only becomes an xmake f --CoreOnly=y flag on the engine build (package/tools/xmake.lua, install()), and this repository has no such option.
The root xmake.lua declares every dependency unconditionally (xmake.lua:12-30: joltphysics, wgpu-native, rmlui, freetype, zlib, glfw, glfw3webgpu, stb, miniaudio, lodepng, tinyobjloader) and includes every plugin (xmake.lua:34), so asking for EngineSquaredCore alone still pays for the whole graphics, physics, audio and UI stack. That first build is where a beginner quits.
What to build
A CoreOnly option in the root xmake.lua:
When it is on:
When it is off, nothing changes.
Done when