Stream: wasmtime

Topic: ✔ wrong type between host and guest


view this post on Zulip Simon (Nov 14 2023 at 09:26):

I’m trying to understand wasmtime and cargo-component playing together for a simple example where the component uses wasi:http. I used wasmtime 14.0.4, build a custom adapter from that revision, copied the wasi/wit/deps over to my workspace and cargo component build the guest, yet when I try to run the guest in my host, I get a wrong type error on wasi:http/types@0.2.0-rc-2023-10-18 fields has wrong type, expected resource found nothing. Any tips on how to approach fixing this? My assumption was that using the same WITs for the adapter, guest and host should make it work. I put up the sample on https://github.com/smndtrl/wasi-test

Contribute to smndtrl/wasi-test development by creating an account on GitHub.

view this post on Zulip Simon (Nov 14 2023 at 11:02):

My bad. I was missing wasmtime-wasi-http's add_to_linker. Didn't know it was a separate thing to do

view this post on Zulip Notification Bot (Nov 14 2023 at 11:02):

Simon has marked this topic as resolved.


Last updated: Nov 22 2024 at 17:03 UTC