Protocol buffer compiler plugin for Scala that generates case classes, parsers, and serializers.
ScalaPB is a protocol buffer compiler plugin for Scala that generates Scala case classes, parsers, and serializers from .proto files. It solves the problem of integrating Protocol Buffers into Scala projects by producing idiomatic Scala code that can coexist with Java-generated protocol buffer code, enabling gradual migration from Java implementations.
Scala developers working with Protocol Buffers who need type-safe serialization/deserialization, particularly those migrating from Java protocol buffers or building systems with gRPC, Scala.js, or SparkSQL integration.
Developers choose ScalaPB because it generates clean, idiomatic Scala case classes with features like functional lenses for easy updates, separate file generation for better incremental compilation, and seamless compatibility with both Java protocol buffers and modern Scala ecosystems including Scala.js and gRPC.
Protocol buffer compiler for Scala.
Generates Scala case classes that integrate naturally with Scala projects, with separate file generation for each top-level message to improve incremental compilation, as highlighted in the README.
Enables coexistence with Java-generated protocol buffer code, allowing easy migration from Java to Scala without breaking existing implementations, per the project philosophy.
Supports gRPC, Scala.js, SparkSQL, JSON conversion, and user-defined options out of the box, providing versatile functionality for various use cases.
Includes functional lenses for updating nested structures in a functional way, enhancing code maintainability and alignment with Scala best practices.
Primarily designed for sbt, requiring plugin installation and configuration in build.sbt, which adds complexity for projects using other build systems or preferring simpler setups.
The stable version supports Protobuf only up to 3.5.x, potentially missing newer features or bug fixes from later releases, as indicated in the version table.
Some operations, like parsing ASCII representations, delegate to the Java implementation, adding runtime overhead compared to native Scala solutions, as noted in the README.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.