A Clojure library for idiomatic, type-safe interaction with Protocol Buffers 3, treating protobuf POJOs as native Clojure maps.
Pronto is a Clojure library that provides idiomatic, type-safe wrappers for Protocol Buffers 3, enabling developers to interact with protobuf-generated Java classes as if they were native Clojure maps. It solves the problem of cumbersome Java interop when working with protobuf data in Clojure, offering seamless integration while enforcing schema correctness and runtime type safety.
Clojure developers who need to work with Protocol Buffers in data-intensive applications, such as microservices, data pipelines, or systems using gRPC, and want to maintain Clojure's functional, data-driven programming style.
Developers choose Pronto because it combines the performance and schema guarantees of Protocol Buffers with Clojure's expressive map APIs, offering fail-fast validation, minimal overhead, and support for advanced protobuf features like one-ofs, well-known types, and custom encoders—all without sacrificing idiomatic Clojure semantics.
Clojure support for protocol buffers
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Wraps protoc-generated Java classes into proto-maps that behave like native Clojure maps, supporting assoc, update, and most map semantics for seamless data-driven programming.
Enforces schema correctness by failing-fast on invalid operations, such as associng non-existent keys or wrong value types, catching errors immediately during development.
Generates thin wrapper classes and avoids reflection, ensuring low CPU and memory usage while maintaining protobuf serialization efficiency, as highlighted in the performance documentation.
Supports one-of fields, well-known type inlining for nullable scalars, and custom encoders for type conversions, preserving full protobuf semantics like unknown field handling.
Dissoc is unsupported, and getting non-existent keys throws errors instead of returning nil, which breaks Clojure's dynamic map conventions and can be restrictive for flexible data workflows.
Requires defining mappers for each protobuf class and managing nested structures, leading to verbose code for complex schemas, as noted in the 'Pro tip' section about balancing proto-map creation.
Relies on protoc-generated Java classes and version compatibility (minimal Java protobuf 3.15.0), introducing potential interop issues and extra steps for Clojure-native teams.