-
Notifications
You must be signed in to change notification settings - Fork 267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move wasm, wasi_snapshot_preview1, ieee754 and similar folders out of internal into utils or helpers #745
Comments
Hi, we have a internal package hierarchy defined intentionally, as described in RATIONALE.md We don't currently plan to expose the raw wasm model as we have internal hooks we routinely add to that. To decode separate from instantiation, we have the Maybe you can mention specifically why you want to separate out decode from config independent of |
@skelouse fyi we will be spinning out a new repo, watzero for the text format, and that will need to have access to the binary types anyway. So, if the goal is manipulation not otherwise done in config, watch tetratelabs/wabin#1 Also, to elaborate compile includes decode, validation (terribly important) and in the case of the compiler backend, translating to machine level assembly, there are more things involved if the goal is caching. This should also land soon #618 We may also end up with a code builder here, but it won't be the same as the internal package for reasons including mutability which can subvert our validation, as well package cycles. Anyway, I hope these breadcrumbs help, but also very curious about the use cases that motivated this issue. At the end of the month we'll start a chat channel (when we do our first beta), until then we can use this issue to elaborate. cheers! |
Runtime.CompileModule will fail when calling r.store.Engine.CompileModule as our dependencies are not known at that time. This is why we need to parse the module import section first, load dependencies then load the module. |
can you make a failing test for that please? CompileModule shouldn't rely on dependencies. in fact CompileModule exposes its imports exactly for this reason |
ex imports and exports were exposed recently so people could poke at which dependencies are needed prior to instantiation here: Lines 263 to 290 in 9414b0b
|
@skelouse did any of the tips above work for you? |
I exposed the binary parsers in the new repo here, though it needs some polishing. Feel free to open an issue https://github.com/tetratelabs/watzero if you still need to manipulate wasm. |
@skelouse ok this should be more precisely what you were looking for https://github.com/tetratelabs/wabin |
Thanks, that's what I needed! I'll get back to you when I find out more info. |
Is your feature request related to a problem? Please describe.
Currently we are not able to decode a wasm module before loading it, exporting these was the only way to load it.
Describe the solution you'd like
Move wasm, wasi_snapshot_preview1, ieee754 and similar folders out of internal into utils or helpers
Describe alternatives you've considered
Forking the wazero repository, and exporting the internals ourselves.
The text was updated successfully, but these errors were encountered: