Research addendum: correct the CultCache reflection claim (registration-time descriptor, not proven per-record IL emit)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
8c78610cbc
commit
e3fac9c2b0
1 changed files with 1 additions and 1 deletions
|
|
@ -140,4 +140,4 @@ Source: https://github.com/zion-sati/NetWasm README, fetched 2026-10-27 (operato
|
|||
- Licence: compiler and tooling under the NetWasm Community License 1.0 (free under 250 employees and USD 10M revenue, paid tiers above); runtime libraries and generated code MIT.
|
||||
- Maturity: 0.10.3, pre-1.0, contracts may change between minors; 269 stars, 301 commits, single vendor.
|
||||
|
||||
CultLib consequence (source read, `src/GameCult.Caching/CultCache.cs` at main 16074345): the C# document path uses runtime reflection (`GetProperties` :1105, :1138; `MakeGenericType` :1330) and MessagePack's `DynamicObjectResolver` (comment :1274), which emits IL at runtime. Neither NetWasm nor Mono wasm AOT runs emitted IL, and NetWasm refuses reflection outright. Any C#-in-the-browser option therefore needs a reflection-free, source-generated CultCache codec first. The same codec is what NativeAOT and Unity IL2CPP consumers need.
|
||||
CultLib consequence (source read, corrected same day): the C# path reflects at document registration, not necessarily per record. `CultCache.BuildDescriptor`/`DiscoverMembers` (`src/GameCult.Caching/CultCache.cs` :689, :1087; `GetProperties` :1105, :1138; `MakeGenericType` :1330; `ConstructorArity` :1277) walk members and constructors to mirror MessagePack's member rules for the descriptor and schema catalog, and `CultDocumentResolver` (`src/GameCult.Caching.MessagePack/CultDocumentMessagePackSerialization.cs` :14-30) builds `CultRecordRef<>` formatters with `MakeGenericType` + `Activator.CreateInstance`. Document formatters come from MessagePack's `StandardResolver` (:61), which in MessagePack 3.x prefers source-generated formatters and falls back to the IL-emitting `DynamicObjectResolver` only for types with none. An earlier version of this paragraph said the codec emits IL at runtime; that rested on a code comment (:1274) and was not established. Whether every [CultDocument] type gets a generated formatter, and what NativeAOT and NetWasm say about the registration path, is for a probe to establish.
|
||||
|
|
|
|||
Loading…
Reference in a new issue