Skip to content

feat(dd): use wasi_ext feature on nightly - #12264

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

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

Conversation

@xtqqczze

@xtqqczze xtqqczze commented May 12, 2026 •

Copy link
Copy Markdown
Collaborator

Enable the unstablewasi-ext feature for nightly WASI builds.

  • Detect nightly Rust in build.rs.
  • Set the nightly cfg flag.
  • Gate wasi_ext behind nightly and target_os = "wasi".

Context: #12258.

@github-actions

github-actions Bot commented May 12, 2026 •

Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/date/resolution (fails in this run but passes in the 'main' branch)
Congrats! The gnu test tests/df/df-output is no longer failing!

Comment thread src/uu/dd/build.rs
Comment thread src/uu/dd/build.rs Outdated
Comment thread src/uu/dd/build.rs Outdated
@xtqqczze
xtqqczze force-pushed the nightly-wasi branch 2 times, most recently from f7726da to ebe63bf Compare May 25, 2026 03:01
Comment thread src/uu/dd/build.rs Outdated
// file that was distributed with this source code.

fn main() {
println!("cargo:rustc-check-cfg=cfg(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.

still not a fan of this
esp without any comment on the why

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

added a couple of comments

@xtqqczze
xtqqczze marked this pull request as draft May 29, 2026 19:43
@github-actions

Copy link
Copy Markdown

Binary size comparison:

Individual binary size comparison VS main (threshold: >=5% AND >=4 KB).

Total size of compared binaries: 152.20 MB (+1016 KB, +0.66%)

Significant per-binary changes:
  comm     1.12 MB ->    2.33 MB  (+1.21 MB, +107.29%)

@xtqqczze
xtqqczze force-pushed the nightly-wasi branch 2 times, most recently from 2cd362f to 870c533 Compare August 31, 2026 01:42
@codspeed

codspeed Bot commented Aug 31, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 377 untouched benchmarks
⏩ 54 skipped benchmarks1


Comparing xtqqczze:nightly-wasi (90c113e) with main (ea21b10)

Open in CodSpeed

Footnotes

  1. 54 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@xtqqczze
xtqqczze marked this pull request as ready for review August 31, 2026 09:03
@xtqqczze xtqqczze changed the title dd: enable WASI support for StdinFile on nightly feat(dd): use wasi_ext feature on nightly Sep 19, 2026
@xtqqczze

Copy link
Copy Markdown
Collaborator Author

@sylvestre I'm minded to close this, and convert to an issue blocked on rust-lang/rust#71213.

@eduardomourar

Copy link
Copy Markdown
Contributor

As this feature in standard library Rust is unlikely to become stable soon, I suggest rewriting this PR to use rustix::fs::fstat/FileType plus std::os::fd instead of #![feature(wasi_ext)], dropping the build.rs/nightly-detection machinery entirely.

@xtqqczze

xtqqczze commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator Author

Tracked by #15215.

@xtqqczze xtqqczze closed this Oct 9, 2026
@oech3

oech3 commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

Personally, RUSTC_BOOTSTRAP=1 on the wasi CI is acceptible for me.

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.

4 participants