From be21a9e721aab2a8a31b69cdc94b2a0732d885c4 Mon Sep 17 00:00:00 2001 From: Arthur Date: Tue, 26 Nov 2024 17:58:39 +0000 Subject: [PATCH] Prune some deps --- Cargo.lock | 33 --- Cargo.toml | 7 +- crates/brush-dataset/Cargo.toml | 3 - crates/brush-desktop/Cargo.toml | 13 +- crates/brush-desktop/index.html | 272 +++++++++--------- crates/brush-render/Cargo.toml | 2 +- crates/brush-rerun/Cargo.toml | 1 - crates/brush-train/Cargo.toml | 4 +- crates/brush-ui/Cargo.toml | 1 - crates/brush-viewer/Cargo.toml | 14 +- .../brush-viewer/src/panels/tracing_debug.rs | 3 - crates/train-2d/Cargo.toml | 2 - 12 files changed, 140 insertions(+), 215 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4de8ef96..9915ee27 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -700,14 +700,12 @@ dependencies = [ "log", "ply-rs 0.1.3 (git+https://github.com/ArthurBrussee/ply-rs.git)", "rand", - "safetensors 0.4.5", "serde", "serde_json", "tokio", "tokio-stream", "tokio_with_wasm", "tracing", - "web-time", "zip 2.2.1", ] @@ -715,8 +713,6 @@ dependencies = [ name = "brush-desktop" version = "0.1.0" dependencies = [ - "anyhow", - "brush-train", "brush-ui", "brush-viewer", "cfg-if", @@ -725,7 +721,6 @@ dependencies = [ "egui", "env_logger", "log", - "parking_lot", "tokio", "tokio_with_wasm", "tracing", @@ -733,7 +728,6 @@ dependencies = [ "tracing-tracy", "tracing-wasm", "wasm-bindgen", - "wasm-bindgen-futures", "wasm-logger", "web-sys", "winit", @@ -803,7 +797,6 @@ name = "brush-rerun" version = "0.1.0" dependencies = [ "burn", - "bytemuck", "rerun", ] @@ -831,13 +824,10 @@ dependencies = [ "anyhow", "brush-render", "burn", - "burn-wgpu", "glam", "image", "log", - "parking_lot", "rand", - "tokio", "tracing", ] @@ -845,7 +835,6 @@ dependencies = [ name = "brush-ui" version = "0.1.0" dependencies = [ - "brush-render", "burn", "burn-fusion", "burn-wgpu", @@ -862,7 +851,6 @@ dependencies = [ "anyhow", "async-fn-stream", "brush-dataset", - "brush-kernel", "brush-render", "brush-rerun", "brush-train", @@ -870,31 +858,24 @@ dependencies = [ "burn", "burn-jit", "burn-wgpu", - "cfg-if", "eframe", "egui", "egui_tiles", "glam", - "gloo-timers", "humantime", "image", "log", - "parking_lot", "rand", "reqwest", "rerun", "rrfd", - "sync-span", "tokio", "tokio-stream", "tokio-util", "tokio_with_wasm", "tracing", - "tracing-subscriber", - "tracing-tracy", "tracing-wasm", "urlencoding", - "wasm-bindgen-futures", "web-sys", "web-time", "wgpu", @@ -3266,18 +3247,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" -[[package]] -name = "gloo-timers" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbb143cf96099802033e0d4f4963b19fd2e0b728bcf076cd9cf7f6634f092994" -dependencies = [ - "futures-channel", - "futures-core", - "js-sys", - "wasm-bindgen", -] - [[package]] name = "glow" version = "0.13.1" @@ -7768,12 +7737,10 @@ dependencies = [ name = "train-2d" version = "0.1.0" dependencies = [ - "async-fn-stream", "brush-render", "brush-train", "brush-ui", "burn", - "burn-wgpu", "eframe", "egui", "env_logger", diff --git a/Cargo.toml b/Cargo.toml index f12f3c61..3ccab5d6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -54,7 +54,6 @@ assert_approx_eq = "1.1.0" safetensors = "0.4.3" log = "0.4.22" wasm-bindgen = "0.2.95" -wasm-bindgen-futures = "0.4.45" wgpu = "22.1.0" naga = "22.1.0" @@ -97,7 +96,6 @@ rerun = { version = "0.19.1", default-features = false, features = [ ] } kiddo = "4.2.1" -gloo-timers = { version = "0.3.0", features = ["futures"] } # Build dependencies. thiserror = "*" @@ -130,11 +128,12 @@ naga = { git = "https://github.com/ArthurBrussee/wgpu", branch = "flt-atom" } opt-level = 0 debug = true -# Optimize all dependencies even in debug builds (does not affect workspace packages): +# Optimize dependencies even in debug builds (does not affect workspace packages): [profile.dev.package."*"] opt-level = 1 debug = true [profile.release] # debug = true # good for profilers -# panic = "abort" # This leads to better optimizations and smaller binaries (and is the default in Wasm anyways). +panic = "abort" # This leads to better optimizations and smaller binaries (and is the default in Wasm). +lto = "thin" diff --git a/crates/brush-dataset/Cargo.toml b/crates/brush-dataset/Cargo.toml index 3e406796..a3b51274 100644 --- a/crates/brush-dataset/Cargo.toml +++ b/crates/brush-dataset/Cargo.toml @@ -19,11 +19,8 @@ burn.workspace = true tracing.workspace = true log.workspace = true ply-rs.workspace = true -web-time.workspace = true rand.workspace = true -safetensors.workspace = true - tokio = { workspace = true, features = ["io-util"] } tokio_with_wasm.workspace = true tokio-stream.workspace = true diff --git a/crates/brush-desktop/Cargo.toml b/crates/brush-desktop/Cargo.toml index 5dd0eaed..4d15f85c 100644 --- a/crates/brush-desktop/Cargo.toml +++ b/crates/brush-desktop/Cargo.toml @@ -11,15 +11,11 @@ name = "brush_bin" path = "src/main.rs" [dependencies] -anyhow.workspace = true egui.workspace = true eframe.workspace = true brush-viewer.path = "../brush-viewer" -brush-train.path = "../brush-train" brush-ui.path = "../brush-ui" log.workspace = true -env_logger.workspace = true -parking_lot.workspace = true tokio_with_wasm = { workspace = true, features = ["rt"] } # Default to wayland on linux. Change this to x11 if needed. @@ -27,24 +23,23 @@ tokio_with_wasm = { workspace = true, features = ["rt"] } # so you could run with cargo run --no-default-features --features=11 winit = { version = "0.30", features = ["default"] } -tracing-tracy = { workspace = true, optional = true } tracing-subscriber.workspace = true tracing.workspace = true cfg-if.workspace = true - [target.'cfg(not(target_arch = "wasm32"))'.dependencies] tokio = { workspace = true, features = ["io-util", "rt", "rt-multi-thread"] } +env_logger.workspace = true +tracing-tracy = { workspace = true, optional = true } [target.'cfg(target_arch = "wasm32")'.dependencies] tokio = { workspace = true, features = ["io-util", "rt"] } tracing-wasm.workspace = true - wasm-bindgen.workspace = true -wasm-bindgen-futures.workspace = true console_error_panic_hook.workspace = true web-sys.workspace = true wasm-logger.workspace = true [features] -tracy = ["brush-viewer/tracy"] +tracy = ["dep:tracing-tracy", "tracing"] +tracing = ["brush-viewer/tracing"] diff --git a/crates/brush-desktop/index.html b/crates/brush-desktop/index.html index 2cd6fe6f..bccdc56b 100644 --- a/crates/brush-desktop/index.html +++ b/crates/brush-desktop/index.html @@ -1,155 +1,143 @@ - - - - - - - - - Brush 🖌️ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + } + + + + + + + + + + + + + + \ No newline at end of file diff --git a/crates/brush-render/Cargo.toml b/crates/brush-render/Cargo.toml index efde8e3a..5f0a8a6d 100644 --- a/crates/brush-render/Cargo.toml +++ b/crates/brush-render/Cargo.toml @@ -20,7 +20,6 @@ burn-fusion.workspace = true bytemuck.workspace = true glam.workspace = true -image.workspace = true naga_oil.workspace = true safetensors.workspace = true tracing.workspace = true @@ -37,6 +36,7 @@ miette.workspace = true [dev-dependencies] rerun.workspace = true +image.workspace = true brush-rerun.path = "../brush-rerun" divan = "0.1.14" diff --git a/crates/brush-rerun/Cargo.toml b/crates/brush-rerun/Cargo.toml index 236cf2fa..deb9582d 100644 --- a/crates/brush-rerun/Cargo.toml +++ b/crates/brush-rerun/Cargo.toml @@ -7,5 +7,4 @@ license.workspace = true [dependencies] burn.workspace = true -bytemuck.workspace = true rerun.workspace = true diff --git a/crates/brush-train/Cargo.toml b/crates/brush-train/Cargo.toml index f920aeca..38697e8e 100644 --- a/crates/brush-train/Cargo.toml +++ b/crates/brush-train/Cargo.toml @@ -7,14 +7,12 @@ license.workspace = true [dependencies] brush-render.path = "../brush-render" + anyhow.workspace = true image.workspace = true glam.workspace = true rand.workspace = true tracing.workspace = true -parking_lot.workspace = true log.workspace = true -tokio.workspace = true burn.workspace = true -burn-wgpu.workspace = true diff --git a/crates/brush-ui/Cargo.toml b/crates/brush-ui/Cargo.toml index b212128b..bfd11fb8 100644 --- a/crates/brush-ui/Cargo.toml +++ b/crates/brush-ui/Cargo.toml @@ -9,7 +9,6 @@ license.workspace = true burn.workspace = true burn-wgpu.workspace = true burn-fusion.workspace = true -brush-render.path = "../brush-render" glam.workspace = true eframe.workspace = true egui.workspace = true diff --git a/crates/brush-viewer/Cargo.toml b/crates/brush-viewer/Cargo.toml index 50af7d2b..0fc0224c 100644 --- a/crates/brush-viewer/Cargo.toml +++ b/crates/brush-viewer/Cargo.toml @@ -10,7 +10,6 @@ license.workspace = true brush-render.path = "../brush-render" brush-train.path = "../brush-train" brush-dataset.path = "../brush-dataset" -brush-kernel.path = "../brush-kernel" brush-ui.path = "../brush-ui" # Workspace deps. @@ -27,20 +26,14 @@ egui.workspace = true egui_tiles.workspace = true tracing.workspace = true wgpu.workspace = true -tracing-subscriber.workspace = true rand.workspace = true web-time.workspace = true humantime.workspace = true log.workspace = true -gloo-timers.workspace = true - -tracing-tracy = { workspace = true, optional = true } -cfg-if.workspace = true rrfd.path = "../rrfd" -sync-span.path = "../sync-span" zip.workspace = true async-fn-stream.workspace = true @@ -48,13 +41,9 @@ async-fn-stream.workspace = true tokio_with_wasm = { workspace = true, features = ["rt"] } tokio = { workspace = true, features = ["io-util", "rt"] } tokio-util.workspace = true - -reqwest.workspace = true - tokio-stream.workspace = true -wasm-bindgen-futures.workspace = true -parking_lot.workspace = true +reqwest.workspace = true urlencoding.workspace = true [target.'cfg(not(target_family = "wasm"))'.dependencies] @@ -66,7 +55,6 @@ tracing-wasm.workspace = true web-sys.workspace = true [features] -tracy = ["dep:tracing-tracy", "tracing"] tracing = [] [package.metadata.wasm-pack.profile.release.wasm-bindgen] diff --git a/crates/brush-viewer/src/panels/tracing_debug.rs b/crates/brush-viewer/src/panels/tracing_debug.rs index a03c7931..1fc8f08e 100644 --- a/crates/brush-viewer/src/panels/tracing_debug.rs +++ b/crates/brush-viewer/src/panels/tracing_debug.rs @@ -12,9 +12,6 @@ impl ViewerPanel for TracingPanel { fn ui(&mut self, ui: &mut egui::Ui, _: &mut ViewerContext) { ui.checkbox(&mut self.constant_redraw, "Constant redraw"); - let mut checked = sync_span::is_enabled(); - ui.checkbox(&mut checked, "Sync scopes"); - sync_span::set_enabled(checked); // Nb: this redraws the whole context so this will include the splat views. if self.constant_redraw { diff --git a/crates/train-2d/Cargo.toml b/crates/train-2d/Cargo.toml index 787e0219..407155df 100644 --- a/crates/train-2d/Cargo.toml +++ b/crates/train-2d/Cargo.toml @@ -7,7 +7,6 @@ license.workspace = true [dependencies] burn.workspace = true -burn-wgpu.workspace = true wgpu.workspace = true brush-train.path = "../brush-train" brush-render.path = "../brush-render" @@ -15,7 +14,6 @@ brush-ui.path = "../brush-ui" tokio = { workspace = true, features = ["sync", "rt-multi-thread", "macros"] } env_logger.workspace = true -async-fn-stream.workspace = true rand.workspace = true glam.workspace = true image.workspace = true