kotlinx.rpc 0.9.1 Help

Ktor Server

Similarly to Server, you can use gRPC with Ktor:

fun Application.module() { grpc(port = PORT, configure = { /* ... */ }) { registerService<MyService> { MyServiceImpl() } } }

GrpcServer instance is created and bound to the Ktor Application lifetime. It can be accessed via application.attributes[GrpcServerKey].

Add the Ktor dependency to your project:

implementation("org.jetbrains.kotlinx:kotlinx-rpc-grpc-ktor-server:0.9.1")
Last modified: 21 July 2025