Skip to content

Cache wasm-bindgen outputs and serialize Rust processing - #1119

Open
ctron wants to merge 2 commits into
trunk-rs:mainfrom
ctron:fix/pr-1095-cache
Open

ctron wants to merge 2 commits into
trunk-rs:mainfrom
ctron:fix/pr-1095-cache

Conversation

@ctron

@ctron ctron commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

Asset-only rebuilds currently rerun wasm-bindgen even when the Rust Wasm input is unchanged. This caches generated outputs by the Wasm input, tool binary, arguments, and WASM_BINDGEN_* environment settings, while validating cached output contents before reuse.

Continues @evilbocchi’s implementation in #1095 and retains the original commit. Adds a target-directory lock covering the complete Rust processing pipeline, reusing the existing dist-lock helper, so concurrent builds cannot record another build’s artifacts under the wrong cache key. The dist lock continues to protect staging and publication.

Supersedes #1095. Closes #1095.

Validation: Linux unit tests, Clippy with warnings denied, formatting, and diff checks passed. Includes cache reuse/invalidation, shared-target processing, cross-process locking, and environment regression tests. The replacement branch has the same tree as the tested local implementation. macOS, Windows, and browser execution were not checked.

@ctron
ctron force-pushed the fix/pr-1095-cache branch from aa336df to fcc5135 Compare November 4, 2026 15:49

This branch has not been deployed

No deployments
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.

2 participants