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

Does not work with latest version of wasm-bindgen #13

Open
JWorthe opened this issue Sep 30, 2023 · 0 comments
Open

Does not work with latest version of wasm-bindgen #13

JWorthe opened this issue Sep 30, 2023 · 0 comments

Comments

@JWorthe
Copy link
Collaborator

JWorthe commented Sep 30, 2023

web-bundler inlines the javascript generated by wasm-bindgen and calls its init function.

https://github.com/panoptix-za/web-bundler/blob/main/src/lib.rs#L278C19-L278C19

    let javascript = format!(
        r#"<script type="module">{} init('{}'); </script>"#,
        package_js_content,
        wasm_path.display()
    );

Unfortunately it looks like in wasm-bindgen 0.2.85 it no longer generates a function named init.

Both before and after, the init function is exported as the default export of the javascript module that wasm-bindgen generates, so web-bunder should use that instead.

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

No branches or pull requests

1 participant