Releases: Kotlin/kotlinx-rpc
Release list
0.11.0-grpc-189
Migration from 0.11.0-grpc-188
Several things have changed in this release.
Please update your code accordingly.
Artifact names
org.jetbrains.kotlinx:kotlinx-rpc-protobuf-api was changed to org.jetbrains.kotlinx:kotlinx-rpc-protobuf-lite.
org.jetbrains.kotlinx:kotlinx-rpc-protobuf-core was changed to org.jetbrains.kotlinx:kotlinx-rpc-protobuf.
Nullability
All Protobuf messages are not nullable anymore. If the value was not set, the default will be returned. This aligns us with the core principles of Protobuf and explicit presence. However, to ensure Kotlin's nullability is still used, we provide a way to generate nullable getters.
Use rpc.protoc.buf.generate.optionalFieldOrNullGetters property for this.
Read more in the docs: https://kotlin.github.io/kotlinx-rpc/grpc-generated-code.html#grpc-optional-fields-and-clearing
Deprecated Apple Target
Apple Targets macosX64, tvosX64, and watchosX64 were removed from publication.
They are officially deprecated in Kotlin.
Other
Exception Message '<messageName>' is missing a required field: <fieldName>
is now ProtobufException instead of ProtobufDecodingException.
Changes
Features 🎉
- KRPC-238: Add proto and protoImport dependency configurations to Gradle plugin by @ai-agent-kxrpc[bot] in #679
- protoc-gen: Refactor optional field generation (KRPC-262) by @Jozott00 in #644
- gRPC: Enable iOS targets for grpc-server by @mlilienberg in #741
- gRPC: Add channel-level userAgent configuration to client by @mlilienberg in #742
Breaking Changes 🔴
- KRPC-598: Use RegularFileProperty/DirectoryProperty for buf task outputs by @ai-agent-kxrpc[bot] in #714
- Remove 2.1 Kotlin support and add 2.4 to docs by @Mr3zee in #724
- KRPC-607 Updated protobuf dependency graph to make it light by @Mr3zee in #738
Bug fixes 🐛
- Fixed kotlin master builds and for-ide deps + master compat by @Mr3zee in #723
- Fix compiler plugin compatibility with Kotlin 2.4.20 by @eminasljivic in #727
- Fix getValueArgumentVS by @Mr3zee in #732
- KRPC-609 Apple OS min values by @Mr3zee in #737
- gRPC: Race condition in requests; Request flow subscription fix by @Mr3zee in #740
Infra 🚧
Other Changes 🧹
- Use providers.gradleProperty for Gradle plugin property lookups by @nataphon-ktsystems in #726
- Remove depraceted targets + add androidNative to core and kRPC by @Mr3zee in #731
- KRPC-620 Protobuf codegen fixes for small bugs and code smells by @Mr3zee in #733
- Update grpc, protobuf, and buf versions, supported editions 2024 by @Mr3zee in #736
- Fix logger memory leak from per-instance logger names by @nickjn92 in #734
New Contributors
- @nataphon-ktsystems made their first contribution in #726
- @mlilienberg made their first contribution in #741
Full Changelog: 0.11.0-grpc-188...0.11.0-grpc-189
0.10.3
Bug fixes 🐛
- KRPC-560: Fix Native segfault in callables property itable dispatch (… by @eminasljivic in #728
Full Changelog: 0.10.2...0.10.3
0.11.0-grpc-188
Features 🎉
- KRPC-239 Add option to disable default protoc plugins by @Mr3zee in #649
- KRPC-254 Strip redundant enum value prefixes in protoc-gen by @Mr3zee in #650
- KRPC-264 Add DSL builder for ProtoConfig by @Mr3zee in #647
- KRPC-237: Add kotlinx.rpc.protoc Gradle property to enable protoc by @ai-agent-kxrpc[bot] in #653
- KRPC-533: Add SubclassOptInRequired to generated proto messages by @ai-agent-kxrpc[bot] in #656
Bug fixes 🐛
- KRPC-245 Fix eager configuration resolution warning in Gradle 9.0 by @Mr3zee in #651
- KRPC-275 Reject invalid UTF-8 in protobuf string extension fields by @Mr3zee in #648
- KRPC-268: Fix missing leading space in generated KDoc block comments by @ai-agent-kxrpc[bot] in #654
- KRPC-266 Move ProtobufException classes to public package by @ai-agent-kxrpc[bot] in #655
- KRPC-274: Reject bad tag field numbers and overlong varints in protobuf parser by @ai-agent-kxrpc[bot] in #657
- KRPC-548: Fix flaky CancellationTest.testCancelServer on native by @ai-agent-kxrpc[bot] in #660
- KRPC-549: Fix flaky GrpcTimeoutTest by increasing server delay margin by @ai-agent-kxrpc[bot] in #658
- KRPC-556: Add markerClass parameter to SubclassOptInRequired annotations by @ai-agent-kxrpc[bot] in #659
- KRPC-267: Add blank line before properties with block comments in protoc-gen by @ai-agent-kxrpc[bot] in #667
- KRPC-560: Fix Native segfault in callables property itable dispatch by @ai-agent-kxrpc[bot] in #668
- KRPC-554: Reject bad tag field numbers and overlong varints in native protobuf parser by @ai-agent-kxrpc[bot] in #669
- KRPC-558: Reject invalid UTF-8 in protobuf string fields on native by @ai-agent-kxrpc[bot] in #666
- KRPC-564: Reject >10-byte varint tags in protobuf parser by @ai-agent-kxrpc[bot] in #672
- KRPC-562: Use ephemeral ports in gRPC integration tests by @ai-agent-kxrpc[bot] in #670
- KRPC-561: Explicit grpc_channel_destroy before grpc_shutdown in NativeManagedChannel by @ai-agent-kxrpc[bot] in #671
- KRPC-252: Support type resolution in comments for protoc-gen by @ai-agent-kxrpc[bot] in #673
- KRPC-567: Fix race in ServerStreamContext.removeCall causing flaky test by @ai-agent-kxrpc[bot] in #681
- KRPC-597: Fix grpc native release race conditions by @ai-agent-kxrpc[bot] in #711
Documentation 📗
- KRPC-440: Clarify Android JVM support on platforms page by @ai-agent-kxrpc[bot] in #664
Infra 🚧
- KRPC-555: Port protobuf conformance tests to Kotlin/Native by @ai-agent-kxrpc[bot] in #661
- KRPC-565: Fix deprecated abiValidation enabled API for Kotlin >= 2.4.0 by @ai-agent-kxrpc[bot] in #676
- KRPC-569: Exclude native conformance test when native targets are unavailable by @ai-agent-kxrpc[bot] in #680
- Add use-develocity skill for build scan analysis by @Mr3zee in #683
- KRPC-571: Fix configuration cache misses on every local build by @ai-agent-kxrpc[bot] in #684
- KRPC-541: Align native shim versions with JVM catalog versions by @ai-agent-kxrpc[bot] in #678
- KRPC-577: Add .gradle-home to .gitignore for CI Docker cache by @ai-agent-kxrpc[bot] in #685
- KRPC-573: Remove hardcoded workers.max to scale with CPU cores by @ai-agent-kxrpc[bot] in #687
- KRPC-572: Enable local Gradle build cache alongside remote Develocity cache by @ai-agent-kxrpc[bot] in #689
- Add CI polling scripts for fix-issue skill by @Mr3zee in #690
- KRPC-574: Make BufGenerateTask cacheable by @ai-agent-kxrpc[bot] in #691
- KRPC-583: Reduce configuration phase overhead from settings plugins by @ai-agent-kxrpc[bot] in #692
- KRPC-580: Make GenerateBufYaml cacheable by @ai-agent-kxrpc[bot] in #700
- KRPC-595: Make BufGenerateTask actually cacheable (remove overlapping outputs) by @ai-agent-kxrpc[bot] in #704
- KRPC-596: Make protobuf conformance tasks cacheable by @ai-agent-kxrpc[bot] in #705
Other Changes 🧹
- KRPC-183 Add little-endian platform guard to native protobuf codec by @Mr3zee in #646
- Add fix-issue skill for autonomous YT issue resolution by @Mr3zee in #652
- KRPC-568: Skip testCancelServer on wasmWasi due to EAGAIN flakiness by @ai-agent-kxrpc[bot] in #677
- KRPC-584: Skip testClientCancellationCancelsStream on wasmWasi (flaky) by @Mr3zee in #693
- Varoius fixes to AI automation by @Mr3zee in #698
- Update commit requirements by @Mr3zee in #701
- fix bot-pr-title.yml and skill by @Mr3zee in #706
New Contributors
- @ai-agent-kxrpc[bot] made their first contribution in #653
Full Changelog: 0.11.0-grpc-187...0.11.0-grpc-188
0.11.0-grpc-187
0.11.0-grpc-186
This is a development preview release. APIs are subject to change and may break without notice in future versions.
Features 🎉
- pb: Use ByteString for bytes field instead of ByteArray by @Jozott00 in #621
- pb: Use static defaults for generated protobuf messages (KRPC-520) by @Jozott00 in #629
Bug fixes 🐛
- protoc-gen: fix star imports issue by @Mr3zee in #624
- Fix dokka CC issues and xcode on CI by @Mr3zee in #637
- KRPC-522 Build is broken for AGP projects by @Mr3zee in #636
Documentation 📗
- Add Gradle Plugin APIs to dokka by @Mr3zee in #628
- Add version notes to gRPC related APIs by @Mr3zee in #631
- Added imports to examples by @Mr3zee in #638
Infra 🚧
- Exporting issues to YT actions by @Mr3zee in #625
- Fix yt export by @Mr3zee in #626
- Add test retries plugin by @Mr3zee in #632
Full Changelog: 0.11.0-grpc-185...0.11.0-grpc-186
0.11.0-grpc-185 (dev preview)
This is a development preview release. APIs are subject to change and may break without notice in future versions.
Overview
This release introduces gRPC and Protocol Buffers support for kotlinx-rpc — a Kotlin Multiplatform implementation of gRPC with native protobuf serialization.
Try it now — generate a gRPC + Ktor project with the Ktor Project Generator.
Two approaches are supported:
- Schema-first — define services and messages in
.protofiles, and the Gradle plugin generates
idiomatic Kotlin code withsuspendfunctions,Flow-based streaming, and type-safe message builders.
See the gRPC configuration and
generated code docs. - Proto-less — write gRPC service interfaces directly in Kotlin with any serialization format
(kotlinx.serialization, customGrpcMarshaller, etc.), no.protofiles needed.
See the gRPC services docs.
Supported gRPC workflows:
- Unary RPC (request-response)
- Server streaming (server returns
Flow) - Client streaming (client sends
Flow) - Bidirectional streaming (both sides use
Flow) - Client and server interceptors
- TLS encryption and call credentials
- Call metadata (headers and trailers)
- Timeout, gzip compression, and keepalive support
- Ktor server integration
- Status exception handling
- proto-less gRPC services
Supported protobuf features:
- Proto2, proto3, and editions 2023 syntax
- All scalar types, enums, repeated fields, maps, oneof, nested messages
- Optional types and field presence tracking
- Extensions and groups (deprecated proto2 feature)
- Well-Known Types (bundled with the runtime)
- Unknown field propagation
- Full protobuf conformance test compliance
- Custom serialization via
kotlinx.serializationor customGrpcMarshaller
Supported platforms: JVM, Android, iOS, macOS, Linux.
Features 🎉
- gRPC initial implementation by @Mr3zee in #262
- Simplified gRPC Gradle configuration by @Mr3zee in #281
- Internal vs public codegen separation in gRPC (KRPC-162) by @Mr3zee in #285
- Reference types by @Mr3zee in #291
- Enum support by @Mr3zee in #294
- Optional types support (KRPC-142) by @Mr3zee in #295
- Repeated types (KRPC-143) by @Mr3zee in #328
- Nested types (KRPC-146) by @Mr3zee in #331
- OneOf types (KRPC-147) by @Mr3zee in #332
- Map types (KRPC-145) by @Mr3zee in #334
- Streaming support (unary, server, client, bidirectional) by @Mr3zee in #389
- gRPC Ktor server plugin by @Mr3zee in #393
- Native initial setup with C++/C/Kotlin interface by @Jozott00 in #400
- Wire format encoder and decoder by @Jozott00 in #412
- Proto generation for common (JVM and Native) by @Jozott00 in #415
- Common APIs for gRPC Services, Client, and Server by @Mr3zee in #419
- Field presence tracking, required field enforcing, and MessageCodec generation by @Jozott00 in #421
- Enum and oneof field generation by @Jozott00 in #426
- gRPC service generation in the compiler plugin by @Mr3zee in #428
- Sub-messages (recursive, nested, repeated) by @Jozott00 in #430
- Map support in protobuf codec by @Jozott00 in #434
- Exceptions and skip unknown fields by @Jozott00 in #437
- Native client calls support by @Jozott00 in #452
- iOS support (arm64, x64, simulatorArm64) by @Jozott00 in #458
- Linux support (arm64, x64) by @Jozott00 in #466
- Native server implementation by @Jozott00 in #469
- TLS credentials support (client and server) by @Jozott00 in #471
- Deprecated groups support by @Jozott00 in #472
- Enable all conformance tests by @Jozott00 in #473
- Client and server interceptor API by @Jozott00 in #484
Grpc.Methodannotation by @Mr3zee in #487- Comments support in generated code by @Mr3zee in #488
- Deprecated options support by @Mr3zee in #489
hashCode,equalsandtoStringfor generated messages by @Mr3zee in #490- Call metadata — headers and trailers by @Jozott00 in #517
- Timeout support by @Jozott00 in #525
- gzip compression support by @Jozott00 in #527
- Keepalive support by @Jozott00 in #528
- Call credentials by @Jozott00 in #530
- Add missing Apple targets by @Jozott00 in #533
- Full KMP support for the Gradle Plugin by @Mr3zee in #534
- Status exception API refactoring by @Jozott00 in #536
copymethod for generated messages by @Jozott00 in #539- Presence check support by @Jozott00 in #540
- Android source sets support by @Mr3zee in #542
- Unknown field propagation by @Jozott00 in #557
- Add
protoServiceNameto@Grpcannotation by @Jozott00 in #563 - Add
CodecConfigandcodecfunction by @Jozott00 in #565 ProtobufConfigwithdiscardUnknownFieldsoption by @Jozott00 in #569@GeneratedProtoMessageannotation and descriptor object by @Jozott00 in #572- Shortest unambiguous names in generated code by @Mr3zee in #573 and #575
- Platform options for the Gradle plugin by @Mr3zee in #574
- Well-known
Anyextension functions by @Jozott00 in #577 - Companion object generation moved to the compiler plugin by @Mr3zee in #586
- Extensions support by @Jozott00 in #587
- MARSHALLER and DESCRIPTOR objects for group messages by @Jozott00 in #589
- Message recursion limit (KRPC-192) by @Mr3zee in #594
descriptor.protogeneration by @Mr3zee in #600
Bug fixes 🐛
- Fix JPMS for gRPC by @Mr3zee in #390
- Fix generation run for imported files by @Mr3zee in #409
- Tasks caching by @Mr3zee in #410
- Protobuf conformance fixes by @Mr3zee in #454
- Fix service names in the generated descriptor by @Jozott00 in #457
- Fix
onReady()listener delegation — native server streaming fix (KRPC-220) by @Jozott00 in #477 - Fix 32-bit target APIs by @Jozott00 in #537
- Fix retry behavior for client RPC calls by @Jozott00 in #545
- Fix protobuf size calculation for repeated fields and maps by @fabiocarneiro in #566
- Add
grpc-marshallerdependency toprotobuf-core(KRPC-219) by @Mr3zee in #595 - AGP 9.0 support by @Mr3zee in #596
- Fix unknown fields in nested messages by @Jozott00 in #599
Documentation 📗
Infra 🚧
- Set up protobuf conformance tests by @Mr3zee in #447
- Pre-built gRPC library to avoid long compilation times by @Jozott00 in #461
- Splitting core module into client and server by @Jozott00 in #504
- Konan LLVM bundle resolution pinning by @Jozott00 in #579
- Gradle 9.4 support by @Mr3zee in https://git...
0.10.2
0.10.1
Features 🎉
- Kotlin 2.2.21 Support by @Mr3zee in #519
- Expose RpcServiceDescriptor.callables by @rnett in #516
- Added watchosDeviceArm64 and watchosArm32 targets to kRPC by @Mr3zee in #513
Bug fixes 🐛
- Fix one more ClosedSendChannelException by @Mr3zee in #514
- Fix scope initialization on the kRPC Client by @Mr3zee in #505
- Fix wording for the
perCallBufferSizedocs by @Mr3zee in #500
Infra 🚧
- Added readme safeguard by @Mr3zee in #515
- Fixed kRPC compatibility tests by @Mr3zee in #518
- Update compiler tests infra by @Mr3zee in #510
New Contributors
Full Changelog: 0.10.0...0.10.1
0.10.0
Overview
This release brings a lot of changes, work:
- Kotlin 2.2.20 and 2.2.10 support
- kRPC: Backpressure
To read about the backpressure feature,
see the updated kRPC Configuration page.
Breaking Changes 🔴
Features 🎉
- Kotlin 2.2.20 by @Mr3zee in #478
- Kotlin 2.2.10 by @Mr3zee in #456
- kRPC: Backpressure by @Mr3zee in #462
- Add support for Wasm/Wasi to krpc #465 by @Mr3zee in #480
Bug fixes 🐛
- Add collect once check for client streams by @Mr3zee in #431
- Fix diagnostic rendering for compiler plugins checkers by @Mr3zee in #432
- fix wrong unchecked null cast (potential NPE) by @y9maly in #445
Documentation 📗
- Docs for gRPC with Ktor by @Mr3zee in #394
- Add a doc for KMP source sets with gRPC by @Mr3zee in #405
- Update strict-mode.topic by @BierDav in #440
- Update grpc-configuration.topic by @flockbastian in #450
- Added docs for release by @Mr3zee in #482
- Fix typo in docs grpc-configuration.topic by @sebaslogen in #495
Infra 🚧
- Fix docs yaml and signing tasks by @Mr3zee in #404
- Fix jdk resolution problems on CI by @Mr3zee in #406
- Use compat-patrouille for compatibility settings by @Mr3zee in #438
Other Changes 🧹
- Fix how we create 'publishMavenArtifact' tasks by @Mr3zee in #416
- Update grpc-sample app by @Mr3zee in #425
- Fix LV and signing by @Mr3zee in #424
- Update ktor-all-platforms-app sample to sync service creation by @Mr3zee in #455
- Added Ktor closure tests and Cancellation tests, + minor fixes by @Mr3zee in #479
- Fix flaky tests by @Mr3zee in #481
New Contributors
- @flockbastian made their first contribution in #450
- @y9maly made their first contribution in #445
- @sebaslogen made their first contribution in #495
Full Changelog: 0.9.1...0.10.0
0.9.1
Important fix, not included in any PR
We fixed a problem in 0.8.1 with unresolved Apple and Windows artifacts.
The same problem affected initial 0.9.0 release, that's why we've published 0.9.1 and skipped 0.9.0.
Bug fixes 🐛
- Support nullable contextual serializers by @yakivy in #392
- Make WS plugin installation for Ktor server more flexible by @Mr3zee in #398
- Make KtorRpcClient inherit KrpcClient by @Mr3zee in #396
Documentation 📗
Infra 🚧
Other Changes 🧹
Full Changelog: 0.8.1...0.9.0