Allow to pass features to cargo install in rust hooks
Author: TerseusCreated Jun 12, 2024Updated Jun 12, 2024
search you tried in the issue tracker
rust features
describe your actual problem
The rust hooks execute cargo install --bins --root <root-dir> <packages> (taken from here) to install the hook, however if a hook wants to use a different set of features than its default features it can't because there's no way to pass either additional flags to the install command or a --features <features> to cargo command.
See https://github.com/JohnnyMorganz/StyLua/issues/867 for a real world example where this has become a limitation.
It would be great to have a way to configure a hook to pass cargo additional features when building the hook's package.
pre-commit --version
3.7.1
Source: pre-commit/pre-commit