Open pusolito opened 1 year ago
Serialization does work in the browser - the conformance tests aren't run there, but there are various unit tests that execute in headless Firefox in CI.
I haven't tried running grpc-js
in the browser but the runtime in this project should work anywhere it works.
Looks like grpc-js is not meant to work in the browser. Would you consider adding grpc-web support to enable this use case.
Do you have an idea of what support for grpc-web would look like?
It sounds like the folks on the gRPC-web project might be able to assist and they could better answer your questions about support. My guess is it wouldn't be too much different than the work you already did for the node version in the grpc-lite library.
Looks standard - we'd need to support generating a browser-compatible stub: https://github.com/grpc/grpc-web/blob/master/net/grpc/gateway/examples/echo/tutorial.md#generate-protobuf-messages-and-service-client-stub
We're able to invoke the grpc-kotlin generator for JVM directly since it's written in Kotlin. It may be possible to invoke the grpc-web plugin via forking a process and mangling package names the same way we do for grpc-kotlin.
Checking in to see if there is a planned timeline to incorporate this into the library.
There is no planned timeline. Feel welcome to take a stab at an implementation, or I'll comment here if I begin significant work I wouldn't want to duplicate.
I'm curious if this will work in the browser as well. I tried a simple app and get a lot of errors related to missing modules. My guess is that it is due to grpc-js really being grpc-node in that it seems intended only for Node and not Browser. Can you confirm if Browsers are expected to work?