Find Related products on Amazon

Shop on Amazon

Proposal: Add bare metal support to Go

Published on: 2025-07-20 23:44:11

Proposal Details I propose the addition of a new GOOS target, such as GOOS=none , to allow Go runtime execution under specific application defined exit functions, rather than arbitrary OS syscalls, enabling freestanding execution without direct OS support. This is currently implemented in the GOOS=tamago project, but for reasons laid out in the Proposal Background section it is proposed for upstream inclusion. Go applications built with GOOS=none would run on bare metal, without any underlying OS. All required support is provided by the Go runtime and external driver packages, also written in Go. Go runtime changes A working example of all proposed changes can be found in the GOOS=tamago implementation. Board support packages or applications would be required (only under GOOS=none ) to define the following functions to support the runtime. If the use of go:linkname is undesirable different strategies are possible, right now linkname is used as convenient way to have externally d ... Read full article.