Skip to main content

Marshaling specification

Marshaling is defined by CLR slot type, direction, byref role, and policy. Mono/IL2CPP and V8/HostJs must expose the same results.

PageContract
Defaultsnull/undefined, number, explicit BigInt
PoliciesLegal slots, Members, AOT XML
byrefref/in inputs, zero-input out tuples
OpaqueBorrow scopes and readonly storage
StructsCopies, boxing, Table/UnpackedValues
ReferencesIdentity and views
ArraysCLR arrays, copies, Uint8Array
EnumsUnderlying numbers and boxing
FunctionsDelegates, calls, reference ownership
PointersTokens and restricted types

Int64/UInt64 default to number, never automatic bigint. XML applies only to AOT assemblies, without runtime registration, hot reload, or Reload.