sparkengine-modules-sdk-abi-and-hot-reload

Diagnose and manage SparkEngine game-module DLL loading, ABI gating, and hot reload.

31|3|Updated Jul 26, 2025
One-click install
npx skills add https://github.com/Krilliac/SparkEngine --skill sparkengine-modules-sdk-abi-and-hot-reload-krilliac
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sparkengine-modules-sdk-abi-and-hot-reload
Source: https://github.com/Krilliac/SparkEngine/tree/main/.claude/skills/sparkengine-modules-sdk-abi-and-hot-reload
Command: npx skills add https://github.com/Krilliac/SparkEngine --skill sparkengine-modules-sdk-abi-and-hot-reload-krilliac

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Game-module DLLs in SparkEngine fail in confusing ways: rejection before OS load, dead console commands, null EngineContext inside the DLL, or crashes at shutdown. This Skill provides a verified runbook for the entire engine-to-module boundary so you can pinpoint which gate, injection seam, or teardown step is failing. ## Core Features & Use Cases - Compatibility gate reference: Explains the mandatory .sparkabi sidecar, SHA-256 binary binding, in-image compatibility descriptor, and SDK version checks that run before any module code executes. - Injection seam and hot-reload guidance: Documents the Windows-only SparkModuleInjectConsole/EngineContext/ImGui exports, the wired ModuleHotReloadManager versus the unwired shadow-copy singleton, and transactional reload staging. - Failure-mode triage table: Maps symptoms like "rejected before OS load", "REFUSED to load game module", or segfaults at shutdown to likely causes and first diagnostic commands. - Use Case: Your rebuilt module DLL is refused with an ABI sidecar hash mismatch; use this Skill to learn that the sidecar must be regenerated with the binary and which grep commands verify the gate ordering in ModuleManager.cpp. ## Quick Start Ask the AI to diagnose why your SparkEngine module DLL is rejected before OS load or why its console commands do nothing after loading.

Frequently Asked Questions about sparkengine-modules-sdk-abi-and-hot-reload

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why is my SparkEngine module DLL rejected before OS load?

Rejection before OS load means the mandatory .sparkabi sidecar is missing, malformed, incompatible, or its SHA-256 does not match the DLL binary. Rebuild the module through spark_add_game_module so the sidecar is regenerated alongside the binary.

How do I fix module console commands that do nothing in SparkEngine?

Dead module console commands on Windows indicate the SparkModuleInjectConsole export is missing, leaving registrations in a DLL-private console instance. Include Spark/ModuleDllMain.h in exactly one .cpp and verify the export exists in the built DLL.

What is the .sparkabi sidecar file in SparkEngine?

The .sparkabi sidecar is a build-generated key=value file with 12 fields including SDK version, compiler ABI, and binary_sha256. ModuleManager validates it before LoadLibrary, so a module without one is invisible to discovery and refused before any of its code runs.

Does SparkEngine hot reload preserve module state?

The wired ModuleHotReloadManager stages a replacement via shadow copy and only commits after successful initialization, preserving the old instance on failure. However, replacement OnLoad runs before old OnUnload, so modules with process-global registrations must handle that overlap.

Why does SparkEngine refuse to load a second game module?

SparkEngine enforces a single-game-module policy: exactly one ModuleKind::Game module may load per process, and a second one is hard-refused. Libraries and extensions must declare ModuleKind::Addon in their ModuleInfo to coexist.

When should I not use this module-boundary skill?

Do not use it for shader hot reload, ECS phase ordering, CMake toolchain setup, or general crash triage unrelated to the module boundary. Those belong to the sibling rendering, ECS lifecycle, build/CI, and debugging-playbook skills respectively.