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

refactor(runtime): use Extensions #10461

Merged
merged 4 commits into from
May 2, 2021

Conversation

AaronO
Copy link
Contributor

@AaronO AaronO commented May 1, 2021

Refactors runtime/ to use the new JsRuntime Extensions landed in #9800, paves a first path for a more modular runtime/ and streamlines worker init logic (having both web extensions/ and runtime/ init'd declaratively instead of imperatively)

Changes

  • Refactor runtime::ops::*::init to return Extensions
  • Refactor workers to init runtime ops with extensions
  • Move WebWorkerHandle/sender to OpState

Notes

  • This refactoring doesn't include the runtime JS in Extensions, that will require more work, to avoid bugs and duplicating logic with snapshots
  • For now we depend on runtime/'s JS to be provided via the snapshot, no different than in main
  • However I think we should clean this up & decouple it, so we can boot a Worker without depending on that snapshot

Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

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

LGTM

@ry ry merged commit 8377957 into denoland:main May 2, 2021
@AaronO AaronO deleted the refactor/runtime-with-extensions branch May 2, 2021 23:31
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.

2 participants