Until recently, all of the functions in my world.wit returned something like
my-function: func(..) -> result<type>
, i.e. an "empty error", aka ()
. Technically, it works. However, since this is not very expressive, I changed the signature of one function to
my-function: func(..) -> result<type,string>
, i.e. returning a String
in case of error. Host and (component) guest compile fine but whenever the host tries to load the corresponding component the following runtime error is thrown: failed to convert function my-function
to given type.
The dependencies of the guest are wit-bindgen = "0.7.0"
.
The host uses wasmtime = { version = "10", features = ["component-model"] }
.
Are there any known errors with result as return type?
Something else I might miss? Thank you for any hint!
I think this probably means that either the guest or the host is out of sync and one of them is still using result<type>
for bindings rather than result<type, string>
so you may want to double-check that everything is using the latest definitions in the wit file
Right, just did a cargo clean
and currently recompiling .. let's see.
Confirmed, the host used an outdated .wit :face_with_peeking_eye:
Christoph Brewing has marked this topic as resolved.
Last updated: Dec 23 2024 at 12:05 UTC