-
Notifications
You must be signed in to change notification settings - Fork 229
Update bindings generation and bump WASIP3 to newest RC #719
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
Update bindings generation and bump WASIP3 to newest RC #719
Conversation
|
Thanks! Will double-check once CI is passing but otherwise r=me |
| typedef monotonic_clock_mark_t monotonic_clock_instant_t; | ||
| #else | ||
| # error "Unknown WASI version" | ||
| #endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The wasi_clocks_system_clock_instant_t.seconds is now int64_t (signed) rather than uint64_t
We'll need to treat p2 and p3 differently L44-47 right? timespec->tv_sec is time_t which is typically long.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like time_t is long long in wasi-libc, so I think there's actually some missing checks for overflow on wasip2
|
The tests pass with trunk |
| uses: bytecodealliance/actions/wasmtime/setup@v1 | ||
| with: | ||
| version: "38.0.3" | ||
| version: "40.0.2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this using dev I think could get things working today
| return !__builtin_mul_overflow(timespec->tv_sec, NSEC_PER_SEC, timestamp) && | ||
| !__builtin_add_overflow(*timestamp, timespec->tv_nsec, timestamp); | ||
| #elif defined(__wasip2__) || defined(__wasip3__) | ||
| #elif defined(__wasip2__) | defined(__wasip3__) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh does a lone | work in C? TIL...
|
I feel that the effort on getting a most up to date toolchain set up increases with this merge waiting for wasmtime-0.42 (four weeks from now, IIRC). This patch requires a straightforward modification on the already merged p3 clock implementation, but it also requires some build process adaptions (adding So, if there is any reasonable way to keep fewer p3 development branches active/waiting, this would help me a lot to combine everything in one place. But you know best on how to weigh this against any upcoming release of wasi-sdk which should still target the old p3 version, because the just released wasmtime still implements the old one. |
|
wasmtime 41 is out and I see @alexcrichton is the best and already backported the latest wasip3 rc: bytecodealliance/wasmtime@309028e |
The bindings generator currently uses the now-archived WebAssembly/wasi-cli repo to download the wit files for wasip2 and wasip3. This repo is no longer being updated, and there is now a wasip3 release candidate that does not have wit files released in that repo.
This PR:
wkg.