Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danawoodman/326a4a9389e3115326a1b1acbe74a7ea to your computer and use it in GitHub Desktop.
Save danawoodman/326a4a9389e3115326a1b1acbe74a7ea to your computer and use it in GitHub Desktop.
How to build a Golang application for a Raspberry Pi

How to build a Golang application for a Raspberry Pi

Given a binary at cmd/server/main.go, create a binary at bin/server that is built for a Raspberry Pi:

env GOOS=linux GOARCH=arm GOARM=5 go build -o ./bin/server ./cmd/server/main.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment