2 ms·
Is this available with workers?
by neximo64 6y ago
Is this available with workers?
- kentonv 6y agoYou can proxy gRPC requests through workers, but currently Workers has no particular support for being a gRPC endpoint. To support it, someone would need to write a gRPC implementation targeting the Workers environment. Someday I'd love to have built-in support in the platform for speaking gRPC and Cap'n Proto†, so that the guest doesn't have to bring their own implementation. But, we don't have any firm plans at the moment. † The Worker Runtime is already built on Cap'n Proto so it's sort of a no-brainer to support. Bringing in gRPC will actually be much harder since the existing gRPC C++ implementation is very opinionated and not particularly easy to embed in an existing non-gRPC based program. (I'm the tech lead for Workers.)
- neximo64 6y agoIs it written is C++ I thought it was Rust. It would actually be great if it did support gRPC somehow. It's the first time i'm hearing about Cap'n Proto. It seems like a great project!
- kentonv 6y agoThe Workers Runtime is primarily written in C++, but has some components (like the HTML rewriter implementation) written in Rust. If we were starting the project from scratch today I would perhaps choose Rust. At the time we started (3.5 years ago), Rust wasn't as mature, and using V8 (which is C++) from Rust would have been particularly challenging.
- mwcampbell 6y agoI wonder how hard it would be to make the Tonic [1] Rust GRPC implementation target Workers. Maybe it's too tied to the Tokio runtime. [1]: https://github.com/hyperium/tonic https://github.com/hyperium/tonic