-
Notifications
You must be signed in to change notification settings - Fork 301
Change whence_t constant values to match pre-existing agreed-upon values. #106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
I agree. I don't see any reason to diverge from the status quo and the fact the an extensively ported codebase like SDL relies on these values is a good sign that they don't generally vary between platforms. We should prepare a parallel patch from wasi-libc. |
|
No objection from me. The current order comes from cloudlibc, so wasi-libc isn't the only one here. However, I don't feel it's important enough for wasi-libc to take a stand on. For completeness, I have now filed a bug in SDL. (For musl's part, it explicitly assumes it's running on Linux.) As a procedural matter, this change should be made to the "ephemeral" tree, rather than the "unstable" tree. We make ABI-breaking changes to "ephemeral" and occasionally promote them to "unstable" with version bumps. We can update wasi-libc when we do the version bump. |
… values." This reverts commit 2e99f40.
|
Thanks, changed to ephemeral. |
|
Cloudabi is actually even more strange and uses 1, 2, 3. No zero at all. Odd. |
Update wasi to use the new whence constants, see WebAssembly/WASI#106
|
No objections and this is a minor change, so let's merge! |
Update wasi to use the new whence constants, see WebAssembly/WASI#106
…ues. (WebAssembly#106) * Change whence_t constant values to match existing agreed-upon values.
…ues. (WebAssembly#106) * Change whence_t constant values to match existing agreed-upon values.
* 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>
…ues. (WebAssembly#106) * Change whence_t constant values to match existing agreed-upon values.
Update to v0.2.2
Background: #103
This reorders the whence constants to match existing values, shared by things like musl and SDL.
Without this, using a libc with the old wasi constants will not work in SDL, which assumes those values are fixed. As SDL is a stable and portable codebase, apparently these constants are consistent in practice across different platforms.
We only noticed the SDL issue by chance, so it's very possible there are more such issues out there. By changing the constants we'll minimize code porting issues in the long term. However, in the short term existing wasi runtimes and binaries may disagree.