Memory
Copy values between runtimes or share state that more than one runtime needs to access. Start with Sharing memory to choose a memory primitive, or follow Synchronizing data for practical examples.
Choose a memory primitive
Serializable— Transfer a value as an independent copy. Changes to the copy do not update the original.Synchronizable— Keep shared state in native memory so multiple runtimes can read and write it.Shareable— Keep a value on a host runtime and access it from guest runtimes.
Create a value
createSerializable— Create an opaque reference to a serialized value. Scheduling APIs usually handle serialization for you.createSynchronizable— Create a shared value in native memory.createShareable— Create a value hosted on a specific runtime.
Inspect a value
isSerializableRef— Check whether a value is a Serializable reference.isSynchronizable— Check whether a value is a Synchronizable.
Customize serialization
registerCustomSerializable— Define how a custom type is transferred between runtimes.
Deprecated APIs
These older APIs use different terminology. Follow their replacement guidance when updating existing code.