Skip to content

fix(wasm): load remote assets into worker VFS - #225

Merged
zackees merged 2 commits into
mainfrom
fix/wasm-assets-check
Aug 31, 2026
Merged

zackees merged 2 commits into
mainfrom
fix/wasm-assets-check

Conversation

@zackees

@zackees zackees commented Aug 31, 2026

Copy link
Copy Markdown
Member

Summary

  • add --check as a strict one-frame production test and always forward browser diagnostics to stderr
  • parse .lnk and assets.json, fetch fallback URLs, and validate declared size and SHA-256
  • load all local and remote files into the background-worker WASM instance before setup()
  • add a real fl::getEmbeddedFs() sketch fixture to the macOS ARM installed-wheel smoke test and upload its rendered PNG
  • release as 2.0.17

Root cause and falsification

The first implementation appeared successful because the frontend logged that it had injected the verified bytes. A real sketch using fl::getEmbeddedFs() still aborted with File not found: the bytes had been loaded into the foreground WASM module, while the sketch executes in a separately instantiated background-worker module. The new load_files worker message performs declaration and byte injection in the module that executes extern_setup.

The GHA fixture reads and byte-compares data/probe.txt during setup() and aborts before registering LEDs on any failure. Only a successful VFS read can produce the green PNG artifact.

Validation

  • bash test: 246 Rust unit tests, 2 viewer tests, cache integration, doc test; 23 Python tests passed and 1 platform-specific test skipped
  • bash lint: formatting, clippy, cargo-dylint 6.0.3, Ruff, Black, isort, Pyright, keyboard checker
  • real browser E2E against a clean archive of FastLED origin/master: SHA verified, worker VFS load completed before setup(), rendered green PNG, exit 0

Closes #213
Closes #215
Closes #216

@zackees
zackees merged commit d0029d2 into main Aug 31, 2026
22 checks passed
@zackees
zackees deleted the fix/wasm-assets-check branch August 31, 2026 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant