proposal: all: add bare metal support
# 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`](https://github.com/usbarmory/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 > [!WARNING] > The proposal evolved in the course of the discussion, the most recent design proposal is tracked at https://go.dev/cl/821260 A working example of all proposed changes can be found in the [`GOOS=tamago` implementation](https://github.com/golang/go/compare/go1.27.0..usbarmory:tamago1.27.0). 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 defined functions being directly invoked in the runtime early on. These hooks act as a "Rosetta Stone" for integration of a freestanding Go runtime within an arbitrary environment, whether bare metal or OS supported. For bare me
Posted by abarisani on May 6, 2025, 7:54 AM
Tags
Related issues
Raise real-world problems, find people facing the same issue, and discuss solutions.2,000 issues0 comments
support (EdTech)
proposal: all: add bare metal support
# 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`](https://github.com/usbarmory/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 > [!WARNING] > The proposal evolved in the course of the discussion, the most recent design proposal is tracked at https://go.dev/cl/821260 A working example of all proposed changes can be found in the [`GOOS=tamago` implementation](https://github.com/golang/go/compare/go1.27.0..usbarmory:tamago1.27.0). 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 defined functions being directly invoked in the runtime early on. These hooks act as a "Rosetta Stone" for integration of a freestanding Go runtime within an arbitrary environment, whether bare metal or OS supported. For bare me
Comments (0)
No comments yet. Start the discussion.