This is a dumping ground for simple demos related to WebAssembly as I explore the various tools currently available to run wasm.
-
Clone this repo.
-
Install emsdk locally within this repo folder (this will take a while):
./setup-em.sh
- Add necessary environment variables and modify PATH in the current shell:
source ./emsdk/emsdk_env.sh
- If you want to use the rust demo, install rust and the emscripten target:
./setup-rust.sh
Folder | Description |
---|---|
hello | An example of compiling a C function and running it in the browser and in node |
simple-wat | An example of writing a module in text format and assembling into binary wasm |
webassembly-add | Demo of webassembly npm module |
rust-helloworld | An example of compiling a Rust function and running it in the browser |