xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

wasmer All In One

wasmer All In One

WebAssembly runtime / virtual machine

$ curl https://get.wasmer.io -sSfL | sh
# https://github.com/wasmerio/wasmer/releases/download/2.3.0/wasmer-darwin-amd64.tar.gz

$ wasmer -h

只要安装上 Wasmer, 就自带 wapm 了 ✅

https://www.cnblogs.com/xgqfrms/p/16689037.html

bugs

zsh: command not found: wasmer

solution ✅

wasmer 环境变量配置

# open & edit config
$ code .zshrc

$ vim .zshrc

.zshrc


# WebAssembly & Rust
# /Users/xgqfrms-mbp/.wasmer/bin
export PATH="$PATH:/Users/xgqfrms-mbp/.wasmer/bin:$PATH"


# update
$ source ~/.zshrc

cargo

wasm32-wasi

# build  出两个 target
$ cd ./wasmer-demo  && cargo build --target=wasm32-wasi

# build 出一个 target
$ cd ./hello_world  && cargo build

/Users/xgqfrms-mbp/Documents/GitHub/rust-in-action/src/wasmer_demo/target/debug

/Users/xgqfrms-mbp/Documents/GitHub/rust-in-action/src/wasmer_demo/target/wasm32-wasi/debug

refs



©xgqfrms 2012-2020

www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!

原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!


posted @ 2022-09-11 13:56  xgqfrms  阅读(45)  评论(3编辑  收藏  举报