Change whence_t constant values to match pre-existing agreed-upon values. by kripken · Pull Request #106 · WebAssembly/WASI

yoshuawuyts pushed a commit to yoshuawuyts/WASI that referenced this pull request

@dicej

* add draft of wasi:http@0.3.0

This adds a `wit-0.3.0-draft` directory so we can iterate on the 0.3.0 design in
parallel with the 0.2.x work.  It's currently an exact copy of the `wit`
directory except for the `handler.wit`, `proxy.wit`, and `types.wit` files,
which have been updated to assume Component Model async, `stream`s, and
`future`s are available.

High level description:

- The incoming-handler and outgoing-handler interfaces have been combined into a single handler interface.
- The incoming- and outgoing- variations of request, response, and body have been combined.
- I've added a option<request-options> field to request since it would be awkward to leave it as a parameter of handler.handle (e.g. what would it mean to receive such a parameter for an incoming request or for a request passed from one component to the other without any use of the network?).
- I've added a request-options-error (analogous to header-error) to distinguish between unsupported fields and immutable handles.
- We use `stream<u8>` and `future<trailers>` where appropriate.

You can find a working implementation of this API, plus several examples, in the
[isyswasfa](https://github.com/dicej/isyswasfa) repository.

Signed-off-by: Joel Dice <joel.dice@fermyon.com>

* regenerate markdown files

Signed-off-by: Joel Dice <joel.dice@fermyon.com>

---------

Signed-off-by: Joel Dice <joel.dice@fermyon.com>