-
Notifications
You must be signed in to change notification settings - Fork 29
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
Lack of support for C dependencies (wasi-sdk?) #109
Comments
I agree this would be great to support! I don't know the best way to finagle it but having something like a separate command which installs the sdk is probably the best starting point, and this could probably manage the install via the pre-compiled binaries on wasi-sdk's CI. |
Target |
Easier to use cargo-zigbuild, so you can use the same command to cross-compile to any target, including wasi. cargo-zigbuild --target=wasm32-wasi |
zigbuild doesn't build zstd-sys for me 😢 |
cargo add zstd-sys # or any other C-dependent crate cargo wasi build
Results in:
(cargo-wasi v0.1.23, Rust 1.55, macOS 15b/x86-64)
From what I could gather, compiling C deps with headers requires wasi-sdk and adding a flag to
clang
:--sysroot=${WASI_SDK_PATH}/share/wasi-sysroot"
.Could
cargo wasi
support installing and configuring the SDK? Without it it's hard to build any non-trivial Rust project (about 23% of Rust crates depend on C code).The text was updated successfully, but these errors were encountered: