Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wasmtime-cli: support run --invoke for components using wave #10054

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

pchickey
Copy link
Contributor

No description provided.

@tpmccallum
Copy link

Tried this locally and got the following:

cd /Users/tpmccallum
git clone https://github.com/bytecodealliance/wasmtime.git
cd wasmtime
git checkout main
git pull origin main
git checkout pch/invoke_wave
git merge main
cargo clean
cargo build --release

Repo I used for testing is at https://github.com/tpmccallum/testing_components/tree/main (specifically the compress component):

tpmccallum@192-168-1-17 compress % /Users/tpmccallum/wasmtime/target/release/wasmtime run --invoke compress target/wasm32-wasip1/debug/compress.wasm

Error: failed to run main module `target/wasm32-wasip1/debug/compress.wasm`

Caused by:
    0: parsing invoke "compress"
    1: unexpected end of input at 8..8

@pchickey
Copy link
Contributor Author

The wave syntax requires functions to be invoked with parens, so --invoke "compress()" should hopefully work. one of the big things missing is better error messages...

@tpmccallum
Copy link

Thanks for the response @pchickey
That makes sense. Thank you, and I will try that next and report back here.

@tpmccallum
Copy link

Hi @pchickey
Thanks for the additional info. I got this working - and wrote an article < https://medium.com/wasm/wasm-component-model-seamless-compression-c-rust-and-wasm-3b8d52ed8b31 >
Thanks again!
Let me know if you need/want me to do any further testing on this. Super happy to assist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wasmtime:api Related to the API of the `wasmtime` crate itself
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants