TinyGo
约 1 分钟阅读
- tinygo-org/tinygoGitHubtinygo-org/tinygotinygo-org/tinygo - Go on Microcontrollers and WASM · 基于 LLVM Go · 语言特性支持 · Why go instead of rust · Go 优势 · Go 更具有主见性 - 因此更易学易用 - 更简单笔记:TinyGo - Go on Microcontrollers and WASM
- 基于 LLVM Go
- 语言特性支持
- Why go instead of rust
- Go 优势
- Go 更具有主见性 - 因此更易学易用 - 更简单
- 内建并发支持 - 不依赖线程实现
- 完善低耦合的标准库
- Rust 优势
- 默认没有 GC
- 更强的内存安全保障
- 更底层,更容易支持 microcontroller
- Go 优势
# 源码安装
git clone --recursive https://github.com/tinygo-org/tinygo.git
cd tinygo
# 安装 - 使用本地安装的 llvm
sudo apk add clang clang-analyzer clang-extra-tools clang-dev llvm-dev
GOPROXY=https://goproxy.io go install -v
# 自行构建 llvm
export CC=clang
export CXX=clang++
make llvm-build
make
./build/tinygo version
make gen-device
# docker
docker run --rm -v $(pwd):/src tinygo/tinygo:0.15.0 tinygo build -o /src/blinky1.hex -size=short -target=pca10040 examples/blinky1关联信息
反向链接、本文链接的其他页面和外部资料。
参考资料
GitHub1 条
- tinygo-org/tinygogithub.com/tinygo-org/tinygo
其他外链2 条
- tinygo.org/faq/why-go-instead-of-rusttinygo.org/faq/why-go-instead-of-rust
- tinygo.org/lang-supporttinygo.org/lang-support