Open anuraaga opened 8 months ago
@L-jasmine Please take a look. Thanks.
@anuraaga I apologize for the confusion, and thank you for bringing up the question. I'm not very familiar with JavaScript myself, so I initially thought that arguments were obtained using 'args'.
I am trying to run a very simple program using
argv
.argv.js:
But it seems to be undefined
Tried
wasmedge --dir=. wasmedge_quickjs.wasm argv.js -- foo bar baz
as well just in case but with same result.I see
argv
should be set toglobalThis.argv
, which I assume should be initialized by quickjs itself, calling the WASI function to fetch arguments, but it seems to not be happening.https://github.com/second-state/wasmedge-quickjs/blob/main/modules/process.js#L9C28-L9C28
env
, initialized in the same pattern, seems to work fineenv.js:
I have tried both the latest release
wasmedge_quickjs.wasm
and one I built myself from commitebad9e74
(before TLS addition).