this might be redundant with an existing thread (I'm not able to find anything that covers it directly) but .. PR https://github.com/bytecodealliance/wasmtime/pull/11442 (from @Alex Crichton back in august) changed ResourceLimiter to have a Send bound and this is somewhat problematic for my embedding. I don't entirely understand why it's necessary or even (I'm embarrassed to say) how Send and async fit together. or if they do at all. I guess it has to do with multi-threaded executors? I am only using and only wanting to use wasmtime (or at least the resources associated with a single Store) on a single thread at a time. is there any way I can eliminate the Send bound in that case, or conditionalize it?
(I suppose there is also the option of just declaring my ResourceLimiter type as Send, unsafely, knowing that it won't ever move between threads; but I feel a little bad doing that)
ah, I just realized there's a workaround I can manage -- forgot &mut itself is Send.
Graydon Hoare has marked this topic as resolved.
Last updated: Dec 06 2025 at 06:05 UTC