Analysis updated 2026-05-18
Call a fast routine written in Zig, Rust, or C from a Go program without CGO overhead
Cross-compile a Go project that depends on compiled native code for multiple platforms
Replace a CGO-based interop layer with a lighter, CGO-free alternative
| romance-dev/speedboost | electricalgorithm/protomq | atasoya/carbonara | |
|---|---|---|---|
| Stars | 27 | 31 | 19 |
| Language | Zig | Zig | Zig |
| Setup difficulty | moderate | moderate | easy |
| Complexity | 3/5 | 4/5 | 2/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires installing Zig 0.16 to build the example shared library.
speedboost is a Go library that lets you call functions written in other languages, specifically libraries compiled to a format called the C ABI (Application Binary Interface), a common standard that allows different programming languages to interoperate, without using CGO. CGO is the built-in Go mechanism for calling C code, but it adds overhead and complexity. The problem this solves is that Go developers sometimes want to use fast, compiled code written in C, Zig, or Rust, but CGO introduces build friction and performance costs. speedboost loads a shared library file (a compiled binary that exports functions) at runtime, looks up a specific function by name, describes its parameter and return types, and calls it directly. The README claims this approach has less overhead than Purego, a similar CGO-free interop library. In the provided example, a simple math function (multiply) is written in Zig, a systems programming language, compiled into a shared library, embedded directly into the Go binary, and then called from Go using speedboost at runtime. The whole thing runs without CGO enabled, making cross-platform compilation straightforward. This pattern would be useful any time you want to add a performance-critical routine written in another language to a Go application without the usual C interop overhead.
A Go library for calling functions from C, Zig, or Rust compiled shared libraries without using CGO.
Mainly Zig. The stack also includes Go, Zig, C ABI.
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.