Skip to content

[2/10] Add typed IL2CPP library and migrate game callers - #365

Merged
netniV merged 2 commits into
refactor/01-spudfrom
refactor/02-il2cpp
Nov 14, 2026
Merged

netniV merged 2 commits into
refactor/01-spudfrom
refactor/02-il2cpp

Conversation

@friendly-ripper

Copy link
Copy Markdown
Collaborator

Part 2 of 10 · base refactor/01-spud · 2 commits

Game code used to search metadata, read fields by offset, and clean up managed references by hand at each call site. This PR adds a typed IL2CPP library that resolves members once and checks them. Game callers move onto it, so drift and missing members surface in one place.

What changes

  • New typed library for class and member resolution, signature checks against metadata, typed invocation, and managed-object ownership through GC handles. Missing metadata is reported without unwinding through hooks.
  • Fake-runtime tests cover calls, dispatch, fields, and GC ownership against a controlled runtime.
  • Game callers drop repeated metadata searches, field offsets, invocation wrappers, and manual GC cleanup in favour of the bindings. A checker scans binding declarations and hook targets against dumped client metadata, so removed members and signature drift show up before a release.

Behavior changes

  • The migration corrects the ActionType value layout and the 64-bit profile and hull identifiers, so those values are read with the right size and shape.

Testing

Built with xmake. Every commit was built on macOS arm64. Nothing was run in the game.

tashcan added 2 commits October 15, 2026 16:40
Resolve managed classes and members once, check their
signatures against metadata, and invoke methods through typed
bindings. Managed objects are owned through GC handles, and
missing metadata is reported without unwinding through hooks.

Fake-runtime tests cover calls, dispatch, fields and GC
ownership against a controlled runtime.
Replace repeated metadata searches, field offsets, invocation
wrappers and manual GC cleanup with the binding library. The
migration also corrects the ActionType value layout and the
64-bit profile and hull identifiers.

A checker scans binding declarations and hook targets against
dumped client metadata, so removed members and signature
drift surface before a release.
@netniV
netniV added this pull request to the merge queue Nov 14, 2026
Merged via the queue into dev with commit f5a1f85 Nov 14, 2026
5 checks passed
@netniV
netniV deleted the refactor/02-il2cpp branch November 14, 2026 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants