internals · 5 of 6 · snapshots
QuickJS can serialize objects and bytecode, but not Rust callbacks, template metadata, or embedder slots. Those are exactly what a deno_core snapshot needs, so a v8x snapshot is one serialized global graph plus a replay log for the native side.
| record | contents |
| context record | the global object graph, serialized as one graph so repeated references keep their identity; template descriptions; lexical globals; embedder and context slots; a bitmap of values already rooted in the graph |
| host function | a HOSTDATA entry holding the function’s index in the rusty_v8 external-reference table |
Restore order matters:
GC stays off for the window in which JavaScript graph edges exist but the native metadata is still disconnected. A collection there would sweep objects the replay log is about to wire up.
System JSC exposes neither heap snapshots nor a bytecode-cache API, so snapshot creation is unavailable on that backend.