finds.dev← search

// the find

cloudwu/sproto

★ 981 · C · MIT · updated Dec 2025

Yet another protocol library like google protocol buffers , but simple and fast.

Sproto is a binary serialization library written in C, designed primarily as a Protocol Buffers alternative for Lua-based game servers (it's from the author of the Skynet game server framework). The schema language is cleaner than proto2/proto3 and the Lua API is first-class; C bindings are callback-based and workable but secondary. Benchmark numbers are from 2014-era hardware, so take them as directional rather than current.

The schema language is genuinely simpler than protobuf — no required/optional noise, nested types are readable, and the fixed-point integer support (e.g. `integer(2)` for hundredths) is a practical touch that protobuf lacks. The wire format is documented with byte-level worked examples in the README itself, which makes debugging protocol issues tractable without external tooling. The 0-packing algorithm (Cap'n Proto-inspired) is straightforward to implement in other languages and the worst-case overhead is bounded and stated explicitly. The entire library is a handful of C files with no dependencies, so embedding it is trivial.

This is fundamentally a Lua/C game server library that has aged into maintenance mode — the last real activity is sporadic fixes, not development, and the ecosystem of bindings listed in the wiki is largely unmaintained forks. There is no schema evolution story beyond 'unknown tags are ignored', so adding a field is safe but removing or renumbering one silently corrupts old clients. The C API is callback-based rather than code-generated, which means you write a lot of glue by hand and there is no generated struct approach like protobuf or flatbuffers. If your stack is not Lua + C, you are largely on your own — the community bindings for Python, Go, etc. are thin and unverified.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →