Skip to content

feat: Add kernel-browser-runtime#522

Merged
rekmarks merged 8 commits intomainfrom
rekm/browser-runtime
May 21, 2025
Merged

feat: Add kernel-browser-runtime#522
rekmarks merged 8 commits intomainfrom
rekm/browser-runtime

Conversation

@rekmarks
Copy link
Member

@rekmarks rekmarks commented May 20, 2025

Progresses: #461

In preparation for integrating the kernel into https://github.com/MetaMask/metamask-extension, extracts the kernel-integration directory into a new package @metamask/kernel-browser-runtime. Makes some supporting refactors to this end.

@rekmarks rekmarks force-pushed the rekm/browser-runtime branch from 0a63e3b to e306520 Compare May 20, 2025 20:48
@rekmarks rekmarks force-pushed the rekm/browser-runtime branch from c71a6af to eabf414 Compare May 20, 2025 20:56
@rekmarks rekmarks marked this pull request as ready for review May 20, 2025 21:04
@rekmarks rekmarks requested a review from a team as a code owner May 20, 2025 21:04
Copy link
Contributor

@FUDCo FUDCo left a comment

Choose a reason for hiding this comment

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

Looks good!

@rekmarks rekmarks enabled auto-merge (squash) May 21, 2025 07:26
@rekmarks rekmarks merged commit f72bebb into main May 21, 2025
22 checks passed
@rekmarks rekmarks deleted the rekm/browser-runtime branch May 21, 2025 07:31
rekmarks added a commit that referenced this pull request Jun 3, 2025
#522 introduced the `kernel-browser-runtime` package, which bundled the
kernel Web Worker. Further experiments indicated that it would be
salutary for this package to bundle the vat worker, i.e. vat iframe, as
well.

To facilitate this, we replace `esbuild` with `vite` in
`kernel-browser-runtime`, and extract all vat iframe-related
functionality to this package. We also extract the extension's Vite
plugins into a dedicated, private package so that they can be reused.

Finally, during development, it was discovered that Vite duplicates the
`@sqlite.org/sqlite.wasm` WASM binaries. This was a preexisting issue in
the extension, when we bundled the kernel worker there. Thankfully, the
duplicate files are extraneous and can be deleted, which is done using
an inline plugin in `kernel-browser-runtime`.

Many red herrings died in the creation of this PR.
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