Repository navigation
Core: versioned stores, batched diffs, UniFFI and iOS build - #4
Closed
MHohlios wants to merge 3 commits into
Conversation
added 3 commits
October 29, 2026 14:19
mudling-core gains a store module: the §12 store set (terminal, vitals, room, map, mobs, characters, gear, settings), each with a revision that bumps only on a real change. A StoreHub coalesces a frame's changes into one batch that the shell drains on its frame tick, and wakes the shell once per batch. Memo caches derived data against input revisions. Payloads other than the terminal's are placeholders for later tickets. mudling-ffi exposes a coarse UniFFI API (open, subscribe, snapshot, drain, send a command) and builds for iOS. scripts/build-ios.sh produces the XCFramework and Swift bindings; a CI workflow runs it on macOS. mudling-bench measures a frame's batch apply and a 50 lines/s burst.
A shell that stops draining, such as a minimized window, no longer grows the pending terminal diff without bound; the lines dropped are ones the terminal would trim anyway. The terminal tests move next to the payload, and the bench derives its frame budget from the frame length.
Keeps Phase 0's first-page find line and the stores report in the bench output. The iOS build moves into ci.yml as its own job, replacing ios.yml, and the stores and FFI files are formatted for the new rustfmt check.
This was referenced Oct 30, 2026
Contributor
Author
|
Landed on main through #15. |
MHohlios
deleted the
wiffletree/core-versioned-stores-batched-diffs-uniffi-and-i
branch
November 1, 2026 17:24
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.
This splits state into versioned stores, so a shell redraws only what changed (PRD §5 #5 and #7, §12). It also adds a coarse UniFFI boundary and an iOS build of the core from day one (§4 goal 5).
Linear: VYT-192 (Phase 1: Core, VYT-186). Stacked on #1 (Phase 0).
What's in it
storemodule:Versioned<S>bumps its revision only on a real change, so a no-op write does nothing.StoreHub. Core threads write changes, which coalesce per store. The shell drains at most one batch per frame, with one wake per batch, and can take a snapshot of any store.Memo<K, V>. Caches derived data against input revisions (§5 Core: plugin host (API v1, plugin.toml, merged matchers, layers) #7).mudling-ffi(UniFFI 0.32):Session.open(waker),subscribe,unsubscribe,snapshot,drain,sendCommand.scripts/build-ios.sh. Builds the static libraries foraarch64-apple-iosand the simulator, the XCFramework, and the Swift bindings..github/workflows/ios.yml. Builds the core for iOS and type-checks the Swift bindings.Numbers (release)
Verified locally
swiftc -typecheckof the generated bindings against the iOS simulator SDK passes.Follow-ups
ios.ymlinto Phase 0'sci.yml.build-ios.sh --debugfails under the stock bash 3.2.