-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
I created a repo that shows the basic setup that my much large/complex project has: https://github.com/wilfreddenton/wasm-tester
The main branch shows how in v39 I am able to implement component imports with async methods and then call them synchronously in the guest code. Limiting complexity in the guest code i.e. avoiding async/await is desirable for this project.
Is this just simply no longer possible in v40? The repo has a branch wasmtime-40 where the only change is updating the version number of the wasmtime dep. Everything compiles still but I get the following:
Error: component imports instance `contract:built-in/context`, but a matching implementation was not found in the linker
Caused by:
0: instance export `foo` has the wrong type
1: type mismatch with async
In the branch wasmtime-40-fix I added the async keyword to all the functions in the wits, made the guest code async, and then enabled wasm_component_model_async as opposed to the wasm_component_model I had before on the engine. This fixes the runtime but now all my guest code has to be async.
So I just want to be sure that this is the correct/only migration strategy?