-
Notifications
You must be signed in to change notification settings - Fork 41
Native functions can be included in the snapshot with newer V8. #1
Comments
There's a blog post on this: https://v8project.blogspot.de/2017/05/energizing-atom-with-v8s-custom-start.html |
@hashseed Just got around to reading the blog post. This looks promising, but it's not immediately clear to me how we'd use these native APIs. Currently we just run What do you think would be the best general path forward for using these capabilities? The ideal scenario would be to somehow start a normal Atom window and get it to a certain point in its startup cycle, then create a snapshot from there. But it looks like in those APIs you need to create a specific /cc @as-cii |
Hi, is this link still available? I clicked it and jump to https://v8.js.cn/blog/custom-startup-snapshots/, this blog looks like outdated. |
@hashseed Is there a documentation for including native modules in the snapshot? |
There is a v8.dev blog post explaining the high-level concepts, but it's probably best to just look at the test cases, e.g. this one |
I'm the author and maintainer of V8's custom start-up snapshot. I just came across this project recently. I think you would find this design document very interesting.
A few highlights:
FunctionTemplates
andObjectTemplates
and their instances can now be serialized, provided that the native function address is provided tov8::SnapshotCreator
.FunctionTemplates
andObjectTemplates
objects can be extracted from the snapshot, so there is no need to set them up from scratch.Please let me know if you are interested and have questions.
The text was updated successfully, but these errors were encountered: