TinyGo
Update: Today’s show has just gone live on YouTube.
A Go Compiler For Small Places.
- tinygo.org | play.tinygo.org
- GitHub: tinygo-org/tinygo (github.com)
- Twitter: @TinyGolang
- Ron Evans: @deadprogram
- Twitch: twitch.tv/lapipatv
Hello, TinyGo!
package main
import (
"machine"
"time"
)
func main() {
led := machine.LED
led.Configure(machine.PinConfig{Mode: machine.PinOutput})
for {
led.Low()
time.Sleep(time.Millisecond * 500)
led.High()
time.Sleep(time.Millisecond * 500)
}
}
See: https://tinygo.org/docs/tutorials/blinky/
New to TinyGo?
The TinyGo collection
Some actual toy projects
- GopherBot: gopherbot.com | hybridgroup/gopherbot
- GoBadge: tinygo-org/gobadge
WebAssembly with TinyGo
- https://wasmbyexample.dev/examples/hello-world/hello-world.go.en-us.html
- https://marianogappa.github.io/software/2020/04/01/webassembly-tinygo-cheesse/
- https://tufin.medium.com/extending-envoy-proxy-with-golang-webassembly-e51202809ba6
- https://github.com/tetratelabs/proxy-wasm-go-sdk
- https://events.istio.io/istiocon-2021/slides/c8p-ExtendingEnvoyWasm-EdSnible.pdf
The first book about TinyGo just came out!
Also take a look at…
GoCV, which we covered on a previous Open Source Spotlight episode (gocv.io | aaronmsft.com/posts/gocv/ | YouTube ), and GoBot (gobot.io), which plays nicely with TinyGo!