Stream: wasmtime

Topic: Article announcing the new `--invoke` feature.


view this post on Zulip Timothy McCallum (Apr 04 2025 at 03:12):

Hi,
Thank you @Pat Hickey and @Andrew Brown for the responses here in Zulip. It has been a pleasure doing a tiny bit of work and creating a PR that can hopefully merge into Pat's original work where Pat actually implements the invoke feature.

Thanks to @Victor Adossi I was also able to write up a demonstration in the Medium article whereby the wasmtime run --invoke command calls an exported function of a Wasm component.

The goal of the Medium article is to explain the wasmtime run subcommand's --invoke feature and how to use wasm-wave to invoke functions with different varieties of arguments, etc.

The article is available at the following location: < https://medium.com/@tpmccallum/running-webassembly-wasm-components-from-the-command-line-8bed9f8af7cb >.

I believe that you will be able to leave notes/feedback if you have a Medium account.

If there is a better platform for the article to be published, I will happily move it over, i.e., BytecodeAlliance articles. It is a bit premature but I though I would get some ducks lined up while the GH reviews are taking place. Invoke is a cool feature!

Thanks again.
Tim McCallum

This PR is in relation to the Zulip conversation at #wasmtime > wasmtime-cli: support run --invoke for components using wave. This PR includes @pchickey's existing PR 10054. (Apologies @pchi...
A lightweight WebAssembly runtime that is fast, secure, and standards-compliant - GitHub - bytecodealliance/wasmtime at pch/invoke_wave
Welcome to the Bytecode Alliance

view this post on Zulip bjorn3 (Apr 04 2025 at 10:06):

Medium redirects me to the login page when I try to read your article. Is it perhaps marked as private?

view this post on Zulip Timothy McCallum (Apr 04 2025 at 12:16):

Hi @bjorn3
As I understand it, the draft should be accessible to anyone with a Medium account. I am just basing this on the message that Medium provided when I clicked "Share Draft Link":

"Copy and send this link to someone, and they’ll be able to read your draft before you publish (and leave private notes if they have a Medium account)."

Screenshot 2025-04-04 at 22.11.29.png

view this post on Zulip bjorn3 (Apr 04 2025 at 12:17):

I see. I don't have a Medium account.

view this post on Zulip Victor Adossi (Apr 04 2025 at 12:56):

yeah I don't either -- being able to see it without having a Medium account would be ideal

view this post on Zulip Victor Adossi (Apr 04 2025 at 12:57):

I know that people have often used Hackpad here quite often -- even a private Gist would work if it's markdown

view this post on Zulip Timothy McCallum (Apr 04 2025 at 13:05):

Hi @Victor Adossi and @bjorn3

I apologise for the Medium roadblock.
I found a way to write it up as an article in a PR.
https://github.com/bytecodealliance/bytecodealliance.org/pull/126/files
I have just placed an arbitrary date on file at this stage; but at least we can all see it and review.

This is an article demonstrating how to use the wasmtime run --invoke feature. It explains WAVE syntax and implements a component with an exported function that is invoked in the Wasmtime CLI. Rela...

view this post on Zulip bjorn3 (Apr 04 2025 at 15:21):

Thanks! Left two comments.

view this post on Zulip Timothy McCallum (Apr 05 2025 at 03:01):

Thanks, @bjorn3 - I appreciate it. Some good catches :+1:

view this post on Zulip Victor Adossi (Apr 06 2025 at 04:37):

Hey @Timothy McCallum just went through and left comments! Feel free to take em or leave em, but hopefully they make sense to you :) -- really difficult to balance being technical and approachable, so I personally appreciate how difficult it is to get it right!

I help out the docs people from time to time https://component-model.bytecodealliance.org/language-support/rust.html which ends up looking somewhat like what you wrote, so most of the notes I left should be somewhat similar to there, as a point of reference

Documentation around creating and using WebAssembly Components - bytecodealliance/component-docs

Last updated: Apr 09 2025 at 18:04 UTC