Proposal: Add bare metal support to Go
In this technical retrospective (2025), @rbanffy shares practical architectural lessons learned from running, scaling, or migrating production software under lean constraints.
Core Principles for Independent Builders:
Defaulting to simpler architectures (such as monolithic frameworks, SQLite, or managed VPS) prevents early engineering bankruptcy.
Evaluating true compute and egress costs reveals that high cloud bills can often be slashed by 80%+ through judicious re-platforming.
Code you write at 2 AM as a solo engineer must be easy to debug six months later without complex microservice dependencies.
Community Debate Themes:
HN engineers debated the tradeoffs between cloud convenience and raw server economics, database indexing strategies, and resisting premature architectural complexity.
CATEGORY Frugal Engineering →
HISTORICAL ERA Post-ZIRP & AI (2023–2026)
COMMUNITY SCORE ★ 85 points
TOTAL DISCUSSIONS 20 comments
FTA:
``` // printk emits a single 8-bit character to standard output // //go:linkname printk runtime.printk func printk(c byte) ``` So, printing “Hello, world!”, necessarily will have to make 13 calls to this function. I think I would have required a printk that prints an array of bytes. I expect that can be significantly faster on lots of hardware.
In contrast, there’s
``` // getRandomData generates len(b) random bytes and writes them into b // //go:linkname getRandomData runtime.getRandomData func getRandomData(b []byte) ``` Here, they seem to acknowledge that it can be faster to make a single call.
We use 'scratch' containers for many of our Go applications, so they have no user-space stuff other than our application binary. It reduces exposure for security vulnerabilities. This proposal seems to be taking that approach to the extreme - not even a kernel. Super-interesting; I wonder if it could run on cloud VMs? How tiny could the image become?
I would be interested in this if it enabled deterministic simulation testing for the Go programming languages. There have been some efforts in this area but with little success.
I use TinyGo, and it does that job well. Not sure if it’s necessary to mainline it.