3a0602326523b312f9dd33b8310308efeb530ec4
Add platform-specific protections against race conditions when module files are written rapidly (compilation, copying, etc). Linux (inotify): - Deduplicate events within a poll cycle to prevent double-unload - When duplicate RELOAD events occur, earlier events are skipped and only the final event is processed BSD (kqueue): - Add file readiness check with flock() before processing mtime changes - Files that aren't ready have their mtime reset, skipping the reload All Unix platforms: - Use atomic .tmp + rename for module copying to prevent loading partially-written files Writes that occur during an active reload or when files aren't ready are skipped. A subsequent write is required to trigger detection of those changes. Fixes segfault caused by processing duplicate reload events (Linux) or copying incomplete files mid-write (BSD).
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%