This repository was archived by the owner on Aug 17, 2022. It is now read-only.
This repository was archived by the owner on Aug 17, 2022. It is now read-only.
Aliasing outer imported modules forces modules to have per-instance runtime state #28
Closed
Description
One thing I tripped over recently when updating wasmtime's as proposed in #26 is that I believe when you alias an outer module's imported module then you're forcing each instantation to create new modules with new state.
For example a simple module like:
(module $PARENT
(import "" (module $b))
(module $a
(instance (instantiate (module outer $PARENT $b))))
(export "a" (module $a)))
each time you instantiate $PARENT
then the "a"
export will have different state because it has to reference whatever module was imported.
I was under the impression, however, that this was likely not intended. Does validation need to ensure that outer
module aliases only refer to locally-defined modules? Or is this an intended feature and consequence for engines to implement?
Metadata
Metadata
Assignees
Labels
No labels