Skip to content

Commit f196430

Browse files
Inherit dependencies from workspace manifest, and optimize some out (#3655)
* chore: inherit dependencies from workspace, optimize some deps out * Update bitflags from 2.9.0 to 2.9.1 * Fix temp directory leak in check_java_at_filepath * Fix build * Fix lint * chore(app-lib): refactor overkill `futures` executor usage to Tokio MPSC * chore: fix Clippy lint * tweak: optimize out dependency on OpenSSL source build Contrary to what I expected before, this was caused due to the Tauri updater plugin using a different TLS stack than everything else. * chore(labrinth): drop now unused dependency * Update zip because 2.6.1 got yanked * Downgrade weezl to 0.1.8 * Mention that p256 is also a blocker for rand 0.9 * chore: sidestep GitHub review requirements * chore: sidestep GitHub review requirements (2) * chore: sidestep GitHub review requirements (3) --------- Co-authored-by: Josiah Glosson <soujournme@gmail.com>
1 parent 37cc81a commit f196430

File tree

35 files changed

+901
-1045
lines changed

35 files changed

+901
-1045
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 173 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,182 @@
11
[workspace]
2-
resolver = '2'
2+
resolver = "2"
33
members = [
4-
'./packages/app-lib',
5-
'./apps/app-playground',
6-
'./apps/app',
7-
'./apps/labrinth',
8-
'./apps/daedalus_client',
9-
'./packages/daedalus',
10-
'./packages/ariadne',
4+
"apps/app",
5+
"apps/app-playground",
6+
"apps/daedalus_client",
7+
"apps/labrinth",
8+
"packages/app-lib",
9+
"packages/ariadne",
10+
"packages/daedalus",
1111
]
1212

13+
[workspace.dependencies]
14+
actix-cors = "0.7.1"
15+
actix-files = "0.6.6"
16+
actix-http = "3.11.0"
17+
actix-multipart = "0.7.2"
18+
actix-rt = "2.10.0"
19+
actix-web = "4.11.0"
20+
actix-web-prom = "0.10.0"
21+
actix-ws = "0.3.0"
22+
argon2 = { version = "0.5.3", features = ["std"] }
23+
ariadne = { path = "packages/ariadne" }
24+
async-compression = { version = "0.4.23", default-features = false }
25+
async-recursion = "1.1.1"
26+
async-stripe = { version = "0.41.0", default-features = false, features = [
27+
"runtime-tokio-hyper-rustls",
28+
] }
29+
async-trait = "0.1.88"
30+
async-tungstenite = { version = "0.29.1", default-features = false, features = [
31+
"futures-03-sink",
32+
] }
33+
async-walkdir = "2.1.0"
34+
async_zip = "0.0.17"
35+
base64 = "0.22.1"
36+
bitflags = "2.9.0"
37+
bytes = "1.10.1"
38+
censor = "0.3.0"
39+
chrono = "0.4.41"
40+
clap = "4.5.38"
41+
clickhouse = "0.13.2"
42+
color-thief = "0.2.2"
43+
console-subscriber = "0.4.1"
44+
daedalus = { path = "packages/daedalus" }
45+
dashmap = "6.1.0"
46+
deadpool-redis = "0.20.0"
47+
dirs = "6.0.0"
48+
discord-rich-presence = "0.2.5"
49+
dotenv-build = "0.1.1"
50+
dotenvy = "0.15.7"
51+
dunce = "1.0.5"
52+
either = "1.15.0"
53+
enumset = "1.1.6"
54+
flate2 = "1.1.1"
55+
fs4 = { version = "0.13.1", default-features = false }
56+
futures = { version = "0.3.31", default-features = false }
57+
futures-util = "0.3.31"
58+
hex = "0.4.3"
59+
hickory-resolver = "0.25.2"
60+
hmac = "0.12.1"
61+
hyper-tls = "0.6.0"
62+
hyper-util = "0.1.11"
63+
iana-time-zone = "0.1.63"
64+
image = { version = "0.25.6", default-features = false, features = ["rayon"] }
65+
indexmap = "2.9.0"
66+
indicatif = "0.17.11"
67+
itertools = "0.14.0"
68+
jemalloc_pprof = "0.7.0"
69+
json-patch = { version = "4.0.0", default-features = false }
70+
lettre = { version = "0.11.16", default-features = false, features = [
71+
"builder",
72+
"hostname",
73+
"pool",
74+
"ring",
75+
"rustls",
76+
"rustls-native-certs",
77+
"smtp-transport",
78+
] }
79+
maxminddb = "0.26.0"
80+
meilisearch-sdk = { version = "0.28.0", default-features = false }
81+
murmur2 = "0.1.0"
82+
native-dialog = "0.9.0"
83+
notify = { version = "8.0.0", default-features = false }
84+
notify-debouncer-mini = { version = "0.6.0", default-features = false }
85+
p256 = "0.13.2"
86+
paste = "1.0.15"
87+
prometheus = "0.14.0"
88+
quartz_nbt = "0.2.9"
89+
quick-xml = "0.37.5"
90+
rand = "=0.8.5" # Locked on 0.8 until argon2 and p256 update to 0.9
91+
rand_chacha = "=0.3.1" # Locked on 0.3 until we can update rand to 0.9
92+
redis = "=0.29.5" # Locked on 0.29 until deadpool-redis updates to 0.30
93+
regex = "1.11.1"
94+
reqwest = { version = "0.12.15", default-features = false }
95+
rust-s3 = { version = "0.35.1", default-features = false, features = [
96+
"fail-on-err",
97+
"tags",
98+
"tokio-rustls-tls",
99+
] }
100+
rust_decimal = { version = "1.37.1", features = [
101+
"serde-with-float",
102+
"serde-with-str",
103+
] }
104+
rust_iso3166 = "0.1.14"
105+
rusty-money = "0.4.1"
106+
sentry = { version = "0.38.1", default-features = false, features = [
107+
"backtrace",
108+
"contexts",
109+
"debug-images",
110+
"panic",
111+
"reqwest",
112+
"rustls",
113+
] }
114+
sentry-actix = "0.38.1"
115+
serde = "1.0.219"
116+
serde-xml-rs = "0.8.0" # Also an XML (de)serializer, consider dropping yaserde in favor of this
117+
serde_bytes = "0.11.17"
118+
serde_cbor = "0.11.2"
119+
serde_ini = "0.2.0"
120+
serde_json = "1.0.140"
121+
serde_with = "3.12.0"
122+
sha1 = "0.10.6"
123+
sha1_smol = { version = "1.0.1", features = ["std"] }
124+
sha2 = "0.10.9"
125+
spdx = "0.10.8"
126+
sqlx = { version = "0.8.5", default-features = false }
127+
sysinfo = { version = "0.35.1", default-features = false }
128+
tar = "0.4.44"
129+
tauri = "2.5.1"
130+
tauri-build = "2.2.0"
131+
tauri-plugin-deep-link = "2.2.1"
132+
tauri-plugin-dialog = "2.2.1"
133+
tauri-plugin-opener = "2.2.6"
134+
tauri-plugin-os = "2.2.1"
135+
tauri-plugin-single-instance = "2.2.3"
136+
tauri-plugin-updater = { version = "2.7.1", default-features = false, features = [
137+
"rustls-tls",
138+
] }
139+
tauri-plugin-window-state = "2.2.2"
140+
tempfile = "3.20.0"
141+
theseus = { path = "packages/app-lib" }
142+
thiserror = "2.0.12"
143+
tikv-jemalloc-ctl = "0.6.0"
144+
tikv-jemallocator = "0.6.0"
145+
tokio = "1.45.0"
146+
tokio-stream = "0.1.17"
147+
tokio-util = "0.7.15"
148+
totp-rs = "5.7.0"
149+
tracing = "0.1.41"
150+
tracing-actix-web = "0.7.18"
151+
tracing-error = "0.2.1"
152+
tracing-subscriber = "0.3.19"
153+
url = "2.5.4"
154+
urlencoding = "2.1.3"
155+
uuid = "1.16.0"
156+
validator = "0.20.0"
157+
webp = { version = "0.3.0", default-features = false }
158+
whoami = "1.6.0"
159+
winreg = "0.55.0"
160+
woothee = "0.13.0"
161+
yaserde = "0.12.0"
162+
zip = { version = "3.0.0", default-features = false, features = [
163+
"bzip2",
164+
"deflate",
165+
"deflate64",
166+
"zstd",
167+
] }
168+
zxcvbn = "3.1.0"
169+
170+
[patch.crates-io]
171+
wry = { git = "https://github.com/modrinth/wry", rev = "cafdaa9" }
172+
13173
# Optimize for speed and reduce size on release builds
14174
[profile.release]
15-
panic = "abort" # Strip expensive panic clean-up logic
16-
codegen-units = 1 # Compile crates one after another so the compiler can optimize better
17-
lto = true # Enables link to optimizations
18-
opt-level = "s" # Optimize for binary size
19-
strip = true # Remove debug symbols
175+
opt-level = "s" # Optimize for binary size
176+
strip = true # Remove debug symbols
177+
lto = true # Enables link to optimizations
178+
panic = "abort" # Strip expensive panic clean-up logic
179+
codegen-units = 1 # Compile crates one after another so the compiler can optimize better
20180

21181
[profile.dev.package.sqlx-macros]
22182
opt-level = 3
23-
24-
[patch.crates-io]
25-
wry = { git = "https://github.com/modrinth/wry", rev = "cafdaa9" }

apps/app-playground/Cargo.toml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ edition = "2024"
66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
77

88
[dependencies]
9-
theseus = { path = "../../packages/app-lib", features = ["cli"] }
10-
tokio = { version = "1", features = ["full"] }
11-
webbrowser = "1.0.4"
12-
enumset = "1.1"
13-
14-
tracing = "0.1.37"
9+
theseus = { workspace = true, features = ["cli"] }
10+
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
11+
enumset.workspace = true

apps/app-playground/src/main.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ pub async fn authenticate_run() -> theseus::Result<Credentials> {
1515
println!("A browser window will now open, follow the login flow there.");
1616
let login = minecraft_auth::begin_login().await?;
1717

18-
println!("URL {}", login.redirect_uri.as_str());
19-
webbrowser::open(login.redirect_uri.as_str())?;
18+
println!("Open URL {} in a browser", login.redirect_uri.as_str());
2019

2120
println!("Please enter URL code: ");
2221
let mut input = String::new();

apps/app/Cargo.toml

Lines changed: 28 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -8,47 +8,45 @@ edition = "2024"
88
build = "build.rs"
99

1010
[build-dependencies]
11-
tauri-build = { version = "2.2.0", features = ["codegen"] }
11+
tauri-build = { workspace = true, features = ["codegen"] }
1212

1313
[dependencies]
14-
theseus = { path = "../../packages/app-lib", features = ["tauri"] }
14+
theseus = { workspace = true, features = ["tauri"] }
1515

16-
serde_json = "1.0"
17-
serde = { version = "1.0", features = ["derive"] }
18-
serde_with = "3.0.0"
16+
serde_json.workspace = true
17+
serde = { workspace = true, features = ["derive"] }
18+
serde_with.workspace = true
1919

20-
tauri = { version = "2.5.1", features = ["devtools", "macos-private-api", "protocol-asset", "unstable"] }
21-
tauri-plugin-window-state = "2.2.0"
22-
tauri-plugin-deep-link = "2.2.0"
23-
tauri-plugin-os = "2.2.0"
24-
tauri-plugin-opener = "2.2.6"
25-
tauri-plugin-dialog = "2.2.0"
26-
tauri-plugin-updater = { version = "2.3.0" }
27-
tauri-plugin-single-instance = { version = "2.2.0" }
20+
tauri = { workspace = true, features = ["devtools", "macos-private-api", "protocol-asset", "unstable"] }
21+
tauri-plugin-window-state.workspace = true
22+
tauri-plugin-deep-link.workspace = true
23+
tauri-plugin-os.workspace = true
24+
tauri-plugin-opener.workspace = true
25+
tauri-plugin-dialog.workspace = true
26+
tauri-plugin-updater.workspace = true
27+
tauri-plugin-single-instance.workspace = true
2828

29-
tokio = { version = "1", features = ["full"] }
30-
thiserror = "2.0.12"
31-
daedalus = { path = "../../packages/daedalus" }
32-
chrono = "0.4.26"
33-
either = "1.15"
29+
tokio = { workspace = true, features = ["time"] }
30+
thiserror.workspace = true
31+
daedalus.workspace = true
32+
chrono.workspace = true
33+
either.workspace = true
3434

35-
url = "2.2"
36-
urlencoding = "2.1"
37-
uuid = { version = "1.1", features = ["serde", "v4"] }
35+
url.workspace = true
36+
urlencoding.workspace = true
37+
uuid = { workspace = true, features = ["serde", "v4"] }
3838

39-
tracing = "0.1.37"
40-
tracing-error = "0.2.0"
39+
tracing.workspace = true
40+
tracing-error.workspace = true
4141

42-
dashmap = "6.1.0"
43-
paste = "1.0.15"
44-
enumset = { version = "1.1", features = ["serde"] }
42+
dashmap.workspace = true
43+
paste.workspace = true
44+
enumset = { workspace = true, features = ["serde"] }
4545

46-
opener = { version = "0.7.2", features = ["reveal", "dbus-vendored"] }
47-
48-
native-dialog = "0.9.0"
46+
native-dialog.workspace = true
4947

5048
[target.'cfg(target_os = "linux")'.dependencies]
51-
tauri-plugin-updater = { version = "2.3.0", optional = true, features = ["native-tls-vendored", "zip"], default-features = false }
49+
tauri-plugin-updater = { workspace = true, optional = true }
5250

5351
[features]
5452
# by default Tauri runs in production mode

apps/app/src/api/utils.rs

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
use serde::{Deserialize, Serialize};
2+
use tauri::Runtime;
3+
use tauri_plugin_opener::OpenerExt;
24
use theseus::{
35
handler,
46
prelude::{CommandPayload, DirectoryInfo},
@@ -74,29 +76,29 @@ pub async fn should_disable_mouseover() -> bool {
7476
}
7577

7678
#[tauri::command]
77-
pub fn highlight_in_folder(path: PathBuf) {
78-
let res = opener::reveal(path);
79-
80-
if let Err(e) = res {
79+
pub fn highlight_in_folder<R: Runtime>(
80+
app: tauri::AppHandle<R>,
81+
path: PathBuf,
82+
) {
83+
if let Err(e) = app.opener().reveal_item_in_dir(path) {
8184
tracing::error!("Failed to highlight file in folder: {}", e);
8285
}
8386
}
8487

8588
#[tauri::command]
86-
pub fn open_path(path: PathBuf) {
87-
let res = opener::open(path);
88-
89-
if let Err(e) = res {
89+
pub fn open_path<R: Runtime>(app: tauri::AppHandle<R>, path: PathBuf) {
90+
if let Err(e) = app.opener().open_path(path.to_string_lossy(), None::<&str>)
91+
{
9092
tracing::error!("Failed to open path: {}", e);
9193
}
9294
}
9395

9496
#[tauri::command]
95-
pub fn show_launcher_logs_folder() {
97+
pub fn show_launcher_logs_folder<R: Runtime>(app: tauri::AppHandle<R>) {
9698
let path = DirectoryInfo::launcher_logs_dir().unwrap_or_default();
9799
// failure to get folder just opens filesystem
98100
// (ie: if in debug mode only and launcher_logs never created)
99-
open_path(path);
101+
open_path(app, path);
100102
}
101103

102104
// Get opening command

apps/daedalus_client/Cargo.toml

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,24 @@ edition = "2024"
77
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
88

99
[dependencies]
10-
daedalus = { path = "../../packages/daedalus" }
11-
tokio = { version = "1", features = ["full"] }
12-
futures = "0.3.25"
13-
dotenvy = "0.15.6"
14-
serde = { version = "1.0", features = ["derive"] }
15-
serde_json = "1.0"
16-
serde-xml-rs = "0.6.0"
17-
lazy_static = "1.4.0"
18-
thiserror = "2.0"
19-
reqwest = { version = "0.12.15", default-features = false, features = ["stream", "json", "rustls-tls-native-roots"] }
20-
async_zip = { version = "0.0.17", features = ["full"] }
21-
chrono = { version = "0.4", features = ["serde"] }
22-
bytes = "1.6.0"
23-
rust-s3 = { version = "0.35.1", default-features = false, features = ["fail-on-err", "tags", "tokio-rustls-tls"] }
24-
dashmap = "6.1.0"
25-
sha1_smol = { version = "1.0.0", features = ["std"] }
26-
indexmap = { version = "2.2.6", features = ["serde"] }
27-
itertools = "0.14.0"
28-
tracing-error = "0.2.0"
10+
daedalus.workspace = true
11+
tokio = { workspace = true, features = ["sync", "macros", "rt-multi-thread"] }
12+
futures.workspace = true
13+
dotenvy.workspace = true
14+
serde = { workspace = true, features = ["derive"] }
15+
serde_json.workspace = true
16+
serde-xml-rs.workspace = true
17+
thiserror.workspace = true
18+
reqwest = { workspace = true, features = ["stream", "json", "rustls-tls-native-roots"] }
19+
async_zip = { workspace = true, features = ["chrono", "tokio-fs", "deflate", "bzip2", "zstd", "deflate64"] }
20+
chrono = { workspace = true, features = ["serde"] }
21+
bytes.workspace = true
22+
rust-s3.workspace = true
23+
dashmap.workspace = true
24+
sha1_smol.workspace = true
25+
indexmap = { workspace = true, features = ["serde"] }
26+
itertools.workspace = true
27+
tracing-error.workspace = true
2928

30-
tracing = "0.1"
31-
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
29+
tracing.workspace = true
30+
tracing-subscriber = { workspace = true, features = ["env-filter"] }

0 commit comments

Comments
 (0)