I have this in my config.toml
target = ["x86_64-unknown-linux-gnu", "wasm32-unknown-emscripten", "wasm32-wasi"] ... wasi-root = "/home/omer/wasi-sdk-11.0/share/wasi-sysroot"
This is the panic I'm getting when I do
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/bootstrap/compile.rs:187:48 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace failed to run: /home/omer/rust/rust/build/bootstrap/debug/bootstrap build Build completed unsuccessfully in 0:00:05
let srcdir = builder.wasi_root(target).unwrap().join("lib/wasm32-wasi");
I have a wasi_root field already so I'm not sure why this is failing. Any ideas?
@osa1 is the wasi-root in a target config for, uh, whatever target you're trying to build for?
(I guess wasm32-unknown-wasi?)
@simulacrum the wasi-root field is already in the config.toml.example, it's commented out, I just enabled it and updated the value. Should I move it to elsewhere?
let me look
Oh wow, you're right, I need a new section for the target
yeah it's under
target.x86_64-unknown-linux-gnu which is useless afaict, you probably want to move it to
target.wasm32-unknown-wasi or whatever the triple is (I forget)
Yeah this works:
[target.wasm32-wasi] wasi-root = "/home/omer/wasi-sdk-11.0/share/wasi-sysroot" [target.wasm32-unknown-emscripten] wasi-root = "/home/omer/wasi-sdk-11.0/share/wasi-sysroot"
I'd be happy to take a patch fixing the config.toml.example
Will submit a PR.