Skip to content

Commit cf190d8

Browse files
authored
Update Rust dependencies (#4139)
* Update Rust version * Update async-compression 0.4.25 -> 0.4.27 * Update async-tungstenite 0.29.1 -> 0.30.0 * Update bytemuck 1.23.0 -> 1.23.1 * Update clap 4.5.40 -> 4.5.43 * Update deadpool-redis 0.21.1 -> 0.22.0 and redis 0.31.0 -> 0.32.4 * Update enumset 1.1.6 -> 1.1.7 * Update hyper-util 0.1.14 -> 0.1.16 * Update indexmap 2.9.0 -> 2.10.0 * Update indicatif 0.17.11 -> 0.18.0 * Update jemalloc_pprof 0.7.0 -> 0.8.1 * Update lettre 0.11.17 -> 0.11.18 * Update meilisearch-sdk 0.28.0 -> 0.29.1 * Update notify 8.0.0 -> 8.2.0 and notify-debouncer-mini 0.6.0 -> 0.7.0 * Update quick-xml 0.37.5 -> 0.38.1 * Fix theseus lint * Update reqwest 0.12.20 -> 0.12.22 * Cargo fmt in theseus * Update rgb 0.8.50 -> 0.8.52 * Update sentry 0.41.0 -> 0.42.0 and sentry-actix 0.41.0 -> 0.42.0 * Update serde_json 1.0.140 -> 1.0.142 * Update serde_with 3.13.0 -> 3.14.0 * Update spdx 0.10.8 -> 0.10.9 * Update sysinfo 0.35.2 -> 0.36.1 * Update tauri suite * Fix build by updating mappings * Update tokio 1.45.1 -> 1.47.1 and tokio-util 0.7.15 -> 0.7.16 * Update tracing-actix-web 0.7.18 -> 0.7.19 * Update zip 4.2.0 -> 4.3.0 * Misc Cargo.lock updates * Update Dockerfiles
1 parent ca0c16b commit cf190d8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+1936
-1890
lines changed

Cargo.lock

Lines changed: 816 additions & 660 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -25,39 +25,39 @@ actix-ws = "0.3.0"
2525
argon2 = { version = "0.5.3", features = ["std"] }
2626
ariadne = { path = "packages/ariadne" }
2727
async_zip = "0.0.17"
28-
async-compression = { version = "0.4.25", default-features = false }
28+
async-compression = { version = "0.4.27", default-features = false }
2929
async-recursion = "1.1.1"
3030
async-stripe = { version = "0.41.0", default-features = false, features = [
3131
"runtime-tokio-hyper-rustls",
3232
] }
3333
async-trait = "0.1.88"
34-
async-tungstenite = { version = "0.29.1", default-features = false, features = [
34+
async-tungstenite = { version = "0.30.0", default-features = false, features = [
3535
"futures-03-sink",
3636
] }
3737
async-walkdir = "2.1.0"
3838
base64 = "0.22.1"
3939
bitflags = "2.9.1"
40-
bytemuck = "1.23.0"
40+
bytemuck = "1.23.1"
4141
bytes = "1.10.1"
4242
censor = "0.3.0"
4343
chardetng = "0.1.17"
4444
chrono = "0.4.41"
45-
clap = "4.5.40"
45+
clap = "4.5.43"
4646
clickhouse = "0.13.3"
4747
color-thief = "0.2.2"
4848
console-subscriber = "0.4.1"
4949
daedalus = { path = "packages/daedalus" }
5050
dashmap = "6.1.0"
5151
data-url = "0.3.1"
52-
deadpool-redis = "0.21.1"
52+
deadpool-redis = "0.22.0"
5353
dirs = "6.0.0"
5454
discord-rich-presence = "0.2.5"
5555
dotenv-build = "0.1.1"
5656
dotenvy = "0.15.7"
5757
dunce = "1.0.5"
5858
either = "1.15.0"
5959
encoding_rs = "0.8.35"
60-
enumset = "1.1.6"
60+
enumset = "1.1.7"
6161
flate2 = "1.1.2"
6262
fs4 = { version = "0.13.1", default-features = false }
6363
futures = { version = "0.3.31", default-features = false }
@@ -74,15 +74,15 @@ hyper-rustls = { version = "0.27.7", default-features = false, features = [
7474
"ring",
7575
"tls12",
7676
] }
77-
hyper-util = "0.1.14"
77+
hyper-util = "0.1.16"
7878
iana-time-zone = "0.1.63"
7979
image = { version = "0.25.6", default-features = false, features = ["rayon"] }
80-
indexmap = "2.9.0"
81-
indicatif = "0.17.11"
80+
indexmap = "2.10.0"
81+
indicatif = "0.18.0"
8282
itertools = "0.14.0"
83-
jemalloc_pprof = "0.7.0"
83+
jemalloc_pprof = "0.8.1"
8484
json-patch = { version = "4.0.0", default-features = false }
85-
lettre = { version = "0.11.17", default-features = false, features = [
85+
lettre = { version = "0.11.18", default-features = false, features = [
8686
"builder",
8787
"hostname",
8888
"pool",
@@ -92,24 +92,24 @@ lettre = { version = "0.11.17", default-features = false, features = [
9292
"smtp-transport",
9393
] }
9494
maxminddb = "0.26.0"
95-
meilisearch-sdk = { version = "0.28.0", default-features = false }
95+
meilisearch-sdk = { version = "0.29.1", default-features = false }
9696
murmur2 = "0.1.0"
9797
native-dialog = "0.9.0"
98-
notify = { version = "8.0.0", default-features = false }
99-
notify-debouncer-mini = { version = "0.6.0", default-features = false }
98+
notify = { version = "8.2.0", default-features = false }
99+
notify-debouncer-mini = { version = "0.7.0", default-features = false }
100100
p256 = "0.13.2"
101101
paste = "1.0.15"
102102
phf = { version = "0.12.1", features = ["macros"] }
103103
png = "0.17.16"
104104
prometheus = "0.14.0"
105105
quartz_nbt = "0.2.9"
106-
quick-xml = "0.37.5"
106+
quick-xml = "0.38.1"
107107
rand = "=0.8.5" # Locked on 0.8 until argon2 and p256 update to 0.9
108108
rand_chacha = "=0.3.1" # Locked on 0.3 until we can update rand to 0.9
109-
redis = "=0.31.0" # Locked on 0.31 until deadpool-redis updates to 0.32
109+
redis = "0.32.4"
110110
regex = "1.11.1"
111-
reqwest = { version = "0.12.20", default-features = false }
112-
rgb = "0.8.50"
111+
reqwest = { version = "0.12.22", default-features = false }
112+
rgb = "0.8.52"
113113
rust_decimal = { version = "1.37.2", features = [
114114
"serde-with-float",
115115
"serde-with-str",
@@ -121,53 +121,53 @@ rust-s3 = { version = "0.35.1", default-features = false, features = [
121121
"tokio-rustls-tls",
122122
] }
123123
rusty-money = "0.4.1"
124-
sentry = { version = "0.41.0", default-features = false, features = [
124+
sentry = { version = "0.42.0", default-features = false, features = [
125125
"backtrace",
126126
"contexts",
127127
"debug-images",
128128
"panic",
129129
"reqwest",
130130
"rustls",
131131
] }
132-
sentry-actix = "0.41.0"
132+
sentry-actix = "0.42.0"
133133
serde = "1.0.219"
134134
serde_bytes = "0.11.17"
135135
serde_cbor = "0.11.2"
136136
serde_ini = "0.2.0"
137-
serde_json = "1.0.140"
138-
serde_with = "3.13.0"
137+
serde_json = "1.0.142"
138+
serde_with = "3.14.0"
139139
serde-xml-rs = "0.8.1" # Also an XML (de)serializer, consider dropping yaserde in favor of this
140140
sha1 = "0.10.6"
141141
sha1_smol = { version = "1.0.1", features = ["std"] }
142142
sha2 = "0.10.9"
143-
spdx = "0.10.8"
143+
spdx = "0.10.9"
144144
sqlx = { version = "0.8.6", default-features = false }
145-
sysinfo = { version = "0.35.2", default-features = false }
145+
sysinfo = { version = "0.36.1", default-features = false }
146146
tar = "0.4.44"
147-
tauri = "2.6.1"
148-
tauri-build = "2.3.0"
149-
tauri-plugin-deep-link = "2.4.0"
150-
tauri-plugin-dialog = "2.3.0"
151-
tauri-plugin-http = "2.5.0"
147+
tauri = "2.7.0"
148+
tauri-build = "2.3.1"
149+
tauri-plugin-deep-link = "2.4.1"
150+
tauri-plugin-dialog = "2.3.2"
151+
tauri-plugin-http = "2.5.1"
152152
tauri-plugin-opener = "2.4.0"
153153
tauri-plugin-os = "2.3.0"
154-
tauri-plugin-single-instance = "2.3.0"
154+
tauri-plugin-single-instance = "2.3.2"
155155
tauri-plugin-updater = { version = "2.9.0", default-features = false, features = [
156156
"rustls-tls",
157157
"zip",
158158
] }
159-
tauri-plugin-window-state = "2.3.0"
159+
tauri-plugin-window-state = "2.4.0"
160160
tempfile = "3.20.0"
161161
theseus = { path = "packages/app-lib" }
162162
thiserror = "2.0.12"
163163
tikv-jemalloc-ctl = "0.6.0"
164164
tikv-jemallocator = "0.6.0"
165-
tokio = "1.45.1"
165+
tokio = "1.47.1"
166166
tokio-stream = "0.1.17"
167-
tokio-util = "0.7.15"
167+
tokio-util = "0.7.16"
168168
totp-rs = "5.7.0"
169169
tracing = "0.1.41"
170-
tracing-actix-web = "0.7.18"
170+
tracing-actix-web = "0.7.19"
171171
tracing-error = "0.2.1"
172172
tracing-subscriber = "0.3.19"
173173
url = "2.5.4"
@@ -179,7 +179,7 @@ whoami = "1.6.0"
179179
winreg = "0.55.0"
180180
woothee = "0.13.0"
181181
yaserde = "0.12.0"
182-
zip = { version = "4.2.0", default-features = false, features = [
182+
zip = { version = "4.3.0", default-features = false, features = [
183183
"bzip2",
184184
"deflate",
185185
"deflate64",
@@ -226,7 +226,7 @@ wildcard_dependencies = "warn"
226226
warnings = "deny"
227227

228228
[patch.crates-io]
229-
wry = { git = "https://github.com/modrinth/wry", rev = "21db186" }
229+
wry = { git = "https://github.com/modrinth/wry", rev = "f2ce0b0" }
230230

231231
# Optimize for speed and reduce size on release builds
232232
[profile.release]

apps/app/src/api/ads.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -197,15 +197,13 @@ pub async fn open_link<R: Runtime>(
197197

198198
if url::Url::parse(&path).is_ok()
199199
&& !state.malicious_origins.contains(&origin)
200+
&& let Some(last_click) = state.last_click
201+
&& last_click.elapsed() < Duration::from_millis(100)
200202
{
201-
if let Some(last_click) = state.last_click {
202-
if last_click.elapsed() < Duration::from_millis(100) {
203-
let _ = app.opener().open_url(&path, None::<String>);
204-
state.last_click = None;
203+
let _ = app.opener().open_url(&path, None::<String>);
204+
state.last_click = None;
205205

206-
return Ok(());
207-
}
208-
}
206+
return Ok(());
209207
}
210208

211209
tracing::info!("Malicious click: {path} origin {origin}");

apps/app/src/api/auth.rs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,13 @@ pub async fn login<R: Runtime>(
5959
.url()?
6060
.as_str()
6161
.starts_with("https://login.live.com/oauth20_desktop.srf")
62-
{
63-
if let Some((_, code)) =
62+
&& let Some((_, code)) =
6463
window.url()?.query_pairs().find(|x| x.0 == "code")
65-
{
66-
window.close()?;
67-
let val =
68-
minecraft_auth::finish_login(&code.clone(), flow).await?;
64+
{
65+
window.close()?;
66+
let val = minecraft_auth::finish_login(&code.clone(), flow).await?;
6967

70-
return Ok(Some(val));
71-
}
68+
return Ok(Some(val));
7269
}
7370

7471
tokio::time::sleep(std::time::Duration::from_millis(50)).await;

apps/app/src/api/utils.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@ pub async fn should_disable_mouseover() -> bool {
6363
// We try to match version to 12.2 or higher. If unrecognizable to pattern or lower, we default to the css with disabled mouseover for safety
6464
if let tauri_plugin_os::Version::Semantic(major, minor, _) =
6565
tauri_plugin_os::version()
66+
&& major >= 12
67+
&& minor >= 3
6668
{
67-
if major >= 12 && minor >= 3 {
68-
// Mac os version is 12.3 or higher, we allow mouseover
69-
return false;
70-
}
69+
// Mac os version is 12.3 or higher, we allow mouseover
70+
return false;
7171
}
7272
true
7373
} else {

apps/app/src/main.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -233,10 +233,10 @@ fn main() {
233233
});
234234

235235
#[cfg(not(target_os = "linux"))]
236-
if let Some(window) = app.get_window("main") {
237-
if let Err(e) = window.set_shadow(true) {
238-
tracing::warn!("Failed to set window shadow: {e}");
239-
}
236+
if let Some(window) = app.get_window("main")
237+
&& let Err(e) = window.set_shadow(true)
238+
{
239+
tracing::warn!("Failed to set window shadow: {e}");
240240
}
241241

242242
Ok(())

apps/daedalus_client/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# syntax=docker/dockerfile:1
22

3-
FROM rust:1.88.0 AS build
3+
FROM rust:1.89.0 AS build
44

55
WORKDIR /usr/src/daedalus
66
COPY . .

apps/daedalus_client/src/forge.rs

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -506,27 +506,25 @@ async fn fetch(
506506

507507
return Ok(lib);
508508
}
509-
} else if let Some(url) = &lib.url {
510-
if !url.is_empty() {
511-
insert_mirrored_artifact(
512-
&lib.name,
513-
None,
514-
vec![
515-
url.clone(),
516-
"https://libraries.minecraft.net/"
517-
.to_string(),
518-
"https://maven.creeperhost.net/"
519-
.to_string(),
520-
maven_url.to_string(),
521-
],
522-
false,
523-
mirror_artifacts,
524-
)?;
509+
} else if let Some(url) = &lib.url
510+
&& !url.is_empty()
511+
{
512+
insert_mirrored_artifact(
513+
&lib.name,
514+
None,
515+
vec![
516+
url.clone(),
517+
"https://libraries.minecraft.net/".to_string(),
518+
"https://maven.creeperhost.net/".to_string(),
519+
maven_url.to_string(),
520+
],
521+
false,
522+
mirror_artifacts,
523+
)?;
525524

526-
lib.url = Some(format_url("maven/"));
525+
lib.url = Some(format_url("maven/"));
527526

528-
return Ok(lib);
529-
}
527+
return Ok(lib);
530528
}
531529

532530
// Other libraries are generally available in the "maven" directory of the installer. If they are

apps/daedalus_client/src/main.rs

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -93,22 +93,22 @@ async fn main() -> Result<()> {
9393
.ok()
9494
.and_then(|x| x.parse::<bool>().ok())
9595
.unwrap_or(false)
96+
&& let Ok(token) = dotenvy::var("CLOUDFLARE_TOKEN")
97+
&& let Ok(zone_id) = dotenvy::var("CLOUDFLARE_ZONE_ID")
9698
{
97-
if let Ok(token) = dotenvy::var("CLOUDFLARE_TOKEN") {
98-
if let Ok(zone_id) = dotenvy::var("CLOUDFLARE_ZONE_ID") {
99-
let cache_clears = upload_files
99+
let cache_clears = upload_files
100+
.into_iter()
101+
.map(|x| format_url(&x.0))
102+
.chain(
103+
mirror_artifacts
100104
.into_iter()
101-
.map(|x| format_url(&x.0))
102-
.chain(
103-
mirror_artifacts
104-
.into_iter()
105-
.map(|x| format_url(&format!("maven/{}", x.0))),
106-
)
107-
.collect::<Vec<_>>();
108-
109-
// Cloudflare ratelimits cache clears to 500 files per request
110-
for chunk in cache_clears.chunks(500) {
111-
REQWEST_CLIENT.post(format!("https://api.cloudflare.com/client/v4/zones/{zone_id}/purge_cache"))
105+
.map(|x| format_url(&format!("maven/{}", x.0))),
106+
)
107+
.collect::<Vec<_>>();
108+
109+
// Cloudflare ratelimits cache clears to 500 files per request
110+
for chunk in cache_clears.chunks(500) {
111+
REQWEST_CLIENT.post(format!("https://api.cloudflare.com/client/v4/zones/{zone_id}/purge_cache"))
112112
.bearer_auth(&token)
113113
.json(&serde_json::json!({
114114
"files": chunk
@@ -128,8 +128,6 @@ async fn main() -> Result<()> {
128128
item: "cloudflare clear cache".to_string(),
129129
}
130130
})?;
131-
}
132-
}
133131
}
134132
}
135133

apps/daedalus_client/src/util.rs

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -167,20 +167,18 @@ pub async fn download_file(
167167
let bytes = x.bytes().await;
168168

169169
if let Ok(bytes) = bytes {
170-
if let Some(sha1) = sha1 {
171-
if &*sha1_async(bytes.clone()).await? != sha1 {
172-
if attempt <= 3 {
173-
continue;
174-
} else {
175-
return Err(
176-
crate::ErrorKind::ChecksumFailure {
177-
hash: sha1.to_string(),
178-
url: url.to_string(),
179-
tries: attempt,
180-
}
181-
.into(),
182-
);
170+
if let Some(sha1) = sha1
171+
&& &*sha1_async(bytes.clone()).await? != sha1
172+
{
173+
if attempt <= 3 {
174+
continue;
175+
} else {
176+
return Err(crate::ErrorKind::ChecksumFailure {
177+
hash: sha1.to_string(),
178+
url: url.to_string(),
179+
tries: attempt,
183180
}
181+
.into());
184182
}
185183
}
186184

0 commit comments

Comments
 (0)