← 返回首页
Allow to pass features to cargo install in rust hooks · Issue #3230 · pre-commit/pre-commit · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

Allow to pass features to cargo install in rust hooks #3230

New issue
New issue

Description

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 JohnnyMorganz/StyLua#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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Footer

      © 2026 GitHub, Inc.