rollup / rollup-plugin-wasm

This module has moved and is now available at @rollup/plugin-wasm / https://github.com/rollup/plugins/blob/master/packages/wasm
75 stars 13 forks source link

Alternative API #1

Closed jamen closed 7 years ago

jamen commented 7 years ago

I pretty much copied this API from wasmify. Coming from Browserify, the API is more limited. Something better could be made with Rollup.

For example, no more promise imports:

import example from './example.wat'

example.main()

This would be possible by wrapping the entire bundle in a promise that resolves your WASM modules, so wherever they are imported you just receive the functions.