Repository navigation
Add native QuickJS/SDL MVP and numeric C kernel tooling - #48
Draft
SandroMaglione wants to merge 4 commits into
Draft
SandroMaglione wants to merge 4 commits into
SandroMaglione wants to merge 4 commits into
Conversation
Native hosts (QuickJS-ng + SDL3) and ahead-of-time compiled systems, written as a handoff for an implementing agent: decisions, assumptions, core seams, the compiled subset, the oracle, phases and gates. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Sf6V9khnQnnb7LuSjzcUwJ
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Games can now run in a native C11 application embedding QuickJS-ng and SDL3, with game-owned 2D drawing and the existing TypeScript simulation, input and fixed-loop contracts. This is the working Linux MVP from #47, with numeric C kernel compilation and mobile project tooling.
@typeonce/ritmo-native:doctor,build,dev,check, retained rectangles/PNG sprites/debug text, structural keyboard/pointer/touch adapters, lifecycle and safe-area handling.requireCompiled.Local Linux verification:
pnpm check(446 runtime tests plus type tests),pnpm pack:check, full core suite in numeric-column mode (272 tests), CTest and screenshot goldens. Top-down and inkline-town each match Node for 600 frames with kernels on and off. Both the 5,000-entity stress fixture and 10,000 numeric fuzz cases pass with ASan/UBSan. The fuzz run verifies actual C kernel execution.The user approved normalizing NaN sign/payload bits because V8 and QuickJS differ even with kernels disabled. Every other IEEE-754 bit remains exact, including signed zero.
The final same-machine browser benchmark check passed, with every runtime difference within 20% and type metrics within the committed 5% tolerance. The plain benchmark check flags six cases against the shared Apple M1 baseline on this AMD Linux host; both outputs and the saved pre-change measurements are committed. At 5,000 entities, native numeric movement measured 0.0817 ms/frame versus Node JIT 0.2712 ms/frame; see
packages/native/bench/results.md.This stays a draft: the conservative compiler leaves top-down's map/validation/helper-based movement interpreted, so its planned
requireCompiledgate is not met. macOS/Windows execution, actual Android/iOS builds and emulator/simulator checks still need platform CI. Mobile project generation alone has been checked locally.PLAN.mdandNATIVE_CHECKPOINT.mdretain the exact outstanding gates and reproduction commands.All work remains in this single implementation PR. Do not merge this PR or #47 into main.