Skip to content

perf(cli): cache dynamic WASM runtime independently - #189

Merged
zackees merged 3 commits into
mainfrom
perf/dynamic-runtime-cache
Jul 12, 2026
Merged

zackees merged 3 commits into
mainfrom
perf/dynamic-runtime-cache

Conversation

@zackees

@zackees zackees commented Jul 12, 2026

Copy link
Copy Markdown
Member

Summary

  • cache fastled.js + fastled.wasm as a sketch-independent MAIN_MODULE=1 runtime
  • build and cache sketch.wasm independently with SIDE_MODULE=1, loaded by the generated JavaScript API
  • fingerprint FastLED, sketch, flags, ABI, generated cross-file, environment, and toolchain inputs with zccache-fingerprint
  • add per-key locking, staged atomic publication, artifact validation, failure state, purge integration, and corruption recovery
  • add the requested transition matrix plus real Chrome coverage for app, --no-app, sketch_assets.json, and legacy files.json

Validation

  • soldr cargo test --workspace (175 unit tests + 2 viewer tests + doctest)
  • uv run --no-project pytest -q (18 passed)
  • release real-Chrome dynamic app smoke
  • release real-Chrome dynamic no-app smoke
  • release real-Chrome legacy files.json smoke
  • formatting, JavaScript syntax, and diff checks

Quick-mode benchmark

Release CLI, local FastLED examples/wasm, median of 3 runs:

scenario static dynamic
warm no-op 1.70s 1.46s
sketch edit 5.91s 3.62s

Dynamic sketch edits were about 39% faster. The SHA-256 of fastled.wasm remained identical across all dynamic sketch edits, proving that only the sketch unit was rebuilt/relinked.

Closes #188

zackees added 3 commits July 11, 2026 17:16
Implement content-addressed runtime and sketch caches with atomic publication, corruption recovery, and MAIN_MODULE=1/SIDE_MODULE=1 runtime loading. Add the full transition matrix and real-browser app/no-app smoke coverage.\n\nCloses #188
Restore executable bits for root Emscripten launchers on both fresh installs and cache hits, and resolve the Clippy findings reported by CI.
Use the repository path boundary type for cache and fake-test paths so the custom cross-platform path lint remains clean.
@zackees
zackees merged commit a36b501 into main Jul 12, 2026
22 checks passed
@zackees
zackees deleted the perf/dynamic-runtime-cache branch July 12, 2026 01:04
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.

perf(cli): cache dynamic fastled.wasm independently with fingerprinted runtime side loading

1 participant