Skip to content
Prev Previous commit
Next Next commit
No commit message
  • Loading branch information
Pannous committed Mar 19, 2018
commit 7a061f34fca28ac8f07ff091f70e397532d98826
9 changes: 9 additions & 0 deletions examples/hello-assembly/hello-assembly.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
// compile this file thus:
// asc -v || npm install --save-dev AssemblyScript/assemblyscript
// asc hello-assembly.ts -b test.wasm -t test.wast

// run compiled wasm file in node.js:
// node -i -e "log_char = c => process.stdout.write(String.fromCodePoint(c));\
// new WebAssembly.Instance(new WebAssembly.Module(require('fs').readFileSync('test.wasm')),{console:{log_char}})"


namespace console {

// imported helper to print a char in node.js
Expand Down