-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathCargo.toml
254 lines (243 loc) · 12.6 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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
[workspace]
members = [
"server",
"libparsec",
"libparsec/crates/client",
"libparsec/crates/client_connection",
"libparsec/crates/crypto",
"libparsec/crates/platform_async",
"libparsec/crates/platform_device_loader",
"libparsec/crates/platform_ipc",
"libparsec/crates/platform_mountpoint",
"libparsec/crates/platform_storage",
"libparsec/crates/protocol",
"libparsec/crates/serialization_format",
"libparsec/crates/testbed",
"libparsec/crates/tests_fixtures",
"libparsec/crates/tests_lite",
"libparsec/crates/tests_macros",
"libparsec/crates/types",
"libparsec/crates/zstd",
"bindings/web",
"bindings/electron",
"bindings/android/libparsec/rust",
"cli",
]
# Ignore bindings stuff given they are special snowflakes that require exotic toolchain and dependencies
# The idea is to be able to do `cargo test` from the root and have all the libparsec&co tests run
default-members = [
"libparsec",
"libparsec/crates/client",
"libparsec/crates/client_connection",
"libparsec/crates/crypto",
"libparsec/crates/platform_async",
"libparsec/crates/platform_device_loader",
"libparsec/crates/platform_ipc",
"libparsec/crates/platform_mountpoint",
"libparsec/crates/platform_storage",
"libparsec/crates/protocol",
"libparsec/crates/serialization_format",
"libparsec/crates/testbed",
"libparsec/crates/tests_fixtures",
"libparsec/crates/tests_lite",
"libparsec/crates/tests_macros",
"libparsec/crates/types",
"libparsec/crates/zstd",
"cli",
]
resolver = "2"
# Define values to be inherited by workspace members.
#
# For a member to inherit a value, it need to set `{key}.workspace = true`.
#
# https://doc.rust-lang.org/cargo/reference/workspaces.html#the-package-table
[workspace.package]
authors = ["@Scille/parsec-dev", "@Scille/rust-code-owners"]
edition = "2021"
homepage = "https://parsec.cloud"
license = "BUSL-1.1"
publish = false
repository = "https://github.com/Scille/parsec-cloud"
# We use the same version for all crates.
# This comment is used to prevent `taplo` from adding multiple spaces between the version and the comment.
version = "3.2.4-a.0+dev" # __PARSEC_VERSION__
[workspace.lints.clippy]
undocumented_unsafe_blocks = "deny"
unwrap_used = "deny"
[workspace.lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = [
'cfg(use_pure_rust_but_dirty_zstd)',
'cfg(skip_fuse_atime_option)',
] }
# All dependencies should be specified here instead of just in the crate(s) requiring them:
# - It ensures each given dependency version is consistent across all crates
# - It simplifies updating dependency version (only a single place to update)
#
# Note the dependencies are marked `default-features = false`, this is because otherwise
# the default features are always provided (see https://github.com/rust-lang/cargo/issues/8366).
# This means the dependencies must always specify all features they use instead of relying
# on default features... Let's say it's a way to reduce bloat by making the developer
# check the default feature and making sure they are actually needed ;-)
[workspace.dependencies]
libparsec = { path = "libparsec", default-features = false }
libparsec_client = { path = "libparsec/crates/client", default-features = false }
libparsec_client_connection = { path = "libparsec/crates/client_connection", default-features = false }
libparsec_crypto = { path = "libparsec/crates/crypto", default-features = false }
libparsec_platform_async = { path = "libparsec/crates/platform_async", default-features = false }
libparsec_platform_device_loader = { path = "libparsec/crates/platform_device_loader", default-features = false }
libparsec_platform_http_proxy = { path = "libparsec/crates/platform_http_proxy", default-features = false }
libparsec_platform_ipc = { path = "libparsec/crates/platform_ipc", default-features = false }
libparsec_platform_mountpoint = { path = "libparsec/crates/platform_mountpoint", default-features = false }
libparsec_platform_storage = { path = "libparsec/crates/platform_storage", default-features = false }
libparsec_protocol = { path = "libparsec/crates/protocol", default-features = false }
libparsec_serialization_format = { path = "libparsec/crates/serialization_format", default-features = false }
libparsec_testbed = { path = "libparsec/crates/testbed", default-features = false }
libparsec_tests_fixtures = { path = "libparsec/crates/tests_fixtures", default-features = false }
libparsec_tests_lite = { path = "libparsec/crates/tests_lite", default-features = false }
libparsec_tests_macros = { path = "libparsec/crates/tests_macros", default-features = false }
libparsec_types = { path = "libparsec/crates/types", default-features = false }
libparsec_zstd = { path = "libparsec/crates/zstd", default-features = false }
# Third parties
android_logger = { version = "0.13", default-features = false }
anyhow = { version = "1.0.95", default-features = false }
argon2 = { version = "0.5.3", default-features = false }
assert_cmd = { version = "2.0.16", default-features = false }
async-broadcast = { version = "0.5.1", default-features = false }
async-lock = { version = "3.4.0", default-features = false }
base32 = { version = "0.4.0", default-features = false }
base64 = { version = "0.22.1", default-features = false }
blake2 = { version = "0.10.6", default-features = false }
bytes = { version = "1.9.0", default-features = false }
chrono = { version = "0.4.39", default-features = false }
clap = { version = "4.5.23", default-features = false }
console_error_panic_hook = { version = "=0.1.6", default-features = false }
console_log = { version = "1.0.0", default-features = false }
crc32fast = { version = "1.4.2", default-features = false }
crypto_box = { version = "0.9.1", default-features = false }
crypto_secretbox = { version = "0.1.1", default-features = false }
ctrlc = { version = "3.4.5", default-features = false }
# You need base64&co ? This is the crate you need !
data-encoding = { version = "2.6.0", default-features = false }
dialoguer = { version = "0.11.0", default-features = false }
digest = { version = "0.10.7", default-features = false }
dirs = { version = "5.0.1", default-features = false }
ed25519-dalek = { version = "2.1.1", default-features = false }
email-address-parser = { version = "2.0.0", default-features = false }
env_logger = { version = "0.10.2", default-features = false }
event-listener = { version = "5.3.1", default-features = false }
eventsource-stream = { version = "0.2.3", default-features = false }
flate2 = { version = "1.0.35", features = ["rust_backend"], default-features = false }
flume = { version = "0.11.1", default-features = false }
fnmatch-regex = { version = "0.2.1", default-features = false }
fuser = { version = "0.15.1", default-features = false }
futures = { version = "0.3.31", default-features = false }
generic-array = { version = "0.14.7", default-features = false }
getrandom = { package = "getrandom", version = "0.2.15", default-features = false }
glob = { version = "0.3.2", default-features = false }
gloo-timers = { version = "0.3.0", default-features = false }
hex = { version = "0.4.3", default-features = false }
hex-literal = { version = "0.4.1", default-features = false }
indexed_db_futures = { version = "0.5.0", default-features = false }
itertools = { version = "0.12.1", default-features = false }
jni = { version = "0.21.1", default-features = false }
js-sys = { version = "0.3.70", default-features = false }
keyring = { version = "3.6.1", default-features = false }
lazy_static = { version = "1.5.0", default-features = false }
libc = { version = "0.2.169", default-features = false }
libsodium-sys = { version = "0.2.7", default-features = false }
libsqlite3-sys = { version = "0.26.0", default-features = false }
log = { version = "0.4.22", default-features = false }
miniserde = { version = "0.1.41", default-features = false }
neon = { version = "1.0.0", default-features = false }
once_cell = { version = "1.20.2", default-features = false }
openssl = { version = "0.10.68", default-features = false }
paste = { version = "1.0.15", default-features = false }
percent-encoding = { version = "2.3.1", default-features = false }
pin-project = { version = "1.1.7", default-features = false }
# Utility crate to find system artifacts
pkg-config = { version = "0.3.31", default-features = false }
predicates = { version = "3.1.3", default-features = false }
pretty_assertions = { version = "1.4.1", default-features = false }
proc-macro2 = { version = "1.0.92", default-features = false }
proptest = { version = "1.6.0", default-features = false }
proptest-state-machine = { version = "0.3.1", default-features = false }
pyo3 = { version = "0.21.2", default-features = false }
quote = { version = "1.0.38", default-features = false }
rand = { version = "0.8.5", default-features = false }
regex = { version = "1.11.1", default-features = false }
regex-syntax = { version = "0.8.4", default-features = false }
reqwest = { version = "0.12.12", default-features = false }
reqwest-eventsource = { version = "0.6.0", default-features = false }
rexpect = "0.6.0"
rmp-serde = { version = "1.3.0", default-features = false }
rpassword = { version = "7.3.1", default-features = false }
rsa = { version = "0.8.2", default-features = false }
rstest = { version = "0.18.2", default-features = false }
rstest_reuse = { version = "0.6.0", default-features = false }
ruzstd = { version = "0.7.3", default-features = true }
sentry = { version = "0.34.0", default-features = false }
sentry-log = { version = "0.34.0", default-features = false }
serde = { version = "1.0.217", default-features = false }
serde-wasm-bindgen = { version = "0.6.4", default-features = false }
serde_bytes = { version = "0.11.15", default-features = false }
serde_json = { version = "1.0.134", default-features = false }
serde_test = { version = "1.0.177", default-features = false }
serde_with = { version = "3.12.0", default-features = false }
sha1 = { version = "0.10.6", default-features = false }
sha2 = { version = "0.10.8", default-features = false }
blahaj = "0.6.0"
sodiumoxide = { version = "0.2.7", default-features = false }
spinners = { version = "4.1.1", default-features = false }
sqlx = { version = "0.7.2", default-features = false }
syn = { version = "2.0.95", default-features = false }
thiserror = { version = "1.0.69", default-features = false }
tokio = { version = "1.42.0", default-features = false }
unicode-normalization = { version = "0.1.24", default-features = false }
url = { version = "2.5.4", default-features = false }
uuid = { version = "1.11.0", default-features = false }
wasm-bindgen = { version = "0.2.97", default-features = false }
wasm-bindgen-futures = { version = "0.4.47", default-features = false }
wasm-bindgen-test = { version = "0.3.47", default-features = false, features = ["std"] }
web-sys = { version = "0.3.72", default-features = false }
web-time = { version = "1.1.0", default-features = false }
widestring = { version = "1.1.0", default-features = false }
windows-sys = { version = "0.59.0", default-features = false }
winfsp_wrs = { version = "0.3.0", default-features = false }
winfsp_wrs_build = { version = "0.3.0", default-features = false }
x25519-dalek = { version = "2.0.1", default-features = false }
zeroize = { version = "1.8.1", default-features = false }
zstd = { version = "0.13.2", default-features = false }
[workspace.dependencies.criterion]
default-features = false
version = "0.5.1"
# We specify a set of features here instead of defining them in every other crates,
# since we will use the same set of features.
features = [
"cargo_bench_support", # Allow to use cargo bench
"plotters", # Provide a dashboard to visualize the benchmark results
"rayon", # Allow to run benchmarks in parallel
"html_reports", # Generate HTML reports
"csv_output", # Generate CSV reports
]
# Rust unoptimized code is really slow with crypto algorithm and regex compilation,
# hence we optimize our 3rd party dependencies.
[profile.dev.package."*"]
opt-level = 1
[profile.dev-python]
inherits = "dev"
# We don't optimize our own crates here given it comes with a high impact on
# when doing single change recompilation.
# Custom profiles for the CI. The idea here is to try to save compilation time
# and artifacts size (to keep cache efficient).
[profile.ci-rust]
inherits = "dev"
# Remove debug symbols saves roughly ~30% compilation time and ~50% artifacts size
debug = false
# Given we don't keep our crate in the cache, we always build them from the
# ground. Removing that saves ~20% in artifacts size.
incremental = false
[profile.ci-python]
inherits = "ci-rust"
# Using `opt-level = 0` divides by 2 compilation time, however it makes code run much
# slower which is a no-go for Python tests :'(
opt-level = 1