You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After #150723, #153130, #153341 and #153413, sys::pal::os only contains default-path related functions (like getcwd and the PATH-splitting logic). In line with #117276, this PR thus moves all these implementations into a new module in sys: sys::paths.
There is one functional change here: The chdir implementation on SGX used to use sgx_ineffective which silently fails, but now returns an error unconditionally – I think that's much more reasonable given that SGX doesn't support filesystem stuff at all.
I've corrected the misleading panic messages in temp_dir for UEFI and WASI, aside from that, this PR only consists of code moves.
rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.
Use r? to explicitly pick a reviewer
Why was this reviewer chosen?
The reviewer was selected based on:
Owners of files modified in this PR: @ChrisDenton, libs
@ChrisDenton, libs expanded to 8 candidates
rustbot
added
O-hermit
Operating System: Hermit
O-SGX
Target: SGX
O-solid
Operating System: SOLID
O-unix
Operating system: Unix-like
O-wasi
Operating system: Wasi, Webassembly System Interface
O-wasm
Target: WASM (WebAssembly), http://webassembly.org/
O-windows
Operating system: Windows
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
labels
Mar 9, 2026
Making this change may break existing programs that depend on this behavior.
Fair enough, I've kept the sgx_ineffective version.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
O-hermitOperating System: HermitO-SGXTarget: SGXO-solidOperating System: SOLIDO-unixOperating system: Unix-likeO-wasiOperating system: Wasi, Webassembly System InterfaceO-wasmTarget: WASM (WebAssembly), http://webassembly.org/O-windowsOperating system: WindowsS-waiting-on-reviewStatus: Awaiting review from the assignee but also interested parties.T-libsRelevant to the library team, which will review and decide on the PR/issue.
4 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #117276.
After #150723, #153130, #153341 and #153413,
sys::pal::osonly contains default-path related functions (likegetcwdand thePATH-splitting logic). In line with #117276, this PR thus moves all these implementations into a new module insys:sys::paths.There is one functional change here: Thechdirimplementation on SGX used to usesgx_ineffectivewhich silently fails, but now returns an error unconditionally – I think that's much more reasonable given that SGX doesn't support filesystem stuff at all.I've corrected the misleading panic messages in
temp_dirfor UEFI and WASI, aside from that, this PR only consists of code moves.CC @jethrogb @raoulstrackx @aditijannu for the SGX change (resolved)