@threadedstack/wmd-web 0.1.39 → 0.1.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/README.md +243 -1
  2. package/RELEASE.json +84 -49
  3. package/guest/arm64/Image +1 -1
  4. package/guest/arm64/Image-4k +1 -1
  5. package/guest/arm64/initramfs.cpio.gz +0 -0
  6. package/package.json +3 -3
  7. package/src/boot.js +231 -4
  8. package/src/edge/auto.js +77 -0
  9. package/src/edge/base.js +10 -0
  10. package/src/edge/bridge.js +76 -7
  11. package/src/edge/ctl.js +21 -4
  12. package/src/edge/error-kind.js +6 -0
  13. package/src/edge/frame-code.gen.js +6 -0
  14. package/src/edge/frame.js +58 -15
  15. package/src/edge/msg.js +3 -0
  16. package/src/edge/own/adapter.js +223 -19
  17. package/src/edge/own/exit-now.js +62 -0
  18. package/src/edge/own/fs-own-route.js +40 -3
  19. package/src/edge/own/fs-stats.js +11 -0
  20. package/src/edge/own/hub.js +126 -14
  21. package/src/edge/own/loader.js +3 -2
  22. package/src/edge/own/marks.js +158 -0
  23. package/src/edge/own/net-host.js +873 -0
  24. package/src/edge/own/node-globals.js +142 -0
  25. package/src/edge/own/pool.js +30 -1
  26. package/src/edge/own/service-receiver.js +7 -1
  27. package/src/edge/own/shim-post.js +38 -0
  28. package/src/edge/own/worker.js +34 -1
  29. package/src/edge/page.js +448 -25
  30. package/src/edge/pins.gen.js +17 -0
  31. package/src/edge/pins.js +21 -0
  32. package/src/edge/plan.js +45 -9
  33. package/src/edge/python-module.js +18 -0
  34. package/src/edge/python-pins.js +64 -0
  35. package/src/edge/python-plan.js +280 -0
  36. package/src/edge/python-source.js +34 -0
  37. package/src/edge/runtime.js +15 -2
  38. package/src/edge/sbx/cap.js +48 -0
  39. package/src/edge/sbx/common.js +186 -0
  40. package/src/edge/sbx/doc.js +121 -0
  41. package/src/edge/sbx/files.js +112 -0
  42. package/src/edge/sbx/frame.js +126 -0
  43. package/src/edge/sbx/gate.js +115 -0
  44. package/src/edge/sbx/sha256.js +68 -0
  45. package/src/edge/sbx/worker-entry.js +36 -0
  46. package/src/edge/sems.js +113 -0
  47. package/src/edge/service-host.js +57 -5
  48. package/src/edge/service-port.js +79 -5
  49. package/src/edge/setup.js +278 -0
  50. package/src/edge/shim.js +3 -1
  51. package/src/edge/watch.js +101 -0
  52. package/src/edge/worker.js +31 -2
  53. package/src/gowasm/setup.js +9 -6
  54. package/src/host/chan-service.js +8 -5
  55. package/src/host/chan-services.js +29 -4
  56. package/src/host/edge-host.js +58 -3
  57. package/wmdpack.wasm +0 -0
package/README.md CHANGED
@@ -2670,6 +2670,248 @@ the runtime). `HASHES.txt` lists the sha256 and size of `wmd_browser_bg.wasm`, `
2670
2670
  the page hashes the first two before the first run (`web/src/edge/own/adapter.js checkFiles`), and `--verify` and the build check the same two. Without
2671
2671
  `edge-site` a page with `edge=1` gets the guest's node through the fallback at every `node` (counted as a runtime that is not there).
2672
2672
 
2673
+ ### Node in a frame the library makes itself (no second site)
2674
+
2675
+ An app writes `containerBundle(...)` and `bootWmd({ ... })` and nothing else: node in the frame is ON by default in Chromium and Firefox (and every browser but WebKit; see below). `edge: { sources }` and `edge: { base }` name other places for its files. `bootWmd` reads the container's spec
2676
+ (`bundle/config/config.json`) and image config (`bundle/config/imageconfig.json`) from the 9P service's `files`, asks the plan, adds the
2677
+ mounts of the image's node to the spec (once), makes the page's side of the bridge, prepares the frame when the page is idle, and closes it when
2678
+ the machine exits (a `vm.restore()` does not close it). There is no `origin`, no second site and no `edgeSetup` call.
2679
+
2680
+ The words of `edge`:
2681
+
2682
+ - `edge: false`: the off switch. Node runs in the guest. No edge code is loaded. No `edge` is the same as `edge: true` (`edge: {}`): on, with the default sources.
2683
+ - `edge: { sources }`: node runs in the frame when the plan says so. `sources` is an ordered list of the places the files of node come from; the
2684
+ first source that gives every file with its pinned sha256 and size wins, and a source that fails, stalls, is too big or gives a wrong byte is
2685
+ left for the next (one reason is kept per source). A source is one of:
2686
+ - `{ kind: 'tgz', url }`: an npm registry tarball. ONE request gives every file; the page reads it through gzip and a small tar reader and
2687
+ keeps the nine pinned files (`package/<path>`). The url may hold `{name}`, `{version}` and `{file}` (the name without its scope), which the
2688
+ pins' package fills in.
2689
+ - `{ kind: 'file', base }`: one file per request at `<base>/<path>` (a CDN of the package, a mirror, your own folder). `base` may hold the same
2690
+ words.
2691
+ - `{ kind: 'url', url }`: one file at exactly this url.
2692
+ - `edge: { base }` is the short form of one file base: `[{ kind: 'file', base }]` (`base` may also be a list of urls, one file source each).
2693
+ `sources` wins when both are given. `edge: true` is `edge: {}`.
2694
+ - The default places (`EDGE_SOURCES_DEFAULT` in `src/edge/base.js`): the npm registry tarball of `@threadedstack/wmd-node` first
2695
+ (`https://registry.npmjs.org/{name}/-/{file}-{version}.tgz`), then `https://cdn.jsdelivr.net/npm/{name}@{version}` and `https://unpkg.com/{name}@{version}`
2696
+ as file bases. Only the pins say which package and version: `src/edge/pins.gen.js` is written by the release (`npm/pack.mjs`) and names
2697
+ `@threadedstack/wmd-node` at the release's own version, with the sha256 and size of each file; a build without it runs node in the guest with the one
2698
+ reason `this build has no pins for node's files`. The page's policy needs `connect-src https://registry.npmjs.org https://unpkg.com` (see the policy lines below).
2699
+ - WebKit (Safari, every browser on iOS): the default is NO frame (`FRAME_CAPS.webkit` is 0 in `src/edge/sbx/cap.js`, measured there: the browser ends a web
2700
+ process at 2048 MB, and a sandboxed frame took the page past it); node runs in the guest with the calm reason `node runs in the guest in this browser: ...`. A page that
2701
+ wants frames anyway says `edge: { frameCap: N }` (its own choice, 0 = none).
2702
+ - `edge: { fscache: false }`: the off switch of the kept file answers (FSC-1). By default a start of node or python keeps what the page told it about the
2703
+ container's tree for 250 ms at most (the listing of a folder it read, the stat of a name and its absence), so the many repeated probes of an import or a
2704
+ `require` are answered inside the runtime, with no trip to the page (`edge/browser/src/fscache.rs`). What it keeps is dropped by every call of the program that
2705
+ changes the tree (write, rename, remove, link, mode, time, a truncate) and for the rest of the start by any call that lets another process act (a child, a watcher,
2706
+ a call the runtime does not know). A write by a process the program has no call to learn of (the guest, another frame) is unseen for 250 ms at most. The same switch for
2707
+ one program is `WMD_FSCACHE=0` in its environment (a mask: 1 listings, 2 stats, 3 both); for a diagnosis the page word `edgeFscache=0`. The table
2708
+ `FSCACHE_OFF` of `src/edge/sbx/cap.js` names an engine that must run with it off (empty: it is on in Chromium, Firefox and WebKit).
2709
+ - The rest of the object (`watch`, `prepare`, `onLog`, `onBridge`, `settings`, `rt`) is for tests and advanced pages; it is handed to `edgeSetup`.
2710
+ - Node runs in the guest, with the reason counted in `edgePlanCounts.off`, when: the image has no node 24, the container says `WMD_EDGE=0`,
2711
+ a user that is not root, a read-only root, tmpfs mounts, the browser lacks SharedArrayBuffer or wasm exceptions, or there is no source (or no pins file).
2712
+ An image without node loads `src/edge/auto.js`, `plan.js` and `runtime.js` only, makes no frame and downloads nothing.
2713
+ - Any failure of the frame (the page's policy, a file that cannot be fetched, a wrong sha256, a Worker that cannot start) gives ONE `site` event
2714
+ with the reason and node runs in the guest from then on (the page tries again after 5 minutes).
2715
+
2716
+ How it works: the page fetches the files from the sources (`src/edge/sbx/files.js`), checks each against the pins of `src/edge/pins.gen.js` (path, sha256,
2717
+ size, and the package that holds them; written by `scripts/edge-pins.mjs` from a build folder, `make edge-pins`; not in git), fetches them ONCE for the life of the
2718
+ page (the frame that prepares and the frame that runs ask the same promise; a failed fetch is not kept), keeps them in Cache Storage by hash, and hands the bytes to a sandboxed iframe
2719
+ (`sandbox="allow-scripts"`, `allow="cross-origin-isolated"`, no `allow-same-origin`: its origin is opaque) over a MessagePort. The frame and its
2720
+ Workers make no request. The frame's document is a srcdoc with a meta policy (`default-src 'none'; script-src blob: data: 'unsafe-eval'
2721
+ 'wasm-unsafe-eval'; worker-src blob: data:; form-action 'none'; base-uri 'none'`) and ONE inline start script. The script's hash does not change
2722
+ from release to release (a unit test pins it): `sha256-aW6P+6eP4hoF25XvKAQTO1ytOkCZ7TwDyjdVN/WaHTI=`.
2723
+
2724
+ A node start never waits long for the files (they are 65 MB). The page begins the download when it is idle after the boot (the idle `prepare`; with
2725
+ `prepare: false`, or no kept frame, the first node start begins it). A node start whose files are not there yet waits at most `FILES_WAIT_MS`
2726
+ (2.5 s, `src/edge/sbx/gate.js`); then that start runs in the guest with the reason "node's files are still loading". That is not a failure: nothing is
2727
+ counted against the frame, the site is not marked down, and no `site` event is made. A start that comes while the files still load goes to the guest
2728
+ at once. The download goes on in the background, once (a start that gave up does not restart it); `onLog` gets `{type: 'files', progress: true, bytes,
2729
+ ms}` (at most two a second), then `{type: 'files', ready: true, bytes, ms, source}` when the files are in, and the first start after that uses the
2730
+ frame. When every source failed (or `PINNED_ALL_MS`, 600 s over all the sources, passed) `onLog` gets ONE `{type: 'files', failed: true, reasons: [{source,
2731
+ why}, ...]}`, node stays in the guest, and a start gets the guest with the reasons. The page tries again no sooner than 5 minutes later (`SITE_RETRY_MS`),
2732
+ as a background fetch: the start that brings the retry goes to the guest at once, and no start ever waits for a retry. A retry costs one request for each
2733
+ source that answers at all (a tarball source: one request, up to the size of its bound in bytes if it trickles; a dead source costs the request only).
2734
+ Nothing is fetched for a container that has no node, or with `edge: false`.
2735
+
2736
+ Serving your own copy: put the nine files where a source can reach them and name that place. As a folder of files, `<base>/<path>` for each pinned
2737
+ path (the same paths the pins have), and pass `edge: { base: 'https://app.example/node-files' }` (that host then goes into `connect-src`, or it is
2738
+ the page's own origin and `'self'` covers it). As a tarball, make a package whose files are under `package/<path>` (what `npm pack` makes) and pass
2739
+ `edge: { sources: [{ kind: 'tgz', url: 'https://app.example/node-files.tgz' }] }`; a `tgz` url without `{name}` words needs no package in the pins. The
2740
+ files must be the bytes the pins name: a file with another byte is refused, and the next source (or the guest) is used. A source on another origin must answer with
2741
+ `access-control-allow-origin` (the page reads it with `fetch`).
2742
+
2743
+ What the page's own Content-Security-Policy must allow (a srcdoc frame inherits it). If the page sends none, nothing is needed. Over a page that runs the guest
2744
+ alone (`edge: false`: `script-src 'self' 'wasm-unsafe-eval'`, `worker-src 'self'`), node in the frame adds exactly this, measured in Chromium, Firefox and WebKit
2745
+ with Playwright (`docs/research/browser-speed-2026-11/x5/sandbox/product/runs/i4-*.json`, `i4m-*.json`, and the fix round's `fixA/runs/rc3-*.json`): in
2746
+ `script-src` the hash of the start script, `blob:`, `data:` and `'unsafe-eval'`; in `worker-src` `blob:` and `data:`; in `connect-src` the host of each source. The page
2747
+ cannot do with less in `script-src` and `worker-src`: the frame's document is a srcdoc, which inherits the page's policy, so its inline start script needs its
2748
+ hash, its code and Workers come from `blob:` and `data:` URLs, and the runtime makes functions from text. Only `connect-src` is a line about where the files come
2749
+ from. Complete lines (each directive written out, `'self'` kept, so pasting them as they are does not take away what the library's own module Workers need);
2750
+ an app that has more in its policy adds these to its own directives:
2751
+
2752
+ ```
2753
+ script-src 'self' 'wasm-unsafe-eval' 'unsafe-eval' 'sha256-aW6P+6eP4hoF25XvKAQTO1ytOkCZ7TwDyjdVN/WaHTI=' blob: data:
2754
+ worker-src 'self' blob: data:
2755
+ connect-src 'self' https://registry.npmjs.org https://unpkg.com
2756
+ ```
2757
+
2758
+ `web/test/unit/edge-x5fa-readme-csp.test.js` reads these three lines out of this file and checks them against the code (the start script's hash, `'self'` in
2759
+ each, the default sources' hosts), and the fix round's browser row boots a page with exactly them in all three browsers.
2760
+
2761
+ The `connect-src` line names the hosts of the sources the release makes the default (the registry's tarball and unpkg's single files). An app that
2762
+ names other sources lists those hosts instead.
2763
+
2764
+ The frame is not something a page has to defend: only the library's own code runs in the frame's window (node itself runs in a Worker of the frame and has no
2765
+ window), and that code does not navigate it. A page that wants even a bug in the library to be unable to send a request from the frame window adds one
2766
+ policy line, `frame-src 'none'` (the srcdoc frame is not governed by it, but a navigation of the frame to a URL is, and with it no request leaves in Chromium,
2767
+ Firefox or WebKit, measured by the check). Nothing about this is needed for node in the frame to work.
2768
+
2769
+ - `script-src` hash: all three. The start script is inline, so without its hash the frame never starts.
2770
+ - `script-src blob:`: all three (the frame's code is loaded from a blob: URL).
2771
+ - `script-src 'unsafe-eval'`: all three (the runtime makes functions from text). `'wasm-unsafe-eval'` alone is not enough, and with `'unsafe-eval'` it is not needed.
2772
+ - `worker-src`: Chromium and Firefox work with `blob:`, with `data:`, with both, or with no `worker-src` at all (the page then follows `script-src`).
2773
+ WebKit needs `data:` (in `worker-src`, or in `script-src` when there is no `worker-src`); WebKit refuses blob: Workers from a frame with an opaque
2774
+ origin. Giving `blob: data:` works everywhere.
2775
+ - `connect-src`: the page's own fetch of the files; it needs the host of each source (a `tgz` url, a `file` base).
2776
+ - `script-src data:`: WebKit only (measured in the fix round, `fixA/runs/rc2-webkit.json`): its frame's Worker is a `data:` Worker that imports a `data:` module, which `script-src` governs; without it the
2777
+ start fails ("Importing a module script failed") and node runs in the guest. Chromium and Firefox work without it; the line has it for all three.
2778
+ - Not needed: `frame-src` (a srcdoc frame is not governed by it, also with `frame-src 'none'`), `child-src`, `'wasm-unsafe-eval'` for the frame (the guest needs it or `'unsafe-eval'` anyway).
2779
+ - The page's own wasm (the guest) needs `'wasm-unsafe-eval'` or `'unsafe-eval'` in `script-src` whatever the frame does.
2780
+
2781
+ A page whose policy is `script-src 'self'` (with `'wasm-unsafe-eval'` for the guest) cannot run the frame. The library finds out when the frame's start
2782
+ script does not say hello within 3 s of its document loading (that is the idle prepare, before the first node command) and gives one event
2783
+ that names `sha256-...`, `blob:`, `'unsafe-eval'` and `worker-src`. Node then runs in the guest. If the policy refuses the frame's code or the
2784
+ runtime later, the same single event names the directive the browser reports (`securitypolicyviolation`) or the form of Worker that could not start.
2785
+
2786
+ ### Node in the frame for an embedder (`edgeSetup`, X5 default1)
2787
+
2788
+ `edgeSetup` of `src/boot.js` gives a page that embeds the package what `web/page/ckpt.js` does for `edge=1`. The frame site's origin is
2789
+ the one thing a page must give; it passes on the container's `env`, which it has for `containerBundle` anyway:
2790
+
2791
+ ```js
2792
+ import { bootWmd, edgeSetup } from './src/boot.js'
2793
+ import { containerBundle } from './src/host/ctl.js'
2794
+ const edge = await edgeSetup({ edge: true, origin: 'https://node-frame.example', env })
2795
+ const bundle = containerBundle({ args, env, edgeNode: edge.edgeNode }) // undefined when node runs in the guest
2796
+ const vm = await bootWmd({ ...options, edge: edge.bootOption() }) // one per boot, a restore's too
2797
+ edge.prepare() // after the boot: the frame is made when the page is idle
2798
+ vm.exited.then(() => edge.close()) // a machine that ended (not one a restore replaces)
2799
+ ```
2800
+
2801
+ - On by default (`edgeSetup` with an origin): only `edge: false` turns it off. With the switch off or no origin no edge module is loaded.
2802
+ - When node runs in the guest the call says why (`reason`) and counts it in `edgePlanCounts.off` (`edgePlanCounts.on` counts the rest).
2803
+ The reasons are the plan's (`src/edge/plan.js`): no frame site, the browser lacks what the frame needs (SharedArrayBuffer in a cross-origin
2804
+ isolated page, wasm exceptions), the container says `WMD_EDGE=0`, a user that is not root, a read-only root, tmpfs mounts, an image node
2805
+ that is not node 24, and the runtime.
2806
+ - Defaults: the 9P service of the container's files on port 564 at `rootfs` (`p9port`, `root`), the own runtime (`rt`), kept frames
2807
+ (`watch.keepFrame`, the frame of a finished run is used again) and the idle prepare (`prepare`). `settings` (hostname, cpus) and `onLog`
2808
+ are optional.
2809
+ - The page must be cross-origin isolated and its content security policy must allow the site in `frame-src`; the site serves the files and
2810
+ headers of the table above.
2811
+ - A site where nothing answers: the frame shows the browser's error page, which never says ready. Chromium fires the frame's load: the run
2812
+ ends 1.5 s after it (`FRAME_LOAD_GRACE_MS` of `src/edge/page.js`). Firefox fires none, but the page can no longer read the frame's
2813
+ document: the run ends 2.5 s after that (`FRAME_COMMIT_GRACE_MS`). WebKit shows the page nothing (the frame stays its about:blank): the
2814
+ idle prepare's frame ends at the start limit, 5 s after it went in (`FRAME_START_LIMIT_MS`), so a node command that comes later runs in
2815
+ the guest at once and one that comes sooner waits for the rest of those 5 s. The site is then marked down, and every later node runs in the guest at once,
2816
+ with the reason counted in the bridge's `fallbackWhy`; the idle prepare finds it the same way, and a node that came meanwhile ends with it.
2817
+ The page looks at the site again every 5 minutes.
2818
+ - A page that loaded in the frame whose script never said ready (a server that is down, one that answers 404 for `/edge/*`, or one that sends no
2819
+ COEP header): the page cannot tell these apart, so the reason says what it knows: a page loaded at the origin and the frame's script did not say ready
2820
+ in N ms, with the three possible causes.
2821
+ - A file of the runtime, the node program (`/wasm/edgejs.wasm`) or the settings file (`/wasm/linux.cjs`) that the site answers with an error (404,
2822
+ 500) is a failure of the site's files, not a program that is broken: the failure names the URL and the status (`the runtime did not load:
2823
+ http://.../wasm/edgejs.wasm answered 404`), the site is marked down for 5 minutes (every node command runs in the guest at once, with that
2824
+ reason counted), and the idle prepare marks it down before the first command. The word that carries this from the frame to the page is one of a
2825
+ fixed set (`errorKind`: `runtime`); the page keeps no other.
2826
+ - `edge.close()` before the machine ended: a `node` that the machine asks for afterwards is answered at once so that the guest runs the image's node
2827
+ (counted in the bridge's `fallbackWhy` as `the edge setup was closed`); no frame is made for it and no command waits. Call `close()` when the machine
2828
+ ended, as above; a machine that a restore replaced is not asked (its messages are dropped). The call closes every machine that got a boot option of
2829
+ this setup, not only the newest option's (a restore asks for `bootOption()` again): after it no such machine can start a frame run or wait for one,
2830
+ and a machine that had sent nothing yet is refused too (counted as a fallback with the same reason). `close()` is final for the options it closed.
2831
+ - One live container per frame site in a page (X5 check 2, F2). A second `edgeSetup` of the same page on a site that a live setup has gets node in
2832
+ the guest: `use` is false, the reason is `the frame site is in use` (counted in `edgePlanCounts.off`) and `onLog` gets
2833
+ `{type: 'site', inUse: true, origin}`. Measured before the rule, in three browsers: a program of container A answered a BroadcastChannel message
2834
+ of container B's node run when both had one site (`docs/research/browser-speed-2026-11/x5/default1/check2/`). The site is free again after the
2835
+ first setup's `close()`, so a page that starts the next container on the same site must have called `close()` for the one before. A boot after
2836
+ `close()` (a new `bootOption()` of the closed setup) takes the site again when it is free; when another container took it meanwhile, every node
2837
+ start of that boot is answered with the fallback and the guest runs node. Sites are compared as origins (`http://C1.example:80/` is
2838
+ `http://c1.example`). The rule covers one page: two pages (tabs) of one browser on one site are not seen by it, and the next point holds for them.
2839
+ - Containers that trust each other can live on one site: each of them passes `shareSite: true` to `edgeSetup`. One that did not say so never
2840
+ shares, whichever came first. Such containers share the site's storage, locks and channels (the next point). Each still has its own frames:
2841
+ a kept frame belongs to the container that made it, that is, to its `edgeSetup` (the same through restores); a second container makes its
2842
+ own frame, never finds, checks or starts the first one's kept frame, and `close()` of one setup removes only its own frames.
2843
+ - A fetch of a runtime file that rejects (the network is gone, the site died between two files), a body that fails while it is read, and a 200 whose
2844
+ bytes are not the file (a proxy's HTML page: the compile throws, or `linux.cjs` fails its marker check, or the runtime's wasm fails HASHES.txt) are
2845
+ failures of kind `runtime` like a 404: the reason names the URL and what happened (`the runtime did not load: http://.../wasm/edgejs.wasm could not
2846
+ be fetched: TypeError: Failed to fetch`), the site is marked down for 5 minutes, the command falls back and later commands make no frame until
2847
+ the recheck. The idle prepare finds the same failures, `linux.cjs` included.
2848
+ - The container's code can post messages from the runtime's Workers. A message of a kind the runtime does not use is dropped and counted: the
2849
+ bridge's `stats().forgedMessages` (summed over the runs that reached the ready step); it never reaches `onLog`.
2850
+ - What a run that ended badly leaves of its frame (measured in Chromium, Firefox and WebKit, `docs/research/browser-speed-2026-11/x5/default1/check1/`;
2851
+ pinned by `web/test/unit/edge-x5f3p-ends.test.js`): after SIGINT, after an uncaught throw and after `process.exit` in a callback the program ends
2852
+ with its exit code and the frame is **kept**; its Worker ended when it said done, the next run starts a new Worker, and input or a relay that carries
2853
+ another run's number is not taken. After SIGKILL inside a synchronous loop the Worker cannot answer: the run is cut off at once and the frame is
2854
+ **removed** (the stop message is posted, then the frame leaves the page); the next command makes a new frame.
2855
+ - One origin per container, and what containers on one origin share (X5 fix3p P2, D-582). The browser's storage is kept per origin (and per top-level
2856
+ site). Containers given the same frame site (`edgeOrigin` or the setup's origin) share that origin's IndexedDB, Cache Storage, OPFS, locks and
2857
+ BroadcastChannel: a program of one container that reaches for them on purpose can leave data for a program of another. Measured in Chromium
2858
+ (`docs/research/browser-speed-2026-11/x5/default1/fix3p/runs/b/f3p-chromium-h4.json`, arms `TWIN1C` and `TWIN2C`): two pages of one browser
2859
+ context on one host name, page A's program wrote a mark to IndexedDB, Cache Storage and OPFS, and page B's program read `{"idb":"A","cache":"A",
2860
+ "opfs":"x5f3p-opfs"}`. With the page option `edgeOrigin=<origin>` naming another host name for page B (here `http://c2.x5f3p.localhost:8988`) the frame
2861
+ of B ran on that host name (its iframe `src` shows it) and read `{"idb":"undefined","cache":"none","opfs":"empty"}`. An embedder that must keep
2862
+ containers apart therefore gives each its own host name (a wildcard host name and certificate, D-582). The origin keeps its storage after its
2863
+ container ends: a new container on a reused host name must clear the site's data first, or take a new name.
2864
+ - The runtime itself stores nothing on the site. `fix3p/runs/grep-P2.txt`: no storage, lock or channel name in the runtime's glue code, and the one
2865
+ BroadcastChannel in `web/src/edge/own/capi.js` is made only when no relay is given, which the runtime's Workers always give. After an `npm ci` in a
2866
+ frame (`f3p-chromium.json`, arm `NPMCI`) the realm lists no IndexedDB database, no cache, no OPFS entry and no lock, and Chromium's own view of the
2867
+ frame's storage key (`http://c1.x5f3p.localhost:8988/`) shows 0 bytes in file systems, IndexedDB, Cache Storage and service workers.
2868
+ - The cost of a new host name: the runtime's files (the page of the frame, its scripts, `edgejs.wasm`, `wmd_browser_bg.wasm`, `linux.cjs`) are fetched and
2869
+ compiled once per origin. Measured at the frame site with cacheable headers (Chromium, loopback, `TWIN1C` and `TWIN2C`, three runs each): the first
2870
+ node command of a second page on the same host name made 1 request (`edgejs.wasm`) and took 1219, 1227 and 1251 ms; on a new host name it made
2871
+ 32 requests (the frame page, scripts, both wasm files) and took 1310, 1194 and 1137 ms. On loopback the time difference is not clear; a real network
2872
+ pays the 32 fetches (not measured here).
2873
+
2874
+ ### Python in the frame (X25)
2875
+
2876
+ A container whose image has CPython 3.12 runs `python3` in the frame under the same switch as node: `edge` (and, for python alone, `python: false` in
2877
+ `edgeSetup`, or `?python=0` on `ckpt.html`, turns it off; `WMD_EDGE=0` in the program's environment sends one start to the guest). What is python's own
2878
+ is the module. `src/edge/python-pins.js` (generated from the Makefile) names it: for 3.12 the npm package `@threadedstack/wmd-python` at the version
2879
+ `3.12.14-1`, its file `python.wasm` (the module without its `.debug` sections, 16,451,533 bytes, sha256
2880
+ `5c8c209c63462c402cf14886c0fbde32db0d5e84a483543820fe4b5918cf83bf`). `src/edge/python-module.js` is the table the frame reads (`/wasm/python-3.12.wasm` is the
2881
+ name a site serves it under), and `src/edge/python-source.js` `fetchPythonModule(minor)` is the default source for a page with no site of its own: the
2882
+ registry's tarball first, then jsDelivr, then unpkg, each accepted only with exactly the pinned sha256 and size (`src/host/pinned-fetch.js`, shared with the
2883
+ Go twin). A start the plan refuses (a container that may hold more than the frame's 32-bit python holds, a native extension the tree needs) runs in the guest as
2884
+ before; the reason is counted.
2885
+
2886
+ ### Where node in the frame differs from node in the guest (X5 fix3)
2887
+
2888
+ `docs/research/browser-speed-2026-11/x5/default1/fix3/fix3.md` has the measured table (Chromium 46 of 61 rows equal, Firefox 47 of 62, WebKit 48 of 62; the rest
2889
+ are the known differences below). Known differences, moved behind the performance work: three names the runtime's core puts on node's global
2890
+ (`getInternalBinding`, `getLinkedBinding`, `internalBinding`; every other name of the browser's worker global is hidden), no `RLIMIT_FSIZE` (a write over
2891
+ `ulimit -f` is not cut off with `EFBIG`), `process.title` is empty (the runtime's property cannot be set), no `Killed` line of the shell after SIGKILL
2892
+ in some runs, and the text of an uncaught error (the frame prints the runtime's stack, node prints the source line and caret).
2893
+
2894
+ `fs.watch` and `fs.promises.watch` work in the frame (`src/edge/watch.js`), with these limits. The page has no event from the machine's files, so it compares
2895
+ scans of them: a name that came, went or changed its inode is `rename`, a file whose size or mtime changed (and a regular file that was made) is `change`.
2896
+ An event can come late: a watcher is scanned at most every max(50 ms, 5 times the cost of its last scan). Two changes of one file between two scans are one
2897
+ event, and a change that leaves size and mtime as they were is not reported. A scan reads at most 50000 names of a tree and a process has at most 1024 watchers
2898
+ (`ENOSPC` after that). Measured on a Mac with the real Overlay (`harness/measure-watch.ts`, `runs/watch-cost.txt`): a poll with nothing watched costs 0.05 us;
2899
+ a recursive tree of 1010 entries scans in 1.0 ms (interval 50 ms), 10500 entries in 7.6 ms (interval 50 ms), and a tree over the 50000-name bound in 38 ms
2900
+ (interval 104 ms); a poll inside the interval costs 0.1 us. The shim asks every 10 ms only while a watcher is open.
2901
+
2902
+ ### The network of node in the frame (X5 net)
2903
+
2904
+ With `edge=1` node's sockets in the frame are the container's: `net.connect`, `net.createServer`, `http`, UDP and `dns.lookup` go through the
2905
+ container's stub (the stub is in the container's network namespaces), so a server of node in the frame is reachable from the guest's other processes and
2906
+ a name is looked up by the guest's resolver. Implementation: the runtime's `net_*` calls (`edge/browser/src/net.rs`, `netproto.rs`) reach `NetHost`
2907
+ (`src/edge/own/net-host.js`), one per run, which opens raw yamux streams on the run's stub session. `edgeNet=0` (page option) turns it off: the runtime
2908
+ answers `ENOSYS` to socket calls as before. Limits per run: 1024 sockets (their first windows fit in the total), 256 listeners, a backlog of 511 per listener, 1 MiB queued per stream for the
2909
+ stub, 256 KiB received per stream until the program takes it, and one total of 256 MiB for every byte the page holds for the run (received and not yet
2910
+ taken, queued sends, datagrams): over it the credit of what the program takes is held back, `send` answers `EAGAIN`, a datagram is dropped; nothing is
2911
+ dropped on TCP. `process.exit` ends the run at once (nothing after it runs but the `'exit'` listeners). Measured differences from node in the guest:
2912
+ `docs/research/browser-speed-2026-11/x5/default1/net/net.md`. Page option `relayUrl=ws://host:port/wisp/` (`ckpt.html`, `proto=wisp`) gives the machine
2913
+ the guest's network of P-B10 (`page/net.js` has the same); the page's CSP must allow the relay's origin (`WMD_WEB_CONNECT_SRC` of `test/serve.ts`).
2914
+
2673
2915
  ## Guests above 1536 MiB: RAM in a memory64 of its own (D-533)
2674
2916
 
2675
2917
  vm.wasm's memory 0 is 4 GiB at most and also holds the emulator's heap, so `--ram` stopped at 1536 MiB
@@ -2780,6 +3022,6 @@ attributes the guest has seen across a cache drop (the page's `ck.dropNames()`),
2780
3022
 
2781
3023
  ## The Go compiler's Wasm twin (X6; off until a base url is set)
2782
3024
 
2783
- An embedder does nothing to get the twin: update the package and call `containerBundle` and `bootWmd` as before, with no line of twin code. `bootWmd` reads the pins (`src/gowasm/pins-data.js`, a JS module that ships in the package, no request), adds the stub mounts to the bundle's spec and sets the service's `gowasm` field from it; the image decides (an image with no Go compile, or a Go release with no pin, runs as before and downloads nothing). The twin's module (41 to 53 MB per Go release) is fetched by the twin's Worker on first use from an ordered list of sources (`GOWASM_SOURCES_DEFAULT` in `src/gowasm/setup.js`, `null` for now: the twin is off until a page or the default names sources): the first that gives the pinned sha256 and size wins, a source that fails, stalls, is too big, refuses the file or has a wrong hash is left for the next (jsDelivr refuses files over 50 MB, so for the largest twin the working sources are the registry tarball and unpkg: each release needs only one source that works), and when all fail the guest compiles, with one `gowasm-off` event that names each source. Source kinds: `{ kind: 'tgz', url }` (an npm registry tarball) and `{ kind: 'file', base }` (`<base>/<file>`); only the pins name the package. The module is kept in Cache Storage of the page's origin under a key that holds its hash (checked again at each boot). What a consumer may pass to `bootWmd`: `gowasm: false` (off), `gowasm: { sources: [...] }`, `gowasm: { base: 'https://.../gowasm' }` (the override for an app that serves its own copy of the files `compile-<go release>.wasm`), `gowasm: { limits }`. The one CSP line an app with a Content-Security-Policy needs, with the default sources: `connect-src 'self' https://registry.npmjs.org https://cdn.jsdelivr.net https://unpkg.com`. Test page words: `gowasm=1`, `gowasm=auto` (only a table the page states by `gowasmtools=<url>` or `<meta name="wmd-gowasm-table" content="<url>">`), `gowasmbase=<url>`. A checkpoint keeps the twin choice it was taken with (a checkpoint taken with the twin always restores: with `gowasm: false` the stub mounts stay, no twin Worker starts, every compile runs in the guest, one `gowasm-off` event, rule `checkpoint-twin`; one taken without it restores without it). Headers, limits, the cache, the checkpoint rule and the images that carry a listed compile: `docs/gowasm-twin.md`.
3025
+ An embedder does nothing to get the twin: update the package and call `containerBundle` and `bootWmd` as before, with no line of twin code. `bootWmd` reads the pins (`src/gowasm/pins-data.js`, a JS module that ships in the package, no request), adds the stub mounts to the bundle's spec and sets the service's `gowasm` field from it; the image decides (an image with no Go compile, or a Go release with no pin, runs as before and downloads nothing). The twin's module (41 to 53 MB per Go release) is fetched by the twin's Worker on first use from an ordered list of sources (`GOWASM_SOURCES_DEFAULT` in `src/gowasm/setup.js`: the npm registry, then jsDelivr, then unpkg; `gowasm: false` turns the twin off): the first that gives the pinned sha256 and size wins, a source that fails, stalls, is too big, refuses the file or has a wrong hash is left for the next (jsDelivr refuses files over 50 MB, so for the largest twin the working sources are the registry tarball and unpkg: each release needs only one source that works), and when all fail the guest compiles, with one `gowasm-off` event that names each source. Source kinds: `{ kind: 'tgz', url }` (an npm registry tarball) and `{ kind: 'file', base }` (`<base>/<file>`); only the pins name the package. The module is kept in Cache Storage of the page's origin under a key that holds its hash (checked again at each boot). What a consumer may pass to `bootWmd`: `gowasm: false` (off), `gowasm: { sources: [...] }`, `gowasm: { base: 'https://.../gowasm' }` (the override for an app that serves its own copy of the files `compile-<go release>.wasm`), `gowasm: { limits }`. An app with no Content-Security-Policy has nothing to do. An app with a policy that has `connect-src` adds one origin, `https://registry.npmjs.org` (the first source; jsDelivr and unpkg are only fallbacks, so they need not be listed), or names a source of its own that the policy allows with `gowasm: { sources: [...] }`. A source the policy blocks is left for the next one without a request, and when all are blocked the guest compiles and the `gowasm-off` event says what blocked each (the directive and the origin to add; in Playwright's WebKit the page gets no violation event from the twin's Worker, so the reason is the browser's own text with a hint naming `connect-src`); knowing that all three are blocked took 21 to 25 ms in Chromium and 22 to 28 ms in Firefox (counted once, under shared load). Test page words: `gowasm=1`, `gowasm=auto` (only a table the page states by `gowasmtools=<url>` or `<meta name="wmd-gowasm-table" content="<url>">`), `gowasmbase=<url>`. A checkpoint keeps the twin choice it was taken with (a checkpoint taken with the twin always restores: with `gowasm: false` the stub mounts stay, no twin Worker starts, every compile runs in the guest, one `gowasm-off` event, rule `checkpoint-twin`; one taken without it restores without it). Headers, limits, the cache, the checkpoint rule and the images that carry a listed compile: `docs/gowasm-twin.md`.
2784
3026
 
2785
3027
  Off is off: with `gowasm: false` (or no twin source and no table) there is no twin file requested, no twin Worker started, no stub mount in the container (the guest's `/proc/mounts` has none), and no event. What the page does load is four small library modules that main's page does not, because the checkpoint rule needs the twin's spec text even when the twin is off: `src/gowasm/boot-setup.js`, `src/gowasm/setup.js`, `src/gowasm/pins-data.js` and `src/host/gowasm-guard.js`, 4 requests and 39,808 bytes uncompressed (counted once in Chromium against a copy of `origin/main`'s `web/`: 228 requests against 225, 65 distinct paths against 61; `web/test/x6/fix10-count.spec.js`). Nothing else differs in what the page asks for.
package/RELEASE.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "wmd-web",
3
3
  "version": "0.5.1",
4
- "commit": "6b1f00376baee9fe58ee14b13752c505c8e75573",
4
+ "commit": "15f927989729f00a9548e101562d256f1ab2538c",
5
5
  "previous": null,
6
6
  "decisions": [
7
7
  "D-388",
@@ -71,7 +71,13 @@
71
71
  "D-642",
72
72
  "D-652",
73
73
  "D-653",
74
- "D-654"
74
+ "D-654",
75
+ "D-655",
76
+ "D-656",
77
+ "D-658",
78
+ "D-659",
79
+ "D-660",
80
+ "D-661"
75
81
  ],
76
82
  "vmSources": "396ad82ca79a77c77620c75791f60cc3b83c6a1c",
77
83
  "guest": {
@@ -82,16 +88,16 @@
82
88
  "bytes": 1567615
83
89
  },
84
90
  "Image": {
85
- "sha256": "8542df8ca5f5b1b543129281e70e9906220da0ef299d93af190df2f953237b97",
91
+ "sha256": "0f17a1a3941f8827396265906e7b23cd70a85212caec47c20915abd5a45e19fe",
86
92
  "bytes": 39049224
87
93
  },
88
94
  "Image-4k": {
89
- "sha256": "696a4ce9d2fdc9b5a945f49f5faeb59f744fbdea9d0d69216afc6d29677398f0",
95
+ "sha256": "97ba5f7832895f2de857375d3802b9b016976258583613c4dbd903c271792e87",
90
96
  "bytes": 38828040
91
97
  },
92
98
  "initramfs.cpio.gz": {
93
- "sha256": "ea7cf5e117d4d0361ac3f9fe152729d5fa36746bc4017eea1c760227983628b8",
94
- "bytes": 4720468
99
+ "sha256": "1cac59f3a8bcf52a2b6b2d5769bf94dc237ec16c8b54df50686b4612bbe7bfef",
100
+ "bytes": 4726602
95
101
  },
96
102
  "features": {
97
103
  "sha256": "02693b8b6c099e10fdb7a092394102ee92971ce1e39d0d6e5327ff8be1d0ee74",
@@ -103,7 +109,7 @@
103
109
  "root": "edge-site",
104
110
  "files": {
105
111
  "edge-site/own/HASHES.txt": {
106
- "sha256": "e79eaf7a2e1200dd4f638f87a2faaa3e7ad799af83ebff1c33abb9b68c88cf04",
112
+ "sha256": "4d83edcb41399bb89eb7b1f89115886d739adac887bdde59a8d33e3a4602683a",
107
113
  "bytes": 359
108
114
  },
109
115
  "edge-site/own/NOTICES.txt": {
@@ -119,16 +125,16 @@
119
125
  "bytes": 207423
120
126
  },
121
127
  "edge-site/own/snippets/wasmer-napi-749f42b30f6a109f/inline0.js": {
122
- "sha256": "661c1a2a4f4a90ca8203d38cb1192075c33d37aa283f970fc68cf0e109124ada",
123
- "bytes": 37307
128
+ "sha256": "6b7322b9a8e1c49921d022621e3438a597630a14df26576a8359070e477fe5f7",
129
+ "bytes": 38363
124
130
  },
125
131
  "edge-site/own/wmd_browser.js": {
126
- "sha256": "ebc29a7f68463c4c076daa4d5c2a24c96ac8ea0fa63e87b70bc3c6600a22f250",
127
- "bytes": 70641
132
+ "sha256": "b389b072096881ba39b22cd705d3a230af02acc5409c61fb4f997d1081c4df6f",
133
+ "bytes": 75647
128
134
  },
129
135
  "edge-site/own/wmd_browser_bg.wasm": {
130
- "sha256": "9813084b410872479bd67d32d33c30ed6cbd9726e5638d0cdc26bafe49b31cd4",
131
- "bytes": 6243492
136
+ "sha256": "1e3db7f2c5f4be0ee44e5f2c0205cf8ca11f906d9addd5512915fad4821661c2",
137
+ "bytes": 6334959
132
138
  },
133
139
  "edge-site/wasm/NOTICES.txt": {
134
140
  "sha256": "7ae1af355689c49eae0a3e1ca3ea85a7d0793100f6bd7f9dabc7916e191e0421",
@@ -139,36 +145,41 @@
139
145
  "bytes": 59169054
140
146
  },
141
147
  "edge-site/wasm/linux.cjs": {
142
- "sha256": "b07b72dce12178348740113af66ea402b1cd1dcd276575979726ee9a66bad448",
143
- "bytes": 84100
148
+ "sha256": "77bb31f2d92a36f8a76bb129187febd253ce79e1c1dc9d4bccc87474075fef3f",
149
+ "bytes": 87706
150
+ },
151
+ "edge-site/wasm/linux.py": {
152
+ "sha256": "5f7ec28282f78691a4d84e37aeb8197cc5aa1888ffb2034f73e4e9c80faf9e22",
153
+ "bytes": 27198
144
154
  }
145
155
  }
146
156
  },
147
157
  "files": {
148
- "README.md": "88f523deff7d9c7fc9f4b14454d6d036cfa6570ad21d1d3c55b027d6d7f5776a",
149
- "edge-site/own/HASHES.txt": "e79eaf7a2e1200dd4f638f87a2faaa3e7ad799af83ebff1c33abb9b68c88cf04",
158
+ "README.md": "9155fdbf01fcd60f0fd89d854d985a26682683294de7404bf0197fd22aa8fdfb",
159
+ "edge-site/own/HASHES.txt": "4d83edcb41399bb89eb7b1f89115886d739adac887bdde59a8d33e3a4602683a",
150
160
  "edge-site/own/NOTICES.txt": "8ceca5406ee5833737bd5fa4a41d434bf5e4d26eff6da1e42c693176ee113101",
151
161
  "edge-site/own/acorn/LICENSE": "76a876cf886ff9be2a8b5e2e86514fed06223c8c9f0c1e9ee9606e93841e00b7",
152
162
  "edge-site/own/acorn/acorn.mjs": "5fb5f5d2613ed04b33892f2beba7400e4d6ba624512bc0e8dfb572243b2882f3",
153
- "edge-site/own/snippets/wasmer-napi-749f42b30f6a109f/inline0.js": "661c1a2a4f4a90ca8203d38cb1192075c33d37aa283f970fc68cf0e109124ada",
154
- "edge-site/own/wmd_browser.js": "ebc29a7f68463c4c076daa4d5c2a24c96ac8ea0fa63e87b70bc3c6600a22f250",
155
- "edge-site/own/wmd_browser_bg.wasm": "9813084b410872479bd67d32d33c30ed6cbd9726e5638d0cdc26bafe49b31cd4",
163
+ "edge-site/own/snippets/wasmer-napi-749f42b30f6a109f/inline0.js": "6b7322b9a8e1c49921d022621e3438a597630a14df26576a8359070e477fe5f7",
164
+ "edge-site/own/wmd_browser.js": "b389b072096881ba39b22cd705d3a230af02acc5409c61fb4f997d1081c4df6f",
165
+ "edge-site/own/wmd_browser_bg.wasm": "1e3db7f2c5f4be0ee44e5f2c0205cf8ca11f906d9addd5512915fad4821661c2",
156
166
  "edge-site/wasm/NOTICES.txt": "7ae1af355689c49eae0a3e1ca3ea85a7d0793100f6bd7f9dabc7916e191e0421",
157
167
  "edge-site/wasm/edgejs.wasm": "7131008ab38d52ff31b0d3059c6e105e8a448775408981956ce7aff792bfd98b",
158
- "edge-site/wasm/linux.cjs": "b07b72dce12178348740113af66ea402b1cd1dcd276575979726ee9a66bad448",
168
+ "edge-site/wasm/linux.cjs": "77bb31f2d92a36f8a76bb129187febd253ce79e1c1dc9d4bccc87474075fef3f",
169
+ "edge-site/wasm/linux.py": "5f7ec28282f78691a4d84e37aeb8197cc5aa1888ffb2034f73e4e9c80faf9e22",
159
170
  "export-page/coi-sw.js": "0300e670b413cb2e0aae35843fc583546bbf6687df971ab6df41cfa3b0d494d7",
160
171
  "export-page/index.html": "f5450c89e63601bbbbffef421f03491b231d1f143070012c1c5315d4b0059f43",
161
172
  "export-page/run.css": "b57adf1e76553549c1f89ff157b7973409dedc21889cd3932948cd05b51adc6f",
162
173
  "export-page/run.js": "717636a632a40469106ddf1383e198eaac5d83651b5866d0699ec04b82462b7f",
163
- "guest/arm64/Image": "8542df8ca5f5b1b543129281e70e9906220da0ef299d93af190df2f953237b97",
164
- "guest/arm64/Image-4k": "696a4ce9d2fdc9b5a945f49f5faeb59f744fbdea9d0d69216afc6d29677398f0",
174
+ "guest/arm64/Image": "0f17a1a3941f8827396265906e7b23cd70a85212caec47c20915abd5a45e19fe",
175
+ "guest/arm64/Image-4k": "97ba5f7832895f2de857375d3802b9b016976258583613c4dbd903c271792e87",
165
176
  "guest/arm64/features": "02693b8b6c099e10fdb7a092394102ee92971ce1e39d0d6e5327ff8be1d0ee74",
166
- "guest/arm64/initramfs.cpio.gz": "ea7cf5e117d4d0361ac3f9fe152729d5fa36746bc4017eea1c760227983628b8",
177
+ "guest/arm64/initramfs.cpio.gz": "1cac59f3a8bcf52a2b6b2d5769bf94dc237ec16c8b54df50686b4612bbe7bfef",
167
178
  "guest/arm64/vm.wasm": "1553b50b591cc579d2ce24e79c3fd72360db34a8a337c108e25e515a5eb920b6",
168
179
  "package.json": "7d43c05047d0a3ea56b4a7709f48a60de32e15c3bdf328d55435c46637981b40",
169
180
  "src/base.js": "982f8e46dbb727ec542a494ebdb884ccd19a31ff4e091425b2d1fc01b0d4754a",
170
181
  "src/blob.js": "bb2a2f0d87ce236280a7be2f246c926010dfe07f649c27da5e70d8eb5eaf7061",
171
- "src/boot.js": "4c4260088f8a1d9b7dcc031f5e9f90411787cda3648e204844291f416d452455",
182
+ "src/boot.js": "530f499bc0cdd29bab13720ff587b081efb008bc2f7b3c314646654c37dd773c",
172
183
  "src/build/builder.js": "c7794ec15b183213228776c8f4fb0950dec7e621f948358da7de8f90ef4f70ec",
173
184
  "src/build/context.js": "d38097c61dbdadc4d41290c010425a4422f499aba473fa2b83f2a5c41e543571",
174
185
  "src/build/dockerfile.js": "5957fe3d4ac8ff8b312f980ee04bd1d98ad4373a61f9a33e02f1ff1108b6ea53",
@@ -178,53 +189,77 @@
178
189
  "src/build/pin.js": "8c67f017ae3ec560d2638fdfc0bd91ddd758150af16c188bbe3bf2cb4d7e28b2",
179
190
  "src/build/tar.js": "25cf477488d9a60da9015be9ca5830bad3ad24428da1546f0621411cb7f44949",
180
191
  "src/calib-worker.js": "3d610591a1b3b58f59c3a2ab457f43c90727d95973cd43055b3b73b76180611d",
181
- "src/edge/bridge.js": "722c1ac6ad76d385839cbf039f4d5bdd4341d2cecd22bc7caa30285721235b5f",
192
+ "src/edge/auto.js": "2b8b7de6decd0dc66813256a9d61f19e0ddc7094824b805ad8deb5b04a29ca46",
193
+ "src/edge/base.js": "9493218ccc47f5e4c9c64959313b19119effc8f4d973bc805462acdd3b29b53a",
194
+ "src/edge/bridge.js": "3fa5acb959c760d7665fc0acd45625e55c9043628bd656f8cc8250ae8988f5f9",
182
195
  "src/edge/codes.js": "1bb32c060d4a960a2e3b384d9ff8583329861de6e2b515b0d901b503f8b8a4a7",
183
- "src/edge/ctl.js": "3bd44f94326aa2cf44d7ea9e284432d04f2f8c769762583f803485ba279b9f9c",
184
- "src/edge/error-kind.js": "5ca61086a9c8b5233e5cbba3c53166545ca394981428329c27803eaf60ebf285",
196
+ "src/edge/ctl.js": "c9818c60588a534b7285ba8050580ae9c474aa79ee8a126bf0274c0eba4e7025",
197
+ "src/edge/error-kind.js": "2d44c95ba69168a31959eb9a484ed1aecf5a316d9f4e0b6e30fb8c2fa1a723fb",
198
+ "src/edge/frame-code.gen.js": "19093c0f58ad13605e6232eef8b5ca01bac2c12b80c9a6ee061b83fb9aab7343",
185
199
  "src/edge/frame.html": "64b608f5c0f6fbc58ed5adc64137c00982503fe96a0e3876b66c5e35b206c380",
186
- "src/edge/frame.js": "c4cd2e2c98d0ca573cf1e29f6c71efe4e337861449b98b8c8666d881fab44b66",
200
+ "src/edge/frame.js": "78bdf2fc985188de2485b0f9ec2ab61a996f61edc2fc4fec1f45adf14f18fb1e",
187
201
  "src/edge/fs-route.js": "2e901b1c15e93a57f0696c5e46a99f87df6bd6c5e1c24cdad3c69bfba2fee281",
188
202
  "src/edge/hist.js": "7d932f6b61499d23650bd2fabfe978c281396ba3930f530459fac21a63e5ab35",
189
- "src/edge/msg.js": "b2ba579b38bbfd5298a9c5ddfd7d913d4a4688361ea1c875c043e5b1026b364f",
203
+ "src/edge/msg.js": "193f2abc19e02091d0ae7035c3c734da4676047335da53904bc1fb7afec6e39e",
190
204
  "src/edge/node-args.js": "43395591af875da507000b224efc762f70691f2147462ad3981a9ff31ce02385",
191
205
  "src/edge/node-guest-opts.js": "81711a8b2f506aab85c61459a41922d031675f4f90ed5be5363179d8b112df44",
192
206
  "src/edge/node-opts.js": "dcad2d3b72f25071b80517ce28de6426731ce7677978376924e48170ae930fe3",
193
- "src/edge/own/adapter.js": "909d1e4e05221d818abbc90d4f829f901a81396e60ab1fd732578823420c0a74",
207
+ "src/edge/own/adapter.js": "10a8c900f212455fce72b98694bb85c8cd26d97906f4ffa57e1132da624083bf",
194
208
  "src/edge/own/capi.js": "f9ba67bdb8e04b970d38cd4225728e2de3cb7db41201b318334dcd764c12c732",
195
209
  "src/edge/own/child-host.js": "2ae20c7631f713520bbb47ead48812ddc42fb83aea5f91da39f4c0c6a5fd1a28",
210
+ "src/edge/own/exit-now.js": "88bc30e44853b496536b97ab1ac1b5e8adfaecb3d19352f2c0143a6fd72df51a",
196
211
  "src/edge/own/fs-bridge.js": "f39dad977f44c49a4030d8f1c315bfbaa99f64d4f06a71f1904600d7eccdd778",
197
- "src/edge/own/fs-own-route.js": "17cbe30c7c855def21018f96b971e44914e28d9d23f713b17c991c2f0e6ddb3b",
212
+ "src/edge/own/fs-own-route.js": "316f807b895ef1c7964ef830a68e5a6abc80f99339697a9846a8362336db78d3",
213
+ "src/edge/own/fs-stats.js": "0516ee532301af7467015b6116bb9bc4fe95d3e42d4d30eae0a9a3291678bbb4",
198
214
  "src/edge/own/guest-spawner.js": "57c33f5924428f04782d1ddd4f3341631a853ef0538464082da9927d706d04a5",
199
- "src/edge/own/hub.js": "753c72c446a24f6548cc2c2a88c37e6228b2922b2443b67ded945bdb6ddc6bbe",
200
- "src/edge/own/loader.js": "a386c8823b16a630401608e7eca4c0c056e7636d99f43d14eea7656c2df8f47f",
215
+ "src/edge/own/hub.js": "64e96430d74b44f6bfd2a3ccbc413e6d15d823fbdfc8aaeb0f0701ce226f7769",
216
+ "src/edge/own/loader.js": "d9c739edd626ee50364260eded1b77c734c0529a85661df94e7298344ec2c80a",
217
+ "src/edge/own/marks.js": "b14473e8b84e0a88e88a2742f300070e440e7f263093b5f2cebbfe52e98476c4",
201
218
  "src/edge/own/memcap.js": "cb1806f8a4174d58a34546457ac7539ad39d44c6b009744b957c2f885ddef55a",
219
+ "src/edge/own/net-host.js": "81bff47c89b686431c334d0dc7815edeed2283d784212ea46ac75bb6b854e66e",
220
+ "src/edge/own/node-globals.js": "64a031c822d70ad2d3a8f2ae8fac6a70724d214a4707dd1dac8678ad3339a1c3",
202
221
  "src/edge/own/payload-size.js": "357127fb08c2001a9d3a68ca768b9c816e385f9a61981198457b65ef7658a75e",
203
- "src/edge/own/pool.js": "f28f39a6fd211fe4e9106779d0027738065514b2a34b5a5a7213c9a928900965",
222
+ "src/edge/own/pool.js": "1daeb45803c6531b638d88904e4a6dd4157b3543bc8809af739896812dc9bb62",
204
223
  "src/edge/own/procfs.js": "93d0657740fc73e484429964a0111cabb0462c1cd06f1efb6fbb93054d204e00",
205
224
  "src/edge/own/serdes-codec.js": "18db7b1b2108a2f38c71bc0bda4f6a0a38734c43943297ed0544d4dba21e8652",
206
- "src/edge/own/service-receiver.js": "bfaf0b3ac544b68f8d39c2c53cc85acb53b603f7d5e28d3a4a3f96df1a436a34",
207
- "src/edge/own/shim-post.js": "e64e362f72c3d93ea158c6509c6e5a5fe73cfdb9e507b39213712534d4d164a3",
225
+ "src/edge/own/service-receiver.js": "1ccb9b2844b298065e369c16bd52b2c3cfa0d0d8866e900413a4e699827466f2",
226
+ "src/edge/own/shim-post.js": "b9e4d9bc654a3b1d2a9eec9f0c32e0e3313fea44d47fcd0e222e4edb70829b1b",
208
227
  "src/edge/own/stack-fix.js": "6a0be64a7159404d433e6984861d43b763c3ae60c364b24e17f08a607c330402",
209
228
  "src/edge/own/stdio-pipe.js": "9d79d6e6a74cd2923c696da2bf2b24f7a1ac7eeb16c6f311d44143201ba3201a",
210
229
  "src/edge/own/v8-serdes.js": "629d5658414d2e953e3a3bebb47a607bd29f957c150c303a667c6536e59467c6",
211
230
  "src/edge/own/wasm-counters.js": "3fd28d5aca05f3a1e8a682f45bab5a0a4eb855b7d5780a5cbb047674f29de8d3",
212
- "src/edge/own/worker.js": "03d3781f75599efa2beb1a8c107c54d2de49400d3b450b18c7d40891e7d7bcac",
213
- "src/edge/page.js": "52d0a07ef58aa7cc3445c8d20645791cdabedde3ba8ad9fc87ef6d8a078d96c1",
214
- "src/edge/plan.js": "10189f27509a37be4aefc60434931750412ed1327856e99b2f51bdc2d0ceb4bb",
231
+ "src/edge/own/worker.js": "5c31bbe07bb2fb3c40a07cc3d06b8caf1a4ccb9b8618aa31729e7e16552ac128",
232
+ "src/edge/page.js": "0e08df63e1534dead4fa9ac891928daf6ad96878ff88e8baa17dbc60307c70c6",
233
+ "src/edge/pins.js": "06e62a8298b95f7e7afb9acbbaad82d37202d9ac946ba498bb4db1d016ebfb0d",
234
+ "src/edge/plan.js": "dffc6b94e9b22293f6b31cc4b44ad5b5330a969d8c015a1e5e1d745484482e88",
235
+ "src/edge/python-module.js": "e6e608b5b03783c4ad14aae4ec10a989118ee1120f8fde8cbebca23d2fc98254",
236
+ "src/edge/python-pins.js": "50e66db4df50553301acb66d8dcf48d5f8c54d384a1ac0af290bb43dc0231acf",
237
+ "src/edge/python-plan.js": "1da9bf454fc1625b557f290d3b659db34ef2fedc07c7d2f99bc5028a4037dff6",
238
+ "src/edge/python-source.js": "b946e1979014328db2c05c80dc904d68b1b188b2e07e550d044745a4fba4ee92",
215
239
  "src/edge/resolve.js": "be0d9c53374da79af72a1b4664919a1320d17f7500dc9f269414005b296ff7dc",
216
- "src/edge/runtime.js": "7900e92a1b2b39d9675585defce09503238cbc0d5cab9ee2909ec79dc273bb91",
240
+ "src/edge/runtime.js": "6fb8dfd61ef61396b6821023313644c9b862ceb2fb5fe28762720cbec7acef64",
241
+ "src/edge/sbx/cap.js": "4bceaf8838e413246e986fdc5fd69eb85a9ff5e05b4e6ffb007d2548ac153784",
242
+ "src/edge/sbx/common.js": "116390056fac2302a68089fbcde3f4d0ed169bb7b42ed606db5923c717873776",
243
+ "src/edge/sbx/doc.js": "0b3877068550015c351240195a5487e9492d0a81a3431486e8d874c7cda11d0e",
244
+ "src/edge/sbx/files.js": "511c0ac6028b0d15d8295c2680614d4b61e3d2139deb66a7cc76812db809a00a",
245
+ "src/edge/sbx/frame.js": "6d291b6bc224d871600a3abd1c1ff9ae73c8e34947a98936e65fe2a9223cdcc2",
246
+ "src/edge/sbx/gate.js": "bd98721278f3f56ef182926c425079a13646d5c2ba9afd81e19f2c1463bcd14b",
247
+ "src/edge/sbx/sha256.js": "da1d3ebcaafcc07e206431d42cce8c146ac9b633b0de21286e35e6608dfe4770",
248
+ "src/edge/sbx/worker-entry.js": "e10a9aea83e5bde77cd6ca4a4b7ad0e708f947236694b318f2f4834626dd648f",
217
249
  "src/edge/sdk/adapter.js": "0b21d32da468739054e7be86e50dd290d14da7be732b288c2b7764b0f2e0cfff",
218
250
  "src/edge/sdk/forward.js": "4f2378d71326b455649a713c4da156ed60820eafde60b9e4ac0186f75ab06fdf",
219
251
  "src/edge/sdk/napi-stub.js": "cd8d74c19f83e118b381710d4423fa73c265f9b930c0bed1ea5fd5364c123f61",
220
252
  "src/edge/sdk/relay.js": "355194b640cd7f1c11d1cc7734737bdf7bf818b47edd5e2a103c661397075693",
221
- "src/edge/service-host.js": "36792b1193e2b7ce3324b6559d9e00da2a8b09520672528f8b6c9a326ac71b71",
222
- "src/edge/service-port.js": "c926fb968193ae6ef123bda94782327e6e831a51636859e6cca77bb610c691c5",
223
- "src/edge/shim.js": "ad61b2b705bf49ddcc6f77001b2f16e19aa99852f4c19b2a4b43a0fc296c5d51",
253
+ "src/edge/sems.js": "f5bd680e67b7ec3eeb16b2f7ac9207b16491001400b435ff5ee3a34f050d8ceb",
254
+ "src/edge/service-host.js": "f77664be9e3a0cc1cc9b283c5aeda7d94c7a9d61b8cecda5b90822295d315df6",
255
+ "src/edge/service-port.js": "6daff74e083d8d6e4d3ce950004bafb8632e78c9fbf626197a2c18453ac96eeb",
256
+ "src/edge/setup.js": "ddaa360a6f9f17cde84c30e738d0f0cf021792aa6d822712ab8fffa9aad24a8d",
257
+ "src/edge/shim.js": "25efa4dddd3bbdd4a2967d99116e10c011a41aa0a4bdd7ce670fbf6d01735a76",
224
258
  "src/edge/site.js": "ff63be7c751678b773fd03e79e551e6fe6e85caa0444b6413b7bb940b8316979",
225
259
  "src/edge/spawn-guard.js": "666cc6cca0628f3c07093f08da277a1d6291eebb91c19abebf0d422f6197e401",
226
260
  "src/edge/tz.js": "4d4f4fd90febcae2b75abeb9c0704dd01a422a0339703137844c8ed3d7330000",
227
- "src/edge/worker.js": "76b51575cd3af088c4e69c6528f7bb43f0ff37f7e409e6da2664baa5a66ad739",
261
+ "src/edge/watch.js": "7714438850170c58dd6db98e22aa3df26ceec889378588ef7ec4625e6d3a32a0",
262
+ "src/edge/worker.js": "1d654af8fbd3c9f7c2ce7f3e0c460e96deb498598ea03f25f75f77265dd359bf",
228
263
  "src/edge/workers.js": "44973877448172aafb3bb9274ca114801be60918f53758bf81f3b268ad100552",
229
264
  "src/fs/9p/codec.js": "69711eb4ebc84eff39256138169fe18f5a5066d6cd9e4ff2daf61c65380d7ef7",
230
265
  "src/fs/9p/server.js": "da0ba00ebb5522161bb0ef7cd94bfc9616e342bf865633dfef0ba5bc67627d7a",
@@ -242,14 +277,14 @@
242
277
  "src/gowasm/pins-data.js": "71fc2e21e2363de883823bccea5bb9ca3c46077e6fab56a04cfa511739563e19",
243
278
  "src/gowasm/pins.js": "d4426f97e73ee5703d12912f803a46d64662da4cdeda8040b942b3621ada1636",
244
279
  "src/gowasm/pins.json": "0f40d8553c19915b328263077097b0c353072ec84d2afd5cf388e92a2fde9cce",
245
- "src/gowasm/setup.js": "2e58f9e51e4d658abbd1c9cd16ba2197dae2cc9c20f20ce0d137c212c5bbdd1f",
280
+ "src/gowasm/setup.js": "4cda761d94ca28b28fc03cb846a98b6735a8e03dbbfe09ebbf4f64742f712038",
246
281
  "src/gowasm/twin-fetch.js": "c5d53ccb6ee21c0ffc76d4c9f41f2dea1ceec45a3fe26d5b98cfbd4b9aecce70",
247
282
  "src/host/base-cache.js": "e0a9ea65e4eb9e30e7f78b28d9e5653b395f8eaa6c5e4c75b92f123c8d6a76a9",
248
283
  "src/host/base-file.js": "edb47c1eeb6b1cec627fa5894512185336b15d3f5db96a7151a8a57b34b4a2e8",
249
284
  "src/host/base-io.js": "cdd049875dce9f1417f28b27efa2c6f494cbe2a49851249150d0c1ec871a8b59",
250
285
  "src/host/boot-events.js": "a6567c889fa1e95ad7e917107a2593f03d14cc921827616368b3417de96faad2",
251
- "src/host/chan-service.js": "b21c98bdb0403124c9bf14b0c084ade871736ef9458d8ba46816d62d7dba9076",
252
- "src/host/chan-services.js": "aab7a60789da260b16549d5f0895e539cce0d086c066afa033d2b5840186ded4",
286
+ "src/host/chan-service.js": "65063feaf93c8604c61be1d05f9d873ec3f8629e18540400d10434cda1d5e86f",
287
+ "src/host/chan-services.js": "e7f52931b6ef76a8b97b793d0a1d86fb35d20dbca3dd333d18cc4ded0806c9f7",
253
288
  "src/host/chan.js": "bb9e76890b0efeee7cfbd8481b9fb4620b3b184459d96d62ff68ddcdc8a46f83",
254
289
  "src/host/ckpt-file.js": "da7938fa640a062e77bdfb59caad5b3b1fcbf6150e3220de3be23f253f4c4497",
255
290
  "src/host/ckpt-io.js": "3fbe74f0254c597f10d088c85e8ba72725502d86ae4dd8c6d2bf0821a93c873f",
@@ -263,7 +298,7 @@
263
298
  "src/host/disk-worker.js": "6e82bfeb4aa3f8b02bd7cb2de7427def26114e016f6b05196c8485d7fc8315ee",
264
299
  "src/host/disk.js": "e941e62cc2d9a83582d53c80c09c5f0f682508f77390237bedff4051c489b2cd",
265
300
  "src/host/edge-go.js": "0067007ccbe3ee97352aa90048fd9245de531b1203334c5a51d5b6f1136c3dc7",
266
- "src/host/edge-host.js": "463db51d4ea96ce4540b47acccfe0f0eb702c504dbe79f9b3404641a9def6f63",
301
+ "src/host/edge-host.js": "2405356951bff266aa5c119f7915efcdc84edbb4d13edcfc9da4231413179135",
267
302
  "src/host/errno.js": "26021d85962084be2c43c98fb3accafc2a8f11fbf3c8a5b8d484bd6a088ae4db",
268
303
  "src/host/fs.js": "d6753f74db35b7b01baa8709fc7fdcdfc8d638dfe42f454b0a833b22111e8f4a",
269
304
  "src/host/gcnudge.js": "4a6569cb73ae24a11fc4ac8c467380bd9efba0bb5fa9867b797bc4f153ab15ab",
package/guest/arm64/Image CHANGED
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: package/guest/arm64/Image
3
3
  size: 39049224 bytes
4
- sha256: 8542df8ca5f5b1b543129281e70e9906220da0ef299d93af190df2f953237b97
4
+ sha256: 0f17a1a3941f8827396265906e7b23cd70a85212caec47c20915abd5a45e19fe
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: package/guest/arm64/Image-4k
3
3
  size: 38828040 bytes
4
- sha256: 696a4ce9d2fdc9b5a945f49f5faeb59f744fbdea9d0d69216afc6d29677398f0
4
+ sha256: 97ba5f7832895f2de857375d3802b9b016976258583613c4dbd903c271792e87
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@threadedstack/wmd-web",
3
- "version": "0.1.39",
3
+ "version": "0.1.42",
4
4
  "license": "MIT",
5
5
  "homepage": "https://github.com/threadedstack/wmd-releases",
6
6
  "repository": {
@@ -9,8 +9,8 @@
9
9
  },
10
10
  "description": "Browser host for wmd's guest vm.wasm (Web Workers + shared memory + WASI preview1)",
11
11
  "wmd": {
12
- "tag": "v0.1.39",
13
- "commit": "6b1f00376baee9fe58ee14b13752c505c8e75573",
12
+ "tag": "v0.1.42",
13
+ "commit": "15f927989729f00a9548e101562d256f1ab2538c",
14
14
  "web": "0.5.1"
15
15
  },
16
16
  "type": "module",