This moves the responsibility to close a module from the engine to the context. The reason for this is that the engine is what defines the function. When a module is closed, it is often from an imported host function. If it is on the module engine, it is easy to accidentally close an imported module. This refactors the WASI tests also, to ensure they aren't cheating too much. This allows us to know for example "proc_exit" works without too much trouble. Signed-off-by: Adrian Cole <adrian@tetrate.io> Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
6.0 KiB
6.0 KiB