wasm-bridge icon indicating copy to clipboard operation
wasm-bridge copied to clipboard

add Send restriction to resource table

Open kayhhh opened this issue 8 months ago • 0 comments

Hello I am back with more Send confusion :p

When calling async functions from the host using .call_myfn(store).await, it is required that the store's data is Send. Keeping a ResourceTable inside of the store's data seems like the most common use case for it, so I changed the dyn Any to dyn Any + Send to allow this.

Looking at the tests it seems this was missed, as the tests with ResourceTable use a synchronous .call, not async.

kayhhh avatar Jun 17 '24 14:06 kayhhh