Skip to content

A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.

docs(cmake): the four subsystem switches, measured, and why no variant ships

esenginee27adf1af669
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fdf6fa5ad..fa42d152e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -17,6 +17,19 @@ option(ES_ENABLE_SPINE "Build the Spine runtime side modules" ON)
option(ES_ENABLE_DRAGONBONES "Build the DragonBones runtime (side module only)" OFF)
option(ES_ENABLE_BOX2D "Enable Box2D physics support" OFF)
option(ES_ENABLE_JOLT "Enable Jolt 3D physics support" OFF)
+# These four are the core's own subsystems, and a project cannot pick them: the
+# engine binary is precompiled per platform. Measured 2026-09-21 on the web
+# build (`ESTELLA_CMAKE_FLAGS=-DES_ENABLE_X=OFF`, brotli q11, the number a
+# mini-game's 4MB cap is judged on):
+#
+# tilemap OFF -12,585 particles OFF -9,603
+# postfx OFF -7,170 text OFF -5,859 all four OFF -34,911
+#
+# So the whole set buys 0.8% of that cap, against one more precompiled binary
+# per platform and a CI matrix per combination. NOT shipping variants: the
+# switches stay, because a project embedding the engine itself can use them and
+# because they are what made this measurable — but no variant is published and
+# no export offers one. Revisit if a platform's cap moves, not before.
option(ES_ENABLE_TILEMAP "Enable Tilemap support" ON)
option(ES_ENABLE_PARTICLES "Enable Particle system" ON)
option(ES_ENABLE_POSTPROCESS "Enable Post-processing pipeline" ON)