-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Embedder's guide to snapshotting #18503
Comments
Are you looking to snapshot deno_core or deno_runtime. I have a project that is in active development if you'd like a makeshift example of snapshotting the deno_runtime, you can view orvitpng/evo:base_project. ext/src/interop.rs for making an extension, and runtime/build.rs for the actual snapshotting. I cannot promise that this code is perfect, but it is very similar to how Deno's cli handles things. edit: Changed the URL as the project has been restructured. Either way, this code should be ignored because current usage has changed because snapshotting is a very volatile part of Deno. |
See https://github.com/filecoin-station/zinnia:
Nice! Thank you @orvitpng for sharing this as an example to inspire from 🙇🏻 |
We'll do a live session on YouTube, next Wednesday and we'll talk about snapshotting. Feel free to put your questions here, we'll answer them and convert it into a blog post/manual page. |
Awesome! I may not be able to join the live session, but I am looking forward to watch the recording and read the content you create.
|
Hey @bajtos; I have answered your questions during yesterday's livestream. Regarding your 4th question: |
A link to the youtube of the livestream: https://www.youtube.com/watch?v=zlJrMGm-XeA There is a table of contents at the bottom so you can skip to the end where Leo goes through the questions in this issue. |
Found the blog post, too: https://deno.com/blog/roll-your-own-javascript-runtime-pt3 Thank you for writing this up! ❤️ |
Continuing the discussion from #18271 (comment).
It would be great to have a guide for embedders showing how to set up their build to create a snapshot of all JS files bundled in their custom runtime to get faster startup times.
I can probably figure this out by reading the source code of Deno core & cli, but it would be much nicer if there were a guide. Having said that, both the guide and snapshotting are pretty much "nice to have" for us right now.
Another possible solution is to add an example to
deno_core
to show this in actions.Quoting from #18271 (comment):
The text was updated successfully, but these errors were encountered: