Helper for offline linting (note: pre-commit CI is not a full CI/build server!)
Justfile helper pre-commit hook which bundles your executables in a portable bin/ directory.
Note: intended primarily for use with pre-commit CI but may be useful for newcomers to a project, who then don't need to bother with installing pre-commit linters for an initial commit, or someone making edits purely via GitHub web UI etc.
Provides the run-just-rust hook which uses a Rust binary to get the bundled just executable,
and puts the contents of bin/ on the PATH.
Built ruff/ty with minimal-size profile to make it 35%/24% smaller
1.9M cargo-machete
300K comment-echo
1.1M conventional_commits_linter
300K echo-comment
1.3M fd
1.4M just
8.8M pyrefly
7.1M ruff
4.1M taplo
6.1M ty
7.8M uv
776K whitespace-format
Total size: 41M .
Built uv with minimal-size profile to make it 2x smaller
1.9M cargo-machete
300K comment-echo
1.1M conventional_commits_linter
300K echo-comment
1.3M fd
1.4M just
8.8M pyrefly
11M ruff
4.1M taplo
8.1M ty
7.8M uv
776K whitespace-format
Total size: 47M .
Added echo-comment and comment-echo (substitution bash interpreters: repo)
1.9M cargo-machete
192K comment-echo
1.1M conventional_commits_linter
192K echo-comment
1.3M fd
1.4M just
5.5M pyrefly
11M ruff
4.1M taplo
7.2M ty
14M uv
768K whitespace-format
Total size: 47M
Removed flake8 and added pyrefly
1.9M cargo-machete
1.1M conventional_commits_linter
1.3M fd
1.4M just
5.5M pyrefly
11M ruff
4.1M taplo
7.2M ty
14M uv
768K whitespace-format
Total size: 47M
Added flake8 (very tiny)
1.9M cargo-machete
1.1M conventional_commits_linter
1.3M fd
12K flake8
1.4M just
11M ruff
4.1M taplo
7.2M ty
14M uv
768K whitespace-format
Total size: 42M
uv was added to the toolchain
1.9M cargo-machete
1.1M conventional_commits_linter
1.3M fd
1.4M just
11M ruff
4.1M taplo
7.2M ty
14M uv
768K whitespace-format
Total size: 42M
Binaries were compressed with upx --best (and tested with upx -t)
1.9M cargo-machete
1.1M conventional_commits_linter
1.3M fd
1.4M just
11M ruff
4.1M taplo
7.1M ty
768K whitespace-format
Total size: 28M
ruff was added to the toolchain in bin/
5.8M cargo-machete
2.9M conventional_commits_linter
3.8M fd
4.1M just
34M ruff
12M taplo
2.3M whitespace-format
The bin/ directory contains the executables defined in refresh_binaries:
5.8M cargo-machete
2.8M conventional_commits_linter
4.1M just
8.4M taplo
2.3M whitespace-format
You may also (but less likely) want the following hooks from this repo:
-
run-just-scriptuses a Python script to get the bundledjustexecutable (will not provide Rust toolchain e.g. Cargo), and puts the contents ofbin/on the PATH -
verify-cargo-versioncan be used to either verify Cargo version or more importantly to provide Rust toolchain e.g. Cargo