tinygo-org/tinygo
Hardware & IoTCompile Go programs for microcontrollers, WebAssembly, and small targets with LLVM-based small binaries.
TinyGo is an alternative Go compiler aimed at "small places": microcontrollers, WebAssembly (WASM/WASI), and command-line tools. It is most relevant to people who already write Go and want it on hardware boards or in size-sensitive WASM modules, rather than to teams looking for a general-purpose drop-in replacement for the standard Go toolchain.
How it works
TinyGo reuses the Go tools' libraries but adds an LLVM backend, trading the standard compiler's priorities for small binary size and low resource use. The README frames the design around that trade: don't pay for what you don't use, and keep the Go memory model (including garbage collection) even on single-core microcontrollers. It explicitly does not aim to be as fast as gc, to handle huge goroutine counts efficiently, or to compile every existing Go program README.
One workflow, three target families
A typical embedded path is target-based: pick a supported board, then compile-and-flash with the board name, e.g. the blinky example running unchanged on an Arduino Uno, Adafruit Circuit Playground Express, or Seeed XIAO-ESP32S3 by changing the target README. The README states support for over 150 microcontroller boards, with the board reference maintained on the project site microcontroller reference.
For WebAssembly, TinyGo emits WASM for browsers and WASI for servers and edge devices. Its documented deployment examples include Fastly Compute, Fermyon Spin, and wazero README. A 2022 HN commenter reported roughly 10x smaller WASM output versus standard Go and using TinyGo-compiled libraries from Python, PHP, JavaScript, and C++, while noting rough edges in cross-language calling HN comment. Treat that as one user's dated experience, not a benchmark guarantee.
TinyGo also compiles for Linux, macOS, and Windows targets, documented separately on the project site Linux guide, though the main value proposition remains small targets.
Requirements and limits to check first
- Installation follows the project's getting-started instructions and includes a Docker option; there is no bundled setup tutorial here getting started, Docker workflow.
- Language coverage is partial by design. Before porting an existing program, check the language-support page rather than assuming standard-library and feature parity language support. A 2022 comment reported a
json.Unmarshalpanic when compiled to WASM, an example of why such checks matter for older versions HN comment. - Mobile is not a supported target: a maintainer stated in 2022 that Android and iOS were unsupported, though Linux/ARM was HN reply.
- Licensing is BSD 3-clause, with some LLVM-derived files under an Apache 2.0 variant and some Teensy-derived code under PJRC's license, marked in file headers README. Verify those terms if you redistribute or vendor the compiler.
HotRepo's take
HotRepo recorded +30 stars on the weekly Go board on 2026-10-29, reaching #17 that day; the stored sample covers only that date, so it says nothing about a trend. The project dates to 2018, and the README's supported-target and feature pages are the right places to confirm current fit repository.
Written by AI from the project's README, updated October 29, 2026. The project's own docs are the source of truth.