From 0eed6a0f9c5314cf8876cb2d79caa1d9223a9b5b Mon Sep 17 00:00:00 2001 From: og-syn <93359805+og-syn@users.noreply.github.com> Date: Fri, 15 Aug 2025 16:50:56 -0700 Subject: [PATCH 1/2] 'add' to 'foo' and minor typo in wasmtime.md This fixes an example which uses 'add' but where the surrounding text uses 'foo' as a function name. Foo seems more thematic. There's also a minor typo ('and' is misspelled AFAICT). --- component-model/src/running-components/wasmtime.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/component-model/src/running-components/wasmtime.md b/component-model/src/running-components/wasmtime.md index a75a220e..a709b56f 100644 --- a/component-model/src/running-components/wasmtime.md +++ b/component-model/src/running-components/wasmtime.md @@ -32,9 +32,9 @@ Try out building and running HTTP components with one of these tutorials As of Wasmtime Version 33.0.0, there is [support for invoking components with custom exports](https://bytecodealliance.org/articles/invoking-component-functions-in-wasmtime-cli). -As an example, if your component exports a function `add` which takes two numeric arguments, you can make use of this feature with the following command. +As an example, if your component exports a function `foo` which takes two numeric arguments, you can make use of this feature with the following command. ```sh wasmtime run --invoke 'foo(1, 2)' ``` -Make sure to wrap your invocation in single quotes abd to include parentheses, even if your function doesn't take any arguments. For a full list of ways to represent the various wit types when passing arguments to your exported function, visit the [WAVE repo](https://github.com/bytecodealliance/wasm-tools/tree/main/crates/wasm-wave). \ No newline at end of file +Make sure to wrap your invocation in single quotes and to include parentheses, even if your function doesn't take any arguments. For a full list of ways to represent the various wit types when passing arguments to your exported function, visit the [WAVE repo](https://github.com/bytecodealliance/wasm-tools/tree/main/crates/wasm-wave). From 24b35b3c42c50a9d2ff105781936e4085aae14e7 Mon Sep 17 00:00:00 2001 From: og-syn <93359805+og-syn@users.noreply.github.com> Date: Fri, 15 Aug 2025 18:17:02 -0700 Subject: [PATCH 2/2] Replace 'foo' with 'add' in wasmtime.md Use 'add' instead of 'foo' as per review comment. I agree that 'add' conveys a meaning more readily than a generic 'foo' function. --- component-model/src/running-components/wasmtime.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/component-model/src/running-components/wasmtime.md b/component-model/src/running-components/wasmtime.md index a709b56f..5c09b37b 100644 --- a/component-model/src/running-components/wasmtime.md +++ b/component-model/src/running-components/wasmtime.md @@ -32,9 +32,9 @@ Try out building and running HTTP components with one of these tutorials As of Wasmtime Version 33.0.0, there is [support for invoking components with custom exports](https://bytecodealliance.org/articles/invoking-component-functions-in-wasmtime-cli). -As an example, if your component exports a function `foo` which takes two numeric arguments, you can make use of this feature with the following command. +As an example, if your component exports a function `add` which takes two numeric arguments, you can make use of this feature with the following command. ```sh -wasmtime run --invoke 'foo(1, 2)' +wasmtime run --invoke 'add(1, 2)' ``` Make sure to wrap your invocation in single quotes and to include parentheses, even if your function doesn't take any arguments. For a full list of ways to represent the various wit types when passing arguments to your exported function, visit the [WAVE repo](https://github.com/bytecodealliance/wasm-tools/tree/main/crates/wasm-wave).