-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
@swc/wasm-typescript
is failing on some architectures
#9259
Comments
I suspect there might be an issue with wasm-bindgen. Note Note: WebAssembly memory is always in little-endian format, regardless of the platform it's run on. Therefore, for portability, you should read and write multi-byte values in JavaScript using DataView. https://developer.mozilla.org/en-US/docs/WebAssembly/JavaScript_interface/Memory |
Regarding the failures on powerpc, is it only on AIX or it includes Linux on little endian as well? If it's only a problem on big endian then could you tell me if emscripten was used to generated the wasm code and it's JavaScript glue code? We have previously patched emscripten to handle big endian platforms here emscripten-core/emscripten#13413 , you will need to add SUPPORT_BIG_ENDIAN=1 during compilation to apply BE patches. |
Thanks, so plinux (being little endian) seems green. How is the wasm file with its |
swc-binding_typescript_wasm-1.6.13.tgz Could you try this package? @marco-ippolito |
can you please publish it as a nightly release? |
@marco-ippolito I published it as |
how is rust compiled to wasm? is emscripten used or rust has its own internal compiler and needs to use |
We use swc/bindings/binding_typescript_wasm/scripts/build.sh Lines 4 to 7 in 02f77f6
|
It seems the fix release in the nightly is working on such architectures, but there is this failure when node is built without ICU
I guess TextDecoder cannot be used without full-icu |
|
TextDecoder is used for decoding strings from Rust. |
I agree and I left a question at rustwasm/wasm-bindgen#1730 (comment) For now, I think we can do some string replace in swc/bindings/binding_typescript_wasm/scripts/patch.mjs Lines 9 to 13 in 02f77f6
|
I published |
It seems to be working! CI is green, (only windows on arm seems to be flaky but its probably unrelated) @kdy1 thank you sooo much 🙏🏼 |
@marco-ippolito Can you try |
Updating breaks it
it breaks this check https://github.com/nodejs/node/blob/014dad5953a632f44e668f9527f546c6e1bb8b86/src/node_contextify.cc#L1648 |
Yeah, it was inevitable, as we now may have to emit a source map. Sorry, I forgot to tell you. |
I can confirm it works fine |
Closing as |
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Originally posted by @marco-ippolito in nodejs/node#53725 (comment)
The text was updated successfully, but these errors were encountered: