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

Add support for output with wasm imports #145

Open
dsherret opened this issue Nov 21, 2024 · 6 comments
Open

Add support for output with wasm imports #145

dsherret opened this issue Nov 21, 2024 · 6 comments

Comments

@dsherret
Copy link
Member

dsherret commented Nov 21, 2024

We should support wasm imports in the output now that it's stable.

It seems there is this: https://docs.rs/wasm-bindgen-cli-support/0.2.95/wasm_bindgen_cli_support/struct.Bindgen.html#method.nodejs_module (maybe there is a web version or a web version would be easy to implement)

@0f-0b
Copy link

0f-0b commented Nov 21, 2024

It appears that the default output format (bundler) already uses Wasm imports and is compatible with node --experimental-wasm-modules. However, I ran into denoland/deno_core#974 when trying to use it with Deno.

@dsherret
Copy link
Member Author

Thanks! We'll have it fixed in the patch release next week.

@dsherret
Copy link
Member Author

Should be fixed now in deno canary (deno upgrade canary)

@dsherret
Copy link
Member Author

I opened rustwasm/wasm-bindgen#4287

@dsherret
Copy link
Member Author

dsherret commented Nov 23, 2024

@0f-0b oh, I misread what you said. Yeah, the output of "bundler" looks correct and we could maybe add an option here to use it. Is this something you'd be interested in implementing?

It would be good to know if the bundler output works with imports though (I didn't test it yet).

@0f-0b
Copy link

0f-0b commented Nov 23, 2024

Is this something you'd be interested in implementing?

Thanks, but I believe it's best done by someone more experienced with this tool.

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

2 participants