Summary

Ron Evans talks about TinyGo - a compiler for Go, written in Go itself, that uses LLVM to achieve very small, fast, and concurrent binaries that can also target devices where Go could never go before. The talk includes live coding of devices, RISC-V, WebAssembly, and a drone, to show some of what can be done today using TinyGo.

Bio

Ron Evans is an open source software developer, businessperson, author, and speaker.

About the conference

Software is changing the world. QCon empowers software development by facilitating the spread of knowledge and innovation in the developer community. A practitioner-driven conference, QCon is designed for technical team leads, architects, engineering directors, and project managers who influence innovation in their teams.

TinyGo

We’re here to talk about TinyGo, which is now officially sponsored by Google. Go is really big in the cloud by which we mean Go is big. Go executable programs are very large in Hello World in Go 1.13, which is the release right before the most recent release. Go programs are very large. That’s not a problem because clouds are infinitely scalable. What about the small places? What about the little places by which we mean microcontrollers, which are the small chips that actually run all the things in the world you care about, like the dialysis machine, or the brake systems, or other types of mission-critical, the refrigerator, and WebAssembly. What we’re talking about is true Edge computing, not this so-called Edge computing. Edge computing is not the data center nearest you. I’m sorry. I must respectfully disagree. The real Edge computing is in what we call the last centimeter. That’s what TinyGo is here for.

How TinyGo works is it’s a trinity between Go, TinyGo, and LLVM. The Go compiler itself is written in Go. All cool languages eventually reach a point where they can be compiled in themselves. It’s very self-referential, but it also proves that it works. The Go compiler tool chain is written in Go and a lot of the things that it uses are actually built into Go standard library. Then you’ve got LLVM. It’s a framework for building compilers. It’s being used by a couple of languages, one of them is a very cool language called Rust. We really admire the Rust community. Also, Swift, another very cool language. Some other cool languages recently Zig, written in LLVM language. The way that TinyGo works is we take the source code of Go and we parse it through the Go standard libraries to create the Go single static assignment form, which is taking the Go code and reducing it down to this very reduced type of syntax. Then we take that and TinyGo translates that into LLVM intermediate representation, which is what LLVM’s tool chain takes. Then using tools like Clang or LLD, which are the built-in tool chain that LLVM itself provides, we can then compile targets in LVM for very small places.

#go language #compilers #qcon london 2020 #demo #go

Tiny Go: Small Is Going Big
8.25 GEEK