External Publication
Visit Post

core::path::Path

Rust Internals [Unofficial] May 8, 2026
Source

Related: there's an issue about also making it possible to deal with Windows paths (in a lexical way) on Unix and vice versa.

github.com/rust-lang/rust

Support Windows path manipulation on other platforms

opened 03:51AM - 15 May 19 UTC

      mathstuf
    

T-libs-api C-feature-request A-io

It'd be nice if the facilities under std::os which don't use platform-specific… APIs would be available on all platforms. For example, the ability to take a bytestream and construct a Windows path out of it in order to detect whether it is a valid Windows path would be great. The use case is implementing a check for Git repositories which validates that a path is valid on Windows. The OsStrExt to get access to the underlying data as if it were a Windows path would be useful for this (since the check should be able to do its work on any platform). I suspect that there are other APIs that would be useful for manipulating data as another platform might see it.

Discussion in the ATmosphere

Loading comments...