Skip to content

chore(ci): cache and parallelize web wasm builds - #6407

Open
404Wolf wants to merge 2 commits into
mainfrom
cursor/wasm-build-caching-8ca2
Open

404Wolf wants to merge 2 commits into
mainfrom
cursor/wasm-build-caching-8ca2

Conversation

@404Wolf

@404Wolf 404Wolf commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Web deploys currently compile cache-wasm, then agent-fold wasm, then Vite — sequentially, with no rustc cache. That rebuilds both wasm packages from scratch on every deploy.

Changes

Parallel. just build-dev / build-staging / build-prod now go through a [parallel] build-wasm recipe. Each wasm-pack crate gets its own CARGO_TARGET_DIR (target/cache-wasm, target/agent-fold-wasm) so the two release compiles do not serialize on the workspace cargo lock. Vite still waits for both.

Cache. Web build, preview, and deploy jobs now follow the existing typecheck pattern:

  • Namespace web-ci remote sccache
  • Cargo registry/git on the cache volume
  • wasm-pack's downloaded wasm-opt cache (same path as the sync-service worker job)

CI still always rebuilds wasm (schema/engine changes can land without a version bump). The compiles just hit sccache instead of starting cold.

Path filters. Preview deploys and web PR checks now also run when crates/agent_fold or crates/agent_runtime_protocol change.

Tested

  • just --dry-run build-dev emits both wasm-pack commands, then Vite
  • cargo test -p xtask_workflows — 28 passed, including new coverage for the build/preview/deploy cache wiring
  • cargo x workflows --check
  • just check

Did not run a full wasm-pack + Vite production build in this environment.

Open in Web Open in Cursor 

cursoragent and others added 2 commits September 14, 2026 23:20
Give each wasm-pack crate its own CARGO_TARGET_DIR and run them via
just's [parallel] attribute so app builds no longer serialize the two
release compiles before Vite.

Co-authored-by: Wolf Mermelstein <wolf@404wolf.com>
Point web build, preview, and deploy jobs at the existing Namespace
web-ci remote sccache and persist cargo plus wasm-pack caches. Include
agent_fold sources in the web artifact path filters.

Co-authored-by: Wolf Mermelstein <wolf@404wolf.com>
@404Wolf
404Wolf marked this pull request as ready for review September 14, 2026 23:20
@coderabbitai

coderabbitai Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 55555702-7137-490b-a119-891bfe422c21

📥 Commits

Reviewing files that changed from the base of the PR and between 6106355 and 6305106.

📒 Files selected for processing (14)
  • .github/workflows/deploy_preview.yml
  • .github/workflows/deploy_web_app.yml
  • .github/workflows/web-app-check-main.yml
  • apps/web/justfile
  • tooling/xtask/crates/xtask_cache_wasm/src/main.rs
  • tooling/xtask/crates/xtask_workflows/src/workflows/deploy_preview.rs
  • tooling/xtask/crates/xtask_workflows/src/workflows/deploy_preview/test.rs
  • tooling/xtask/crates/xtask_workflows/src/workflows/deploy_web_app.rs
  • tooling/xtask/crates/xtask_workflows/src/workflows/deploy_web_app/test.rs
  • tooling/xtask/crates/xtask_workflows/src/workflows/steps.rs
  • tooling/xtask/crates/xtask_workflows/src/workflows/steps/test.rs
  • tooling/xtask/crates/xtask_workflows/src/workflows/web_app_check_main.rs
  • tooling/xtask/crates/xtask_workflows/src/workflows/web_app_check_main/test.rs
  • tooling/xtask/crates/xtask_workflows/src/workflows/web_artifact_paths.rs

Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review.


📝 Summary

Summary by CodeRabbit

  • Performance

    • Improved web build performance by enabling parallel WebAssembly builds and expanded caching for Rust, Bun, and WebAssembly assets.
    • Added remote build-cache support with cache statistics and local fallback when unavailable.
  • Builds & Deployments

    • Web checks and preview deployments now run when agent-related WebAssembly components change.
    • Web builds use a larger build environment for improved reliability.
  • Testing

    • Added workflow validation to confirm caching, WebAssembly builds, and change detection behave as expected.

Walkthrough

The change adds parallel cache-WASM and fold-WASM build targets with separate Cargo output directories. Web workflows now cache Bun, Cargo, and wasm-pack data, configure shared Namespace sccache, and report statistics. Web build jobs use the web build cache and a larger runner where applicable. Changes to fold-WASM crates now trigger relevant workflows. Tests validate generated workflow configuration.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to 63051

No actionable merge-blocking risk is supported by the available evidence.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title uses the conventional commits format, clearly describes the caching and parallelization changes, and is 48 characters long.
Description check ✅ Passed The description directly explains the parallel wasm builds, sccache and cache changes, path filters, tests, and known validation limits.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@404Wolf 404Wolf changed the title Cache and parallelize web wasm builds chore(ci): cache and parallelize web wasm builds Sep 14, 2026
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.

2 participants