libs/core/examples/snapshot/README.md
This example roughly follows the blog post
Roll Your Own JavaScript Runtime: Part 3 to create a JsRuntime with an
embedded startup snapshot.
That blog post and the two that preceded it were no longer accurate. By including this example in the repository, it will continually be built, so it will hopefully stay up-to-date.
The example can be run by changing to the core/examples/snapshot directory and
running cargo run.
Differences from those blog posts:
create_snapshot() API has changed in various ways.#[op2] (read more)extension!(...) macro replaces Extension::builder()Missing features vs. those blog posts: