A 100% conformant Elixir library for Google Protocol Buffers with reliable encoding/decoding and code generation.
Protox is an Elixir library for Google Protocol Buffers that enables encoding and decoding of binary protobuf data, generating Elixir code from .proto files, and compiling schemas at build time. It solves the problem of integrating protobuf—a widely-used data interchange format—into Elixir applications with full spec conformance and reliability.
Elixir developers building systems that need to serialize/deserialize data with Protocol Buffers, especially those working with gRPC services, microservices, or data pipelines requiring efficient binary formats.
Developers choose Protox for its 100% conformance to Google's Protocol Buffers specification, strong emphasis on reliability through comprehensive testing, and seamless integration with Elixir's tooling and idioms like structs and iodata.
A reasonably fast, easy to use and 100% conformant Elixir library for Google Protocol Buffers (aka protobuf)
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Passes Google's official conformance test suite for both proto2 and proto3, ensuring spec-compliant encoding and decoding as highlighted in the README's testing section.
Generates regular Elixir structs from protobuf definitions via macros or mix tasks, making it seamless to use with Elixir's pattern matching and functional style.
Preserves unknown fields during decoding with a generated unknown_fields/1 function, enabling safe handling of schema evolution without data loss.
Returns iodata for encoding, which can be directly written to sockets or files without converting to binary, optimizing performance for network and storage operations.
The Any well-known type is only partially supported, requiring developers to manually pack and unpack embedded messages, adding complexity for dynamic use cases.
Requires protoc to be installed in the PATH at compile-time, which can be a hurdle in containerized or restricted build environments, as noted in the prerequisites.
Ignores most protobuf options beyond 'packed' and 'default', which might break expectations for teams relying on those options for cross-language consistency.