chenrui333 opened issue #7323:
With 14.0.0 release, the
wasmtime xx.wasm --invoke xx
seems not workingrelates to https://github.com/Homebrew/homebrew-core/pull/151945
chenrui333 commented on issue #7323:
looks like the error status also has some issue as well
==> /usr/bin/clang hello.c -I/opt/homebrew/Cellar/wasmtime/14.0.0/include -L/opt/homebrew/Cellar/wasmtime/14.0.0/lib -lwasmtime -o hello ==> ./hello Assertion failed: (file != NULL), function main, file hello.c, line 33. Initializing... Error: wasmtime: failed An exception occurred within a child process: Minitest::Assertion: Expected: 0 Actual: nil
alexcrichton commented on issue #7323:
Thanks for the report! This was a feature that was changed in the 14.0.0 release, specifically the way CLI arguments are parsed.
Previously where
wasmtime xx.wasm --invoke xx
worked you'll now need to dowasmtime --invoke xx xx.wasm
. If you change to placing the Wasmtime-related arguments before the wasm module itself, does it work for you?
chenrui333 commented on issue #7323:
@alexcrichton that is not work for me
==> /opt/homebrew/Cellar/wasmtime/14.0.0/bin/wasmtime --invoke sum 1 2 /private/tmp/wasmtime-test-20231022-20896-1uab29w/sum.wasm Error: failed to read file: 1 Caused by: No such file or directory (os error 2)
this used to work
==> /opt/homebrew/Cellar/wasmtime/14.0.0/bin/wasmtime /private/tmp/wasmtime-test-20231022-20896-1uab29w/sum.wasm --invoke sum 1 2
chenrui333 commented on issue #7323:
and what about this issue?
Minitest::Assertion: Expected: 0 Actual: nil
alexcrichton commented on issue #7323:
I believe you'll change that to
wasmtime --invoke sum foo.wasm 1 2
to work correctly. Arguments to the wasm come after the wasm, not before. Arguments to Wasmtime must come before the wasm.I don't know what minitest is or what that assertion is about, so sorry I can't help you there.
chenrui333 commented on issue #7323:
I believe you'll change that to
wasmtime --invoke sum foo.wasm 1 2
to work correctly. Arguments to the wasm come after the wasm, not before. Arguments to Wasmtime must come before the wasm.thanks, this helps my test. appreciate it.
chenrui333 closed issue #7323:
With 14.0.0 release, the
wasmtime xx.wasm --invoke xx
seems not workingrelates to https://github.com/Homebrew/homebrew-core/pull/151945
Last updated: Nov 22 2024 at 16:03 UTC