Skip to content

Switch binaryen.js/wasm to ESM #4280

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

Merged
merged 5 commits into from
Oct 28, 2021
Merged

Switch binaryen.js/wasm to ESM #4280

merged 5 commits into from
Oct 28, 2021

Conversation

dcodeIO
Copy link
Contributor

@dcodeIO dcodeIO commented Oct 26, 2021

As discussed a while ago, this PR aims to switch browser builds to ESM. New usage is ~:

import Binaryen from "binaryen";
const binaryen = await Binaryen();
...

The await is not strictly necessary for the .js / wasm2js build, but when provided allows switching out the two builds.

Copy link
Member

@kripken kripken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! lgtm % comments

Copy link
Member

@kripken kripken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

@dcodeIO dcodeIO merged commit 77be470 into WebAssembly:main Oct 28, 2021
@dcodeIO dcodeIO deleted the js-es6 branch October 28, 2021 01:59
@comods
Copy link

comods commented Nov 16, 2021

This might be related:
AssemblyScript/assemblyscript#1306

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 this pull request may close these issues.

4 participants