forked from nakabonne/rhack
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCargo.toml
161 lines (146 loc) · 4.15 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
[package]
name = "cargo-rhack"
version = "0.1.5"
authors = ["the cargo-rhack team"]
categories = ["command-line-utilities"]
edition = "2021"
homepage = "https://github.com/simonsan/cargo-rhack"
keywords = ["cli", "cargo", "dependency", "crate"]
license-file = "LICENSE"
readme = "README.md"
repository = "https://github.com/simonsan/cargo-rhack"
rust-version = "1.74.1"
description = "Temporarily edit your Cargo dependencies"
[package.metadata.wix]
upgrade-guid = "761BAF94-3270-4E25-A807-B9C44138635A"
path-guid = "7EC8468E-6ABF-44AD-8A17-94FFAABDFE2E"
license = false
eula = false
[dependencies]
anyhow = "1.0.81"
clap = { version = "4.3.24", features = ["derive", "color"] }
home = "0.5.5"
serde = { version = "1.0.197", features = ["derive"] }
serde_json = "1.0.114"
toml_edit = "0.22.7"
[dev-dependencies]
once_cell = "1.19.0"
# The profile that 'cargo dist' will build with
[profile.dist]
inherits = "release"
lto = "thin"
# Config for 'cargo dist'
[workspace.metadata.dist]
# The preferred cargo-dist version to use in CI (Cargo.toml SemVer syntax)
cargo-dist-version = "0.11.1"
# CI backends to support
ci = ["github"]
# The installers to generate for each app
installers = ["shell", "powershell", "msi"]
# Target platforms to build apps for (Rust target-triple syntax)
targets = [
"aarch64-apple-darwin",
"x86_64-apple-darwin",
"x86_64-unknown-linux-gnu",
"x86_64-unknown-linux-musl",
"x86_64-pc-windows-msvc",
]
# Publish jobs to run in CI
pr-run-mode = "plan"
# see: https://nnethercote.github.io/perf-book/build-configuration.html
[profile.dev]
opt-level = 0
debug = 0 # try for faster builds, usually 'true'
strip = "debuginfo" # try for faster builds
rpath = false
lto = false
debug-assertions = true
codegen-units = 4
# compile dependencies with optimizations in dev mode
# see: https://doc.rust-lang.org/stable/cargo/reference/profiles.html#overrides
[profile.dev.package."*"]
opt-level = 3
debug = true
[profile.release]
opt-level = 3
debug = false # true for profiling
rpath = false
lto = "fat"
debug-assertions = false
codegen-units = 1
strip = true
panic = "abort"
[profile.test]
opt-level = 1
debug = true
rpath = false
lto = false
debug-assertions = true
codegen-units = 4
[profile.bench]
opt-level = 3
debug = true # true for profiling
rpath = false
lto = true
debug-assertions = false
codegen-units = 1
# Allows quick RPM file generation, if "cargo-generate-rpm" is installed:
# cargo build --release; cargo generate-rpm
# will result in a file like target/generate-rpm/cargo-rhack-0.6.1-1.x86_64.rpm
[package.metadata.generate-rpm]
assets = [
{ source = "target/release/cargo-rhack", dest = "/usr/bin/cargo-rhack", mode = "0755", config = false, doc = false }, # user = "root", group = "root" },
]
[lints.rust]
unsafe_code = "forbid"
# missing_docs = "warn"
rust_2018_idioms = "warn"
trivial_casts = "warn"
unused_lifetimes = "warn"
unused_qualifications = "warn"
bad_style = "warn"
dead_code = "warn"
improper_ctypes = "warn"
# missing_copy_implementations = "warn"
# missing_debug_implementations = "warn"
non_shorthand_field_patterns = "warn"
no_mangle_generic_items = "warn"
overflowing_literals = "warn"
path_statements = "warn"
patterns_in_fns_without_body = "warn"
trivial_numeric_casts = "warn"
unused_results = "warn"
unused_extern_crates = "warn"
unused_import_braces = "warn"
unconditional_recursion = "warn"
unused = "warn"
unused_allocation = "warn"
unused_comparisons = "warn"
unused_parens = "warn"
while_true = "warn"
[lints.clippy]
pedantic = "warn"
nursery = "warn"
expect_used = "warn"
unwrap_used = "warn"
enum_glob_use = "warn"
correctness = "warn"
suspicious = "warn"
complexity = "warn"
perf = "warn"
cast_lossless = "warn"
default_trait_access = "warn"
doc_markdown = "warn"
manual_string_new = "warn"
match_same_arms = "warn"
semicolon_if_nothing_returned = "warn"
trivially_copy_pass_by_ref = "warn"
module_name_repetitions = "allow"
# cargo-binstall support
# https://github.com/cargo-bins/cargo-binstall/blob/HEAD/SUPPORT.md
[package.metadata.binstall]
pkg-url = "{ repo }/releases/download/v{ version }/{ bin }-{ target }{ archive-suffix }"
bin-dir = "{ bin }{ binary-ext }"
pkg-fmt = "txz"
[package.metadata.binstall.overrides.x86_64-pc-windows-msvc]
pkg-fmt = "zip"