Hi, I've been toying with wasmtime for a few days and have run into something that has me puzzled.
For context, my host has a rust object (couple of fields and a map) and it starts a wasm guest to get some decision, and the logic I went for is:
Note that all of these consider the entire store context as borrowed for the duration of the call or the duration of the returned slice. This largely means that while the function is running you’ll be unable to borrow anything else from the store. This includes getting access to the T on Store<T>, but it also means that you can’t recursively call into WebAssembly for instance.
But then, am I doing something wrong here? I can of course force my way in with pointers, but that seems very dirty for a fairly simple use-case
I think you might want data_and_store_mut
perhaps?
ahem, yes, that's it. I should have RTFM'd better. Thank you @Alex Crichton !
Guillaume Quintard has marked this topic as resolved.
Last updated: Nov 22 2024 at 16:03 UTC