-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathCargo.toml
108 lines (97 loc) · 3.22 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
[package]
name = "cargo-shear"
version = "1.2.4"
edition = "2024"
description = "Detect and remove unused dependencies from Cargo.toml"
authors = ["Boshen <[email protected]>"]
repository = "https://github.com/Boshen/cargo-shear"
keywords = ["cargo", "udeps", "machete", "unused", "dependencies"]
categories = ["development-tools", "development-tools::cargo-plugins"]
license = "MIT"
readme = "README.md"
[lib]
doctest = false
[[bin]]
name = "cargo-shear"
path = "src/main.rs"
test = false
[dependencies]
walkdir = "2.5.0"
cargo_metadata = "0.19.2"
cargo_toml = "0.22.1"
bpaf = { version = "0.9.19", features = ["derive", "batteries"] }
proc-macro2 = { version = "1.0.94", features = ["span-locations"] }
syn = { version = "2.0.100", features = [
"full",
"visit",
"extra-traits", # add "extra-traits" to debug syn ast
] }
regex-lite = "0.1.6"
rayon = "1.10.0"
toml_edit = { version = "0.22.24", features = ["parse"] }
anyhow = "1.0.97"
cargo-util-schemas = "0.8.0"
serde_json = "1.0.140"
[target.'cfg(all(not(target_os = "linux"), not(target_os = "freebsd"), not(target_family = "wasm")))'.dependencies]
mimalloc-safe = { version = "0.1.50", optional = true, features = [
"skip_collect_on_exit",
] }
[target.'cfg(any(target_os = "linux", target_os = "freebsd"))'.dependencies]
mimalloc-safe = { version = "0.1.50", optional = true, features = [
"skip_collect_on_exit",
"local_dynamic_tls",
] }
[features]
default = []
allocator = ["dep:mimalloc-safe"]
[profile.release]
# Configurations explicitly listed here for clarity.
# Using the best options for performance.
opt-level = 3
lto = "fat"
codegen-units = 1
strip = "symbols"
debug = false
panic = "abort" # Let it crash and force ourselves to write safe Rust.
[lints.rust]
unsafe_code = "deny"
deprecated = "warn"
elided_lifetimes_in_paths = "warn"
future_incompatible = { level = "warn", priority = -1 }
nonstandard_style = { level = "warn", priority = -1 }
rust_2018_idioms = { level = "warn", priority = -1 }
rust_2021_prelude_collisions = "warn"
semicolon_in_expressions_from_macros = "warn"
trivial_numeric_casts = "warn"
unsafe_op_in_unsafe_fn = "warn" # `unsafe_op_in_unsafe_fn` may become the default in future Rust versions: https://github.com/rust-lang/rust/issues/71668
unused_extern_crates = "warn"
unused_import_braces = "warn"
unused_lifetimes = "warn"
trivial_casts = "allow"
unused_qualifications = "allow"
[lints.rustdoc]
all = "warn"
missing_crate_level_docs = "warn"
[lints.clippy]
all = { level = "warn", priority = -1 }
correctness = { level = "warn", priority = -1 }
suspicious = { level = "warn", priority = -1 }
style = { level = "warn", priority = -1 }
complexity = { level = "warn", priority = -1 }
perf = { level = "warn", priority = -1 }
pedantic = { level = "warn", priority = -1 }
nursery = { level = "warn", priority = -1 }
# Additional lints from https://rust-lang.github.io/rust-clippy/master/index.html?groups=restriction
allow_attributes = "warn"
allow_attributes_without_reason = "warn"
assertions_on_result_states = "warn"
create_dir = "warn"
clone_on_ref_ptr = "warn"
expect_used = "warn"
missing_assert_message = "warn"
panic_in_result_fn = "warn"
str_to_string = "warn"
todo = "warn"
unimplemented = "warn"
unwrap_used = "warn"
wildcard_enum_match_arm = "warn"