oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
74.04k stars 2.76k forks source link

wasm-simd is not supported in bun #10306

Open derekhearst opened 6 months ago

derekhearst commented 6 months ago

What version of Bun is running?

1.1.4+fbe2fe0c3

What platform is your computer?

Microsoft Windows NT 10.0.22631.0 x64

What steps can reproduce the bug?

https://github.com/derekhearst/wasm-simd-issues Clone Repo Bun Install bun ocr.js tests/test1.jpg -- throws error node ocr.js tests/test1.jpg -- works

What is the expected behavior?

Should OCR the image like nodejs does.

What do you see instead?

RuntimeError: Aborted(CompileError: WebAssembly.Module doesn't parse at byte 10: wasm-simd is not supported, in function at index 45). Build with -sASSERTIONS for more info. at abort (C:\Users\derek\Documents\Projects\node-cli\node_modules\tesseract-wasm\dist\lib.js:558:5228) at C:\Users\derek\Documents\Projects\node-cli\node_modules\tesseract-wasm\dist\lib.js:558:6949

Additional information

No response

derekhearst commented 6 months ago

import { simd } from 'wasm-feature-detect'; const hasSIMD = await simd(); console.log(hasSIMD) // returns false Coming from this - https://v8.dev/features/simd

datapedd commented 4 months ago

Would love to have this as this would speed up tensorflow wasm : "bun run ./src/test.ts SIMD or multi-threading is not supported in this environment." Is SIMD in principle working or is it that because I use the apline docker image inside wsl that it is not activated?

panuchka commented 4 months ago

Would also be needing this to run my game server on bun (physics calculations using wasm)