Skip to content

Commit

Permalink
Remove unused code and update rust deps (#2662)
Browse files Browse the repository at this point in the history
* Remove deps-generator app
 - It is broken for quite a while and not being used

* Remove unused code and unused deps

* auto format

* Restore incorrectly removed files
 - Remove aws deps and test code using it

* Replace winapi-util with windows-rs
 - Adjust some deps versions

* Autoformat

* Update rand, remove unused dep

* Fix image crate due to changes in pdf-renderer
 - Dont use default features in reqwest
 - Use native-tls tauri

* Remove incorrect notice about blake3
  • Loading branch information
HeavenVolkoff authored Aug 15, 2024
1 parent 8527b42 commit 6672c6c
Show file tree
Hide file tree
Showing 45 changed files with 730 additions and 2,884 deletions.
2,092 changes: 548 additions & 1,544 deletions Cargo.lock

Large diffs are not rendered by default.

20 changes: 4 additions & 16 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[workspace]
members = [
"apps/deps-generator",
"apps/desktop/crates/*",
"apps/desktop/src-tauri",
"apps/mobile/modules/sd-core/android/crate",
Expand All @@ -26,14 +25,11 @@ async-stream = "0.3.5"
async-trait = "0.1.80"
axum = "0.6.20" # Update blocked by hyper
base64 = "0.22.1"
base91 = "0.1.0"
blake3 = "1.5"
chrono = "0.4.38"
directories = "5.0"
ed25519-dalek = "2.1.1"
ed25519-dalek = "2.1"
futures = "0.3.30"
futures-concurrency = "7.6"
gix-ignore = "0.11.2"
globset = "0.4.14"
http = "0.2" # Update blocked by axum
hyper = "0.14" # Update blocked due to API breaking changes
Expand All @@ -44,18 +40,16 @@ libc = "0.2"
normpath = "1.2"
once_cell = "1.19"
pin-project-lite = "0.2.14"
rand = "0.8.5"
rand = "0.9.0-alpha.2"
regex = "1.10"
reqwest = "0.11" # Update blocked by hyper
reqwest = { version = "0.11", default-features = false } # Update blocked by hyper
rmp = "0.8.14"
rmp-serde = "1.3.0"
rmp-serde = "1.3"
rmpv = { version = "1.3", features = ["with-serde"] }
rspc = "0.1.4" # Update blocked by custom patch below
serde = "1.0"
serde_json = "1.0"
specta = "=2.0.0-rc.20"
specta-typescript = "=0.0.7"
static_assertions = "1.1"
strum = "0.26"
strum_macros = "0.26"
tempfile = "3.10"
Expand All @@ -76,12 +70,6 @@ features = ["migrations", "specta", "sqlite", "sqlite-create-many"]
git = "https://github.com/brendonovich/prisma-client-rust"
rev = "4f9ef9d38c"

[workspace.dependencies.prisma-client-rust-cli]
default-features = false
features = ["migrations", "specta", "sqlite", "sqlite-create-many"]
git = "https://github.com/brendonovich/prisma-client-rust"
rev = "4f9ef9d38c"

[workspace.dependencies.prisma-client-rust-sdk]
default-features = false
features = ["sqlite"]
Expand Down
20 changes: 0 additions & 20 deletions apps/deps-generator/Cargo.toml

This file was deleted.

75 changes: 0 additions & 75 deletions apps/deps-generator/src/main.rs

This file was deleted.

12 changes: 0 additions & 12 deletions apps/deps-generator/src/types/backend.rs

This file was deleted.

33 changes: 0 additions & 33 deletions apps/deps-generator/src/types/cli.rs

This file was deleted.

36 changes: 0 additions & 36 deletions apps/deps-generator/src/types/frontend.rs

This file was deleted.

3 changes: 0 additions & 3 deletions apps/deps-generator/src/types/mod.rs

This file was deleted.

4 changes: 2 additions & 2 deletions apps/desktop/crates/macos/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license.workspace = true
repository.workspace = true

[target.'cfg(target_os = "macos")'.dependencies]
swift-rs = { version = "1.0.6", features = ["serde"] }
swift-rs = { version = "1.0", features = ["serde"] }

[target.'cfg(target_os = "macos")'.build-dependencies]
swift-rs = { version = "1.0.6", features = ["build"] }
swift-rs = { version = "1.0", features = ["build"] }
5 changes: 2 additions & 3 deletions apps/desktop/crates/windows/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ license.workspace = true
repository.workspace = true

[dependencies]
libc = { workspace = true }
normpath = { workspace = true }
thiserror = { workspace = true }
libc = { workspace = true }
normpath = { workspace = true }

[target.'cfg(target_os = "windows")'.dependencies.windows]
features = ["Win32_Foundation", "Win32_System_Com", "Win32_UI_Shell"]
Expand Down
12 changes: 6 additions & 6 deletions apps/desktop/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ sd-prisma = { path = "../../../crates/prisma" }

# Workspace dependencies
axum = { workspace = true, features = ["headers", "query"] }
directories = { workspace = true }
futures = { workspace = true }
http = { workspace = true }
hyper = { workspace = true }
Expand All @@ -27,7 +26,6 @@ rspc = { workspace = true, features = ["tauri", "tracing"] }
serde = { workspace = true }
serde_json = { workspace = true }
specta = { workspace = true }
specta-typescript = { workspace = true }
strum = { workspace = true, features = ["derive"] }
thiserror = { workspace = true }
tokio = { workspace = true, features = ["sync"] }
Expand All @@ -37,13 +35,15 @@ uuid = { workspace = true, features = ["serde"] }
# Specific Desktop dependencies
# WARNING: Do NOT enable default features, as that vendors dbus (see below)
opener = { version = "0.7.1", features = ["reveal"], default-features = false }
tauri = { version = "=2.0.0-rc.2", features = ["linux-libxdo", "macos-private-api", "unstable"] }
specta-typescript = "=0.0.7"
tauri-plugin-dialog = "=2.0.0-rc.0"
tauri-plugin-os = "=2.0.0-rc.0"
tauri-plugin-shell = "=2.0.0-rc.0"
tauri-plugin-updater = "=2.0.0-rc.0"
tauri-runtime = { version = "=2.0.0-rc.2" }
tauri-utils = { version = "=2.0.0-rc.2" }

[dependencies.tauri]
features = ["linux-libxdo", "macos-private-api", "native-tls-vendored", "unstable"]
version = "=2.0.0-rc.2"

[dependencies.tauri-specta]
features = ["derive", "typescript"]
Expand All @@ -57,7 +57,7 @@ sd-desktop-linux = { path = "../crates/linux" }
# Specific Desktop dependencies
# WARNING: dbus must NOT be vendored, as that breaks the app on Linux,X11,Nvidia
dbus = { version = "0.9.7", features = ["stdfd"] }
# https://github.com/tauri-apps/tauri/blob/tauri-v2.0.0-rc.2/core/tauri/Cargo.toml
# https://github.com/tauri-apps/tauri/blob/tauri-v2.0.0-rc.2/core/tauri/Cargo.toml#L86
webkit2gtk = { version = "=2.0.1", features = ["v2_38"] }

[target.'cfg(target_os = "macos")'.dependencies]
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/src-tauri/src/tauri_plugins.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use axum::{
};
use http::Method;
use hyper::server::{accept::Accept, conn::AddrIncoming};
use rand::{distributions::Alphanumeric, Rng};
use rand::{distr::Alphanumeric, Rng};
use sd_core::{custom_uri, Node, NodeError};
use serde::Deserialize;
use tauri::{async_runtime::block_on, plugin::TauriPlugin, RunEvent, Runtime};
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/modules/sd-core/android/crate/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ rust-version = "1.64"
# Android can use dynamic linking since all FFI is done via JNI
crate-type = ["cdylib"]

[dependencies]
[target.'cfg(target_os = "android")'.dependencies]
# Spacedrive Sub-crates
sd-mobile-core = { path = "../../core" }

Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/modules/sd-core/ios/crate/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ rust-version = "1.64"
# which are only available when linking against the app's ObjC
crate-type = ["staticlib"]

[dependencies]
[target.'cfg(target_os = "ios")'.dependencies]
# Spacedrive Sub-crates
sd-mobile-core = { path = "../../core" }
28 changes: 0 additions & 28 deletions apps/p2p-relay/Cargo.toml

This file was deleted.

15 changes: 0 additions & 15 deletions apps/p2p-relay/deploy.sh

This file was deleted.

Loading

0 comments on commit 6672c6c

Please sign in to comment.