Stream: git-wasmtime

Topic: wasmtime / issue #10764 Using `--invoke` with components ...


view this post on Zulip Wasmtime GitHub notifications bot (May 10 2025 at 18:40):

gertvv opened issue #10764:

Test Case

Apologies, GitHub does not allow me to attach a .wasm file, so I had to add a redundant ".txt" extension:

area_comp.wasm.txt

Steps to Reproduce

  1. Create a component exposing an "area" function taking a variant type as argument.
  2. Read the documentation at https://docs.wasmtime.dev/cli-options.html#run and https://github.com/bytecodealliance/wasm-tools/tree/a56e8d3d2a0b754e0465c668f8e4b68bad97590f/crates/wasm-wave#readme suggesting that the previous can be run with --invoke
  3. Run wasmtime run -W function-references,gc,component-model --invoke 'area(shape-circle({radius: 1.0}))' area_comp.wasm

Expected Results

The function returns an approximation of pi.

Actual Results

Error: failed to run main module `area_comp.wasm`

Caused by:
    using `--invoke` with components is not supported

Versions and Environment

Wasmtime version or commit: 32.0.0

Operating system: Linux (Ubuntu 24.04)

Architecture: x86_64

Extra Info

I'm working through the component model's Canonical ABI documentation and am having a very difficult time trying to verify my assumptions, and I was really excited when I saw this in the documentation!

view this post on Zulip Wasmtime GitHub notifications bot (May 10 2025 at 18:40):

gertvv added the bug label to Issue #10764.

view this post on Zulip Wasmtime GitHub notifications bot (May 10 2025 at 18:47):

bjorn3 commented on issue #10764:

Should be fixed by https://github.com/bytecodealliance/wasmtime/pull/10054, which will be part of Wasmtime 33.0.

view this post on Zulip Wasmtime GitHub notifications bot (May 10 2025 at 19:10):

gertvv commented on issue #10764:

Ah that's great! Are there nightly builds available?

view this post on Zulip Wasmtime GitHub notifications bot (May 10 2025 at 19:16):

gertvv closed issue #10764:

Test Case

Apologies, GitHub does not allow me to attach a .wasm file, so I had to add a redundant ".txt" extension:

area_comp.wasm.txt

Steps to Reproduce

  1. Create a component exposing an "area" function taking a variant type as argument.
  2. Read the documentation at https://docs.wasmtime.dev/cli-options.html#run and https://github.com/bytecodealliance/wasm-tools/tree/a56e8d3d2a0b754e0465c668f8e4b68bad97590f/crates/wasm-wave#readme suggesting that the previous can be run with --invoke
  3. Run wasmtime run -W function-references,gc,component-model --invoke 'area(shape-circle({radius: 1.0}))' area_comp.wasm

Expected Results

The function returns an approximation of pi.

Actual Results

Error: failed to run main module `area_comp.wasm`

Caused by:
    using `--invoke` with components is not supported

Versions and Environment

Wasmtime version or commit: 32.0.0

Operating system: Linux (Ubuntu 24.04)

Architecture: x86_64

Extra Info

I'm working through the component model's Canonical ABI documentation and am having a very difficult time trying to verify my assumptions, and I was really excited when I saw this in the documentation!

view this post on Zulip Wasmtime GitHub notifications bot (May 10 2025 at 19:16):

gertvv commented on issue #10764:

Ah, found the nightly build and can confirm that this works now:

$ ./wasmtime-dev-x86_64-linux/wasmtime run -W function-references,gc,component-model --invoke 'area(circle({radius: 1.0}))' area_comp.wasm
3.14

Fantastic!


Last updated: Dec 06 2025 at 07:03 UTC