Has anyone here experimented with gRPC in Kotlin M...
# multiplatform
m
Has anyone here experimented with gRPC in Kotlin Multiplatform? I’m exploring how feasible it is to use gRPC for cross-platform communication in a KMP project, ideally with a shared client that works across Android, iOS, Desktop, and Web. I know gRPC-Kotlin works well on JVM, but support for Kotlin/Native and Kotlin/JS seems limited. Before I dive into writing custom protobuf or HTTP/2 wrappers, I wanted to ask: • Are there any known libraries or workarounds for gRPC on KMP (e.g. using Ktor + protobuf or any community ports)? • Has anyone managed to get gRPC working (even partially) on Kotlin/WASM? • Any best practices or gotchas you’ve learned while integrating gRPC in a multiplatform setup? Would really appreciate any references, code samples, or write-ups you’ve found helpful
c
There is #C072YJ3Q91V which is similar and multiplatform, but it's not actually gRPC, it's a new protocol.
m
Thank you for your message @CLOVIS, my issue issue with kotlinx-rpc is the fact that HTTP/2 support via Ktor for JS is not fully there yet
👍 1
Also I would really love to benefit from bi-directional streams, which krpc does not have either
o
AFAIK, the kotlinx-rpc team is currently working on KMP gRPC via kotlinx-rpc APIs 🙂 cc @Alexander Sysoev
thank you color 1
a
Yes we do, and Native implementation is working in our internal prototype. After some refinement we'll release it Don't have high hopes for web though, because grpc for web is in a bad place from google side
Also, we do have bi-directional streams in kRPC and there is web there (though only via web sockets for now)
m
I figured bi-directional would be via web-sockets yeah. Any plans on not relying on web sockets for that in the near future ? @Alexander Sysoev
a
In near no