TinyGo 介绍

发布时间: 更新时间: 总字数:90 阅读时间:1m 作者: IP属地: 分享 复制网址

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 包的子集,区别如下:

参考

  1. https://tinygo.org/
  2. https://play.tinygo.org/
  3. https://tinygo.org/docs/guides/webassembly/
Home Archives Categories Tags Statistics
本文总阅读量 次 本站总访问量 次 本站总访客数