anth64 1e97b69fcd feat: add comprehensive error handling with typed error codes
Add strict error handling for stk initialization and platform operations.
stk_init() now fails fast on critical errors and returns typed error codes
that users can handle programmatically.

Changes:
- Add STK_INIT_* error codes for init failures (memory, tmpdir, watch)
- Add STK_PLATFORM_* error codes for platform operation results
- Check platform_mkdir() and fail if temp directory cannot be created
- Check platform_directory_watch_start() and fail if watch cannot initialize
- Add error_cleanup path in platform_directory_watch_start() to properly
  free resources on critical Windows failures.
- Replace all platform error checks with STK_PLATFORM_OPERATION_SUCCESS
- Log FATAL errors with when critical operations fail
- Add warning logs for non-critical failures

Critical failures now return specific error codes:
- STK_INIT_MEMORY_ERROR: Module memory allocation failed
- STK_INIT_TMPDIR_ERROR: Cannot create temp directory
- STK_INIT_WATCH_ERROR: Cannot start directory watching

Individual module load failures remain non-fatal and are handled logged.
2026-01-31 15:04:20 +01:00
2025-12-20 08:22:41 -05:00
2025-10-08 19:01:44 +02:00
2025-09-28 14:21:06 +00:00

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.

S
Description
A lightweight, portable, modular toolkit for building games and game engines.
Readme MPL-2.0 244 KiB
Languages
C 88.3%
Makefile 10.8%
Shell 0.9%