Skip to content

Support for CommonJS and AMD loaders in libwabt.js - #536

Merged
binji merged 1 commit into
WebAssembly:masterfrom
dcodeIO:js-commonjs-amd
Jun 27, 2017
Merged

binji merged 1 commit into
WebAssembly:masterfrom
dcodeIO:js-commonjs-amd

Conversation

@dcodeIO

@dcodeIO dcodeIO commented Jun 27, 2017 •

Copy link
Copy Markdown
Contributor

It is currently necessary to postprocess libwabt.js to support different kinds of module loaders, especially CommonJS-style require and AMD-style define. This PR adds CommonJS and AMD module loader support directly to wabt.pre/post.js and exposes wabt as a global var only if neither is available.

Unfortunately, I haven't yet figured out where exactly libwabt.js is built with emscripten, so the new generated file is not included. In case you decide to merge the PR, I would appreciate if libwabt.js could be updated as well.

@binji

binji commented Jun 27, 2017

Copy link
Copy Markdown
Member

libwabt.js is currently built by me running make emscripten-release and copying the result from the output directory into the demo directory. ;-)

It would be much better to have this automated, but for now I can just update this manually.

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.

2 participants