Skip to content

wasi: clean up core platform abstractions - #12503

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

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

Conversation

@DePasqualeOrg

@DePasqualeOrg DePasqualeOrg commented May 28, 2026

Copy link
Copy Markdown
Contributor

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

oech3 commented May 28, 2026

Copy link
Copy Markdown
Contributor

closes #12427

@github-actions

github-actions Bot commented May 28, 2026

Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/date/date-locale-hour (fails in this run but passes in the 'main' branch)
Congrats! The gnu test tests/seq/seq-epipe is now 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

codspeed-hq Bot commented May 28, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 345 untouched benchmarks
⏩ 46 skipped benchmarks1


Comparing DePasqualeOrg:wasi-core-platform-abstractions (7db371a) with main (c477de7)

Open in CodSpeed

Footnotes

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

@oech3

oech3 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Is this ready to merge?

@DePasqualeOrg

DePasqualeOrg commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

If's ready for whatever you want to do with it. I have coreutils working in Wasm and wanted to upstream my changes here in case it's useful to others. However, the process has dragged on for months, and there's been some unnecessary friction.

@DePasqualeOrg

Copy link
Copy Markdown
Contributor Author

Now there's a new merge conflict. I've already resolved several other such conflicts in the past few months.

I think I will just leave #11712 as a reference for whoever is interested in Wasm support and maintain my own private patches, rather than trying to upstream changes here.

@DePasqualeOrg
DePasqualeOrg force-pushed the wasi-core-platform-abstractions branch from 618421d to 7db371a Compare August 3, 2026 11:55
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