Update v86 to latest, replace string-match patches with stable shim

The previous build patched libv86.js by exact-string match against
Closure-mangled identifiers (k.load_file, H.exportSymbol, pa, qa),
which broke on every upstream rebuild.

Of the three old patches:
- exportSymbol order: now a one-line HTML shim copying module.exports.V86
  to window after libv86 loads
- this.fetch binding: fixed upstream
- load_file XHR vs fs: replaced by patching await import('node:fs/promises')
  to require('fs').promises - string literals survive Closure, fails loud
  if absent

Also adds tools/update-v86.js to pull new builds from copy.sh, and exposes
the renderer DevTools protocol on localhost:9222 in dev.
This commit is contained in:
Felix Rieseberg
2026-04-10 20:53:44 -07:00
parent 00943ae4da
commit 2d34183e14
6 changed files with 779 additions and 697 deletions

View File

@@ -61,6 +61,12 @@ export function main() {
return;
}
if (isDevMode()) {
// Renderer DevTools Protocol — connect Chrome to chrome://inspect
// or attach a debugger to localhost:9222
app.commandLine.appendSwitch("remote-debugging-port", "9222");
}
// Set the app's name
app.setName("windows95");

View File

@@ -18,7 +18,6 @@ export function getOrCreateWindow(): BrowserWindow {
},
});
// mainWindow.webContents.toggleDevTools();
mainWindow.loadFile("./dist/static/index.html");
mainWindow.webContents.on("will-navigate", (event, url) =>

Binary file not shown.

File diff suppressed because it is too large Load Diff