Skip to content
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

Confusing documentation for wasm32-wasip1-threads #126857

Open
veluca93 opened this issue Jun 23, 2024 · 1 comment
Open

Confusing documentation for wasm32-wasip1-threads #126857

veluca93 opened this issue Jun 23, 2024 · 1 comment
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools O-wasi Operating system: Wasi, Webassembly System Interface T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@veluca93
Copy link
Contributor

Location

https://doc.rust-lang.org/rustc/platform-support/wasm32-wasip1-threads.html#building-the-target

Summary

The section seems to suggest to add

[target.wasm32-wasip1-threads]
wasi-root = ".../wasi-libc/sysroot"

to use with cargo build -Zbuild-std in a crate, but doing so results in the following error:

error: expected a table, but found a string for `target.wasm32-wasip1-threads.wasi-root` .../.cargo/config.toml
@veluca93 veluca93 added the A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools label Jun 23, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jun 23, 2024
@bjorn3
Copy link
Member

bjorn3 commented Jun 24, 2024

The documentation here is incorrect. wasi-root only exists for the config.toml used for building rustc itself. Not for .cargo/config.toml. And I don't think -Zbuild-std works either. Unless you are working on rustc itself I would suggest following the instructions at https://doc.rust-lang.org/rustc/platform-support/wasm32-wasip1-threads.html#building-rust-programs instead.

@bjorn3 bjorn3 added the O-wasi Operating system: Wasi, Webassembly System Interface label Jun 24, 2024
@saethlin saethlin added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Jul 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools O-wasi Operating system: Wasi, Webassembly System Interface T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants