clap icon indicating copy to clipboard operation
clap copied to clipboard

Generate shell completions as part of the build process to assist cross compilation

Open Flowdalic opened this issue 1 year ago • 0 comments

Please complete the following tasks

Clap Version

4.5.8

Describe your use case

Gentoo currently improves on Rust cross-compilation. However many Rust packages in Gentoo generate the shell completions files by invoking the resulting binary, which will then output the shell completion (files). Unfortunately, this approach does not work when cross-compiling, since the resulting binary will be a binary of a different architecture than the build host.

See also https://www.mail-archive.com/[email protected]/msg99709.html

Describe the solution you'd like

The shell completion files should be an output of cargo build and not of the final binary.

Alternatives, if applicable

No response

Additional Context

No response

Flowdalic avatar Jul 02 '24 09:07 Flowdalic