336a096b82e03ed30338978a4d2cec725f039654
Modules that fail to load no longer crash or leak memory: - Check return values from stk_module_load_init() and stk_module_load() - Log errors with specific failure reasons (library load, symbol lookup, init) - Track successful_loads counter separately from file_count - Only increment module_count for modules that actually loaded - Trim allocated arrays when some modules fail to load - Continue loading other modules when one fails This prevents crashes from accessing uninitialized module slots and avoids memory leaks from over-allocation.
stk (Stalwart Toolkit)
stk is a lightweight, modular toolkit for building games and game engines. It provides a portable foundation for dynamically loading modules, native or WASM, without enforcing any architecture or design choices.
It is designed to run on modern systems running POSIX and Windows.
Key Features
- Dynamic module loading (native
.so/.dll) - Hot-swapping of modules at runtime
- Optional WASM support for multi-language modules
- Developer tools: lightweight metadata, logging/tracing, and dependency management
- Minimal, portable API
stk is non-opinionated: developers control architecture, engine design, and game logic while relying on a predictable, lean foundation.
Languages
C
88.3%
Makefile
10.8%
Shell
0.9%