Skip to content

std: move sys::pal::os to sys::paths#153623

Merged
rust-bors[bot] merged 3 commits intorust-lang:mainfrom
joboet:move_pal_os
Mar 23, 2026
Merged

std: move sys::pal::os to sys::paths#153623
rust-bors[bot] merged 3 commits intorust-lang:mainfrom
joboet:move_pal_os

Conversation

@joboet
Copy link
Copy Markdown
Member

@joboet joboet commented Mar 9, 2026

Part of #117276.

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.

CC @jethrogb @raoulstrackx @aditijannu for the SGX change (resolved)

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Mar 9, 2026

r? @Mark-Simulacrum

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 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
@jethrogb
Copy link
Copy Markdown
Contributor

jethrogb commented Mar 9, 2026

Please don't make any more breaking changes to the SGX target.

The current behavior has been there since Rust 1.33 and is in line with the documented platform behavior.

Making this change may break existing programs that depend on this behavior.

@joboet
Copy link
Copy Markdown
Member Author

joboet commented Mar 9, 2026

Please don't make any more breaking changes to the SGX target.

The current behavior has been there since Rust 1.33 and is in line with the documented platform behavior.

Making this change may break existing programs that depend on this behavior.

Fair enough, I've kept the sgx_ineffective version.

@Mark-Simulacrum
Copy link
Copy Markdown
Member

@bors r+ rollup

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Mar 22, 2026

📌 Commit be5f070 has been approved by Mark-Simulacrum

It is now in the queue for this repository.

@rust-bors rust-bors bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 22, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Mar 22, 2026
std: move `sys::pal::os` to `sys::paths`

Part of rust-lang#117276.

After rust-lang#150723, rust-lang#153130, rust-lang#153341 and rust-lang#153413, `sys::pal::os` only contains default-path related functions (like `getcwd` and the `PATH`-splitting logic). In line with rust-lang#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.

CC @jethrogb @raoulstrackx @aditijannu for the SGX change (resolved)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Mar 22, 2026
std: move `sys::pal::os` to `sys::paths`

Part of rust-lang#117276.

After rust-lang#150723, rust-lang#153130, rust-lang#153341 and rust-lang#153413, `sys::pal::os` only contains default-path related functions (like `getcwd` and the `PATH`-splitting logic). In line with rust-lang#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.

CC @jethrogb @raoulstrackx @aditijannu for the SGX change (resolved)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Mar 22, 2026
std: move `sys::pal::os` to `sys::paths`

Part of rust-lang#117276.

After rust-lang#150723, rust-lang#153130, rust-lang#153341 and rust-lang#153413, `sys::pal::os` only contains default-path related functions (like `getcwd` and the `PATH`-splitting logic). In line with rust-lang#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.

CC @jethrogb @raoulstrackx @aditijannu for the SGX change (resolved)
rust-bors bot pushed a commit that referenced this pull request Mar 23, 2026
…uwer

Rollup of 22 pull requests

Successful merges:

 - #122668 (Add APIs for dealing with titlecase)
 - #152543 (privacy: Fix type privacy holes in RPITITs)
 - #153107 (Optimize BTreeMap::append() using CursorMut)
 - #153312 (Packages as namespaces part 1)
 - #153534 (Remove a flaky `got_timeout` assert from two channel tests)
 - #153718 (Fix environ on FreeBSD with cdylib targets that use -Wl,--no-undefined .)
 - #153857 (Rename `target.abi` to `target.cfg_abi` and enum-ify llvm_abiname)
 - #153880 (Lifted intersperse and intersperse_with Fused transformation and updated documentation + tests)
 - #153931 (remove usages of to-be-deprecated numeric constants)
 - #150630 (Unknown -> Unsupported compression algorithm)
 - #153491 (Move `freeze_*` methods to `OpenOptionsExt2`)
 - #153582 (Simplify find_attr! for HirId usage)
 - #153623 (std: move `sys::pal::os` to `sys::paths`)
 - #153647 (docs(fs): Clarify That File::lock Coordinates Across Processes)
 - #153936 (Skip stack_start_aligned for immediate-abort)
 - #154011 (implement `BinaryHeap::as_mut_slice`)
 - #154167 (ui/lto: move and rename two tests from issues/)
 - #154174 (allow `incomplete_features` in most UI tests)
 - #154175 (Add new alias for Guillaume Gomez email address)
 - #154182 (diagnostics: avoid ICE for undeclared generic parameter in impl)
 - #154188 (Update the tracking issue for #[diagnostic::on_move])
 - #154201 (Use enums to clarify `DepNodeColorMap` color marking )
rust-bors bot pushed a commit that referenced this pull request Mar 23, 2026
…uwer

Rollup of 22 pull requests

Successful merges:

 - #122668 (Add APIs for dealing with titlecase)
 - #152543 (privacy: Fix type privacy holes in RPITITs)
 - #153107 (Optimize BTreeMap::append() using CursorMut)
 - #153312 (Packages as namespaces part 1)
 - #153534 (Remove a flaky `got_timeout` assert from two channel tests)
 - #153718 (Fix environ on FreeBSD with cdylib targets that use -Wl,--no-undefined .)
 - #153857 (Rename `target.abi` to `target.cfg_abi` and enum-ify llvm_abiname)
 - #153880 (Lifted intersperse and intersperse_with Fused transformation and updated documentation + tests)
 - #153931 (remove usages of to-be-deprecated numeric constants)
 - #150630 (Unknown -> Unsupported compression algorithm)
 - #153491 (Move `freeze_*` methods to `OpenOptionsExt2`)
 - #153582 (Simplify find_attr! for HirId usage)
 - #153623 (std: move `sys::pal::os` to `sys::paths`)
 - #153647 (docs(fs): Clarify That File::lock Coordinates Across Processes)
 - #153936 (Skip stack_start_aligned for immediate-abort)
 - #154011 (implement `BinaryHeap::as_mut_slice`)
 - #154167 (ui/lto: move and rename two tests from issues/)
 - #154174 (allow `incomplete_features` in most UI tests)
 - #154175 (Add new alias for Guillaume Gomez email address)
 - #154182 (diagnostics: avoid ICE for undeclared generic parameter in impl)
 - #154188 (Update the tracking issue for #[diagnostic::on_move])
 - #154201 (Use enums to clarify `DepNodeColorMap` color marking )
rust-bors bot pushed a commit that referenced this pull request Mar 23, 2026
…uwer

Rollup of 21 pull requests

Successful merges:

 - #152543 (privacy: Fix type privacy holes in RPITITs)
 - #153107 (Optimize BTreeMap::append() using CursorMut)
 - #153312 (Packages as namespaces part 1)
 - #153534 (Remove a flaky `got_timeout` assert from two channel tests)
 - #153718 (Fix environ on FreeBSD with cdylib targets that use -Wl,--no-undefined .)
 - #153857 (Rename `target.abi` to `target.cfg_abi` and enum-ify llvm_abiname)
 - #153880 (Lifted intersperse and intersperse_with Fused transformation and updated documentation + tests)
 - #153931 (remove usages of to-be-deprecated numeric constants)
 - #150630 (Unknown -> Unsupported compression algorithm)
 - #153491 (Move `freeze_*` methods to `OpenOptionsExt2`)
 - #153582 (Simplify find_attr! for HirId usage)
 - #153623 (std: move `sys::pal::os` to `sys::paths`)
 - #153647 (docs(fs): Clarify That File::lock Coordinates Across Processes)
 - #153936 (Skip stack_start_aligned for immediate-abort)
 - #154011 (implement `BinaryHeap::as_mut_slice`)
 - #154167 (ui/lto: move and rename two tests from issues/)
 - #154174 (allow `incomplete_features` in most UI tests)
 - #154175 (Add new alias for Guillaume Gomez email address)
 - #154182 (diagnostics: avoid ICE for undeclared generic parameter in impl)
 - #154188 (Update the tracking issue for #[diagnostic::on_move])
 - #154201 (Use enums to clarify `DepNodeColorMap` color marking )
@rust-bors rust-bors bot merged commit 9650f0d into rust-lang:main Mar 23, 2026
11 checks passed
@rustbot rustbot added this to the 1.96.0 milestone Mar 23, 2026
github-actions bot pushed a commit to rust-lang/stdarch that referenced this pull request Mar 26, 2026
…uwer

Rollup of 21 pull requests

Successful merges:

 - rust-lang/rust#152543 (privacy: Fix type privacy holes in RPITITs)
 - rust-lang/rust#153107 (Optimize BTreeMap::append() using CursorMut)
 - rust-lang/rust#153312 (Packages as namespaces part 1)
 - rust-lang/rust#153534 (Remove a flaky `got_timeout` assert from two channel tests)
 - rust-lang/rust#153718 (Fix environ on FreeBSD with cdylib targets that use -Wl,--no-undefined .)
 - rust-lang/rust#153857 (Rename `target.abi` to `target.cfg_abi` and enum-ify llvm_abiname)
 - rust-lang/rust#153880 (Lifted intersperse and intersperse_with Fused transformation and updated documentation + tests)
 - rust-lang/rust#153931 (remove usages of to-be-deprecated numeric constants)
 - rust-lang/rust#150630 (Unknown -> Unsupported compression algorithm)
 - rust-lang/rust#153491 (Move `freeze_*` methods to `OpenOptionsExt2`)
 - rust-lang/rust#153582 (Simplify find_attr! for HirId usage)
 - rust-lang/rust#153623 (std: move `sys::pal::os` to `sys::paths`)
 - rust-lang/rust#153647 (docs(fs): Clarify That File::lock Coordinates Across Processes)
 - rust-lang/rust#153936 (Skip stack_start_aligned for immediate-abort)
 - rust-lang/rust#154011 (implement `BinaryHeap::as_mut_slice`)
 - rust-lang/rust#154167 (ui/lto: move and rename two tests from issues/)
 - rust-lang/rust#154174 (allow `incomplete_features` in most UI tests)
 - rust-lang/rust#154175 (Add new alias for Guillaume Gomez email address)
 - rust-lang/rust#154182 (diagnostics: avoid ICE for undeclared generic parameter in impl)
 - rust-lang/rust#154188 (Update the tracking issue for #[diagnostic::on_move])
 - rust-lang/rust#154201 (Use enums to clarify `DepNodeColorMap` color marking )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants