Skip to content

dd: enable WASI support for StdinFile on nightly#12264

Open
xtqqczze wants to merge 1 commit into
uutils:mainfrom
xtqqczze:nightly-wasi
Open

dd: enable WASI support for StdinFile on nightly#12264
xtqqczze wants to merge 1 commit into
uutils:mainfrom
xtqqczze:nightly-wasi

Conversation

@xtqqczze
Copy link
Copy Markdown
Contributor

@xtqqczze xtqqczze commented May 12, 2026

Follow-up to #12258

wasi-ext is not yet stabilised, so introduce a cfg for rustc nightly.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 12, 2026

GNU testsuite comparison:

Skip an intermittent issue tests/date/resolution (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/tail/tail-n0f (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/tail/inotify-dir-recreate (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/tail/retry (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/pr/bounded-memory is now passing!

Comment thread src/uu/dd/build.rs
// For the full copyright and license information, please view the LICENSE
// file that was distributed with this source code.

fn main() {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why that?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wasi-ext is not yet stabilised, we need to detect if we are compiling with nightly

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use cfg_aliases to avoid new dep?

Comment thread src/uu/dd/build.rs
fn main() {
let is_nightly =
rustc_version::version_meta().unwrap().channel == rustc_version::Channel::Nightly;
rsconf::declare_cfg("nightly", is_nightly);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is RUSTC_BOOTSTRAP=1 supported?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no way to detect whether a certain unstable feature is enabled; we have to check for nightly compiler. So RUSTC_BOOTSTRAP=1 won't be supported.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just manually catching?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know, I'm open to suggestions.

Comment thread src/uu/dd/build.rs
Comment on lines +7 to +9
let is_nightly =
rustc_version::version_meta().unwrap().channel == rustc_version::Channel::Nightly;
rsconf::declare_cfg("nightly", is_nightly);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let is_nightly =
rustc_version::version_meta().unwrap().channel == rustc_version::Channel::Nightly;
rsconf::declare_cfg("nightly", is_nightly);
println!("cargo:rustc-check-cfg=cfg(nightly)");
if rustc_version::version_meta().unwrap().channel == rustc_version::Channel::Nightly {
println!("cargo:rustc-cfg=nightly");
}

I guess we can lose the rsconf build dependency if that's an issue?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Because we can reduce build time.

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.

3 participants