Skip to content

Switch binaryen.js/wasm to ESM - #4280

Merged
dcodeIO merged 5 commits into
WebAssembly:mainfrom
dcodeIO:js-es6
Oct 28, 2021
Merged

dcodeIO merged 5 commits into
WebAssembly:mainfrom
dcodeIO:js-es6

Conversation

@dcodeIO

@dcodeIO dcodeIO commented Oct 26, 2021

Copy link
Copy Markdown
Contributor

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.

Comment thread src/js/binaryen.js-extern-pre.js Resolved
Comment thread scripts/test/support.py Resolved

@kripken kripken left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks! lgtm % comments

Comment thread src/js/binaryen.js-extern-pre.js Resolved
Comment thread scripts/test/support.py Resolved

@kripken kripken left a comment

Copy link
Copy Markdown
Member

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

comods commented Nov 16, 2021

Copy link
Copy Markdown

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