scalapb / ScalaPB

Protocol buffer compiler for Scala.
https://scalapb.github.io/
Apache License 2.0
1.31k stars 283 forks source link

Add support for gRPC-Web for Scala.Js #275

Closed mkotsbak closed 7 years ago

mkotsbak commented 7 years ago

See https://spatialos.improbable.io/games/grpc-web-moving-past-restjson-towards-type-safe-web-apis and https://github.com/improbable-eng/grpc-web

We could probably use a wrapper of https://github.com/improbable-eng/grpc-web/tree/master/ts and maybe some ideas from the TS generator: https://github.com/improbable-eng/ts-protoc-gen

thesamet commented 7 years ago

This probably wouldn't happen anytime soon unless a PR is submitted. If anyone is interested in working on it, please coordinate with me over the details before jumping in.

thesamet commented 7 years ago

Closing for the time being. This can be addressed as a custom protoc-bridge generator. @mkotsbak if you'd like to work on this and need help getting started feel free to let me know.

thesamet commented 6 years ago

@mkotsbak , in case this is still relevant, check out https://github.com/scalapb/scalapb-grpcweb

If you add scalapb-grpcweb to your Scala.js project you should be able to make web-grpc code using the client that is generated by ScalaPB's default gRPC code generator.

mkotsbak commented 6 years ago

Interesting, but it seems it is currently not type safe at all...

thesamet commented 6 years ago

@mkotsbak it is type safe. Can you explain?

mkotsbak commented 6 years ago

Sorry, it was just the protocol itself that looked generic, thanks :)