Abstract
It is now possible to run Go on microcontrollers such as the Arduino and use it on the web with WebAssembly, all using TinyGo. TinyGo is designed to compile the same Go code you're used to down to much smaller binaries, and thus brings Go to places it couldn't go before. While you may not be very aware of it, embedded software is everywhere. It goes from very small chips in remote controls to advanced automotive navigation systems and everything in between. While these systems used to be written mainly in C, and still often are, more and more people are realizing that this is an aging language with many pitfalls such as buffer overflows - especially now that more and more systems are connected to the internet and are thus are much more easy to exploit. Therefore, newer and more modern and secure languages like Rust, JavaScript and Python are being used for these systems for ease of programming and increased reliability and safety. Unfortunately, Go was often not an option because of its large binary size. Enter TinyGo. This project aims to support the same language with the same standard library and ecosystem, while keeping binary sizes low. It runs comfortably on chips with tens to hundreds of kilobytes of program memory and a few tens of kilobytes of RAM. TinyGo is also a viable alternative to Go on the Web, as it does support WebAssembly. Again, binary sizes are much smaller: sometimes 3% of the size compared to the main Go support. This is very important for the Web, as load times must be kept low because not everybody has a fast internet connection and unlimited data. This talk will give an introduction to the TinyGo project for those who are new to it. It will also give a short history of the project, including previous attempts to port Go to microcontrollers and why they failed. Further, it will include some technical details of how the compiler works and why it can produce such small programs. And finally, I'll show what is possible today with a few demos.