Skip to content

Update wasi-sdk for wasm32-webp2 - #662

Merged
alexcrichton merged 14 commits into
WebAssembly:mainfrom
bvisness:webp2
Nov 11, 2026
Merged

alexcrichton merged 14 commits into
WebAssembly:mainfrom
bvisness:webp2

Conversation

@bvisness

@bvisness bvisness commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

WIP. Adds support for wasm32-webp2, to be later repackaged in https://github.com/WebAssembly/component-sdk.

  • Remove dependence on custom branch of wasi-libc
  • Depend on patched version of wasm-component-ld (getter/setter support)

See also:

@alexcrichton

Copy link
Copy Markdown
Collaborator

lgtm 👍

@bvisness
bvisness marked this pull request as ready for review October 13, 2026 19:32
@bvisness

bvisness commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor Author

I think this is overall ready for review. We should merge WebAssembly/wasi-libc#883 first though.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this PR gets closer to merging, could you be sure to send this *.patch and the below one upstream to LLVM and then rename these *.patch files to the llvm-pr-NNNN.patch equivalent?

defined(__DragonFly__)
# define _LIBCPP_USING_ARC4_RANDOM
-# elif defined(__wasi__) || defined(__EMSCRIPTEN__)
+# elif defined(__wasi__) || defined(__webp2__) || defined(__EMSCRIPTEN__)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't the webp2 target also always define __wasi__?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I chose not to do that because lots of code that checks for __wasi__ assumes the existence of WASI APIs, which we don't support on the web. So at least for now it doesn't use __wasi__, and I didn't add a comparable __web__ define since that seemed presumptuous at this stage.

alexcrichton added a commit to WebAssembly/wasi-libc that referenced this pull request Nov 9, 2026
Adds initial support for a `webp2` target. 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.

- [x] Figure out exec model stuff (reactor + _initialize hook)
- [x] Depend on actual release of wit-bindgen with accessor support
- [x] Tests!

See also:
- WebAssembly/wasi-sdk#662
- bytecodealliance/wasm-component-ld#131

---------

Co-authored-by: Alex Crichton <alex@alexcrichton.com>
@bvisness

Copy link
Copy Markdown
Contributor Author

Seems we have problems with CI because GitHub retired the macos-14 runners: https://github.blog/changelog/2026-10-01-github-actions-macos-14-runner-image-retirement/

I think I'll take a crack at fixing that in a separate PR and then rebasing this one.

@alexcrichton

Copy link
Copy Markdown
Collaborator

Oh CI takes forever so feel free to just throw it in this PR, it should just be bumping some versions in the CI config, no major issues expected

@alexcrichton
alexcrichton merged commit 0f85552 into WebAssembly:main Nov 11, 2026
21 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants