wasi: clean up core platform abstractions#12503
Conversation
|
closes #12427 |
|
GNU testsuite comparison: |
| pub type Pid = u64; | ||
|
|
||
| #[cfg(target_os = "wasi")] | ||
| #[allow(dead_code)] |
There was a problem hiding this comment.
please refactor to avoid the allow dead code
There was a problem hiding this comment.
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.
Merging this PR will degrade performance by 14.62%
|
| 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)
Footnotes
-
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.
This is the first PR split out from the larger WASI changes in #11712.
Changes
rustix::fs::Statfor WASIFileInformationso same-file checks use device/inode identity instead of a file-type/size heuristic.read_fs_list()returnUResult<Vec<MountInfo>>on WASI, matching other platforms while still returning an empty mount list.OsStrExt/OsStringExtimports inenv.tailprocess-check stubs so the shared follow code compiles while--pidremains unsupported.OwnedFileDescriptorOrHandle::into_stdio().