Repository navigation
Initial support for webp2 - #883
Conversation
|
What happened here? Did they just time out or something? |
|
ah probably today's github actions incident, I restarted |
|
Overall looks good yeah. Main comment is I'd recommend going over all the webp2-specific locations and removing the webp2-specific logic where possible. My hope is that only where things bottom out in wasip2/wasip3/webp2 differing implementations is where the unsupported log would be necessary as opposed to each layer of functions (e.g. |
Many logs of unsupported functions have been removed since they will fall back on deeper functions that will also fail. Additionally, there are now fewer webp2-specific exceptions in the build.
I didn't know they were supposed to be atomic.
|
@alexcrichton Ready for another review. I went over every single changed file again and tried to make sure that everything was delegating to existing implementations as much as possible. Much of the diff is now adding webp2 to existing ifdefs. And I tried to clean up unnecessary includes that were left over from previous updates. Some includes were alphabetized but hopefully there shouldn't be any lingering useless ones. I will fix up the dumb CI mistakes in the meantime. |
alexcrichton
left a comment
There was a problem hiding this comment.
Ok I believe I've now covered and looked at everything in this PR now, thanks for your patience! My main comment here below is about buffering and stdio -- you commented above as well and I think it'd be appropriate to flag stdout/stderr as a tty. In my experience that primarily controls buffering within libc and while it's used as a signal for things like ansi codes IMO that's best resolved on a per-library basis since it's not the most common thing in the world. I'd ideally like to remove p2-specific buffering altogether (trading that for worse outputs in some situations) but would want to get your thoughts on this too. I'm ok to defer to what you would prefer, but I think the least surprising thing in terms of compat is going to be removing buffering vs keeping it. One possible nice benefit of removing buffering would mean that sprinkled modifications to the top-half I think would no longer be necessary, but I'm not certain of that.
This avoids assuming that all fd's we fflush are stdio streams. That's true for now but very likely won't be in the future.
WIP. Adds support for wasm32-webp2, to be later repackaged in https://github.com/WebAssembly/component-sdk. - [x] Remove dependence on custom branch of wasi-libc - [x] Depend on patched version of wasm-component-ld (getter/setter support) See also: - WebAssembly/wasi-libc#883 - bytecodealliance/wasm-component-ld#131
Adds initial support for a
webp2target. Filesystem and socket stuff is all stubbed out and should trap. Time and randomness functionality has been implemented using web APIs. Absolutely none of this has yet been tested in any meaningful way, and I'm quite confident that some stuff must be wildly incomplete. But if you're interested, you can take a look and see if I'm doing things in a generally reasonable way.See also: