[Angular] v86: ship the emulator from the npm package (copy step) or drop the unused v86 npm dependency #1173

Closed
opened 2026-10-02 04:44:19 +00:00 by spikerj · 1 comment
Owner

Why

v86 is in package.json and gets bumped every refresh (0.5.462 → 0.5.46x now), but nothing uses node_modules/v86. The legacy-systems exhibit loads committed files projects/spikersoft/src/assets/v86/v86.js (Jul 22) and v86.wasm (Jul 25) via v86-image-url.ts (~L23-24). Bumps are no-ops; the emulator we ship has silently drifted from the dependency we declare. The catalogue header records Upstream: copy/v86@589487c.

Upstream since our copy: IA32_PAT MSR + CLFLUSH, ATA_CMD_READ_LOG_EXT (#1639), use_graphical_text release fix (#1640).

Options (pick one)

  1. Wire it: add an asset glob / copy script for node_modules/v86/build/{libv86.js,v86.wasm} into the v86 assets path (like the isomorphic-git UMD copy in projects/spikersoft/project.json ~L45-53), delete the committed binaries, keep js+wasm in lock-step automatically.
  2. Drop it: remove the npm dep and document the manual vendoring procedure in the v86 assets README.

Acceptance criteria

  • one source of truth for the emulator build
  • boot test of all catalogue entries, especially the 7 with prebuilt state snapshots (v86-catalogue.ts, initial_state in v86-emulator.component.ts ~L365) — snapshots are tied to the emulator build and are the likeliest to break
  • wasm-module-registry / offline cache entries still match

Size: S (+ boot testing).


Filed from the 2026-10-02 spikersoft-angular pnpm outdated changelog review.

## Why `v86` is in `package.json` and gets bumped every refresh (0.5.462 → 0.5.46x now), but **nothing uses `node_modules/v86`**. The legacy-systems exhibit loads committed files `projects/spikersoft/src/assets/v86/v86.js` (Jul 22) and `v86.wasm` (Jul 25) via `v86-image-url.ts` (~L23-24). Bumps are no-ops; the emulator we ship has silently drifted from the dependency we declare. The catalogue header records `Upstream: copy/v86@589487c`. Upstream since our copy: IA32_PAT MSR + CLFLUSH, ATA_CMD_READ_LOG_EXT (#1639), `use_graphical_text` release fix (#1640). ## Options (pick one) 1. **Wire it**: add an asset glob / copy script for `node_modules/v86/build/{libv86.js,v86.wasm}` into the v86 assets path (like the isomorphic-git UMD copy in `projects/spikersoft/project.json` ~L45-53), delete the committed binaries, keep js+wasm in lock-step automatically. 2. **Drop it**: remove the npm dep and document the manual vendoring procedure in the v86 assets README. ## Acceptance criteria - [ ] one source of truth for the emulator build - [ ] **boot test** of all catalogue entries, especially the 7 with prebuilt `state` snapshots (`v86-catalogue.ts`, `initial_state` in `v86-emulator.component.ts` ~L365) — snapshots are tied to the emulator build and are the likeliest to break - [ ] wasm-module-registry / offline cache entries still match Size: **S** (+ boot testing). --- _Filed from the 2026-10-02 spikersoft-angular `pnpm outdated` changelog review._
spikerj added the enhancement label 2026-10-02 04:44:19 +00:00
Author
Owner

Tracker sweep 2026-10-06. Closing: done by spikerj/spikersoft-angular#1419 (merged 2026-10-02).

The PR said "Closes spikersoft-issues#1173", but Gitea only auto-closes issues in the same repo, so this one stayed open. Checked against angular master:

  • One source of truth (option 1, "Wire it"): projects/spikersoft/project.json copies {libv86.js,v86.wasm,v86-fallback.wasm} from node_modules/v86/build into assets/v86. The committed v86.js and v86.wasm are deleted, and .gitignore rejects new copies. The dependency is v86 ^0.5.469, so a version bump now really updates the emulator.
  • Boot test: headless Chromium restored all 7 prebuilt-state catalogue entries on 0.5.469, as recorded in the PR. The saved-state format is unchanged (STATE_VERSION 6). Not covered: cold boots and save/load round-trips.
  • Cache and registry entries: nothing outside the emulator component still points at assets/v86/v86.js. The loader uses /assets/v86/libv86.js and /assets/v86/v86.wasm (v86-image-url.ts).

If a cold-boot entry misbehaves on the new build, please open a fresh issue in spikerj/spikersoft-angular.

**Tracker sweep 2026-10-06. Closing: done by spikerj/spikersoft-angular#1419 (merged 2026-10-02).** The PR said "Closes spikersoft-issues#1173", but Gitea only auto-closes issues in the same repo, so this one stayed open. Checked against angular `master`: - **One source of truth (option 1, "Wire it"):** `projects/spikersoft/project.json` copies `{libv86.js,v86.wasm,v86-fallback.wasm}` from `node_modules/v86/build` into `assets/v86`. The committed `v86.js` and `v86.wasm` are deleted, and `.gitignore` rejects new copies. The dependency is `v86 ^0.5.469`, so a version bump now really updates the emulator. - **Boot test:** headless Chromium restored all 7 prebuilt-state catalogue entries on 0.5.469, as recorded in the PR. The saved-state format is unchanged (`STATE_VERSION` 6). Not covered: cold boots and save/load round-trips. - **Cache and registry entries:** nothing outside the emulator component still points at `assets/v86/v86.js`. The loader uses `/assets/v86/libv86.js` and `/assets/v86/v86.wasm` (`v86-image-url.ts`). If a cold-boot entry misbehaves on the new build, please open a fresh issue in spikerj/spikersoft-angular.
Sign in to join this conversation.