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

Wasm Reactor Module Initialization #16

Closed
hellwolf opened this issue Feb 28, 2023 · 2 comments · Fixed by #17
Closed

Wasm Reactor Module Initialization #16

hellwolf opened this issue Feb 28, 2023 · 2 comments · Fixed by #17

Comments

@hellwolf
Copy link

hellwolf commented Feb 28, 2023

Instead of calling _start, _initialize should be used per https://nodejs.org/api/wasi.html#wasiinitializeinstance.

An example is to support Haskell Wasm Reactor Module:

    // initialize Haskell Wasm Reactor Module
    wasi.inst = inst;
    inst.exports._initialize();
    inst.exports.hs_init(0, 0);

Full example: https://github.com/hellwolf/haskell-examples/blob/master/2023-02-24-wasm-comm/client.js

What is your recommendation?

@bjorn3
Copy link
Owner

bjorn3 commented Feb 28, 2023

Does #17 work?

@hellwolf
Copy link
Author

Yep!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants