Conversation
|
Thanks for working on this. I'm not sure if this crate is the right place to add support for this. Anyway, can you please add some tests? |
|
I wasn’t sure either, but started exploring it and ended up completing it. No pressure, totally understand if it’s not the right fit.I'll add tests running on |
This change enables calling unary RPCs and response streaming from binaries built for the `wasm32-wasip2` target.
tonic@0.14.0 requires rustc 1.86
eecda37 to
24d06a9
Compare
|
The tests fit nicely, essentially I just replaced an annotation. The whole change that enables |
|
@tomasol Can a standard gRPC client run directly in a WASI environment? I'm a little confused about why gRPC-Web would be necessary. I was under the impression that gRPC-Web is a workaround specifically for web browsers. Does WASI's networking model have similar constraints that prevent a standard gRPC implementation from working? |
|
gRPC proper isn't currently supported in WASI, see this issue for context. While it's technically possible to send gRPC messages over HTTP/1, that requires non-standard server configs. Even once full support lands in WASI runtimes, a gRPC-Web library could still be useful. For example, a WASI app might want to target gRPC-Web to integrate with existing infrastructure (e.g., sharing a port already exposed for gRPC-Web traffic). |
This change enables calling unary RPCs and response streaming from binaries built for the
wasm32-wasip2target.