Skip to content

Delete #[cfg_attr(wasi, path = "backend/wasi/mod.rs")] - #1540

Merged
sunfishcode merged 1 commit into
bytecodealliance:mainfrom
dtolnay-contrib:backendwasi
Nov 9, 2025
Merged

sunfishcode merged 1 commit into
bytecodealliance:mainfrom
dtolnay-contrib:backendwasi

Conversation

@dtolnay

@dtolnay dtolnay commented Nov 9, 2025

Copy link
Copy Markdown
Contributor

Closes #1539.

As far as I can tell, nothing in build.rs enables cfg(wasi), unlike cfg(libc) and cfg(linux_raw).

Enabling it manually results in:

bytecodealliance:rustix$  RUSTFLAGS=--cfg=wasi cargo check --target=wasm32-wasip2

warning: unused attribute
   --> src/lib.rs:197:18
    |
197 | #[cfg_attr(wasi, path = "backend/wasi/mod.rs")]
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
    |
note: attribute also specified here
   --> src/lib.rs:195:18
    |
195 | #[cfg_attr(libc, path = "backend/libc/mod.rs")]
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: `#[warn(unused_attributes)]` (part of `#[warn(unused)]`) on by default

@sunfishcode

Copy link
Copy Markdown
Member

Thanks! This was part of an early experiment that I or someone else may revisit some day, but it makes sense to fully remove for now.

@sunfishcode
sunfishcode merged commit 33e4638 into bytecodealliance:main Nov 9, 2025
39 of 50 checks passed
@dtolnay
dtolnay deleted the backendwasi branch November 9, 2025 16:02
@sunfishcode

Copy link
Copy Markdown
Member

This is now released in rustix 1.1.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing backend/wasi/mod.rs

2 participants