|
| 1 | +Cocos4 Split Static Libraries |
| 2 | +Generated by: build_cocos_split.sh |
| 3 | +================================================== |
| 4 | + |
| 5 | +Each .a file is built from sources under packages/cocos4/native/cocos/<module>/ |
| 6 | +except the core utilities, which come from upstream's USE_MODULES=ON set. |
| 7 | + |
| 8 | +CORE UTILITIES (upstream module set, always built) |
| 9 | + libccmath.a - Math library (vectors, matrices, quaternions, geometry primitives) |
| 10 | + libccgeometry.a - Geometry types (Plane, Ray, Sphere, Triangle, Spline, etc.) |
| 11 | + libcclog.a - Logging framework |
| 12 | + libccunzip.a - ZIP/unzip utility |
| 13 | + libccfilesystem.a - File abstraction, path resolution, asset bundles |
| 14 | + libccbindings.a - Script engine bindings (sebind, jswrapper glue) |
| 15 | + libccutils.a - Misc utilities (base64, memory hooks, threadpool, string utils) |
| 16 | + |
| 17 | +ENGINE MODULES (split by subsystem directory) |
| 18 | + libccrenderer.a - Renderer (262 source files): GFX backends, pipeline, batcher, |
| 19 | + scene rendering, debug drawer, frame graph, material system |
| 20 | + libcc2d3d.a - 2D + 3D object system: sprites, labels, particle systems, |
| 21 | + terrain, mesh rendering, skeletal animation |
| 22 | + libccscene.a - Scene graph: Scene, Node, Component, Director, Camera, |
| 23 | + Renderer, Scheduler, Action system |
| 24 | + libccphysics.a - Physics: Box2D JSB bindings, PhysX integration, |
| 25 | + collision detection, rigid bodies, joints |
| 26 | + libccaudio.a - Audio engine: decoders (MP3, OGG, WAV), mixer, player, |
| 27 | + audio engine soft implementation |
| 28 | + libccplatform.a - Platform abstraction: Android/iOS/Linux/Mac/Windows/Harmony |
| 29 | + backends, input, system window, device info |
| 30 | + libccapp.a - Application lifecycle: CocosApplication, BaseGame, Engine, |
| 31 | + main entry, platform-specific app delegates |
| 32 | + libccmisc.a - Everything else: UI widgets, network, editor-support |
| 33 | + (spine/dragonbones runtime), profiler, plugins, storage, |
| 34 | + GI/light-probe, primitive types, base utilities |
| 35 | + |
| 36 | +LINK ORDER (topological) |
| 37 | + ccmath -> ccgeometry -> cclog -> ccunzip -> ccfilesystem |
| 38 | + -> ccbindings -> ccutils -> ccrenderer -> cc2d3d -> ccscene |
| 39 | + -> ccphysics -> ccaudio -> ccplatform -> ccapp -> ccmisc |
| 40 | + |
| 41 | +BUILD TIME |
| 42 | + Total: ~260MB across all split .a files |
| 43 | + Split: each module is 1-157MB depending on subsystem |
| 44 | + |
| 45 | +WHEN TO REBUILD A SINGLE MODULE |
| 46 | + renderer/ change -> cmake --build . --target ccrenderer -j$(nproc) |
| 47 | + audio/ change -> cmake --build . --target ccaudio -j$(nproc) |
| 48 | + platform/ change -> cmake --build . --target ccplatform -j$(nproc) |
| 49 | + |
| 50 | +================================================== |
0 commit comments