Recently, I’ve been learning Go. One thing I’ve learned is that the Go compiler generates its own assembly language. There’s a great talk by Rob Pike about it. While I was learning, I began to wish there was a tool similar to the Compiler Explorer (more commonly referred to as Godbolt), but for Go assembly. So I built goasm, a Go assembly generator.
I deployed the app on Heroku, since they support Go apps. Normally, Go is only available on your Heroku dyno while building your app, but I used [jpillora’s custom heroku Go buildpack], because it keeps Go in the run environment. Jpillora built this in order to build the pretty neat cloud-gox tool.
I would like to implement setting arbitrary GOOS and GOARCH variables. It would be very easy, except that Go doesn’t yet support specifying an environment variable for a single command.
Right now, the output is taken raw from the output of the Go compiler. I’d like to parse the output for just the assembly code, and make it look much more like Godbolt.