feat: wasmtime

This commit is contained in:
2022-07-10 14:48:03 +08:00
parent 6160185ace
commit 2a6b904c2a
5 changed files with 71 additions and 24 deletions

12
__wasm/wasmtime/justfile Normal file
View File

@@ -0,0 +1,12 @@
_:
@just --list
# https://git.hatter.ink/hatter/learn_programming/src/branch/master/webassembly/clang-llvm.md
compile_add_wasm:
export PATH=/usr/local/opt/llvm/bin:$PATH
clang --target=wasm32 --no-standard-libraries -Wl,--export-all -Wl,--no-entry -o add.wasm add.c
run_example1:
cargo run --example example1