Skip to content

feat(pvm): run App Manifest v2 runtimes in Dotli - #185

Open
replghost wants to merge 58 commits into
mainfrom
feat/pvm-wasm
Open

feat(pvm): run App Manifest v2 runtimes in Dotli#185
replghost wants to merge 58 commits into
mainfrom
feat/pvm-wasm

Conversation

@replghost

@replghost replghost commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

What

  • load signed PolkaVM App v2 archives in the sandbox.
  • run framebuffer, Tri2D, and WebGPU profiles through the host runtime bridge.
  • consume truapi-pvm-host@e892cd9d and standalone runtime v0.1.5@81a484a1 through the reviewed bridge.
  • synchronize and verify browser assets from the bridge exporter with one source-bound lock.
  • route baseline TrUAPI request/response frames between PVM workers and Dotli’s canonical product MessagePort.
  • refresh translated/interpreter WebGPU capabilities after resize so stale surface generations recover.
  • resolve optional motion input as unavailable when a browser host has no active sensor source; pointer input remains the fallback.
  • keep the runtime namespace outside product-controlled service-worker routes.
  • add configurable seven-app smoke coverage.

Verification

  • sandbox tests: 21 passed, including canonical MessagePort negotiation.
  • sandbox lint and TypeScript checks: passed.
  • production sandbox build: passed with bridge-owned runtime 0.1.5 assets.
  • bridge asset synchronization and checksum gate: passed.
  • focused PVM functional suite: passed.
  • App Kit pvm-truapi-playground CAR: compiler/Tri2D rendering passed and canonical TrUAPI handshake request/response counters both advanced.
  • Chinpokomon App v2: compiler/WebGPU rendering, window resize, and subsequent input passed.
  • canonical seven-app Dotli compiler matrix: passed.

@github-actions

Copy link
Copy Markdown
Contributor

⚡ Performance Report

⚠️ No baseline found on main. This PR's results are recorded but cannot be compared.
Merge to main to establish a baseline.

@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Bundle Size Report

Chunks over 500 KB:

File Raw Brotli Gzip
host/assets/paseo.smol-DboPaEh1.json 1.84 MB 941.7 KB 1019.4 KB
host/assets/paseo-people-next.smol.json 3.36 MB 1.68 MB 1.82 MB
host/assets/smoldot.js 3.05 MB 2.27 MB (+315 B) 2.28 MB
host/assets/smoldot_worker.js 3.02 MB 2.26 MB 2.27 MB
host/assets/truapi_server_bg.wasm 7.20 MB 5.29 MB 5.56 MB
host/assets/wasm/web/truapi_server_bg.wasm 7.20 MB 5.29 MB 5.56 MB
sandbox/pvm-runtime/pvm-browser-runtime.wasm 955.0 KB 158.1 KB 212.4 KB
Total 27.96 MB (+1.15 MB) 18.28 MB (+226.0 KB) (-35%) 19.17 MB (+286.4 KB)
All files
File Raw Brotli Gzip
host/.well-known/apple-app-site-association 505 B 505 B 505 B
host/.well-known/assetlinks.json 2.1 KB 343 B 427 B
host/assets/bridge.js 70.9 KB (+392 B) 19.4 KB (+40 B) 22.3 KB (+93 B)
host/assets/browser.js 22.9 KB 7.5 KB (-17 B) 8.6 KB
host/assets/client.js 100.1 KB 29.5 KB (+87 B) 32.4 KB (+6 B)
host/assets/dist.js 39.0 KB (+6 B) 12.8 KB (-43 B) 14.5 KB (+41 B)
host/assets/dotli-debug-bus.js 710 B 710 B 710 B
host/assets/get-sync-provider.js 2.8 KB 1.1 KB (-1 B) 1.2 KB
host/assets/hex.js 154 B 154 B 154 B
host/assets/index.js 234.6 KB (+6.2 KB) 58.7 KB (+1.4 KB) 70.3 KB (+2.0 KB)
host/assets/index.css 55.1 KB 8.6 KB 9.8 KB
host/assets/manifest.js 19.6 KB (-3.0 KB) 6.5 KB (-736 B) 7.2 KB (-817 B)
host/assets/panel.js 76.4 KB (+128 B) 20.6 KB (+50 B) 23.2 KB (+2 B)
host/assets/paseo.smol-DboPaEh1.json 1.84 MB 941.7 KB 1019.4 KB
host/assets/paseo-people-next.smol.json 3.36 MB 1.68 MB 1.82 MB
host/assets/paseo.smol.json 25.2 KB 5.6 KB 6.7 KB
host/assets/previewnet.smol.json 63.7 KB 7.6 KB 13.1 KB
host/assets/resolve.js 156 B 156 B 156 B
host/assets/rpc-resolve.js 2.5 KB 1.0 KB (-4 B) 1.2 KB (-1 B)
host/assets/smoldot.js 3.05 MB 2.27 MB (+315 B) 2.28 MB
host/assets/smoldot_worker.js 3.02 MB 2.26 MB 2.27 MB
host/assets/spans.js 2.6 KB 1.1 KB 1.3 KB
host/assets/src.js 1.8 KB 859 B (+15 B) 946 B (+1 B)
host/assets/styles.css 15.3 KB 3.3 KB 3.8 KB
host/assets/truapi_server_bg.wasm 7.20 MB 5.29 MB 5.56 MB
host/assets/wasm/web/README.md 13.4 KB 13.4 KB 13.4 KB
host/assets/wasm/web/package.json 371 B 371 B 371 B
host/assets/wasm/web/truapi_server.d.ts 12.6 KB 12.6 KB 12.6 KB
host/assets/wasm/web/truapi_server.js 49.7 KB 7.9 KB 9.2 KB
host/assets/wasm/web/truapi_server_bg.wasm 7.20 MB 5.29 MB 5.56 MB
host/assets/wasm/web/truapi_server_bg.wasm.d.ts 4.0 KB 4.0 KB 4.0 KB
host/assets/web.js 18.2 KB (+6 B) 4.6 KB (-3 B) 5.1 KB (-2 B)
host/assets/worker-runtime.js 28.9 KB (+28.8 KB) 6.8 KB (+6.7 KB) 7.7 KB (+7.6 KB)
host/assets/worker-runtime.js 106 B 106 B 106 B
host/assets/ws.js 23.1 KB 7.5 KB (+2 B) 8.2 KB (+1 B)
host/dotli.png 11.5 KB 11.5 KB 11.5 KB
host/favicon.svg 1.8 KB 1.8 KB 1.8 KB
host/host-sw.js 2.7 KB 1.1 KB (-8 B) 1.3 KB (-1 B)
host/icon-192.png 12.5 KB 12.5 KB 12.5 KB
host/icon-512.png 42.8 KB 42.8 KB 42.8 KB
host/index.html 29.1 KB 5.4 KB (+2 B) 6.7 KB (+1 B)
host/manifest.webmanifest 441 B 441 B 441 B
host/workbox.js 14.8 KB 4.6 KB 5.1 KB
sandbox/app-sw.js 9.7 KB (+52 B) 3.2 KB (+18 B) 3.6 KB (+17 B)
sandbox/assets/bitswap-bridge.js 840 B 840 B 840 B
sandbox/assets/fetch.js 3.4 KB 1.2 KB (+1 B) 1.4 KB (+3 B)
sandbox/assets/index.js 158.0 KB (+37.6 KB) 45.1 KB (+10.8 KB) 52.8 KB (+12.5 KB)
sandbox/assets/index.css 55.1 KB 8.6 KB 9.8 KB
sandbox/favicon.svg 1.8 KB 1.8 KB 1.8 KB
sandbox/index.html 1.7 KB 582 B (+2 B) 786 B
sandbox/pvm-runtime/LICENSE-MPL-2.0 16.3 KB 16.3 KB 16.3 KB
sandbox/pvm-runtime/PolkaVM-LICENSE-APACHE 10.6 KB 10.6 KB 10.6 KB
sandbox/pvm-runtime/PolkaVM-LICENSE-MIT 1023 B 1023 B 1023 B
sandbox/pvm-runtime/SOURCE 388 B 388 B 388 B
sandbox/pvm-runtime/pvm-browser-runtime.wasm 955.0 KB 158.1 KB 212.4 KB
sandbox/pvm-runtime/pvm-gpu-worker.js 55.4 KB 9.7 KB 11.1 KB
sandbox/pvm-runtime/pvm-wasm-worker.js 69.0 KB 11.2 KB 13.1 KB
Total 27.96 MB (+1.15 MB) 18.28 MB (+226.0 KB) (-35%) 19.17 MB (+286.4 KB)

Commit: b61ff8c

@replghost

replghost commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator Author

@justraman the PVM change is green across formatting, build, unit, functional, and the canonical seven-app Dotli matrix. The broad host-playground E2E remains red on the same account, allowance, and navigation failures as current main (the latest main Tests runs also fail); it does not exercise this PVM path. Could you review the runtime adapter so this can follow host-rust-core#540?

@replghost

Copy link
Copy Markdown
Collaborator Author

Warm-cache reload is now fixed in 1a8aa4d839bdf6f5a74a125eae24578d8f043914.

Root causes:

  1. performance Playwright reused any process already listening on port 5173, so local runs could silently test a stale build;
  2. a same-iframe reload posted a second truapi-ready, but the Host had removed its probe listener after the first handshake and the original MessagePort could not be transferred again;
  3. runtime readiness did not wait for the translated-byte IndexedDB write to settle.

Changes:

  • isolated performance server via PERF_PORT and reuseExistingServer: false;
  • retain the modern Host handshake listener and replace the product-side provider with a fresh MessageChannel on every subsequent truapi-ready;
  • wait for the bounded translation-cache write before exposing runtime readiness;
  • behavioral unit coverage for the second port handoff.

Verification on an isolated current branch build:

  • live doom.paseo manifest resolution: passed;
  • live Quake translated runtime: passed;
  • live Duke bounded hostcall/audio runtime: passed;
  • live Doom cold compiler/playability and warm same-iframe cache hit: passed;
  • full live PVM performance file: 4/4 passed;
  • UI tests: 217 passed;
  • sandbox tests: 17 passed.

@replghost
replghost deployed to westendli.dev August 31, 2026 19:42 — with GitHub Actions Active
@replghost
replghost deployed to westendli.dev September 1, 2026 16:16 — with GitHub Actions Active
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

⚠️ E2E Product suite skipped — Nova signing bot is unavailable.

This is a Nova-side outage and not a dot.li test failure. Re-run
from the Actions tab once the bot recovers.

Logs: https://github.com/paritytech/dotli-community/actions/runs/33672996217

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant