Solod — a subset of Go that spits out readable C

What is Solod?
Solod (So) is a tiny transpiler that takes a strict subset of Go and emits C11. Write Go code, get human-readable C headers and .c files. It has been reported that the project aims for zero runtime — no garbage collector, no hidden allocations — and that most values are stack-allocated by default with heap usage made explicit via the So standard library.
Features and trade-offs
So keeps a familiar Go surface: structs, methods, interfaces, slices, multiple returns and defer are supported. But there are limits — no channels, no goroutines, no closures, and no generics — deliberately trading concurrency sugar for C-like predictability. The repo claims native, source-level C interop (call C from So and So from C) with no cgo overhead; allegedly this is a big selling point for folks who need tight ABI control and tiny binaries. Why use it? For systems work where you want Go's ergonomics and type safety without a garbage collector, it can feel like a breath of fresh air.
Try it and be cautious
Tooling is familiar: the So toolchain is installed with go install and integrates with Go modules and go test, so editors and linters mostly keep working. Examples in the repo show how a small Go program becomes a .h/.c pair you can compile with any C compiler. But Solod is new and rough around the edges; expect gaps, caveats, and ongoing design trade-offs as the project matures. Interested engineers should experiment in a sandbox — it's an intriguing addition to the current trend of alternatives to traditional runtimes (think Zig, Rust, and transpilers), not a drop-in replacement for full Go.
Sources: github.com/solod-dev, Hacker News
Comments