protokt 1.0.0-beta.10
Codec architecture
- Pluggable codec backends: serialization and deserialization are now backed by swappable codec implementations.
ProtobufJavaCodec,KotlinxIoCodec, andProtoktCodeccan be selected per use case.OptimalJvmCodecandOptimalKmpCodecpick the best combination automatically. (#466, #467, #476) - Pure Kotlin codec (
ProtoktCodec): a new zero-dependency codec for byte-array serialization and deserialization, shipping withprotokt-runtime. No protobuf-java or kotlinx-io dependency required. (#466, #467) - Module split for dependency isolation: runtime implementations split across
protokt-runtime,protokt-runtime-protobuf-java,protokt-runtime-kotlinx-io, andprotokt-runtime-persistent-collectionsso consumers only pull in the dependencies they actually use. (#476)
Performance
- Lazily converted wrapper types: custom wrapper types (e.g.
UUID,Instant) are now backed byLazyReference, deferring conversion from wire form until first access. Pass-through workloads skip conversion entirely. Wrapped elements ofrepeatedandmapfields are also lazily converted on access rather than eagerly during deserialization, andcopy {}avoids converting wrapped fields unnecessarily. (#457, #483) - Persistent collection support:
repeatedandmapfields can optionally usekotlinx-collections-immutablepersistent data structures viaPersistentCollectionFactory, enabling O(log n) structural sharing oncopy {}append instead of O(n) full copies. Large-collection append is 29-99x faster. (#455) - Lazy strings: string fields now use
LazyReferencecaching, deferringBytes-to-Stringdecoding until field access. Includes an optimizedutf8Lengthimplementation using fast-scan ASCII loops and branch-free byte counting. (#468, #483)
Platform support
Bug fixes and maintenance
- Get Android test fixtures working with new variant-based tool resolution (#449)
- Fix configuration timing resolution warning (#452)
- Fix JS gRPC tests and improve error handling (#465)
- Run protovalidate conformance tests in CI again (#451)
- Clean up task linking (#464)
Benchmarks
Comprehensive JMH benchmarks added across all codec implementations, protobuf-java, and Wire, covering deserialization, serialization, pass-through, mutate-and-serialize, copy/append, and string-heavy workloads. (#468, #483)
Dependency updates
Libraries:
- Kotlin 2.2.0 -> 2.3.10
- kotlinx-serialization-json 1.9.0 -> 1.10.0
- binary-compatibility-validator 0.17.0 -> 0.18.1
- grpc-java 1.73.0 -> 1.79.0
- grpc-kotlin 1.4.3 -> 1.5.0
- Wire 5.4.0 -> 5.5.0
- protovalidate 0.12.0 -> 1.0.0
- proto-google-common-protos 2.57.0 -> 2.66.1
- JUnit Jupiter 5.13.4 -> 6.0.3
- CEL 0.11.0 -> 0.12.0
- kotlin-logging 7.0.13 -> 8.0.01
- jackson-module-kotlin 2.20.0 -> 2.21.1
- classgraph 4.8.180 -> 4.8.181
- spotless 7.0.4 -> 8.0.0
- gradle-maven-publish-plugin 0.34.0 -> 0.36.0
- gradle-plugin-publish 1.3.1 -> 2.0.0
- buildconfig 5.6.5 -> 5.6.7
- de.undercouch.download 5.6.0 -> 5.7.0
Build tools:
- Gradle 9.2.1 -> 9.3.1
- actions/setup-java 4 -> 5
- actions/checkout 4 -> 6
- actions/download-artifact 4 -> 8
- actions/upload-artifact 4 -> 7