-
-
Notifications
You must be signed in to change notification settings - Fork 13
fix: wasm file not found error #677
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for rstest-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for WebAssembly (WASM) modules in Rstest by implementing a custom WASM file loader and integrating it with the runtime module system.
- Adds
readWasmFilefunction to load WASM files from asset files - Modifies the
async_wasm_loadingruntime module to use the custom WASM loader - Prevents WASM files from being externalized during bundling
- Adds an E2E test for WASM factorial function
Reviewed Changes
Copilot reviewed 5 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/core/src/runtime/worker/loadModule.ts | Implements readWasmFile function to load WASM files from asset files |
| packages/core/src/core/plugins/mockRuntime.ts | Patches async_wasm_loading runtime module to use custom WASM loader |
| packages/core/src/core/plugins/external.ts | Excludes WASM files from externalization |
| packages/core/src/utils/error.ts | Adds type guard for error.stack |
| e2e/wasm/index.test.ts | E2E test for WASM module loading |
| e2e/wasm/src/factorial.wasm.d.ts | TypeScript declaration for WASM module |
| e2e/wasm/src/factorial.wasm | Binary WASM file for testing |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Summary
fix wasm file not found error

TODO: below error should be fixed after bump rspack 1.6.2+ web-infra-dev/rspack#12068

Related Links
#676
Checklist