deno icon indicating copy to clipboard operation
deno copied to clipboard

wip serialize ModuleMap

Open bartlomieju opened this issue 3 years ago • 2 comments

It seems to be crashing on M1 with SIGSEGV :( cargo test -p deno_core snapshot

bartlomieju avatar May 30 '22 18:05 bartlomieju

This approach won't work. We can only serialize things that are v8::Value using serde_v8 and v8::Module is v8::Data and not v8::Value.

Other approach to explore is to manually serialize ModuleMapInner into a V8 object - since all v8::Value are also v8::Data we could then embed it into the snapshot using SnapshotCreator::AddData method. This will require some manual labor for serialization, but seems doable. The disadvantage is that when creating a snapshot from an existing snapshot all embedded data is lost, so we'll need to figure out how to make it work with #14744

bartlomieju avatar May 31 '22 16:05 bartlomieju

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jul 30 '22 19:07 stale[bot]