cargo: compile C for wasm32-wasip2 with a WASI clang
ci / check (push) Successful in 18s

The Nix package, the dev shell, and the test check set CC_wasm32_wasip2
and AR_wasm32_wasip2 to the clang of pkgsCross.wasi32 (wasi-libc), so
build scripts with the cc crate work, for example rusqlite with bundled
SQLite. The runtime-toolchain check links C into a probe with the
packaged host and an empty PATH.
This commit is contained in:
2026-10-22 20:16:38 +01:00
parent 34e2f35272
commit a536d873e6
8 changed files with 112 additions and 6 deletions
+5
View File
@@ -0,0 +1,5 @@
// Compile C with the `cc` crate: natively for the unit test, and with the
// WASI clang (`CC_wasm32_wasip2`) for the actor.
fn main() {
cc::Build::new().file("src/add.c").compile("add");
}