Kotlin
A concise multiplatform language developed by JetBrains
KotlinX RPC 0.9.1 Is Now Available
This release of kotlinx.rpc introduces significant improvements aimed at the long-term stability, maintenance, and evolution of the library. We’ve focused on decoupling dependencies and simplifying the API to create a more robust and user-friendly experience.
Ready to get started? Build your next project with the interactive generator at start.ktor.io, or check out our samples on GitHub. Your feedback and contributions are always welcome!
🔗 Get Started With KotlinX RPC | 📢 Join the Community on Slack in #kotlinx-rpc
Decoupling from KotlinX Serialization
The kotlinx-rpc-core
module is no longer coupled with kotlinx.serialization. This major change allows you to use kotlinx.rpc without kotlinx.serialiation in a gRPC setup. The responsibility for serializing data is now handled by the implementer of the RpcClient
and RpcServer
interfaces. See the incompatible API changes guide for more information.
Simplified lifetime management
We’ve simplified resource management and reduced the potential for common mistakes. The @Rpc
generated implementations, RpcClient
, and RpcServer
, no longer extend CoroutineScope
. Consequently, the CoroutineScope
parameter has been removed from the RpcServer.registerService
factory method, streamlining the overall API.
Strict mode is now the default
Strict mode, which was introduced in version 0.5.0 to simplify the APIs and guarantee correctness, is now enabled by default, and it cannot be disabled in versions after 0.8.0. For a detailed guide on adapting your project, please check out the Strict mode documentation.
Changelog
Features
- Serialization decoupling by Mr3zee in kotlinx-rpc/354
- Update Kotlin to 2.2.0 by Mr3zee in kotlinx-rpc/359
Breaking changes
- [Meta] Strict mode, deprecations, lifetime by Mr3zee in kotlinx-rpc/353
Improvements and fixes
- Support nullable contextual serializers by @yakivy in #392
- Make WebSocket installation for Ktor server more flexible by @Mr3zee in #398
- Make KtorRpcClient inherit KrpcClient by @Mr3zee in #396
- Generate Platform status labels in API documentation by Mr3zee in kotlinx-rpc/356
- Generate API documentation with Dokka by Mr3zee in kotlinx-rpc/357
- Include changelog on website by Mr3zee in kotlinx-rpc/358
- Add onboarding guide by Mr3zee in kotlinx-rpc/363
- Fix compilation for standalone k2 module by Mr3zee in kotlinx-rpc/350
- Update README.md to use non-suspend flows by brokenhappy in kotlinx-rpc/342
- Propagate transport coroutine context by @yakivy in #374
- Ensure KrpcClient is created only once by @Mr3zee in #385
- Grpc sample update by @Mr3zee in #371
Thank you!
We want to say a huge thank-you to our community for all the valuable contributions and feedback!
A special shout-out goes to @brokenhappy, @BierDav, and @yakivy for their first contributions to KotlinX RPC.
🔗 Get Started With KotlinX RPC | 📢 Join the Community on Slack in #kotlinx-rpc