Skip to content

dd: support wasi without threads or descriptor duplication - #16094

Open
eduardomourar wants to merge 1 commit into
uutils:mainfrom
eduardomourar:feat/wasi-dd
Open

eduardomourar wants to merge 1 commit into
uutils:mainfrom
eduardomourar:feat/wasi-dd

Conversation

@eduardomourar

@eduardomourar eduardomourar commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

WASI Preview 2 has no threads. The progress reporter prints inline and the alarm polls the clock. dd reads stdin through a File, as on Unix. dd takes ownership of the stdout descriptor, because WASI cannot duplicate descriptors. An empty path fails with ENOENT, because WASI resolves it to the preopened directory.

Ignore the dd tests that the WASI sandbox cannot run.

Related to #16599.

@sylvestre

Copy link
Copy Markdown
Contributor

clippy is sad :), and a bunch of jobs are failing

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

GNU testsuite comparison:

Skipping an intermittent issue tests/tail/inotify-dir-recreate (passes in this run but fails in the 'main' branch)

@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: 155.50 MB (+116 KB, +0.07%)

Significant per-binary changes:
  env     1.20 MB ->    1.28 MB  (+80 KB, +6.51%)

@sylvestre

Copy link
Copy Markdown
Contributor

thanks for working on this!
clippy and several CI jobs are still failing. Also, the WASI progress reporter duplicates gen_prog_updater (see the inline comments).

@eduardomourar

Copy link
Copy Markdown
Contributor Author

The linting problem is not coming from my changes. By the way, I don't see any inline comments on this PR.

Comment thread src/uu/dd/src/progress.rs Resolved
Comment thread src/uu/dd/src/dd.rs Resolved
Comment thread src/uu/dd/src/dd.rs Resolved
Comment thread src/uu/dd/src/dd.rs Resolved
Comment thread src/uu/dd/src/dd.rs Resolved
@eduardomourar
eduardomourar force-pushed the feat/wasi-dd branch 2 times, most recently from d510aa5 to 7efa1d2 Compare November 26, 2026 00:44
@codspeed

codspeed Bot commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will improve performance by 17.59%

2 warnings, 1 note

⚠️ 125 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

⚠️ 1 benchmark with a significant change ran on different hardware

Its base and head results were measured on machines with a different CPU, core count or memory, so the change might not come from the code. Run base and head on the same runner type.

Learn more about Macro Runners

See affected benchmarks

ℹ️ 1 benchmark has no flamegraph

The flamegraph wasn't generated: most of the time was spent in runtime internals, which would leave nothing useful to analyze.

See affected benchmarks

⚡ 1 improved benchmark
✅ 414 untouched benchmarks
⏩ 70 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
⚡ Memory cp_recursive_deep_tree[(120, 4)] 789 KB 671 KB +17.59%

Tip

Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.


Comparing eduardomourar:feat/wasi-dd (7efa1d2) with main (9ed1dfc)

Open in CodSpeed

Footnotes

  1. 70 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. ↩

Comment thread src/uu/dd/src/dd.rs Resolved

This branch has not been deployed

No deployments
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.

2 participants