summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeth Samuel <seth@airtime.com>2016-08-18 16:30:07 -0700
committerGitHub <noreply@github.com>2016-08-18 16:30:07 -0700
commit5e87de50ae9be4a3348623b7dc9c7d9cd7054fd9 (patch)
treeddeb962a1781f01dfb75cafc2b0d77f28de450f6
parente5e3bf39f25ed3a2fb45a9ca1f55d6828d81a3eb (diff)
downloadbinaryen-5e87de50ae9be4a3348623b7dc9c7d9cd7054fd9.tar.gz
binaryen-5e87de50ae9be4a3348623b7dc9c7d9cd7054fd9.tar.bz2
binaryen-5e87de50ae9be4a3348623b7dc9c7d9cd7054fd9.zip
Update README.md with full hello_world.asm.js source
This tripped me up as a complete beginner, since I had copied out the example code from the README rather than the test file.
-rw-r--r--README.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/README.md b/README.md
index 24717c3f1..b04942f19 100644
--- a/README.md
+++ b/README.md
@@ -93,11 +93,15 @@ $ bin/asm2wasm test/hello_world.asm.js
That input file contains
```javascript
+function () {
+ "use asm";
function add(x, y) {
x = x | 0;
y = y | 0;
return x + y | 0;
}
+ return { add: add };
+}
```
You should see something like this: