From 5d3f31bdd03e0334adc55fd5ad56a37824dcda95 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Fri, 10 Jun 2022 15:38:44 +0200 Subject: [PATCH 1/5] CI: deny warnings, and used --locked --- .github/workflows/rust.yml | 4 ++-- check.sh | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 9641bea74b6f..3ee7d90c85d4 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -6,7 +6,7 @@ env: # This is required to enable the web_sys clipboard API which egui_web uses # https://rustwasm.github.io/wasm-bindgen/api/web_sys/struct.Clipboard.html # https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html - RUSTFLAGS: --cfg=web_sys_unstable_apis + RUSTFLAGS: --cfg=web_sys_unstable_apis -D warnings RUSTDOCFLAGS: -D warnings jobs: @@ -24,7 +24,7 @@ jobs: - uses: actions-rs/cargo@v1 with: command: check - args: --all-features + args: --all-features --locked check_no_features: name: Check --no-default-features diff --git a/check.sh b/check.sh index e9f07f8342c6..cce9cbf80d24 100755 --- a/check.sh +++ b/check.sh @@ -2,6 +2,7 @@ # This scripts runs various CI-like checks in a convenient way. set -eux +RUSTFLAGS="-D warnings" RUSTDOCFLAGS="-D warnings" # https://github.com/emilk/egui/pull/1454 cargo build --all-features From 0ebcb5aee8df17bd4c2e448f48dd4f0cb3b2496c Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Fri, 10 Jun 2022 17:01:39 +0200 Subject: [PATCH 2/5] Fix tests (broken on main too) --- data_store/benches/data_benchmark.rs | 2 +- data_store/examples/memory_usage.rs | 2 +- log_types/src/encoding.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/data_store/benches/data_benchmark.rs b/data_store/benches/data_benchmark.rs index 6c34293efd47..557ed42e536e 100644 --- a/data_store/benches/data_benchmark.rs +++ b/data_store/benches/data_benchmark.rs @@ -12,7 +12,7 @@ const NUM_POINTS_PER_CAMERA: u64 = 1_000; const TOTAL_POINTS: u64 = 2 * NUM_POINTS_PER_CAMERA; fn data_path(camera: &str, index: u64, field: &str) -> DataPath { - DataPath(vec![ + DataPath::new(vec![ DataPathComponent::String("camera".into()), DataPathComponent::Index(Index::String(camera.into())), DataPathComponent::String("point".into()), diff --git a/data_store/examples/memory_usage.rs b/data_store/examples/memory_usage.rs index db559bcb9d54..93493654a042 100644 --- a/data_store/examples/memory_usage.rs +++ b/data_store/examples/memory_usage.rs @@ -53,7 +53,7 @@ impl TrackingAllocator { } fn data_path(camera: u64, index: u64, field: &str) -> DataPath { - DataPath(vec![ + DataPath::new(vec![ DataPathComponent::String("camera".into()), DataPathComponent::Index(Index::Sequence(camera)), DataPathComponent::String("point".into()), diff --git a/log_types/src/encoding.rs b/log_types/src/encoding.rs index b37728972691..86955e647d34 100644 --- a/log_types/src/encoding.rs +++ b/log_types/src/encoding.rs @@ -152,10 +152,10 @@ fn test_encode_decode() { TimeValue::Time(Time::from_ns_since_epoch(1_649_934_625_012_345_678)), )]); let messages = vec![ - log_msg(&time_point, DataPath::default() / "foo" / "bar" / "baz", 42), + log_msg(&time_point, DataPath::from("foo") / "bar" / "baz", 42), crate::log_msg( &time_point, - DataPath::default() / "badger" / "mushroom" / "snake", + DataPath::from("badger") / "mushroom" / "snake", 1337.0, ), ]; From 96156aad8241960f3c33a370ba6d093dd38b8e1c Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Fri, 10 Jun 2022 15:37:37 +0200 Subject: [PATCH 3/5] update to latest egui --- Cargo.lock | 508 ++++++++++++++++++++++++++++++++++++++-- viewer/Cargo.toml | 10 +- viewer/src/ui/view3d.rs | 14 +- 3 files changed, 498 insertions(+), 34 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5b1bfa44cbce..fc3e18d26e43 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -30,6 +30,12 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234" +[[package]] +name = "ahash" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "739f4a8db6605981345c5654f3a85b056ce52f37a39d34da03f25bf2151ea16e" + [[package]] name = "ahash" version = "0.7.6" @@ -42,6 +48,15 @@ dependencies = [ "version_check", ] +[[package]] +name = "aho-corasick" +version = "0.7.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" +dependencies = [ + "memchr", +] + [[package]] name = "android_glue" version = "0.2.3" @@ -98,6 +113,82 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" +[[package]] +name = "async-broadcast" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bbd92a9bd0e9c1298118ecf8a2f825e86b12c3ec9e411573e34aaf3a0c03cdd" +dependencies = [ + "easy-parallel", + "event-listener", + "futures-core", + "parking_lot 0.11.2", +] + +[[package]] +name = "async-channel" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2114d64672151c0c5eaa5e131ec84a74f06e1e559830dabba01ca30605d66319" +dependencies = [ + "concurrent-queue", + "event-listener", + "futures-core", +] + +[[package]] +name = "async-executor" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "871f9bb5e0a22eeb7e8cf16641feb87c9dc67032ccf8ff49e772eb9941d3a965" +dependencies = [ + "async-task", + "concurrent-queue", + "fastrand", + "futures-lite", + "once_cell", + "slab", +] + +[[package]] +name = "async-io" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5e18f61464ae81cde0a23e713ae8fd299580c54d697a35820cfd0625b8b0e07" +dependencies = [ + "concurrent-queue", + "futures-lite", + "libc", + "log", + "once_cell", + "parking", + "polling", + "slab", + "socket2", + "waker-fn", + "winapi", +] + +[[package]] +name = "async-lock" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e97a171d191782fba31bb902b14ad94e24a68145032b7eedf871ab0bc0d077b6" +dependencies = [ + "event-listener", +] + +[[package]] +name = "async-recursion" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7d78656ba01f1b93024b7c3a0467f1608e4be67d725749fdcd7d2c7678fd7a2" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "async-stream" version = "0.3.3" @@ -119,6 +210,23 @@ dependencies = [ "syn", ] +[[package]] +name = "async-task" +version = "4.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30696a84d817107fc028e049980e09d5e140e8da8f1caeb17e8e950658a3cea9" + +[[package]] +name = "async-trait" +version = "0.1.53" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed6aa3524a2dfcf9fe180c51eae2b58738348d819517ceadf95789c51fff7600" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "atk-sys" version = "0.15.1" @@ -255,6 +363,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" +[[package]] +name = "cache-padded" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1db59621ec70f09c5e9b597b220c7a2b43611f4710dc03ceb8748637775692c" + [[package]] name = "cairo-sys-rs" version = "0.15.1" @@ -272,7 +386,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf2eec61efe56aa1e813f5126959296933cf0700030e4314786c48779a66ab82" dependencies = [ "log", - "nix", + "nix 0.22.3", ] [[package]] @@ -489,6 +603,15 @@ dependencies = [ "tungstenite", ] +[[package]] +name = "concurrent-queue" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30ed07550be01594c6026cff2a1d7fe9c8f683caa798e12b68694ac9e88286a3" +dependencies = [ + "cache-padded", +] + [[package]] name = "console_error_panic_hook" version = "0.1.7" @@ -718,6 +841,23 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" +[[package]] +name = "dark-light" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b83576e2eee2d9cdaa8d08812ae59cbfe1b5ac7ac5ac4b8400303c6148a88c1" +dependencies = [ + "dconf_rs", + "detect-desktop-environment", + "dirs", + "objc", + "rust-ini", + "web-sys", + "winreg", + "zbus", + "zvariant", +] + [[package]] name = "darling" version = "0.13.4" @@ -757,7 +897,7 @@ dependencies = [ name = "data_store" version = "0.1.0" dependencies = [ - "ahash", + "ahash 0.7.6", "criterion", "im", "log_types", @@ -766,6 +906,12 @@ dependencies = [ "tracing", ] +[[package]] +name = "dconf_rs" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7046468a81e6a002061c01e6a7c83139daf91b11c30e66795b13217c2d885c8b" + [[package]] name = "deflate" version = "0.8.6" @@ -776,6 +922,23 @@ dependencies = [ "byteorder", ] +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "detect-desktop-environment" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21d8ad60dd5b13a4ee6bd8fa2d5d88965c597c67bce32b5fc49c94f55cb50810" + [[package]] name = "digest" version = "0.10.3" @@ -796,6 +959,26 @@ dependencies = [ "dirs-sys-next", ] +[[package]] +name = "dirs" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" +dependencies = [ + "libc", + "redox_users", + "winapi", +] + [[package]] name = "dirs-sys-next" version = "0.1.2" @@ -822,18 +1005,34 @@ dependencies = [ "libloading", ] +[[package]] +name = "dlv-list" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68df3f2b690c1b86e65ef7830956aededf3cb0a16f898f79b9a6f421a7b6211b" +dependencies = [ + "rand", +] + [[package]] name = "downcast-rs" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" +[[package]] +name = "easy-parallel" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6907e25393cdcc1f4f3f513d9aac1e840eb1cc341a0fccb01171f7d14d10b946" + [[package]] name = "eframe" version = "0.18.0" -source = "git+https://github.com/emilk/egui?rev=b2510676b9a7b45b38820da326e27c05b7b2d408#b2510676b9a7b45b38820da326e27c05b7b2d408" +source = "git+https://github.com/emilk/egui?rev=317436c0570dde617fb408d6c9a973c5dd0a2fc4#317436c0570dde617fb408d6c9a973c5dd0a2fc4" dependencies = [ "bytemuck", + "dark-light", "directories-next", "egui", "egui-winit", @@ -855,9 +1054,9 @@ dependencies = [ [[package]] name = "egui" version = "0.18.1" -source = "git+https://github.com/emilk/egui?rev=b2510676b9a7b45b38820da326e27c05b7b2d408#b2510676b9a7b45b38820da326e27c05b7b2d408" +source = "git+https://github.com/emilk/egui?rev=317436c0570dde617fb408d6c9a973c5dd0a2fc4#317436c0570dde617fb408d6c9a973c5dd0a2fc4" dependencies = [ - "ahash", + "ahash 0.7.6", "epaint", "nohash-hasher", "ron", @@ -868,7 +1067,7 @@ dependencies = [ [[package]] name = "egui-winit" version = "0.18.0" -source = "git+https://github.com/emilk/egui?rev=b2510676b9a7b45b38820da326e27c05b7b2d408#b2510676b9a7b45b38820da326e27c05b7b2d408" +source = "git+https://github.com/emilk/egui?rev=317436c0570dde617fb408d6c9a973c5dd0a2fc4#317436c0570dde617fb408d6c9a973c5dd0a2fc4" dependencies = [ "arboard", "egui", @@ -884,7 +1083,7 @@ dependencies = [ [[package]] name = "egui_extras" version = "0.18.0" -source = "git+https://github.com/emilk/egui?rev=b2510676b9a7b45b38820da326e27c05b7b2d408#b2510676b9a7b45b38820da326e27c05b7b2d408" +source = "git+https://github.com/emilk/egui?rev=317436c0570dde617fb408d6c9a973c5dd0a2fc4#317436c0570dde617fb408d6c9a973c5dd0a2fc4" dependencies = [ "egui", "tracing", @@ -893,7 +1092,7 @@ dependencies = [ [[package]] name = "egui_glow" version = "0.18.1" -source = "git+https://github.com/emilk/egui?rev=b2510676b9a7b45b38820da326e27c05b7b2d408#b2510676b9a7b45b38820da326e27c05b7b2d408" +source = "git+https://github.com/emilk/egui?rev=317436c0570dde617fb408d6c9a973c5dd0a2fc4#317436c0570dde617fb408d6c9a973c5dd0a2fc4" dependencies = [ "bytemuck", "egui", @@ -915,19 +1114,40 @@ checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" [[package]] name = "emath" version = "0.18.0" -source = "git+https://github.com/emilk/egui?rev=b2510676b9a7b45b38820da326e27c05b7b2d408#b2510676b9a7b45b38820da326e27c05b7b2d408" +source = "git+https://github.com/emilk/egui?rev=317436c0570dde617fb408d6c9a973c5dd0a2fc4#317436c0570dde617fb408d6c9a973c5dd0a2fc4" dependencies = [ "bytemuck", "serde", ] +[[package]] +name = "enumflags2" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e75d4cd21b95383444831539909fbb14b9dc3fdceb2a6f5d36577329a1f55ccb" +dependencies = [ + "enumflags2_derive", + "serde", +] + +[[package]] +name = "enumflags2_derive" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f58dc3c5e468259f19f2d46304a6b28f1c3d034442e14b322d2b850e36f6d5ae" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "epaint" version = "0.18.1" -source = "git+https://github.com/emilk/egui?rev=b2510676b9a7b45b38820da326e27c05b7b2d408#b2510676b9a7b45b38820da326e27c05b7b2d408" +source = "git+https://github.com/emilk/egui?rev=317436c0570dde617fb408d6c9a973c5dd0a2fc4#317436c0570dde617fb408d6c9a973c5dd0a2fc4" dependencies = [ "ab_glyph", - "ahash", + "ahash 0.7.6", "atomic_refcell", "bytemuck", "emath", @@ -946,6 +1166,12 @@ dependencies = [ "str-buf", ] +[[package]] +name = "event-listener" +version = "2.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77f3309417938f28bf8228fcff79a4a37103981e3e186d2ccd19c74b38f4eb71" + [[package]] name = "ewebsock" version = "0.2.0" @@ -1059,6 +1285,21 @@ version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc4045962a5a5e935ee2fdedaa4e08284547402885ab326734432bed5d12966b" +[[package]] +name = "futures-lite" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7694489acd39452c77daa48516b894c153f192c3578d5a839b62c58099fcbf48" +dependencies = [ + "fastrand", + "futures-core", + "futures-io", + "memchr", + "parking", + "pin-project-lite", + "waker-fn", +] + [[package]] name = "futures-macro" version = "0.3.21" @@ -1413,6 +1654,15 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "hashbrown" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" +dependencies = [ + "ahash 0.4.7", +] + [[package]] name = "hashbrown" version = "0.11.2" @@ -1434,6 +1684,12 @@ dependencies = [ "libc", ] +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + [[package]] name = "http" version = "0.2.7" @@ -1549,7 +1805,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f647032dfaa1f8b6dc29bd3edb7bbef4861b8b8007ebb118d6db284fd59f6ee" dependencies = [ "autocfg", - "hashbrown", + "hashbrown 0.11.2", ] [[package]] @@ -1724,7 +1980,7 @@ dependencies = [ name = "log_types" version = "0.1.0" dependencies = [ - "ahash", + "ahash 0.7.6", "anyhow", "chrono", "im", @@ -1948,6 +2204,19 @@ dependencies = [ "memoffset", ] +[[package]] +name = "nix" +version = "0.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f866317acbd3a240710c63f065ffb1e4fd466259045ccb504130b7f668f35c6" +dependencies = [ + "bitflags", + "cc", + "cfg-if 1.0.0", + "libc", + "memoffset", +] + [[package]] name = "nohash-hasher" version = "0.2.0" @@ -2100,6 +2369,26 @@ version = "11.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" +[[package]] +name = "ordered-multimap" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c672c7ad9ec066e428c00eb917124a06f08db19e2584de982cc34b1f4c12485" +dependencies = [ + "dlv-list", + "hashbrown 0.9.1", +] + +[[package]] +name = "ordered-stream" +version = "0.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44630c059eacfd6e08bdaa51b1db2ce33119caa4ddc1235e923109aa5f25ccb1" +dependencies = [ + "futures-core", + "pin-project-lite", +] + [[package]] name = "os_str_bytes" version = "6.0.0" @@ -2136,6 +2425,12 @@ dependencies = [ "system-deps", ] +[[package]] +name = "parking" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72" + [[package]] name = "parking_lot" version = "0.11.2" @@ -2264,6 +2559,19 @@ dependencies = [ "miniz_oxide 0.3.7", ] +[[package]] +name = "polling" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "685404d509889fade3e86fe3a5803bca2ec09b0c0778d5ada6ec8bf7a8de5259" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "log", + "wepoll-ffi", + "winapi", +] + [[package]] name = "ppv-lite86" version = "0.2.16" @@ -2503,6 +2811,8 @@ version = "1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a11647b6b25ff05a515cb92c365cec08801e83423a235b51e231e1808747286" dependencies = [ + "aho-corasick", + "memchr", "regex-syntax", ] @@ -2603,13 +2913,23 @@ dependencies = [ name = "rr_string_interner" version = "0.1.0" dependencies = [ - "ahash", + "ahash 0.7.6", "nohash-hasher", "once_cell", "parking_lot 0.12.0", "serde", ] +[[package]] +name = "rust-ini" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63471c4aa97a1cf8332a5f97709a79a4234698de6a1f5087faf66f2dae810e22" +dependencies = [ + "cfg-if 1.0.0", + "ordered-multimap", +] + [[package]] name = "rustc_version" version = "0.4.0" @@ -2731,6 +3051,17 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_repr" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2ad84e47328a31223de7fed7a4f5087f2d6ddfe586cf3ca25b7a165bc0a5aed" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "sha-1" version = "0.10.0" @@ -2742,6 +3073,21 @@ dependencies = [ "digest", ] +[[package]] +name = "sha1" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1da05c97445caa12d05e848c4a4fcbbea29e748ac28f7e80e9b010392063770" +dependencies = [ + "sha1_smol", +] + +[[package]] +name = "sha1_smol" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" + [[package]] name = "sharded-slab" version = "0.1.4" @@ -2804,7 +3150,7 @@ dependencies = [ "lazy_static", "log", "memmap2", - "nix", + "nix 0.22.3", "pkg-config", "wayland-client", "wayland-cursor", @@ -3228,6 +3574,16 @@ version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" +[[package]] +name = "uds_windows" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce65604324d3cce9b966701489fbd0cf318cb1f7bd9dd07ac9a4ee6fb791930d" +dependencies = [ + "tempfile", + "winapi", +] + [[package]] name = "unicode-bidi" version = "0.3.8" @@ -3317,7 +3673,7 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" name = "viewer" version = "0.1.0" dependencies = [ - "ahash", + "ahash 0.7.6", "anyhow", "arboard", "bytemuck", @@ -3353,6 +3709,12 @@ dependencies = [ "vec1", ] +[[package]] +name = "waker-fn" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" + [[package]] name = "walkdir" version = "2.3.2" @@ -3472,7 +3834,7 @@ dependencies = [ "bitflags", "downcast-rs", "libc", - "nix", + "nix 0.22.3", "scoped-tls", "wayland-commons", "wayland-scanner", @@ -3485,7 +3847,7 @@ version = "0.29.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94f6e5e340d7c13490eca867898c4cec5af56c27a5ffe5c80c6fc4708e22d33e" dependencies = [ - "nix", + "nix 0.22.3", "once_cell", "smallvec", "wayland-sys", @@ -3497,7 +3859,7 @@ version = "0.29.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c52758f13d5e7861fc83d942d3d99bf270c83269575e52ac29e5b73cb956a6bd" dependencies = [ - "nix", + "nix 0.22.3", "wayland-client", "xcursor", ] @@ -3607,6 +3969,15 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c97e489d8f836838d497091de568cf16b117486d529ec5579233521065bd5e4" +[[package]] +name = "wepoll-ffi" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d743fdedc5c64377b5fc2bc036b01c7fd642205a0d96356034ae3404d49eb7fb" +dependencies = [ + "cc", +] + [[package]] name = "which" version = "4.2.5" @@ -3783,6 +4154,15 @@ dependencies = [ "x11-dl", ] +[[package]] +name = "winreg" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d107f8c6e916235c4c01cabb3e8acf7bea8ef6a63ca2e7fa0527c049badfc48c" +dependencies = [ + "winapi", +] + [[package]] name = "x11-dl" version = "2.19.1" @@ -3801,7 +4181,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e99be55648b3ae2a52342f9a870c0e138709a3493261ce9b469afe6e4df6d8a" dependencies = [ "gethostname", - "nix", + "nix 0.22.3", "winapi", "winapi-wsapoll", ] @@ -3821,6 +4201,68 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2d7d3948613f75c98fd9328cfdcc45acc4d360655289d0a7d4ec931392200a3" +[[package]] +name = "zbus" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53819092b9db813b2c6168b097b4b13ad284d81c9f2b0165a0a1b190e505a1f3" +dependencies = [ + "async-broadcast", + "async-channel", + "async-executor", + "async-io", + "async-lock", + "async-recursion", + "async-task", + "async-trait", + "byteorder", + "derivative", + "enumflags2", + "event-listener", + "futures-core", + "futures-sink", + "futures-util", + "hex", + "lazy_static", + "nix 0.23.1", + "once_cell", + "ordered-stream", + "rand", + "serde", + "serde_repr", + "sha1", + "static_assertions", + "uds_windows", + "winapi", + "zbus_macros", + "zbus_names", + "zvariant", +] + +[[package]] +name = "zbus_macros" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7174ebe6722c280d6d132d694bb5664ce50a788cb70eeb518e7fc1ca095a114" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "regex", + "syn", +] + +[[package]] +name = "zbus_names" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45dfcdcf87b71dad505d30cc27b1b7b88a64b6d1c435648f48f9dbc1fdc4b7e1" +dependencies = [ + "serde", + "static_assertions", + "zvariant", +] + [[package]] name = "zerocopy" version = "0.6.1" @@ -3870,3 +4312,29 @@ dependencies = [ "cc", "libc", ] + +[[package]] +name = "zvariant" +version = "3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbd1abd8bc2c855412b9c8af9fc11c0d695c73c732ad5a1a1be10f3fd4bf19b2" +dependencies = [ + "byteorder", + "enumflags2", + "libc", + "serde", + "static_assertions", + "zvariant_derive", +] + +[[package]] +name = "zvariant_derive" +version = "3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abebd57382dfacf3e7bbdd7b7c3d162d6ed0687a78f046263ddef4ddabc275ae" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn", +] diff --git a/viewer/Cargo.toml b/viewer/Cargo.toml index 89e0825f6127..75d301abf42d 100644 --- a/viewer/Cargo.toml +++ b/viewer/Cargo.toml @@ -22,11 +22,11 @@ comms = { path = "../comms", features = ["client"] } log_types = { path = "../log_types", features = ["save", "load"] } rr_string_interner = { path = "../rr_string_interner" } -# We use bleeding edge egui, from 2022-05-22 -eframe = { git = "https://github.com/emilk/egui", rev = "b2510676b9a7b45b38820da326e27c05b7b2d408", features = ["persistence"] } -egui = { git = "https://github.com/emilk/egui", rev = "b2510676b9a7b45b38820da326e27c05b7b2d408", features = ["extra_debug_asserts", "tracing"] } -egui_extras = { git = "https://github.com/emilk/egui", rev = "b2510676b9a7b45b38820da326e27c05b7b2d408", features = ["tracing"] } -egui_glow = { git = "https://github.com/emilk/egui", rev = "b2510676b9a7b45b38820da326e27c05b7b2d408" } +# We use bleeding edge egui, from 2022-06-09 +eframe = { git = "https://github.com/emilk/egui", rev = "317436c0570dde617fb408d6c9a973c5dd0a2fc4", features = ["persistence"] } +egui = { git = "https://github.com/emilk/egui", rev = "317436c0570dde617fb408d6c9a973c5dd0a2fc4", features = ["extra_debug_asserts", "tracing"] } +egui_extras = { git = "https://github.com/emilk/egui", rev = "317436c0570dde617fb408d6c9a973c5dd0a2fc4", features = ["tracing"] } +egui_glow = { git = "https://github.com/emilk/egui", rev = "317436c0570dde617fb408d6c9a973c5dd0a2fc4" } # eframe = { path = "../../../egui/eframe", features = ["persistence"] } # egui = { path = "../../../egui/egui", features = ["extra_debug_asserts", "tracing"] } # egui_extras = { path = "../../../egui/egui_extras", features = ["tracing"] } diff --git a/viewer/src/ui/view3d.rs b/viewer/src/ui/view3d.rs index 1b12fed457e7..6d850542567b 100644 --- a/viewer/src/ui/view3d.rs +++ b/viewer/src/ui/view3d.rs @@ -383,15 +383,11 @@ pub(crate) fn combined_view_3d( let callback = egui::PaintCallback { rect, - callback: std::sync::Arc::new(move |info, render_ctx| { - if let Some(painter) = render_ctx.downcast_ref::() { - with_three_d_context(painter.gl(), |rendering| { - paint_with_three_d(rendering, &camera, info, &scene, dark_mode).unwrap(); - }); - } else { - eprintln!("Can't do custom painting because we are not using a glow context"); - } - }), + callback: std::sync::Arc::new(egui_glow::CallbackFn::new(move |info, painter| { + with_three_d_context(painter.gl(), |rendering| { + paint_with_three_d(rendering, &camera, &info, &scene, dark_mode).unwrap(); + }); + })), }; ui.painter().add(callback); } From e1110e5cfc174230f61bba5e0121ca8704fdf02e Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Fri, 10 Jun 2022 17:03:02 +0200 Subject: [PATCH 4/5] Fix web build --- viewer/src/web.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/viewer/src/web.rs b/viewer/src/web.rs index 62def01b4a16..5ca5639a376c 100644 --- a/viewer/src/web.rs +++ b/viewer/src/web.rs @@ -14,8 +14,11 @@ pub fn start(canvas_id: &str) -> std::result::Result<(), eframe::wasm_bindgen::J // Redirect tracing to console.log and friends: tracing_wasm::set_as_global_default(); + let web_options = eframe::WebOptions::default(); + eframe::start_web( canvas_id, + web_options, Box::new(move |cc| { crate::customize_egui(&cc.egui_ctx); let url = get_url(&cc.integration_info); From 916648950b26ab2fda8cab1f2f3a6c06ff7dbd45 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Fri, 10 Jun 2022 17:10:38 +0200 Subject: [PATCH 5/5] clippy fix --- data_store/tests/test_data_store.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data_store/tests/test_data_store.rs b/data_store/tests/test_data_store.rs index ab7d5a591cab..1e17601a30e4 100644 --- a/data_store/tests/test_data_store.rs +++ b/data_store/tests/test_data_store.rs @@ -15,8 +15,8 @@ fn test_singular() -> data_store::Result<()> { let mut points: Vec<_> = Scene3D::from_store(store, &time_query) .points .values() - .cloned() .flatten() + .cloned() .collect(); points.sort_by(|a, b| a.partial_cmp(b).unwrap()); points