Skip to content

uucore: for fs use real inode dev stat on wasi - #13684

Open
eduardomourar wants to merge 1 commit into
uutils:mainfrom
eduardomourar:wasi-fs-inode-dev-stat
Open

uucore: for fs use real inode dev stat on wasi#13684
eduardomourar wants to merge 1 commit into
uutils:mainfrom
eduardomourar:wasi-fs-inode-dev-stat

Conversation

@eduardomourar

Copy link
Copy Markdown
Contributor

FileInformation previously fell back to a std::fs::Metadata-based heuristic (comparing file type and size) on WASI, since it lacked access to nix::sys::stat. Switch it to rustix::fs::Stat, the same backing type used on Unix, giving WASI real inode/device identity, nlink, and equality checks instead of an approximation. Also add WASI implementations of are_hardlinks_to_same_file and are_hardlinks_or_one_way_symlink_to_same_file via rustix::fs::stat/ lstat, since std::os::unix::fs::MetadataExt is unavailable there.

@codspeed-hq

codspeed-hq Bot commented Aug 1, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 12.39%

⚠️ 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 improved benchmarks
✅ 343 untouched benchmarks
⏩ 46 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation df_with_path 699.6 µs 570.6 µs +22.62%
Simulation cksum_crc32b 40.9 ms 39.7 ms +3.03%

Tip

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


Comparing eduardomourar:wasi-fs-inode-dev-stat (ab6642b) with main (bad4676)2

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.

  2. No successful run was found on main (0c8a3c7) during the generation of this report, so bad4676 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@github-actions

github-actions Bot commented Aug 1, 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/cut/bounded-memory is now passing!
Congrats! The gnu test tests/tail/pipe-f is now passing!
Note: The gnu test tests/misc/write-errors was skipped on 'main' but is now failing.

FileInformation previously fell back to a std::fs::Metadata-based
heuristic (comparing file type and size) on WASI, since it lacked
access to nix::sys::stat. Switch it to rustix::fs::Stat, the same
backing type used on Unix, giving WASI real inode/device identity,
nlink, and equality checks instead of an approximation. Also add
WASI implementations of are_hardlinks_to_same_file and
are_hardlinks_or_one_way_symlink_to_same_file via rustix::fs::stat/
lstat, since std::os::unix::fs::MetadataExt is unavailable there.
@eduardomourar
eduardomourar force-pushed the wasi-fs-inode-dev-stat branch from 7425df9 to ab6642b Compare August 1, 2026 12:43
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.

1 participant