TinyGo: run Go on microcontrollers and WebAssembly
10 steps · about 5 h 25 min · Intermediate
- A Tour of Go (interactive, go.dev, 2 h)
TinyGo compiles ordinary Go, so you need the language basics first.
- TinyGo: Go for microcontrollers and WebAssembly (article, Jorge Fuertes Alfranca, 15 min)
A recent overview of what TinyGo is, which boards suit a beginner, and how a first blink works.
- An Introduction to TinyGo, and The Tools That Will Help You Flourish (article, jaminologist.com, 10 min)
Introduces the browser playground and editor plugins, so you can try TinyGo before buying hardware.
- Quick install guide (doc, tinygo.org, 20 min)
The official install steps for Linux, macOS, Windows and Docker, including flashing tools.
- Tour of TinyGo (interactive, tinygo.org, 1 h)
Runnable lessons on LEDs, buttons, PWM and I2C, run in the browser or on a real board.
- Drivers (doc, tinygo.org, 10 min)
Shows how drivers hide the I2C and SPI details of a sensor, so you can read hardware with a few lines.
- tinygo-org/drivers (repo, GitHub (TinyGo project), 30 min)
Browse real driver source and examples for sensors, displays and radios, then try one in your own project.
- Getting started with TinyGo and WebAssembly (WASM) (article, Andrea Grandi, 25 min)
A first WebAssembly project: build a small Go function and call it from JavaScript.
- Using WASM (doc, tinygo.org, 20 min)
The official guide to calling Go from JavaScript and the reverse, and why wasm_exec.js must match your TinyGo version.
- Why Your Go Binary Is Too Fat for WebAssembly (and How TinyGo Fixes It) (article, DEV Community, 15 min)
Explains why TinyGo output is small and how to check binary size, which is the reason TinyGo exists.