wasm2lua icon indicating copy to clipboard operation
wasm2lua copied to clipboard

Try that and never works

Open swang206 opened this issue 3 years ago • 4 comments

Can you show us a demo on how to run

#include<stdio.h> int main() { puts("Hello World\n"); }

?

swang206 avatar Nov 22 '21 05:11 swang206

/home/cqwrteur/myhome/wasm2lua/node_modules/wasm2lua/js/index.js:1840 let loadOffset = ins.args[0].value; ^

TypeError: Cannot read properties of undefined (reading 'value') at wasm2lua.processInstructionsPass2 (/home/cqwrteur/myhome/wasm2lua/node_modules/wasm2lua/js/index.js:1840:62) at wasm2lua.processFunc (/home/cqwrteur/myhome/wasm2lua/node_modules/wasm2lua/js/index.js:853:30) at wasm2lua.processModule (/home/cqwrteur/myhome/wasm2lua/node_modules/wasm2lua/js/index.js:434:38) at wasm2lua.process (/home/cqwrteur/myhome/wasm2lua/node_modules/wasm2lua/js/index.js:335:38) at new wasm2lua (/home/cqwrteur/myhome/wasm2lua/node_modules/wasm2lua/js/index.js:105:14) at Object. (/home/cqwrteur/myhome/wasm2lua/node_modules/wasm2lua/js/bin/wasm2lua.js:85:12) at Module._compile (node:internal/modules/cjs/loader:1101:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12)

swang206 avatar Nov 22 '21 06:11 swang206

cqwrteur@Home-Server:~/myhome/wasm2lua$ wasm2lua ./a out.lua /home/cqwrteur/myhome/wasm2lua/node_modules/wasm2lua/js/index.js:1790 let loadOffset = ins.args[0].value; ^

TypeError: Cannot read properties of undefined (reading 'value') at wasm2lua.processInstructionsPass2 (/home/cqwrteur/myhome/wasm2lua/node_modules/wasm2lua/js/index.js:1790:58) at wasm2lua.processFunc (/home/cqwrteur/myhome/wasm2lua/node_modules/wasm2lua/js/index.js:853:30) at wasm2lua.processModule (/home/cqwrteur/myhome/wasm2lua/node_modules/wasm2lua/js/index.js:434:38) at wasm2lua.process (/home/cqwrteur/myhome/wasm2lua/node_modules/wasm2lua/js/index.js:335:38) at new wasm2lua (/home/cqwrteur/myhome/wasm2lua/node_modules/wasm2lua/js/index.js:105:14) at Object. (/home/cqwrteur/myhome/wasm2lua/node_modules/wasm2lua/js/bin/wasm2lua.js:85:12) at Module._compile (node:internal/modules/cjs/loader:1097:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1149:10) at Module.load (node:internal/modules/cjs/loader:975:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12)

Node.js v18.0.0-pre

swang206 avatar Dec 13 '21 23:12 swang206

I may not be able to debug this myself, but could I ask a favour? Could you attach the .wasm file that you used to generate this error?

If you are feeling extra brave, you can also try to attach a minimum reproducible example

SwadicalRag avatar Dec 14 '21 11:12 SwadicalRag

Hi I'd like to +1 this issue. I installed wasm2lua using yarn and ran into a similar if not the same error report. I tested this on .wasm files you provided in https://github.com/SwadicalRag/bullet3-lua/releases/ and https://github.com/SwadicalRag/brotli-lua/releases/ and did not have any success. Are you still able to get it to work yourself?

Diminim avatar Nov 07 '22 17:11 Diminim