wasmi: Cannot compile a Wasm module from a called host function using the same `Engine`
The issue is quite similar to #567 But instead of calling a WASM function we try to
- create another WASM module using the same
Engineor - wrap
Func::wraphost function for while preinstantiating already created WASM module
lock deadlock
host ------------> WASM #1 ------------> host ------------> create WASM module or wrap `Func::wrap` host function for already created WASM module
Would it be possible to fix this?
About this issue
- Original URL
- State: open
- Created a year ago
- Comments: 30
Commits related to this issue
- fix issue #631 — committed to wasmi-labs/wasmi by Robbepop a year ago
@Robbepop fair enough. All your arguments sound reasonable indeed. Thanks for your kind support. Waiting for the proper fix 😃
No, unfortunately #694 only provided the foundation for this feature to (maybe) be effective. Implementation needed to confirm.
Sorry for the confusion. Indeed my messages were a bit misleading.
Yes, as per the Wasm specification the
Storeis the owner of all instantiated Wasm related state. An instance only stores references into its associatedStore. TheStoreeven owns all Wasm instances associated to it.Thank you @Robbepop for your swift reply.
Per your comment, I’d like to add more context for our use case.
A little bit background on us, we’re from RadixDLT and we’ve integrated
wasmi v11.0into RadixEngine/Scrypto about one year ago, and we’ve got this problem when attempting to upgrade tov23.0.In RadixEngine, we execute user-provided WASM code dynamically. In order to efficiently execute them, we cache compiled WASM modules. With the new
wasmiarchitecture, wherewasmimodule is coupled with engine for performance reason, the idea is broken, because we’re not allowed to eitherStorefor state isolation).I believe this is applicable for many other blockchain projects as well.
Sincerely hope you can help prioritise this.