rouzwawi / grpc-kotlin

gRPC with Kotlin Coroutines
https://gitter.im/gRPC-Kotlin/Lobby
Apache License 2.0
218 stars 22 forks source link

Multiplatform support for Kotlin/JS and Kotlin/Native #11

Open joelhandwell opened 5 years ago

joelhandwell commented 5 years ago

GRPC-web became GA. Coroutine is implemented in Kotlin/JS and Kotlin/Native Is there possibility to extract kotlin common code and implement for JVM/JS/Native to enable multi platform GRPC?

rouzwawi commented 5 years ago

This is an interesting idea. I have not tried either of those before so I can't say straight away if it would work or not. But I will spend some time experimenting with those combinations to see what works and what doesn't work. I'll push a branch when I got something to show.

Any help with researching this is highly appreciated!

wfhartford commented 5 years ago

We're early in our adoption of gRPC, but are planning on using gRPC-web at some point in the future. If we can do more of that in Kotlin rather than JS, I'd certainly call it a win.

RdeWilde commented 5 years ago

Can anyone get me going with this? I'm pretty new, but when I know how I have to setup the tooling/project, I'd like to add my efforts to this project

Radisovik commented 5 years ago

This project: https://github.com/cretz/pb-and-k generates the JS code.. and native..

Radisovik commented 5 years ago

I take that back... no native in pb-and-k... there is also kroto plus https://github.com/marcoferrer/kroto-plus which says that "In Progress Multiplatform Protobuf Messages w/ Kotlinx Serialization"

MitchDart commented 4 years ago

We are looking at using Kotlin MPP to share our business layer code base between our platforms. Since we use gRPC on all our platforms already this would be really nice to have. Any news on this?

TimOrtel commented 2 years ago

I have implemented such a project on my own. It currently supports JVM/Android and JS and allows you to make grpc calls from your common code. iOS is currently not supported, but it will be in the future.

Here is my project: GRPC Kotlin Multiplatform