Skip to content

wasi: clean up core platform abstractions#12503

Open
DePasqualeOrg wants to merge 5 commits into
uutils:mainfrom
DePasqualeOrg:wasi-core-platform-abstractions
Open

wasi: clean up core platform abstractions#12503
DePasqualeOrg wants to merge 5 commits into
uutils:mainfrom
DePasqualeOrg:wasi-core-platform-abstractions

Conversation

@DePasqualeOrg
Copy link
Copy Markdown
Contributor

@DePasqualeOrg DePasqualeOrg commented May 28, 2026

This is the first PR split out from the larger WASI changes in #11712.

Changes

  • Use rustix::fs::Stat for WASI FileInformation so same-file checks use device/inode identity instead of a file-type/size heuristic.
  • Make read_fs_list() return UResult<Vec<MountInfo>> on WASI, matching other platforms while still returning an empty mount list.
  • Use the WASI-specific OsStrExt/OsStringExt imports in env.
  • Add inert WASI tail process-check stubs so the shared follow code compiles while --pid remains unsupported.
  • Remove an unreachable nested cfg branch from non-WASI OwnedFileDescriptorOrHandle::into_stdio().
  • Update WASI comm tests for corrected same-file detection.

@oech3
Copy link
Copy Markdown
Contributor

oech3 commented May 28, 2026

closes #12427

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 28, 2026

GNU testsuite comparison:

Skip an intermittent issue tests/tail/tail-n0f (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/cut/bounded-memory (passes in this run but fails in the 'main' branch)
Note: The gnu test tests/rm/many-dir-entries-vs-OOM is now being skipped but was previously passing.

Comment thread src/uu/tail/src/platform/mod.rs Outdated
pub type Pid = u64;

#[cfg(target_os = "wasi")]
#[allow(dead_code)]
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.

please refactor to avoid the allow dead code

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.

Okay, I think we can just remove ProcessChecker for WASI. Since the original PR is from a couple months ago, I don't remember why exactly it was added.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 28, 2026

Merging this PR will degrade performance by 14.62%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

❌ 2 regressed benchmarks
✅ 302 untouched benchmarks
⏩ 61 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation true_consecutive_calls 170.3 ns 199.4 ns -14.62%
Simulation false_consecutive_calls 170.3 ns 199.4 ns -14.62%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing DePasqualeOrg:wasi-core-platform-abstractions (5bcd0ad) with main (55549fa)

Open in CodSpeed

Footnotes

  1. 61 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.

The command fails during argument validation before reading stdin, so remove unnecessary piped input that could hit EPIPE.
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