f331970ae2cd3cde394f1172dd12b49ec807358b
Refactor memory allocation patterns: - Replace realloc-in-loop with count-then-allocate pattern across all platforms - Eliminate arbitrary buffer sizes (e.g., malloc(8 * ...)) in favor of exact counts - Reduce allocation overhead by pre-counting items before malloc Fix Windows file watching: - Replace unreliable FindFirstChangeNotification with directory handle approach - Add is_file_ready() to prevent events while compiler is still writing files - Preserve timestamps when file is locked to retry on next poll - Fix do-while loop in platform_directory_init_scan (was skipping first file) Fix Linux inotify event handling: - Consolidate DELETE+CREATE pairs into single RELOAD event - Prevents duplicate events when compiler uses temp-file-and-rename pattern Fix BSD/macOS kqueue implementation: - Remove realloc loops from update_watches() and watch initialization - Pre-count files before allocating file descriptor arrays All platforms now correctly handle: - Compiler overwrites (temp file operations) - Manual copy/move operations - Explicit file deletions Tested on Linux, Windows 10, and FreeBSD.
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%