Skip to content

Releases: anth64/stk

v1.0.0-pre.12

29 Mar 06:15

Choose a tag to compare

v1.0.0-pre.12 Pre-release
Pre-release

Fixed

  • gmake.mk: change static library extension on Windows from .lib to .a for MinGW
  • module_loader: use RTLD_GLOBAL when loading modules to expose host symbols

Full Changelog: v1.0.0-pre.11...v1.0.0-pre.12

v1.0.0-pre.11

15 Mar 17:02

Choose a tag to compare

v1.0.0-pre.11 Pre-release
Pre-release

Fixed

  • gmake.mk: PREFIX now defaults to /usr on Linux instead of /usr/local

Full Changelog: v1.0.0-pre.10...v1.0.0-pre.11

v1.0.0-pre.10

14 Mar 16:32

Choose a tag to compare

v1.0.0-pre.10 Pre-release
Pre-release

Fixed

  • bmake.mk: all target and object paths now anchored with ${.CURDIR} to fix incorrect path nesting when building from outside the project root; substitution delimiters switched to | to avoid conflicts with path separators; compile rules now emit -MT/-MF for correct dependency file targeting; removed stale .-include directives for .d files; release lib rules now use ${.TARGET} consistently
  • gmake.mk: removed AR/ARFLAGS_STATIC variables and the ifeq-guarded static lib rules; both debug and release static lib rules now use ar rcs directly, as MinGW ships ar and lib.exe was incorrect

Full Changelog: v1.0.0-pre.9...v1.0.0-pre.10

v1.0.0-pre.9

12 Mar 21:46

Choose a tag to compare

v1.0.0-pre.9 Pre-release
Pre-release

Changed

  • debug and release targets now produce both a shared and static library alongside each other
  • obj directories split into shared/ and static/ subdirs to keep -fPIC objects isolated
  • install no longer depends on release; guards with an existence check and exits with a clear message if artifacts are missing
  • uninstall removes static lib alongside shared lib
  • build.sh: install and uninstall now handle privilege escalation automatically via doas or sudo; skips escalation if already root
  • updated Windows installation instructions to clarify stk.dll vs stk.lib depending on link type

Full Changelog: v1.0.0-pre.8...v1.0.0-pre.9

v1.0.0-pre.8

08 Mar 09:14

Choose a tag to compare

v1.0.0-pre.8 Pre-release
Pre-release

What's Changed

  • stk_poll: new modules were loaded into stale pre-compaction slot indices when simultaneous load and unload events occurred in the same poll cycle. The two load loops have been unified into one that always appends to the compacted array.
  • stk_poll: cascade_indices was a fixed 256-slot stack array with no bounds check. Now heap-allocated to module_count entries per iteration.
  • stk_pending_retry: module array was pre-allocated to module_count + stk_pending_count but never shrunk when fewer entries loaded than were pending. Now trimmed to actual count after the retry loop.
  • stk_collect_dependents: no bounds guard before writing to the indices buffer. Added capacity parameter and an explicit check before every write.
  • stk_log_modules: %lu with size_t is UB on 64-bit MSVC where unsigned long is 32-bit. Fixed with an explicit (unsigned long) cast.

Full Changelog: v1.0.0-pre.7...v1.0.0-pre.8

v1.0.0-pre.7

07 Mar 16:14

Choose a tag to compare

v1.0.0-pre.7 Pre-release
Pre-release

What's Changed

  • Added missing dependency failure logging to stk_module_load(). This ensures that when a module is deferred to the pending queue, the specific unmet requirements are reported to the log.

Full Changelog: v1.0.0-pre.6...v1.0.0-pre.7

v1.0.0-pre.6

07 Mar 13:54

Choose a tag to compare

v1.0.0-pre.6 Pre-release
Pre-release

Completes the pending queue batching work started in pre.4. stk_poll() now collects all deferred paths from the load holes and append_modules loops into a single buffer and flushes them with one stk_pending_add_batch() call, consistent with how the unload, cascade, and init loops were already handled.

Full Changelog: v1.0.0-pre.5...v1.0.0-pre.6

v1.0.0-pre.5

07 Mar 13:42

Choose a tag to compare

v1.0.0-pre.5 Pre-release
Pre-release

What's Changed

Performance

  • Replaced per-module stk_pending_add() calls in stk_init deferred
    module loop with batch collection and a single stk_pending_add_batch()
    call after.

Full Changelog: v1.0.0-pre.4...v1.0.0-pre.5

v1.0.0-pre.4

07 Mar 13:26

Choose a tag to compare

v1.0.0-pre.4 Pre-release
Pre-release

What's Changed

Performance

  • Replaced per-module realloc calls in stk_pending_retry with a single bulk allocation upfront
  • Replaced per-module stk_pending_add calls in stk_poll unload and cascade loops with stk_pending_add_batch

Full Changelog: v1.0.0-pre.3...v1.0.0-pre.4

v1.0.0-pre.3

07 Mar 11:27

Choose a tag to compare

v1.0.0-pre.3 Pre-release
Pre-release

This release introduces a major overhaul of dependency resolution, including transitive "cascade" unloads, a generic topological sort implementation, and granular failure logging.

Core Architecture Changes

Dependency Graph & Topological Sorting

  • Generic Kahn's Sort: Refactored the topological sort into stk_kahn_sort(). It now accepts has_dep and on_cycle callbacks, decoupling the core algorithm from the stk_modules structure.
  • Batch Load Ordering: stk_sort_load_order() now uses stk_batch_has_dep to inspect temporary files. This allows simultaneous load events to be processed in dependency-first order without requiring a retry cycle.
  • Transitive Unloads (Cascade): On UNLOAD events, stk_poll() now expands the target set via stk_collect_dependents() to include all transitively dependent modules.
  • Unload Ordering: Added stk_sort_unload_order() to ensure that dependents are always shut down before their dependencies (reverse topological order).

Module Lifecycle Refactor

  • Phased Loading: stk_module_load() has been decomposed into stk_module_preload(), stk_module_activate(), stk_module_discard(), and stk_validate_dependencies_single().
  • Activation Guard: Module init is no longer called if dependencies are unmet during the validation phase.
  • Pending Queue Persistence: Modules with unmet dependencies are now added to the pending queue instead of being dropped. stk_pending_retry() now prunes entries for files that no longer exist and skips already-loaded entries.

Logging & Diagnostics

  • Granular Failure Reporting: Replaced vague "unmet dependencies" logs with stk_log_dependency_failures().
  • Error Context: Logs now specify the exact reason for a dependency failure:
    • not found: Missing dependency ID.
    • requires <constraint>, have <version>: Version mismatch.
  • Buffer Configuration: Added STK_MOD_DEP_LOG_BUFFER (2048) to stk.h to define the failure message buffer size.

Technical Changelog

Added

  • STK_MOD_DEP_LOG_BUFFER constant in stk.h.
  • stk_kahn_sort generic callback-based implementation.
  • stk_log_dependency_failures for detailed mismatch reporting.
  • stk_collect_dependents for transitive dependency tracking.

Changed

  • stk_module_load logic split into discrete preload, validate, activate, and discard steps.
  • stk_poll event loop updated to support cascade unloads and improved retry paths.
  • Kahn sort refactored to eliminate direct coupling to stk_modules.

Fixed

  • Fixed silent deferrals during stk_init.
  • Fixed logic error where stk_pending_retry could be bypassed in certain stk_poll exit paths.

Full Changelog: v1.0.0-pre.2...v1.0.0-pre.3