Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable the type validation in wabt tools (#461)
This potentially fixes/improves the situation for #451 but opens a question wrt our API. Current situation: You can do the parsing and cache the loaded module in memory with: ```java private static final Module MODULE = Module.builder(...).build(); ``` after that, you still need 2 steps: - `Instance` initialization - `start` function call the initialization will also map the `HostImports`, but, when using `wasi` we always need to re-initialize everything even when changing only the `arguments`, as we have a single `build` method: ```java Instance.builder(MODULE).withHostImports(imports).build(); ``` this is sub-optimal as there are use cases(i.e. multiple subsequent executions of a tool) that would benefit from caching the `Instance` and hot-swapping the wasi `HostImports`: Possible resolution: ```java private static final HostImports baseImports = ???; private static final Instance INSTANCE = Instance.builder(Module.builder(...).build()).withHostImports(baseImports).withStart(false).build(); ``` when using the `Instance` we should be able to fully skip the initialization(and have an effective memoization) by using, something like: ```java INSTANCE.updateImports(baseImports.withArgs(myNewArgs)).export("_start").apply(); ``` There are few possible alternatives to tackle the problem, I'm interested if this is something we want to fix now or something that can be postponed, I'm not sure how much this pattern is widely used. Thoughts?
- Loading branch information