Understanding what TinyGo is
TinyGo is an independently written compiler, with its own runtime implementation. It is intended to be used for microcontroller programming, WebAssembly (WASM), and CLI tools. TinyGo heavily makes use of the LLVM infrastructure to optimize and compile code to binaries that a microcontroller can understand.
The first release of TinyGo (v0.1) was published on February 1, 2019 on GitHub. Since then, the project has quickly implemented lots of features and never stopped adding support for more microcontrollers, sensors, displays, and other devices.
On February 2, 2020, TinyGo announced that it is now officially a Google-sponsored project. This was a big step for the complete project.
How TinyGo works
The TinyGo compiler uses a different set of steps than other languages to transform Go source code to machine code. We will not be going into the details though, but let's take a look at an overview of the compiler pipeline:
- We write the...