abrown opened issue #5675:
In #5484, it would have been ideal to check if an instance was "instantiatable" by a
Linker
much sooner than when we currently check it (at startup instead of when a thread is spawned). Because aStore
is not available until the thread is spawned andLinker::instantiate_pre
requires a mutableStore
, we cannot do this check sooner. IfLinker::instantiate_pre
were refactored to be called without aStore
or if some other method were available to "check that all the imports can be satisfied," then the check in wasi-threads could be moved up and this issue closed.
jameysharp commented on issue #5675:
I was just looking at a wasmtime embedder that constructs an otherwise-unused
Store
solely for use withinstantiate_pre
. I agree that it'd be nice to not have to do that!
pchickey commented on issue #5675:
This isn't a very helpful answer, but I wanted this as well when we introduced instantiate_pre, and there was some complexity of the implementation that made it extremely difficult, so I gave up.
pchickey edited a comment on issue #5675:
This isn't a very helpful answer, but I wanted this as well when we introduced instantiate_pre, and there was some complexity of the implementation that made it extremely difficult, so I gave up. The situation may have changed and I'd welcome if someone was able to do it!
alexcrichton commented on issue #5675:
I was struck with inspiration when thinking about this again and created https://github.com/bytecodealliance/wasmtime/pull/5683
alexcrichton closed issue #5675:
In #5484, it would have been ideal to check if an instance was "instantiatable" by a
Linker
much sooner than when we currently check it (at startup instead of when a thread is spawned). Because aStore
is not available until the thread is spawned andLinker::instantiate_pre
requires a mutableStore
, we cannot do this check sooner. IfLinker::instantiate_pre
were refactored to be called without aStore
or if some other method were available to "check that all the imports can be satisfied," then the check in wasi-threads could be moved up and this issue closed.
Last updated: Dec 23 2024 at 12:05 UTC