TinyGo
是针对嵌入式应用和webassembly的Go编译器
介绍
WebAssembly 使用介绍
安装
Mac
brew tap tinygo-org/tools
brew install tinygo
tinygo version
Ubuntu
wget https://github.com/tinygo-org/tinygo/releases/download/v0.20.0/tinygo_0.20.0_amd64.deb
sudo dpkg -i tinygo_0.20.0_amd64.deb
tinygo version
常用命令
$ tinygo env
GOOS="darwin"
GOARCH="amd64"
GOROOT="/usr/local/Cellar/go/1.16.6/libexec"
GOPATH="/Users/xiexianbin/work/code/go"
GOCACHE="/Users/xiexianbin/Library/Caches/tinygo"
CGO_ENABLED="1"
TINYGOROOT="/usr/local/Cellar/tinygo/0.20.0"
与 go 区别
TinyGo 是 golang 包的子集,区别如下: