runestone icon indicating copy to clipboard operation
runestone copied to clipboard

compile for node14

Open daorren opened this issue 1 year ago β€’ 5 comments

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

daorren avatar May 21 '24 15:05 daorren

looks like this trans string is error: image

ONLY-yours avatar May 22 '24 11:05 ONLY-yours

@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 avatar May 22 '24 13:05 jeasonstudio

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

jeasonstudio avatar May 22 '24 13:05 jeasonstudio

@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

daorren avatar May 23 '24 01:05 daorren

@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.

jeasonstudio avatar May 23 '24 02:05 jeasonstudio