I want to compile a Rust compiler that can target wasm32-wasi, I see in the config.toml that it expects me to specify a path to the wasm32-wasi sysroot. Where can I get this sysroot?
There's a sysroot tarbal in the wasi-sdk release.
great, thanks :)
Just a sanity check: you are aware that rustup
can usually provide this?
@Lann Martin right, I'm hitting a bug in rustc that only manifests on wasm32-wasi, I'm trying to fix it :)
I'm actually having some trouble with this, does anyone here build rustc with wasm32-wasi support? I have the sysroot, I have config.toml setup to point to it, and I'm building rustc with x build --target wasm32-wasi
. I can see that it's building for wasm32-wasi, and I can see the artifacts in the build directory. But when I try to build anything with cargo +stage1 build --target wasm32-wasi
, it tells me it can't find std. I'm baffled
You need an additional --target
with the host arch when building rustc. Otherwise build scripts and proc macros don't have a sysroot to compile against.
Last updated: Nov 22 2024 at 16:03 UTC