HeadlinesBriefing favicon HeadlinesBriefing.com

Solod: Go-to-C Compiler for Systems Programming

Hacker News •
×

Solod (So) is a strict subset of Go that translates to regular C, offering systems programmers the syntax and tooling of Go with the performance and control of C. The project eliminates garbage collection and reference counting, providing zero runtime overhead while maintaining source-level interoperability between Go and C.

Unlike traditional Go, Solod requires manual memory management with stack allocation as default and heap allocation opt-in through the standard library. The tool supports structs, methods, interfaces, slices, multiple returns, and defer, but deliberately excludes channels, goroutines, closures, and generics to maintain simplicity. Developers can use existing Go tooling including syntax highlighting, LSP, linting, and go test without modification.

Solod generates C11 code compatible with GCC and Clang, leveraging several compiler extensions including binary literals, statement expressions, and __attribute__((constructor)) for package initialization. The project includes a growing standard library, online playground, and hands-on examples. While still new and described as "rough around the edges," Solod demonstrates competitive performance with regular Go code and excels at C interop scenarios where traditional CGO introduces overhead.