Phase 6 updates

Phase 6 · Slice 2 ·

NativeAOT builds

  • dotnet/Tassix.Native: the managed runtime published with NativeAOT as one shared library. Bootstrap's [UnmanagedCallersOnly] entry points carry export names (tassix_initialize, tassix_frame...), exported from the runtime assembly (UnmanagedEntryPointsAssembly). The engine assemblies and the game's script assemblies (TassixScripts) are rooted whole, so scripts are found and called by reflection as under the JIT; Tassix.Runtime and the framework are trimmed (Roslyn mostly falls away behind the JIT checks). OptimizationPreference=Speed: frame times then match the JIT player on the 5000-object benchmark (0.30 ms), where the default was 18% slower.
  • The Rust host loads Tassix.Native with libloading when the managed folder has it, instead of starting .NET through hostfxr; the entry points are the same functions either way (ScriptHost::is_native).
  • Linked scripts: ScriptAssemblies.Linked (no dynamic code) finds script assemblies by name instead of loading files. A Unity project's script build now writes a manifest (Library/Tassix/Scripts/assemblies.txt: names in load order, DLLs, references), which packaging links and the linked game reads back. Reload, watching and exec report that they need the JIT.
  • AOT fixes: VolumeComponent orders parameters by declaring class and declaration order instead of metadata tokens (NativeAOT has none). NativeAOT has no field metadata on generic instantiations such as NativeArray<int>, so the engine's 23 native containers hand the job safety system their handle through an internal interface (reflection remains for other containers). The benchmark's spinner is kept from trimming.
  • cargo xtask package -- ... --aot cooks as before, then publishes the native library with the game's scripts (and a Unity project's plugin facades), drops the managed runtime and bundled .NET, and runs the result once. cargo xtask conformance-aot publishes with the conformance scenarios linked and diffs them against Unity's recordings; CI runs it.
  • Checked: all 50 scenarios pass on the AOT build. Nine sample scenes render pixel-identically to the JIT player (physics and showroom vary between runs on either). The Unity Coin Dash package is 53 MB rather than 105 and starts in 0.09 s rather than 0.22 s.
  • Not yet: plugins referencing Unity modules link through their facades but are untested; value-type generic instantiations made only by reflection (MakeGenericType) can be missing; GetComponent is 3x slower in the micro-benchmark than under tiered JIT; other platforms' NativeAOT builds.
  • Next: documentation and the public compatibility matrix.