Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
adding hello world example
  • Loading branch information
Unknown committed May 20, 2017
commit ca9b1950b73831fa6786a257f2fa1ab2a512a593
6 changes: 6 additions & 0 deletions examples/helloworld/helloworld.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// helloworld.c
#include <webassembly.h>

export void greeting() {
console_log("Hello World!");
}
Binary file added examples/helloworld/helloworld.wasm
Binary file not shown.
7 changes: 7 additions & 0 deletions examples/helloworld/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<script src="../../dist/webassembly.min.js"></script>
<script>
webassembly.load("helloworld.wasm").then(function(module) {
var {greeting} = module.exports;
greeting();
});
</script>