Skip to content

Instantly share code, notes, and snippets.

@TheLarkInn
Last active July 14, 2017 22:09
Show Gist options
  • Save TheLarkInn/def97889b9dacd3f79dc124fad8f3a30 to your computer and use it in GitHub Desktop.
Save TheLarkInn/def97889b9dacd3f79dc124fad8f3a30 to your computer and use it in GitHub Desktop.
Example of using webpack and .wat as a module type
import("./abc.js").then(abc => abc.doIt());
import { add } from "./addition.wat";
export function doIt() {
console.log(add(1, 2));
}
(module
(func
(export "add")
(param i32 i32)
(result i32)
(i32.add (get_local 0) (get_local 1))
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment