Skip to content
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

compile for node14 #4

Open
daorren opened this issue May 21, 2024 · 5 comments
Open

compile for node14 #4

daorren opened this issue May 21, 2024 · 5 comments

Comments

@daorren
Copy link

daorren commented May 21, 2024

Hello, first of all ty for providing this js runestone lib
For some reasons, I have to use node 14,
if I execute examples/node.js file under node 14, there's an error like Error [ERR_INTERNAL_ASSERTION]: TypeError: wasm function signature contains illegal type

But I'm not familiar with rust or turning it into wasm
can you provide some tips, so I can change some config of this repo, and build my wasm lib for node14
thx in advance

@ONLY-yours
Copy link

looks like this trans string is error:
image

@jeasonstudio
Copy link
Owner

@daorren @ONLY-yours
I reproduced your issue in codesandbox, it seems to be caused by node14 not supporting bigint. I solved this issue by adding --experimental-wasm-bigint parameters in node command.
Try this:

Edit runestone-node

8ae1f8ff62a5b25251841b7deb39e99

@jeasonstudio
Copy link
Owner

Btw, if you don't have control over the node command parameters, you can add a compilation process before the code is executed.

@daorren
Copy link
Author

daorren commented May 23, 2024

@jeasonstudio Actually I prefer to compile a new Lib for node14

so can you help to provide some tips, since I think changing some configs and then executing command in package.json is enough

maybe I'm wrong about this,but I think you can give me some directions,thx

@jeasonstudio
Copy link
Owner

@jeasonstudio Actually I prefer to compile a new Lib for node14

so can you help to provide some tips, since I think changing some configs and then executing command in package.json is enough

maybe I'm wrong about this,but I think you can give me some directions,thx

Node14 has become too outdated, and we don't plan to support it, the only friction is bigint. This is an experimental feature in node14. You can consider turning it on or try other bigint polyfill.

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

No branches or pull requests

3 participants