-
-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
I'm trying to test the package I create using this crate on all 3 major browsers using playwright, but unfortunately with a minimal code sample
import init, { initThreadPool } from "./wasm_rayon_webkit_error.js";
import { expect, test } from "vitest";
console.log("Initializing WASM...");
await init();
console.log("WASM initialized");
await initThreadPool(1);
console.log("Thread poool initialized");
test("example test", () => {
expect(true).toBe(true);
});the test fails (only) on webkit with:
FAIL webkit min.test.ts [ min.test.ts ]
Error: Failed to import test file /Users/end/Documents/tmp/wasm-rayon-webkit-error2/web/min.test.ts
Caused by: RuntimeError: Out of bounds memory access (evaluating 'wasm.wbg_rayon_poolbuilder_build(this.__wbg_ptr)')
❯ build wasm_rayon_webkit_error.js:102:41
❯ startWorkers snippets/wasm-bindgen-rayon-38edf6e439f6d70d/src/workerHelpers.js:106:16
I have created an example repo here. Just run
cd web
npm i
npx playwright install
cd ..
sh wasm-test.shand it will install playwright, build the wasm module and run the test. You will see it succeeds on both firefox and chromium, but fails on webkit with the above error.
Let me know if there's any additional context that would be helpful to you. Thank you for this really cool crate and the other stuff you made & contribute to.
Metadata
Metadata
Assignees
Labels
No labels