Skip to content
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

feat(runtime): allow adding custom extensions to snapshot #23569

Merged
merged 4 commits into from May 1, 2024

Conversation

mlafeldt
Copy link
Contributor

This makes create_runtime_snapshot more useful for embedders who add their own extension(s) to the runtime in build scripts.


I guess the alternative would be to use the method as-is right now and then create another snapshot from that one via startup_snapshot of CreateSnapshotOptions?

@mlafeldt
Copy link
Contributor Author

Also open to adding create_custom_runtime_snapshot or create_runtime_snapshot_with_extensions or similar instead.

This makes `create_runtime_snapshot` more useful for embedders
who add their own extension(s) to the runtime in build scripts.
Copy link
Member

@mmastrac mmastrac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable enough. Note that without tests this might be brittle and break in the future, however it's not an easy thing to add a test for.

Signed-off-by: Matt Mastracci <matthew@mastracci.com>
@mmastrac mmastrac enabled auto-merge (squash) May 1, 2024 13:48
@mmastrac mmastrac merged commit ee122c5 into denoland:main May 1, 2024
17 checks passed
@mlafeldt mlafeldt deleted the custom-runtime-snapshot branch May 2, 2024 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants