-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is Browser supported, or just Node? #202
Comments
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 |
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?
The text was updated successfully, but these errors were encountered: