Skip to content
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

WebAssembly: indicate initialization status of runtime #2851

Open
jzabinski-dolios opened this issue May 16, 2022 · 3 comments
Open

WebAssembly: indicate initialization status of runtime #2851

jzabinski-dolios opened this issue May 16, 2022 · 3 comments
Labels
enhancement New feature or request wasm WebAssembly

Comments

@jzabinski-dolios
Copy link

For WebAssembly, the embedder needs to use wasm_exec's run(instance) method in global.Go so that TinyGo's runtime can be initialized prior to calling any of the WebAssembly module's exported functions. But there doesn't seem to be anything in global.Go indicating whether the runtime has been initialized. An easy workaround would be to create a wrapper object for run elsewhere in Javascript, but I feel like it would be useful to store a variable indicating the initialization status of the runtime in global.Go itself.

@deadprogram deadprogram added enhancement New feature or request wasm WebAssembly labels May 18, 2022
@dgryski
Copy link
Member

dgryski commented May 19, 2022

This seems pretty doable.

@codefromthecrypt
Copy link
Contributor

do any other compilers do this (rust, clang etc)? might be nice to see how.

@dgryski
Copy link
Member

dgryski commented Feb 2, 2023

If this ends up being part of #2735 then we could close this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wasm WebAssembly
Projects
None yet
Development

No branches or pull requests

4 participants