Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENG-351] Tokio git patch #552

Merged
merged 2 commits into from
Jan 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 5 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,14 @@ specta = { version = "0.0.4" }

swift-rs = { git = "https://github.com/Brendonovich/swift-rs.git", rev = "833e29ba333f1dfe303eaa21de78c4f8c5a3f2ff" }

tokio = { version = "1.24.2" }

[patch.crates-io]
# We use this patch so we can compile for the IOS simulator on M1
openssl-sys = { git = "https://github.com/spacedriveapp/rust-openssl", rev = "92c3dec225a9e984884d5b30a517e5d44a24d03b" }

rspc = { git = "https://github.com/oscartbeaumont/rspc", rev = "6243b5b6a1376940a40318340e5eaef22e4a2c22" } # TODO: Move back to crates.io when new jsonrpc executor + `tokio::spawn` in the Tauri IPC plugin is released
normi = { git = "https://github.com/oscartbeaumont/rspc", rev = "6243b5b6a1376940a40318340e5eaef22e4a2c22" } # TODO: When normi is released on crates.io
specta = { git = "https://github.com/oscartbeaumont/rspc", rev = "6243b5b6a1376940a40318340e5eaef22e4a2c22" } # TODO: When normi is released on crates.io

tokio = { git = "https://github.com/spacedriveapp/tokio", rev = "d3936848ccb32ac7df41614acfabe5139a6a7d75" } # TODO: move back once tokio raise their internal read buffer size (ENG-351 for more)
6 changes: 2 additions & 4 deletions apps/desktop/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ build = "build.rs"
tauri = { version = "1.1.1", features = ["api-all", "macos-private-api"] }
rspc = { workspace = true, features = ["tauri"] }
sd-core = { path = "../../../core", features = ["ffmpeg", "location-watcher"] }
tokio = { version = "1.21.2", features = ["sync"] }
tokio = { workspace = true, features = ["sync"] }
window-shadows = "0.2.0"
tracing = "0.1.36"
serde = "1.0.145"
Expand All @@ -25,9 +25,7 @@ swift-rs.workspace = true
tauri-build = { version = "1.1.1", features = [] }

[target.'cfg(target_os = "macos")'.build-dependencies]
swift-rs = { workspace = true, features = [
"build",
] }
swift-rs = { workspace = true, features = ["build"] }

[features]
default = ["custom-protocol"]
Expand Down
6 changes: 3 additions & 3 deletions apps/mobile/rust/mobile/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ rust-version = "1.64.0"

[features]
android = ["sd-core/android"]

[dependencies]
once_cell = "1.15.0"
sd-core = { path = "../../../../core", features = [
"mobile",
"p2p",
], default-features = false }
rspc.workspace= true
rspc.workspace = true
serde_json = "1.0.85"
tokio = "1.21.2"
tokio = { workspace = true }
openssl = { version = "0.10.42", features = [
"vendored",
] } # Override features of transitive dependencies
Expand Down
2 changes: 1 addition & 1 deletion apps/server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ edition = "2021"
sd-core = { path = "../../core", features = ["ffmpeg"] }
rspc = { workspace = true, features = ["axum"] }
axum = "0.5.16"
tokio = { version = "1.21.2", features = ["sync", "rt-multi-thread", "signal"] }
tokio = { workspace = true, features = ["sync", "rt-multi-thread", "signal"] }
tracing = "0.1.36"
ctrlc = "3.2.3"
14 changes: 8 additions & 6 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ ffmpeg = [
"dep:ffmpeg-next",
"dep:sd-ffmpeg",
] # This feature controls whether the Spacedrive Core contains functionality which requires FFmpeg.
location-watcher = [
"dep:notify"
]
location-watcher = ["dep:notify"]

[dependencies]
hostname = "0.3.1"
Expand All @@ -46,10 +44,12 @@ uuid = { version = "1.1.2", features = ["v4", "serde"] }
sysinfo = "0.26.4"
thiserror = "1.0.37"

tokio = { version = "1.21.2", features = [
tokio = { workspace = true, features = [
"sync",
"rt-multi-thread",
"io-util",
"macros",
"time",
] }
include_dir = { version = "0.7.2", features = ["glob"] }
async-trait = "^0.1.57"
Expand All @@ -58,7 +58,7 @@ webp = "0.2.2"
ffmpeg-next = { version = "5.1.1", optional = true, features = [] }
sd-ffmpeg = { path = "../crates/ffmpeg", optional = true }
sd-crypto = { path = "../crates/crypto", features = ["rspc", "serde"] }
sd-file-ext = { path = "../crates/file-ext"}
sd-file-ext = { path = "../crates/file-ext" }
sd-sync = { path = "../crates/sync" }
fs_extra = "1.2.0"
tracing = "0.1.36"
Expand All @@ -70,7 +70,9 @@ ctor = "0.1.23"
globset = { version = "^0.4.9", features = ["serde1"] }
itertools = "^0.10.5"
enumflags2 = "0.7.5"
notify = { version = "5.0.0", default-features = false, features = ["macos_fsevent"], optional = true }
notify = { version = "5.0.0", default-features = false, features = [
"macos_fsevent",
], optional = true }
uhlc = "0.5.1"

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion crates/crypto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ specta = { workspace = true, optional = true }

hex = "0.4.3"

tokio = { version = "1.21.2", features = ["io-util", "rt-multi-thread"] }
tokio = { workspace = true, features = ["io-util", "rt-multi-thread"] }

[dev-dependencies]
criterion = "0.4.0"
Expand Down
4 changes: 2 additions & 2 deletions crates/ffmpeg/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ resolver = "2"
ffmpeg-sys-next = "5.1.1"
thiserror = "1.0.37"
webp = "0.2.2"
tokio = { version = "1.21.2", features = ["fs", "rt"] }
tokio = { workspace = true, features = ["fs", "rt"] }

[dev-dependencies]
tempfile = "3.3.0"
tokio = { version = "1.21.2", features = ["fs", "rt", "macros"] }
tokio = { workspace = true, features = ["fs", "rt", "macros"] }
13 changes: 8 additions & 5 deletions crates/file-ext/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,19 @@
name = "sd-file-ext"
version = "0.0.0"
edition = "2021"
authors = ["Brendan Allen <brendan@spacedrive.com>", "Jamie Pine <jamie@spacedrive.com>"]
authors = [
"Brendan Allen <brendan@spacedrive.com>",
"Jamie Pine <jamie@spacedrive.com>",
]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
int-enum = "0.5.0"
serde = {version = "1.0.145", features = ["derive"]}
serde = { version = "1.0.145", features = ["derive"] }
serde_json = "1.0.85"
strum = { version = "0.24", features = ["derive"]}
strum = { version = "0.24", features = ["derive"] }
strum_macros = "0.24"
tokio = { version = "1.21.2", features = ["fs", "rt", "io-util"] }
tokio = { workspace = true, features = ["fs", "rt", "io-util"] }

[dev-dependencies]
tokio = { version = "1.21.2", features = ["fs", "rt", "macros"] }
tokio = { workspace = true, features = ["fs", "rt", "macros"] }
4 changes: 2 additions & 2 deletions crates/p2p/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ sd-tunnel-utils = { path = "./tunnel/utils" }
dashmap = "5.3.4"
rcgen = "0.9.2"
rustls = "0.20.6"
tokio = { version = "1.19.2", features = ["macros", "sync"] }
tokio = { workspace = true, features = ["macros", "sync"] }
if-watch = "1.1.1"
thiserror = "1.0.31"
mdns-sd = "0.5.5"
Expand All @@ -25,4 +25,4 @@ tracing = "0.1.35"
specta = "0.0.2"

[dev-dependencies]
tokio = { version = "1.19.2", features = ["rt-multi-thread"] }
tokio = { workspace = true, features = ["rt-multi-thread"] }
6 changes: 4 additions & 2 deletions crates/p2p/tunnel/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ quinn = "0.8.3"
rcgen = "0.9.2"
rustls = "0.20.6"
serde = { version = "1.0.137", features = ["derive"] }
tokio = { version = "1.19.2", features = ["rt-multi-thread", "macros"] }
tokio = { workspace = true, features = ["rt-multi-thread", "macros"] }
tracing = "0.1.35"
tracing-subscriber = { version = "0.3.11", features = ["env-filter"] }
metrics = "0.19.0"
metrics-exporter-prometheus = { version = "0.10.0", features = ["http-listener"] }
metrics-exporter-prometheus = { version = "0.10.0", features = [
"http-listener",
] }
thiserror = "1.0.31"
rmp-serde = "1.1.0"
bb8-redis = "0.11.0"
2 changes: 1 addition & 1 deletion crates/sync/example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ serde_json = "1.0.85"
serde = { version = "1.0.145", features = ["derive"] }
axum = "0.5.16"
rspc = { workspace = true, features = ["axum"] }
tokio = { version = "1.21.2", features = ["full"] }
tokio = { workspace = true, features = ["full"] }
prisma-client-rust = { workspace = true }
dotenv = "0.15.0"
tower-http = { version = "0.3.4", features = ["cors"] }
Expand Down