Skip to content

Make it easier to embed a windows manifest for long paths #16328

@konstin

Description

@konstin

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):

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-build-scriptsArea: build.rs scriptsC-enhancementCategory: enhancementO-windowsOS: WindowsS-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions