TinyGo: The Power of Go, in Kilobytes.
https://tinygo.org| Installer Source| Releases (json) (tab)
TinyGo: The Power of Go, in Kilobytes.
https://tinygo.org| Installer Source| Releases (json) (tab)
To update or switch versions, run webi tinygo@stable
(or @v0.30
, @beta
,
etc).
TinyGo is an alternate, llvm-based compiler for Go with a much smaller and simpler runtime with a minimum size of kilobytes - suitable for micro-controllers, embedded devices, and good old fashioned CLI utilities that don't need a high-performance garbage collector.
GOOS=linux GOARCH=arm64 \
tinygo build -short -no-debug \
-o hello-v1.0.0-linux-arm64
You may also want to install the Go IDE tooling: go-essentials.
These are the files / directories that are created and/or modified with this install:
~/.config/envman/PATH.env
~/.local/opt/tinygo/
~/.local/opt/go/
~/go/
Core differences from Go's self-hosted compiler:
By following certain patterns, you can avoid forcing heap allocation and get better memory usage and performance.
See:
Your Go, TinyGo, and dependency versions (particularly golang.org/x
) will
need to be paired.
See the Go Compatibility Matrix
Standard Library
encoding/json
Windows:
macOS:
llvm
from
conflict-free brew to get small sizes when cross-compilingSee also: