Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
173 lines (148 loc) · 5.26 KB
/
Copy pathCargo.toml
File metadata and controls
173 lines (148 loc) · 5.26 KB
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
162
163
164
165
166
167
168
169
170
171
172
173
# sed (uutils)
# * see the repository LICENSE, README, and CONTRIBUTING files for more information
# spell-checker:ignore (libs) mangen sed binstall codspeed libc memchr memmap rlimit rustix textwrap uucore uutests xattr
# spell-checker:ignore (misc) clippy codegen msvc startswith uninlined uutils
[package]
name = "sed"
version = "0.3.0"
license = "MIT"
description = "sed ~ implemented as universal (cross-platform) utils, written in Rust"
default-run = "sed"
homepage = "https://github.com/uutils/sed"
repository = "https://github.com/uutils/sed"
readme = "README.md"
keywords = ["sed", "uutils", "cross-platform", "cli", "utility"]
categories = ["command-line-utilities"]
edition = "2024"
rust-version = "1.88"
build = "build.rs"
# cargo-binstall: fetch the archives published by `dist` in the GitHub releases
# instead of building from source. The layout below has to stay in sync with
# `dist-workspace.toml` (targets) and the archives it produces:
# sed-<target>.tar.xz (zip on Windows), containing a sed-<target>/ directory.
# Note that the release tags carry no `v` prefix, hence `{ version }`.
[package.metadata.binstall]
pkg-url = "{ repo }/releases/download/{ version }/{ name }-{ target }.{ archive-suffix }"
bin-dir = "{ name }-{ target }/{ bin }{ binary-ext }"
pkg-fmt = "txz"
[package.metadata.binstall.overrides.x86_64-pc-windows-msvc]
pkg-fmt = "zip"
[features]
default = ["feat_common_core"]
feat_common_core = ["sed"]
sed = []
[workspace.dependencies]
assert_fs = "1.1.3"
clap = { version = "4.4", features = ["wrap_help", "cargo"] }
clap_complete = "4.5"
clap_mangen = "0.3"
divan = { package = "codspeed-divan-compat", version = "5.0.0" }
fancy-regex = "0.18.0"
hex = "0.4"
libc = "0.2.153"
memchr = "2.7.4"
memmap2 = "0.9"
phf = "0.14.0"
phf_codegen = "0.14.0"
predicates = "3.1.3"
rand = { version = "0.10.0" }
regex = "1.10.4"
sha2 = { version = "0.11.0", default-features = false, features = ["alloc"] }
tempfile = "3.10.1"
terminal_size = "0.4.2"
textwrap = { version = "0.16.1", features = ["terminal_size"] }
unicode-width = "0.2.2"
uucore = { version = "0.12.0", features = ["diagnostics", "libc"] }
rustix = "1.1.4"
xattr = "1.3.1"
[dependencies]
clap = { workspace = true }
clap_complete = { workspace = true }
clap_mangen = { workspace = true }
fancy-regex = { workspace = true }
memchr = { workspace = true }
memmap2.workspace = true
phf = { workspace = true }
predicates = { workspace = true }
regex = { workspace = true }
tempfile = { workspace = true }
terminal_size = { workspace = true }
textwrap = { workspace = true }
unicode-width = { workspace = true }
uucore = { workspace = true }
rustix = { workspace = true }
[dev-dependencies]
assert_fs = { workspace = true }
ctor = "1.0.0"
divan = { workspace = true }
hex = { workspace = true }
libc = { workspace = true }
pretty_assertions = "1"
rand = { workspace = true }
regex = { workspace = true }
sha2 = { workspace = true }
tempfile = { workspace = true }
uucore = { workspace = true, features = ["entries", "process", "signals", "benchmark"] }
uutests = "0.12.0"
[target.'cfg(unix)'.dev-dependencies]
xattr = { workspace = true }
[target.'cfg(any(target_os = "linux", target_os = "android"))'.dev-dependencies]
rlimit = "0.11.0"
[build-dependencies]
phf_codegen = { workspace = true }
[lib]
path = "src/lib.rs"
[[bin]]
name = "sed"
path = "src/bin/sed.rs"
[[bench]]
name = "sed_bench"
harness = false
[profile.release]
lto = true
panic = "abort"
# should be dropped to 1 for binary size without performance drop
codegen-units = 7
# A release-like profile that is as small as possible.
[profile.release-small]
inherits = "release"
opt-level = "z"
strip = true
# The profile that 'dist' will build with
[profile.dist]
inherits = "release"
[lints.clippy]
all = { level = "warn", priority = -1 }
cargo = { level = "warn", priority = -1 }
pedantic = { level = "warn", priority = -1 }
# The counts were generated with this command:
# cargo +nightly clippy --all-targets --workspace --message-format=json --quiet \
# | jq -r '.message.code.code | select(. != null and startswith("clippy::"))' \
# | sort | uniq -c | sort -h -r
missing_errors_doc = "allow" # 69
doc_markdown = "allow" # 63
must_use_candidate = "allow" # 56
needless_raw_string_hashes = "allow" # 20
needless_pass_by_value = "allow" # 15
missing_panics_doc = "allow" # 12
# cast_possible_truncation = "allow" # 7
unnecessary_wraps = "allow" # 6
match_wildcard_for_single_variants = "allow" # 4
cast_sign_loss = "allow" # 4
cast_possible_wrap = "allow" # 4
uninlined_format_args = "allow" # 3
similar_names = "allow" # 3
used_underscore_binding = "allow" # 2
too_many_lines = "allow" # 2
struct_excessive_bools = "allow" # 2
match_same_arms = "allow" # 2
ignore_without_reason = "allow" # 2
format_push_string = "allow" # 2
should_panic_without_expect = "allow" # 1
many_single_char_names = "allow" # 1
comparison_chain = "allow"
multiple_crate_versions = "allow"
unnested_or_patterns = "allow"
restriction = { level = "allow", priority = -1 }
cognitive_complexity = "warn"
redundant_clone = "warn"