rust-lang / rust-lang/rust-clippy

consider making clippy_lints into a dylib for faster recompilation.

Open
#12,977 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-enhancement
Dominant language
Rust
Stars
13.5k
Forks
2.2k
Avg merge
2d 10h
Merged PRs (30d)
32

Description

Description

cargo currently rebuilds all dependants of a crate instead of just relinking.

when only changing the implementation of a lint, this is unnecessary.

using dylib or cdylib should make it possible to just relink when adding/modifying lints, although it may require slight modifications of the api. if i understand correctly, register_plugins is the only function that really needs to be public, with all the lint structs being basically an implementation detail. this is a unique situation and should allow optimizing the build process.

Version

No response

Additional Labels

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by examining the clippy_lints crate and its register_plugins entry point, then trace how Cargo rebuilds its dependants. Determine whether building it as a dylib or cdylib permits relinking after lint implementation changes and identify any required API modifications. Done means documenting or implementing a viable build approach without unnecessary dependant recompilation.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system, performance, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.