-
-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
wasi-sdk 16.0 (new formula) #101491
wasi-sdk 16.0 (new formula) #101491
Conversation
WASI-SDK is a distribution of a custom libc (wasi-libc) with clang/LLVM to target the WASI (WebAssembly System Interface) platform. WASI is a definition of a POSIX-like set of syscalls for WebAssembly modules to use. A program compiled for the `wasm32-wasi` target can run in various WebAssembly-outside-the-browser environments (server-side, cloud/edge computing, command-line runtimes like Wasmtime, etc) and within browsers with the appropriate shims. This formula is a fairly thin wrapper around the custom Makefile in the `wasi-sdk` repository [1], which itself is a fairly thin wrapper around an LLVM/Clang build with specific options and defaults together with a build of the custom sysroot. [1] https://github.com/WebAssembly/wasi-sdk/
linux build failure. |
Updated with @danielnachun's Linux build fix, and upgraded to wasi-sdk 16.0 (recently released). Builds fine locally for me (in 19m49s on an M1 Air 16GB). |
Great! I or another maintainer can requeue this when one of our Regarding the question of whether this should use brewed In this case it sounds like the intention is essentially provide a custom sysroot for |
If it's just to provide a custom sysroot, I'd like to avoid shipping another LLVM distribution. We can always wrap our existing binaries (or potentially even the macOS-provided How far does the |
OK, that's good to know and I'm happy to look more into that option! I'll ask over in wasi-sdk about the best way to do this and if there are any downsides (e.g. custom tweaks to LLVM, but afaik they don't carry any patches). |
For reference, the custom Makefile they use is here: https://github.com/WebAssembly/wasi-sdk/blob/main/Makefile. From what I can see, for the main However, looking at It's also worth noting that the WebAssembly target should already be enabled in the |
WASI-SDK is a distribution of a custom libc (wasi-libc) with clang/LLVM
to target the WASI (WebAssembly System Interface) platform. WASI is a
definition of a POSIX-like set of syscalls for WebAssembly modules to
use. A program compiled for the
wasm32-wasi
target can run in variousWebAssembly-outside-the-browser environments (server-side, cloud/edge
computing, command-line runtimes like Wasmtime, etc) and within browsers
with the appropriate shims.
This formula is a fairly thin wrapper around the custom Makefile in the
wasi-sdk
repository [1], which itself is a fairly thin wrapper aroundan LLVM/Clang build with specific options and defaults together with a
build of the custom sysroot.
An alternative strategy might be to provide a formula that builds just
the sysroot (or downloads it as a tarball from the
wasi-sdk
releases),depends on Clang from the
clang
formula, and provides some shell-scriptwrappers that alter the default target and specify the sysroot. That is a bit
more work, however, and diverges a bit further from "upstream" (the SDK
as intended by its authors), so I wanted to get a reading on whether this
current approach might work first. Thanks!
[1] https://github.com/WebAssembly/wasi-sdk/
brew install --build-from-source <formula>
, where<formula>
is the name of the formula you're submitting?brew test <formula>
, where<formula>
is the name of the formula you're submitting?brew audit --strict <formula>
(after doingbrew install --build-from-source <formula>
)? If this is a new formula, does it passbrew audit --new <formula>
?