GopherCon 2019 - Portable GUI Programs in Go

conference, golang, gophercon2019, notes

These are some notes from my experiences at the GopherCon 2019. I don’t expect these will be laid out in any particularly useful way; I am mostly taking them so I can remember some of the bits I found most useful in the future.


  • Gio (framework)
  • Scatter.im (example program – encrypted chat over email)

Gio

  • Immediate mode design
  • GPU accelerated vector and text rendering
  • macOS, Linux, Windows, Android, iOS, tvOS, Webassembly
  • Core is 100% Go, os-specific native interfaces are optional
  • Build/run/install with standard go tooling (modules suggested)
  • Tooling to create apk for android

Immediate Mode UI

  • UI state is owned by the program, even the layout and widget tree
  • No callbacks; events are handled while drawing
  • Need to set up / start in goroutine, but not too bad

Operations

  • Need to redraw everything in every frame – use ops buffer
  • Pass ops buffer to window.Draw

Widgets

  • Supported, looks straightforward