core::path::Path
Rust Internals [Unofficial]
May 10, 2026
RelativePath<Sep: AsciiChar> could be made platform independent fairly easily. A relative path is just (conceptually at least) an array of OsStr separated by a character. Most of the complexity in Path comes with having different types of root.
There is also the problem that Win32 allows both / and \ as separators but that could be worked around, either by RelativePath taking multiple separators or by it being an error on use in a Windows context (like null in Path is today).
Discussion in the ATmosphere