diff --git a/Cargo.lock b/Cargo.lock index e42c2c6..fd0e0d0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1414,6 +1414,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "core_maths" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77745e017f5edba1a9c1d854f6f3a52dac8a12dd5af5d2f54aecf61e43d80d30" +dependencies = [ + "libm", +] + [[package]] name = "cpufeatures" version = "0.2.17" @@ -1716,9 +1725,8 @@ dependencies = [ [[package]] name = "ecolor" -version = "0.34.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "137c0ce4ce4152ff7e223a7ce22ee1057cdff61fce0a45c32459c3ccec64868d" +version = "0.34.2" +source = "git+https://github.com/emilk/egui?branch=main#e64b7683a24d154c810b59357478e6a78c73c4c8" dependencies = [ "bytemuck", "color-hex", @@ -1752,9 +1760,8 @@ dependencies = [ [[package]] name = "eframe" -version = "0.34.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6e995b8e434d65aefd12c4519221be3e8f38efd77804ef39ca10553f4ad7063" +version = "0.34.2" +source = "git+https://github.com/emilk/egui?branch=main#e64b7683a24d154c810b59357478e6a78c73c4c8" dependencies = [ "ahash", "bytemuck", @@ -1792,9 +1799,8 @@ dependencies = [ [[package]] name = "egui" -version = "0.34.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f34aaf627da598dfadd64b0fee6101d22e9c451d1e5348157312720b7f459f0f" +version = "0.34.2" +source = "git+https://github.com/emilk/egui?branch=main#e64b7683a24d154c810b59357478e6a78c73c4c8" dependencies = [ "accesskit", "ahash", @@ -1813,9 +1819,8 @@ dependencies = [ [[package]] name = "egui-wgpu" -version = "0.34.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71033ff78b041c9c363450f4498ff95468ef3ecbcc71a62f67036a6207d98fa4" +version = "0.34.2" +source = "git+https://github.com/emilk/egui?branch=main#e64b7683a24d154c810b59357478e6a78c73c4c8" dependencies = [ "ahash", "bytemuck", @@ -1833,9 +1838,8 @@ dependencies = [ [[package]] name = "egui-winit" -version = "0.34.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11a2881b2bf1a305e413e644af63f836737a33d85077705ff808e88f902ff742" +version = "0.34.2" +source = "git+https://github.com/emilk/egui?branch=main#e64b7683a24d154c810b59357478e6a78c73c4c8" dependencies = [ "accesskit_winit", "arboard", @@ -1879,9 +1883,8 @@ dependencies = [ [[package]] name = "egui_extras" -version = "0.34.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bfc6870c68d3f254e33aca8200095d422e09edacb0f365f79fe23a5ba10963" +version = "0.34.2" +source = "git+https://github.com/emilk/egui?branch=main#e64b7683a24d154c810b59357478e6a78c73c4c8" dependencies = [ "ahash", "egui", @@ -1897,9 +1900,8 @@ dependencies = [ [[package]] name = "egui_glow" -version = "0.34.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3b28d39ab6c0cac238190e6cb1e8c9047d02cb470ab942a7a3302e4cb3a8e74" +version = "0.34.2" +source = "git+https://github.com/emilk/egui?branch=main#e64b7683a24d154c810b59357478e6a78c73c4c8" dependencies = [ "bytemuck", "egui", @@ -1907,8 +1909,6 @@ dependencies = [ "log", "memoffset", "profiling", - "wasm-bindgen", - "web-sys", "winit", ] @@ -1968,9 +1968,8 @@ dependencies = [ [[package]] name = "emath" -version = "0.34.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a05cd8bdf3b598488c627ca97c7fe8909448ffa26278dd3c7e535cdb554d721" +version = "0.34.2" +source = "git+https://github.com/emilk/egui?branch=main#e64b7683a24d154c810b59357478e6a78c73c4c8" dependencies = [ "bytemuck", "serde", @@ -2069,9 +2068,8 @@ dependencies = [ [[package]] name = "epaint" -version = "0.34.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04f3017dd67f147a697ee0c8484fb568fd9553e2a0c114be5020dbbc11962841" +version = "0.34.2" +source = "git+https://github.com/emilk/egui?branch=main#e64b7683a24d154c810b59357478e6a78c73c4c8" dependencies = [ "ahash", "bytemuck", @@ -2079,6 +2077,7 @@ dependencies = [ "emath", "epaint_default_fonts", "font-types", + "harfrust", "log", "nohash-hasher", "parking_lot", @@ -2088,14 +2087,15 @@ dependencies = [ "serde", "skrifa", "smallvec", + "unicode-general-category", + "unicode-segmentation", "vello_cpu", ] [[package]] name = "epaint_default_fonts" -version = "0.34.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e3b85a2bb775a3ab02d077a65cc31575c11b2584581913253cc11ce49f48bba" +version = "0.34.2" +source = "git+https://github.com/emilk/egui?branch=main#e64b7683a24d154c810b59357478e6a78c73c4c8" [[package]] name = "equator" @@ -2231,12 +2231,9 @@ dependencies = [ [[package]] name = "fearless_simd" -version = "0.3.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fb2907d1f08b2b316b9223ced5b0e89d87028ba8deae9764741dba8ff7f3903" -dependencies = [ - "bytemuck", -] +checksum = "b97b65636e5b9ef369943878ac74335ba1c55c1cb6adbf1e2c293c624248d693" [[package]] name = "ff" @@ -3683,6 +3680,15 @@ dependencies = [ "subtle", ] +[[package]] +name = "guillotiere" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b17e70c989c36bad147b27a58d148c0741c51448aa5653436547323e524d0ab" +dependencies = [ + "euclid", +] + [[package]] name = "h2" version = "0.4.13" @@ -3715,6 +3721,19 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "harfrust" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9da2e5ae821f6e96664977bf974d6d6a2d6682f9ccee23e62ec1d134246845f9" +dependencies = [ + "bitflags 2.11.0", + "bytemuck", + "core_maths", + "read-fonts", + "smallvec", +] + [[package]] name = "hash32" version = "0.3.1" @@ -4442,6 +4461,7 @@ checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" name = "kitdiff" version = "0.1.0" dependencies = [ + "ahash", "anyhow", "axum", "bytes", @@ -6020,7 +6040,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27c6023962132f4b30eb4c172c91ce92d933da334c59c23cddee82358ddafb0b" dependencies = [ "anyhow", - "itertools 0.14.0", + "itertools 0.10.5", "proc-macro2", "quote", "syn", @@ -6818,6 +6838,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b634fabf032fab15307ffd272149b622260f55974d9fad689292a5d33df02e5" dependencies = [ "bytemuck", + "core_maths", "font-types", ] @@ -8156,6 +8177,12 @@ version = "2.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7eec5d1121208364f6793f7d2e222bf75a915c19557537745b195b253dd64217" +[[package]] +name = "unicode-general-category" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b993bddc193ae5bd0d623b49ec06ac3e9312875fdae725a975c51db1cc1677f" + [[package]] name = "unicode-ident" version = "1.0.24" @@ -8316,29 +8343,42 @@ dependencies = [ "smallvec", ] +[[package]] +name = "vello_api" +version = "0.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5088cd0113bc5332c753f24503825e3bc93e26c7883c9dc3ad9637bb62c4634" +dependencies = [ + "bytemuck", + "peniko", +] + [[package]] name = "vello_common" -version = "0.0.6" +version = "0.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bd1a4c633ce09e7d713df1a6e036644a125e15e0c169cfb5180ddf5836ca04b" +checksum = "986dc49a501a683477614bf07b8e7b6c79ae4828efce3bf22e51850f4a0a8a4c" dependencies = [ "bytemuck", "fearless_simd", + "guillotiere", "hashbrown 0.16.1", "log", "peniko", "skrifa", "smallvec", + "thiserror 2.0.18", ] [[package]] name = "vello_cpu" -version = "0.0.6" +version = "0.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0162bfe48aabf6a9fdcd401b628c7d9f260c2cbabb343c70a65feba6f7849edc" +checksum = "a678f91c7524a3a9ac9a19df9f83552866ec70b2ca26441b916a6b219b6aa2de" dependencies = [ "bytemuck", "hashbrown 0.16.1", + "vello_api", "vello_common", ] diff --git a/Cargo.toml b/Cargo.toml index 34b1fff..6c33f3d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,20 +18,32 @@ targets = ["x86_64-unknown-linux-gnu", "wasm32-unknown-unknown"] [dependencies] +ahash = "0.8" anyhow = "1.0.100" bytes = "1.10.1" dify = "0.8.0" -eframe = { version = "0.34.1", features = ["glow", "default", "persistence", "ron"] } +eframe = { version = "0.34.1", features = [ + "glow", + "default", + "persistence", + "ron", +] } egui_extras = { version = "0.34.1", features = ["image", "file", "http"] } egui_inbox = { version = "0.11.0", features = ["async", "tokio"] } -env_logger = { version = "0.11.8", default-features = false, features = ["auto-color", "humantime"] } +env_logger = { version = "0.11.8", default-features = false, features = [ + "auto-color", + "humantime", +] } flate2 = { version = "1.1" } futures = "0.3.31" graphql_client = "0.16.0" hello_egui_utils = "0.11.0" image = "0.25.8" log = "0.4.28" -octocrab = { version = "0.49.7", default-features = false, features = ["stream", "jwt-rust-crypto"] } +octocrab = { version = "0.49.7", default-features = false, features = [ + "stream", + "jwt-rust-crypto", +] } octocrab-wasm = { path = "crates/octocrab-wasm" } percent-encoding = "2.3.2" re_ui = { git = "https://github.com/rerun-io/rerun", branch = "main" } @@ -47,7 +59,12 @@ zip = { version = "8.5.1", default-features = false, features = ["deflate"] } axum = "0.8.6" clap = { version = "4.5", features = ["derive"] } env_logger = "0.11.8" -gix = { version = "0.81", default-features = false, features = ["blocking-network-client", "blob-diff", "merge", "sha1"] } +gix = { version = "0.81", default-features = false, features = [ + "blocking-network-client", + "blob-diff", + "merge", + "sha1", +] } ignore = { version = "0.4" } tokio = { version = "1.47", features = ["full"] } @@ -57,7 +74,14 @@ getrandom = { version = "0.3", features = ["wasm_js"] } js-sys = { version = "0.3.81" } wasm-bindgen = { version = "0.2.104" } wasm-bindgen-futures = { version = "0.4.54" } -web-sys = { version = "0.3.81", features = ["Window", "Location", "History", "Navigator", "Clipboard", "Performance"] } +web-sys = { version = "0.3.81", features = [ + "Window", + "Location", + "History", + "Navigator", + "Clipboard", + "Performance", +] } [profile.release] opt-level = 2 # fast and small wasm @@ -70,9 +94,12 @@ opt-level = 2 [patch.crates-io] # If you want to use the bleeding edge version of egui and eframe: -# egui = { git = "https://github.com/emilk/egui", branch = "main" } -# eframe = { git = "https://github.com/emilk/egui", branch = "main" } -# egui_extras = { git = "https://github.com/emilk/egui", branch = "main" } +ecolor = { git = "https://github.com/emilk/egui", branch = "main" } +eframe = { git = "https://github.com/emilk/egui", branch = "main" } +egui = { git = "https://github.com/emilk/egui", branch = "main" } +egui_extras = { git = "https://github.com/emilk/egui", branch = "main" } +emath = { git = "https://github.com/emilk/egui", branch = "main" } +epaint = { git = "https://github.com/emilk/egui", branch = "main" } # re_ui = { git = "https://github.com/rerun-io/rerun", branch = "main" } # egui_commonmark = { git = "https://github.com/rerun-io/egui_commonmark.git", branch = "lucas/update-egui-main" } @@ -82,7 +109,6 @@ opt-level = 2 # eframe = { path = "../egui/crates/eframe" } - # ---------------------------------------------------------------------------------------- # Lints: @@ -130,11 +156,11 @@ dbg_macro = "warn" debug_assert_with_mut_call = "warn" default_union_representation = "warn" derive_partial_eq_without_eq = "warn" -disallowed_macros = "warn" # See clippy.toml -disallowed_methods = "warn" # See clippy.toml -disallowed_names = "warn" # See clippy.toml -disallowed_script_idents = "warn" # See clippy.toml -disallowed_types = "warn" # See clippy.toml +disallowed_macros = "warn" # See clippy.toml +disallowed_methods = "warn" # See clippy.toml +disallowed_names = "warn" # See clippy.toml +disallowed_script_idents = "warn" # See clippy.toml +disallowed_types = "warn" # See clippy.toml doc_comment_double_space_linebreaks = "warn" doc_include_without_cfg = "warn" doc_link_with_quotes = "warn" @@ -292,5 +318,5 @@ zero_sized_map_values = "warn" # TODO: enable? missing_errors_doc = "allow" -manual_range_contains = "allow" # this is better on 'allow' -map_unwrap_or = "allow" # this is better on 'allow' +manual_range_contains = "allow" # this is better on 'allow' +map_unwrap_or = "allow" # this is better on 'allow' diff --git a/src/diff_image_loader.rs b/src/diff_image_loader.rs index f970fd7..595ee75 100644 --- a/src/diff_image_loader.rs +++ b/src/diff_image_loader.rs @@ -1,7 +1,7 @@ +use ahash::HashMap; use eframe::egui::load::{ImageLoadResult, ImageLoader, ImagePoll, LoadError}; use eframe::egui::mutex::Mutex; use eframe::egui::{Color32, ColorImage, Context, SizeHint}; -use eframe::epaint::ahash::HashMap; use egui_extras::loaders::image_loader::ImageCrateLoader; use std::sync::Arc; use std::task::Poll; diff --git a/taplo.toml b/taplo.toml new file mode 100644 index 0000000..09b5a0b --- /dev/null +++ b/taplo.toml @@ -0,0 +1,6 @@ +# https://github.com/tamasfe/taplo + +[formatting] +align_comments = false # causes unnecessary churn +column_width = 100 +indent_string = " " # keep in sync with `.editorconfig`