-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
153 lines (144 loc) · 5.15 KB
/
Copy pathCargo.toml
File metadata and controls
153 lines (144 loc) · 5.15 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
[workspace]
members = [
"crates/socket-patch-core",
"crates/socket-patch-cli",
"crates/socket-patch-node",
"crates/socket-patch-bench",
]
# Bare `cargo build` (release.yml's per-target builds) skips the Node addon,
# which no release artifact ships; `--workspace` and `-p` still build it.
default-members = [
"crates/socket-patch-core",
"crates/socket-patch-cli",
]
resolver = "2"
[workspace.package]
version = "4.0.0"
edition = "2021"
license = "MIT"
repository = "https://github.com/SocketDev/socket-patch"
[workspace.dependencies]
socket-patch-core = { path = "crates/socket-patch-core", version = "=4.0.0" }
clap = { version = "=4.5.60", features = ["derive", "env"] }
serde = { version = "=1.0.228", features = ["derive"] }
serde_json = { version = "=1.0.149", features = ["preserve_order", "raw_value"] }
sha2 = "=0.10.9"
sha1 = "=0.10.6"
hex = "=0.4.3"
reqwest = { version = "=0.12.28", features = ["rustls-tls", "json"], default-features = false }
tokio = { version = "=1.50.0", features = ["full"] }
tokio-util = "=0.7.18"
futures-util = { version = "=0.3.32", default-features = false, features = ["std"] }
thiserror = "=2.0.18"
walkdir = "=2.5.0"
uuid = { version = "=1.21.0", features = ["v4"] }
console = "=0.15.11"
dialoguer = "=0.11.0"
tempfile = "=3.26.0"
regex = "=1.12.3"
aho-corasick = "=1.1.4"
glob = "=0.3.4"
toml_edit = "=0.25.12"
once_cell = "=1.21.3"
qbsdiff = "=1.4.4"
rayon = "=1.12.0"
tar = "=0.4.46"
flate2 = "=1.1.9"
zip = { version = "=8.6.0", default-features = false, features = ["deflate"] }
fs2 = "=0.4.3"
same-file = "=1.0.6"
libc = "=0.2.182"
windows-sys = "=0.59.0"
semver = "=1.0.27"
self-replace = "=1.5.0"
wiremock = "=0.6.5"
portable-pty = "=0.9.0"
base64 = "=0.22.1"
serial_test = "=3.4.0"
napi = { version = "=3.13.0", features = ["napi8", "tokio_rt"] }
napi-derive = "=3.6.9"
napi-build = "=2.5.0"
serde-saphyr = { version = "=1.3.0", default-features = false, features = ["deserialize"] }
ignore = "=0.4.33"
[profile.release]
strip = true
lto = true
opt-level = "s"
# CI-only profile for the test-release job. Inherits the shipped profile's
# semantics (opt-level = "s", debug-assertions off, overflow-checks off) —
# which is what test-release exists to validate — but drops
# the full-LTO link: ~23m of that job's ~29m was LTO-relinking 159 test
# binaries, and LTO relinks are structurally uncacheable. release.yml still
# builds the real full-LTO [profile.release] for every shipped target.
[profile.ci-release]
inherits = "release"
lto = false
strip = "none" # unstripped test binaries => usable backtraces on failure
# The benchmark gate's build (crates/socket-patch-bench, .github/workflows/
# bench.yml): the shipped profile's codegen (opt-level = "s", no debug
# assertions) so timings track what users run, with thin instead of full
# LTO so CI can afford to build both sides of a comparison. Unstripped, so
# a profiler can symbolize it.
[profile.perf]
inherits = "release"
lto = "thin"
strip = "none"
# The Node addon (crates/socket-patch-node) for hosts that load it
# in-process: release semantics without the slow full-LTO link.
[profile.addon]
inherits = "release"
lto = "thin"
# Test-execution speed: `cargo test` builds dependencies with the dev
# profile; at opt-level 0 the hash/compression/bsdiff hot loops are 10-100x
# slower (the self_update fixtures gzip and sha256-hash the multi-MB debug
# CLI binary per test: ~403s debug vs ~2s release). Workspace members are NOT matched by "*" — they stay
# opt-level 0, so incremental compile speed, debugging, and llvm-cov line
# fidelity (reports filter to workspace crates) are unchanged. Dependencies
# keep debug-assertions and overflow-checks ON — only codegen opt changes.
[profile.dev.package."*"]
opt-level = 1
# The measured hot path gets full optimization: archive building
# (flate2/zip over multi-MB payloads), SHA hashing in fixtures and in the
# CLI's own verify paths, and qbsdiff bspatch in every apply test.
[profile.dev.package.sha2]
opt-level = 3
[profile.dev.package.sha1]
opt-level = 3
[profile.dev.package.digest]
opt-level = 3
[profile.dev.package.block-buffer]
opt-level = 3
[profile.dev.package.cpufeatures]
opt-level = 3
[profile.dev.package.crc32fast]
opt-level = 3
[profile.dev.package.flate2]
opt-level = 3
[profile.dev.package.miniz_oxide]
opt-level = 3
[profile.dev.package.zlib-rs]
opt-level = 3
[profile.dev.package.adler2]
opt-level = 3
[profile.dev.package.simd-adler32]
opt-level = 3
[profile.dev.package.zip]
opt-level = 3
[profile.dev.package.qbsdiff]
opt-level = 3
[profile.dev.package.bzip2]
opt-level = 3
[profile.dev.package.libbz2-rs-sys]
opt-level = 3
[profile.dev.package.suffix_array]
opt-level = 3
# macOS debug builds use unpacked split-debuginfo: every linked binary —
# including each of the ~90 e2e test executables — pins its per-codegen-unit
# .o files in target/debug/deps, and cargo never garbage-collects the
# generations superseded by lockfile/toolchain bumps (this grew target/ to
# 99 GB). Line tables keep panic backtraces readable while dropping the bulk
# of the retained DWARF; for a full-fidelity debugger session, override with
# CARGO_PROFILE_DEV_DEBUG=full. Applies to test/bench profiles via
# inheritance.
[profile.dev]
debug = "line-tables-only"