Marshaling specification
Marshaling is defined by CLR slot type, direction, byref role, and policy. Mono/IL2CPP and V8/HostJs must expose the same results.
| Page | Contract |
|---|---|
| Defaults | null/undefined, number, explicit BigInt |
| Policies | Legal slots, Members, AOT XML |
| byref | ref/in inputs, zero-input out tuples |
| Opaque | Borrow scopes and readonly storage |
| Structs | Copies, boxing, Table/UnpackedValues |
| References | Identity and views |
| Arrays | CLR arrays, copies, Uint8Array |
| Enums | Underlying numbers and boxing |
| Functions | Delegates, calls, reference ownership |
| Pointers | Tokens and restricted types |
Int64/UInt64 default to number, never automatic bigint. XML applies only to AOT assemblies, without runtime registration, hot reload, or Reload.