Skip to content

ci: build WASM straight into viewer/pkg with wasm-pack --out-dir - #182

Merged
DrunkOnJava merged 1 commit into
mainfrom
ci/wasm-pack-out-dir
Aug 30, 2026
Merged

DrunkOnJava merged 1 commit into
mainfrom
ci/wasm-pack-out-dir

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Aug 30, 2026 •

Copy link
Copy Markdown
Owner

Summary

Replaces the three-line wasm-pack build … && rm -rf viewer/pkg && mv pkg viewer/pkg shuffle with wasm-pack build --target web --out-dir viewer/pkg -- --features wasm --no-default-features everywhere it appears, and fixes the deploy workflow comment that still pointed at the 404ing /rvt-rs/viewer/ path.

Motivation

--out-dir is a wasm-pack flag; before -- it works as intended. The workaround dated from a form that placed it after --. Replay topic (d) from the historical-checkout custody review, reimplemented against current main.

Changes

  • .github/workflows/deploy-viewer.yml, .github/workflows/publish.yml — one-line build step
  • AGENTS.md, docs/install.md, docs/release-checklist.md, .cursor/install.sh — same command

Testing

  • wasm-pack 0.15.0 locally: viewer/pkg/rvt_bg.wasm written directly, no stray ./pkg
  • VW1-21 wasm-objdump -j Import audit: no network primitives
  • npm run typecheck and npm run build in viewer/: green
  • N/A: no Rust source changes

Note

Low Risk
Docs and CI/build-script only; same wasm-pack flags and output path, no Rust or viewer runtime changes.

Overview
WASM build steps no longer build to ./pkg and shuffle into viewer/pkg. Every install script, CI job, and doc now uses a single wasm-pack build --target web --out-dir viewer/pkg -- --features wasm --no-default-features, with comments noting that --out-dir must sit before -- so wasm-pack (not cargo) receives it.

The deploy-viewer workflow header comment is updated to say GitHub Pages is served at the repo root (https://drunkonjava.github.io/rvt-rs/) instead of the old /viewer/ sub-path that 404s.

Reviewed by Cursor Bugbot for commit bba269a. Configure here.

wasm-pack's --out-dir is a wasm-pack option, so placing it before `--`
writes the package directly to viewer/pkg. The rm/mv shuffle existed only
because an earlier form put --out-dir after `--` (where cargo rejected it).
Same one-liner applied to publish.yml, AGENTS.md, docs/install.md,
docs/release-checklist.md and .cursor/install.sh. The deploy workflow
comment also advertised the /rvt-rs/viewer/ Pages path, which 404s; the
site is served from the Pages root.

Verified locally with wasm-pack 0.15.0: viewer/pkg populated, no stray
./pkg, VW1-21 wasm-objdump audit clean, viewer typecheck and Vite build
green.
@cursor

cursor Bot commented Aug 30, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_eaffc1ad-68bd-4193-94c4-7ed8c3a6d677)

@DrunkOnJava
DrunkOnJava merged commit 3fbe6eb into main Aug 30, 2026
24 checks passed
@DrunkOnJava
DrunkOnJava deleted the ci/wasm-pack-out-dir branch August 30, 2026 08:02
DrunkOnJava added a commit that referenced this pull request Aug 30, 2026
…today (#196)

## Summary
Makes the release-path viewer smoke run the compiled-WASM import audit
(it skipped for lack of `wasm-objdump`), and brings the hand-curated
`[Unreleased]` changelog up to date with today's merged changes.

## Changes
- .github/workflows/publish.yml — `apt-get install wabt` before the
viewer build, mirroring deploy-viewer.yml
- CHANGELOG.md — Added / Changed entries for #182, #183, #185, #189,
#190, #191/#192, #193, #195

## Testing
- [x] YAML + actionlint clean
- [ ] Fourth `workflow_dispatch` dry-run after merge must show the
`wasm-no-network-imports` spec as ✓ instead of skipped
DrunkOnJava added a commit that referenced this pull request Aug 31, 2026
## Summary
Replaces the three-line `wasm-pack build … && rm -rf viewer/pkg && mv
pkg viewer/pkg` shuffle with `wasm-pack build --target web --out-dir
viewer/pkg -- --features wasm --no-default-features` everywhere it
appears, and fixes the deploy workflow comment that still pointed at the
404ing `/rvt-rs/viewer/` path.

## Motivation
`--out-dir` is a wasm-pack flag; before `--` it works as intended. The
workaround dated from a form that placed it after `--`. Replay topic (d)
from the historical-checkout custody review, reimplemented against
current `main`.

## Changes
- .github/workflows/deploy-viewer.yml, .github/workflows/publish.yml —
one-line build step
- AGENTS.md, docs/install.md, docs/release-checklist.md,
.cursor/install.sh — same command

## Testing
- [x] wasm-pack 0.15.0 locally: `viewer/pkg/rvt_bg.wasm` written
directly, no stray `./pkg`
- [x] VW1-21 `wasm-objdump -j Import` audit: no network primitives
- [x] `npm run typecheck` and `npm run build` in `viewer/`: green
- N/A: no Rust source changes

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Docs and CI/build-script only; same wasm-pack flags and output path,
no Rust or viewer runtime changes.
> 
> **Overview**
> **WASM build** steps no longer build to `./pkg` and shuffle into
`viewer/pkg`. Every install script, CI job, and doc now uses a single
`wasm-pack build --target web --out-dir viewer/pkg -- --features wasm
--no-default-features`, with comments noting that `--out-dir` must sit
before `--` so wasm-pack (not cargo) receives it.
> 
> The **deploy-viewer** workflow header comment is updated to say GitHub
Pages is served at the repo root
(`https://drunkonjava.github.io/rvt-rs/`) instead of the old `/viewer/`
sub-path that 404s.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
cb909dcbfc53a7fbbaadd03ff2e15dfbb1fd70ce. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
DrunkOnJava added a commit that referenced this pull request Aug 31, 2026
…today (#196)

## Summary
Makes the release-path viewer smoke run the compiled-WASM import audit
(it skipped for lack of `wasm-objdump`), and brings the hand-curated
`[Unreleased]` changelog up to date with today's merged changes.

## Changes
- .github/workflows/publish.yml — `apt-get install wabt` before the
viewer build, mirroring deploy-viewer.yml
- CHANGELOG.md — Added / Changed entries for #182, #183, #185, #189,
#190, #191/#192, #193, #195

## Testing
- [x] YAML + actionlint clean
- [ ] Fourth `workflow_dispatch` dry-run after merge must show the
`wasm-no-network-imports` spec as ✓ instead of skipped
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.

1 participant