-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
This issue is a crossover from #14948 and #9770 with a more narrow focus: Make it easier to have an embedded windows manifest that enables long paths.
It seems that widely used Rust CLI applications that process user file trees eventually run into the problem of long path support. Some examples (feel free to add more):
- Cargo and rustc: Add a windows manifest file #13131 and Add Windows application manifest to rustc-main rust#96737
- uv: Add a Windows manifest to uv binaries astral-sh/uv#16894
- ripgrep:BurntSushi/ripgrep@db6bb21
Currently, this requires understanding (or copying) a Windows manifest that sets <longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>. There's even a dedicated crates for generating this manifest: https://codeberg.org/carey/embed-manifest.
The main argument from Microsoft's side to not enable this by default is that you may write a long path that other applications can't read (microsoft/WindowsAppSDK#875 (comment)). In my experience, the current default does not protect from problems with long paths (e.g. astral-sh/uv#16877).
The two main problems are that most application developers are unaware of Windows manifests, how they relate to long paths and that the error message they see is a path length issue, and that this requires a build script for crates that would otherwise work without a build script.