WebAssembly / WebAssembly/WASI
Additions to support gRPC
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 5.8k
- Forks
- 333
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 3
Description
Recently, I've been trying to use a popular .NET library, Grpc.Net, to make outbound gRPC connections using a port of System.Net.Http to wasi-http. I was able to get it to work, but had to hack a few things:
- Patched
wasmtime-wasi-httpto use HTTP/2 for all outgoing requests - Patched
System.Net.Httpto assume incoming responses use HTTP/2 - Patched
wasmtime-wasi-http'sis_forbidden_headerto allow all headers
Ideally, none of those hacks would be necessary, so I'd like to propose the following additions to the wasi-http spec:
- (Optional) Add documentation to clarify that the set of "forbidden" headers may vary among implementations. E.g. browsers might prohibit
TEheaders, butwasmtime-wasi-httpmight allow them (and indeed should allow them). - Add a method on
outgoing-requestto specify the HTTP version to use. The implementation should return an error if it can't guarantee that version will be used. - Add a method on
incoming-responseto retrieve the HTTP version of the response, e.g. as anoption<http-version>wherehttp-versionis an enum type andnonemeans the version is not known. This allows the client to detect if the server downgraded the connection to a lower version.
See also https://github.com/bytecodealliance/wasmtime/pull/7538 for further discussion.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the wasi-http specification and review the linked Wasmtime PR 7538 plus the referenced runtime-lab PR to understand the existing HTTP/2 and header behavior. Define the specification changes for forbidden headers, outgoing HTTP-version selection, and incoming-response version reporting; done means the proposal is resolved and the specification is updated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- grpc, wasm
- Domain
- api, networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100