@wasm-gaming/rsdkv3-wasm
v0.1.4
Published
RSDKv3 (Retro Software Development Kit v3) compiled to WebAssembly, with a JS SDK conforming to the wasm-gaming engine contract. Runs Sonic CD by loading Data.rsdk at runtime.
Downloads
279
Readme
@wasm-gaming/rsdkv3-wasm
RSDKv3 (Retro Software Development Kit v3, Sonic CD 2011 decompilation) compiled to WebAssembly, wrapped in a JS SDK conforming to the wasm-gaming engine contract.
The engine does not bake game data with --preload-file. Hosts provide
Data.rsdk at runtime, so the same rsdkv3.wasm can be reused across installs.
Contract surface
import { manifest, load } from '@wasm-gaming/rsdkv3-wasm';
const engine = await load({
canvas,
assets: { data: dataRsdkBytes /*, settings: iniBytes */ },
onEvent: (e) => { /* 'ready' | 'error' */ },
// Optional override when artifacts are hosted externally:
// jsUrl, wasmUrl,
});
engine.pause();
engine.resume();
engine.setInput('rsdkv4');
engine.destroy();manifestdefines requireddata(/data/Data.rsdk) and optionalsettings(/data/settings.ini) assets.load(config)returns anEngineInstanceand exposesdevMenubridge helpers:getStageList(),loadStage(category, stage),setPaused(bool).
Options
Engine-specific options are declared in
src/rsdkv3.options.ts and mirrored into manifest.options:
devMenuengineDebugModevsyncsoundtrack(0JP/EU,1US)languagedisableTouchControls
If assets.settings is omitted, the SDK generates settings.ini from these
options.
Build
All build logic is in Makefile:
make build # SDK (TypeScript) + WASM
make build-sdk # SDK only
make build-wasm # WASM via Docker wrapper
make preview # serves dist/ at http://localhost:8080scripts/build.shclonesRubberduckycooly/Sonic-CD-11-Decompilation, applies known Emscripten patches, vendorslibtheora, and outputs:dist/rsdkv3/rsdkv3.jsdist/rsdkv3/rsdkv3.wasm
scripts/emit-manifest.mjswritesdist/manifest.jsonfrom typed manifest.scripts/seed-settings.mjsseedsdist/settings.inifromsrc/settings.default.iniwhen absent.
Try locally
make build
cp /path/to/Data.rsdk dist/
make preview
# open http://localhost:8080/The demo attempts ./Data.rsdk; if missing, it shows a file picker and supports
drag-and-drop.
Status
- ✅ TypeScript SDK + manifest build
- ✅ CI workflow scaffold for SDK/WASM/release/pages
- ⏳ Browser runtime verification with a real
Data.rsdk - ⏳ Full WASM build verification (
make build-wasm) on this new subproject
License
MIT for this wrapper. Upstream engine and game data keep their own licenses.
