-
Notifications
You must be signed in to change notification settings - Fork 1k
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
gRPC-Web wasm browser client implementation in tonic-web #645
Comments
@titanous Is your implementation meant to replace https://github.com/grpc/grpc-web and https://github.com/improbable-eng/grpc-web? |
Only for Rust use, I don’t plan to export JS bindings. |
Is it suitable to use the grpc-web-client prototype crate as an actual grpc web client today? I notice it points against branches of tonic that no longer exist. |
It should work if you point it at the lastest tonic master. I am planning to send a PR that will integrate it into this repository soon. |
Any way to get this effort going again? |
I too would like to see this implemented. I'm working on a full-stack rust app and using gRPC would be fantastic. |
What's new? |
I have only seen this alternative: https://github.com/devashishdxt/tonic-web-wasm-client |
Feature Request
Crates
tonic-web
Motivation
Now that gRPC-Web support has been implemented and merged by @alce (#455), I think it's worth considering adding support for a gRPC-Web client implementation that works in browsers. This will allow users that are writing frontend apps in Rust to use gRPC natively via tonic without leaving the Rust ecosystem.
Proposal
I propose adding a new
Client
type totonic-web
that implementsGrpcService
using the browser Fetch API viajs-sys
/wasm-bindgen
. I have prototyped this implementation at https://github.com/titanous/grpc-web-client and am happy to work on a PR to merge in the implementation.This would be behind a feature flag that is not enabled by default so that it can be used in projects that use wasm-bindgen to target browsers.
Alternatives
The alternative is to keep this implementation as a separate third-party crate, but I think that it would be better for the ecosystem to have an easy to find implementation available in tonic.
The text was updated successfully, but these errors were encountered: