./wasm_cpp
directory contains an example Arduino app (sketch) that is compiled to WebAssembly.
Compilation is performed using wasicc
here, but clang --target=wasm32
can be used as well.
See build.sh
for details.
Before building the app, please install the toolchain:
rustup target add wasm32-unknown-unknown
To rebuild, use build.sh
.
Before building the app, please install npm dependencies:
npm install # or yarn install
To rebuild, use npm run build
.
To rebuild, use build.sh
.
Note: for all examples, the resulting wasm
binary is converted to a C header using xxd
.