dominus

One damus client to rule them all
git clone git://jb55.com/dominus
Log | Files | Refs | README

commit 6137a34d55536c35233bd791150aef41ec63270d
parent 8d0bfdfb24bfc538346b5fa2c8f8a1db51da6614
Author: William Casarin <jb55@jb55.com>
Date:   Tue, 29 Nov 2022 18:27:43 -0800

android progress

Diffstat:
MCargo.lock | 1421+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------
MCargo.toml | 88+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------
MTrunk.toml | 2+-
Msrc/app.rs | 214+++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------
Msrc/main.rs | 385+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------
5 files changed, 1646 insertions(+), 464 deletions(-)

diff --git a/Cargo.lock b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "ab_glyph" -version = "0.2.16" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "846ffacb9d0c8b879ef9e565b59e18fb76d6a61013e5bd24ecc659864e6b1a1f" +checksum = "4dcdbc68024b653943864d436fe8a24b028095bc1cf91a8926f8241e4aaffe59" dependencies = [ "ab_glyph_rasterizer", "owned_ttf_parser", @@ -14,9 +14,9 @@ dependencies = [ [[package]] name = "ab_glyph_rasterizer" -version = "0.1.5" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a13739d7177fbd22bb0ed28badfff9f372f8bef46c863db4e1c6248f6b223b6e" +checksum = "330223a1aecc308757b9926e9391c9b47f8ef2dbd8aea9df88312aea18c5e8d6" [[package]] name = "adler" @@ -25,31 +25,86 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] -name = "adler32" -version = "1.2.0" +name = "ahash" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234" +checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +dependencies = [ + "getrandom", + "once_cell", + "version_check", +] [[package]] name = "ahash" -version = "0.8.0" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57e6e951cfbb2db8de1828d49073a113a29fd7117b1596caa781a258c7e38d72" +checksum = "bf6ccdb167abbf410dcb915cabd428929d7f6a04980b54a11f26a39f1c7f7107" dependencies = [ "cfg-if", "getrandom", "once_cell", - "serde", "version_check", ] [[package]] -name = "ansi_term" -version = "0.12.1" +name = "aho-corasick" +version = "0.7.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" dependencies = [ - "winapi", + "memchr", +] + +[[package]] +name = "android-activity" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4165a1aef703232031b40a6e8908c2f9e314d495f11aa7f98db75d39a497cc6a" +dependencies = [ + "android-properties", + "bitflags", + "cc", + "jni-sys", + "libc", + "log", + "ndk 0.7.0", + "ndk-context", + "ndk-sys 0.4.1+23.1.7779620", + "num_enum", +] + +[[package]] +name = "android-properties" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04" + +[[package]] +name = "android_log-sys" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85965b6739a430150bdd138e2374a98af0c3ee0d030b3bb7fc3bddff58d0102e" + +[[package]] +name = "android_logger" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e9dd62f37dea550caf48c77591dc50bd1a378ce08855be1a0c42a97b7550fb" +dependencies = [ + "android_log-sys", + "env_logger", + "log", + "once_cell", +] + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", ] [[package]] @@ -88,12 +143,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" [[package]] +name = "ash" +version = "0.37.1+1.3.235" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "911015c962d56e2e4052f40182ca5462ba60a3d2ff04e827c365a0ab3d65726d" +dependencies = [ + "libloading", +] + +[[package]] name = "atomic_refcell" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73b5e5f48b927f04e952dedc932f31995a65a0bf65ec971c74436e51bf6e970d" [[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi", + "libc", + "winapi", +] + +[[package]] name = "autocfg" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -101,9 +176,24 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "base64" -version = "0.13.0" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + +[[package]] +name = "bit-set" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" [[package]] name = "bit_field" @@ -124,25 +214,53 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" [[package]] +name = "block-buffer" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block-sys" +version = "0.1.0-beta.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa55741ee90902547802152aaf3f8e5248aab7e21468089560d4c8840561146" +dependencies = [ + "objc-sys", +] + +[[package]] +name = "block2" +version = "0.2.0-alpha.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8dd9e63c1744f755c2f60332b88de39d341e5e86239014ad839bd71c106dec42" +dependencies = [ + "block-sys", + "objc2-encode", +] + +[[package]] name = "bumpalo" -version = "3.11.0" +version = "3.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1ad822118d20d2c234f427000d5acc36eabe1e29a348c89b63dd60b13f28e5d" +checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" [[package]] name = "bytemuck" -version = "1.12.1" +version = "1.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f5715e491b5a1598fc2bef5a606847b5dc1d48ea625bd3c02c00de8285591da" +checksum = "aaa3a8d9a1ca92e282c96a32d6511b695d7d994d1d102ba85d279f9b2756947f" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.2.1" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9e1f5fa78f69496407a27ae9ed989e3c3b072310286f5ef385525e4cbc24a9" +checksum = "5fe233b960f12f8007e3db2d136e3cb1c291bfd7396e384ee76025fc1a3932b4" dependencies = [ "proc-macro2", "quote", @@ -157,18 +275,18 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "1.2.1" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec8a7b6a70fde80372154c65702f00a0f56f3e1c36abbc6c440484be248856db" +checksum = "dfb24e866b15a1af2a1b663f10c6b6b8f397a84aadb828f12e5b289ec23a3a3c" [[package]] name = "calloop" -version = "0.10.1" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a22a6a8f622f797120d452c630b0ab12e1331a1a753e2039ce7868d4ac77b4ee" +checksum = "5bcf530afb40e45e14440701e5e996d7fd139e84a912a4d83a8d6a0fb3e58663" dependencies = [ "log", - "nix 0.24.2", + "nix 0.25.0", "slotmap", "thiserror", "vec_map", @@ -176,9 +294,12 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.73" +version = "1.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" +checksum = "e9f73505338f7d905b19d18738976aae232eb46b8efc15554ffc56deb5d9ebe4" +dependencies = [ + "jobserver", +] [[package]] name = "cesu8" @@ -193,12 +314,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] -name = "cgl" -version = "0.3.2" +name = "cfg_aliases" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" + +[[package]] +name = "chrono" +version = "0.4.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ced0551234e87afee12411d535648dd89d2e7f34c78b753395567aff3d447ff" +checksum = "16b0a3d9ed01224b22057780a37bb8c5dbfe1be8ba48678e7bf57ec4b385411f" dependencies = [ - "libc", + "iana-time-zone", + "js-sys", + "num-integer", + "num-traits", + "time 0.1.45", + "wasm-bindgen", + "winapi", ] [[package]] @@ -220,18 +353,18 @@ dependencies = [ [[package]] name = "cmake" -version = "0.1.48" +version = "0.1.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8ad8cef104ac57b68b89df3208164d228503abbdce70f6880ffa3d970e7443a" +checksum = "db34956e100b30725f2eb215f90d4871051239535632f84fea3bc92722c66b7c" dependencies = [ "cc", ] [[package]] name = "cocoa" -version = "0.24.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f63902e9223530efb4e26ccd0cf55ec30d592d3b42e21a28defc42a9586e832" +checksum = "f425db7937052c684daec3bd6375c8abe2d146dca4b8b143d6db777c39138f3a" dependencies = [ "bitflags", "block", @@ -259,12 +392,33 @@ dependencies = [ ] [[package]] +name = "codespan-reporting" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" +dependencies = [ + "termcolor", + "unicode-width", +] + +[[package]] name = "color_quant" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" [[package]] +name = "colored" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3616f750b84d8f0de8a58bda93e08e2a81ad3f523089b05f1dffecab48c6cbd" +dependencies = [ + "atty", + "lazy_static", + "winapi", +] + +[[package]] name = "combine" version = "4.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -338,6 +492,15 @@ dependencies = [ ] [[package]] +name = "cpufeatures" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" +dependencies = [ + "libc", +] + +[[package]] name = "crc32fast" version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -369,31 +532,31 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.11" +version = "0.9.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f916dfc5d356b0ed9dae65f1db9fc9770aa2851d2662b988ccf4fe3516e86348" +checksum = "01a9af1f4c2ef74bb8aa1f7e19706bc72d03598c8a570bb5de72243c7a9d9d5a" dependencies = [ "autocfg", "cfg-if", "crossbeam-utils", - "memoffset", + "memoffset 0.7.1", "scopeguard", ] [[package]] name = "crossbeam-utils" -version = "0.8.12" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edbafec5fa1f196ca66527c1b12c2ec4745ca14b50f1ad8f9f6f720b55d11fac" +checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" dependencies = [ "cfg-if", ] [[package]] name = "crossfont" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f66b1c1979c4362323f03ab6bf7fb522902bfc418e0c37319ab347f9561d980f" +checksum = "21fd3add36ea31aba1520aa5288714dd63be506106753226d0eb387a93bc9c45" dependencies = [ "cocoa", "core-foundation", @@ -419,27 +582,105 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] name = "cty" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" [[package]] +name = "cxx" +version = "1.0.82" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4a41a86530d0fe7f5d9ea779916b7cadd2d4f9add748b99c2c029cbbdfaf453" +dependencies = [ + "cc", + "cxxbridge-flags", + "cxxbridge-macro", + "link-cplusplus", +] + +[[package]] +name = "cxx-build" +version = "1.0.82" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06416d667ff3e3ad2df1cd8cd8afae5da26cf9cec4d0825040f88b5ca659a2f0" +dependencies = [ + "cc", + "codespan-reporting", + "once_cell", + "proc-macro2", + "quote", + "scratch", + "syn", +] + +[[package]] +name = "cxxbridge-flags" +version = "1.0.82" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "820a9a2af1669deeef27cb271f476ffd196a2c4b6731336011e0ba63e2c7cf71" + +[[package]] +name = "cxxbridge-macro" +version = "1.0.82" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a08a6e2fcc370a089ad3b4aaf54db3b1b4cee38ddabce5896b33eb693275f470" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "d3d12" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "827914e1f53b1e0e025ecd3d967a7836b7bcb54520f90e21ef8df7b4d88a2759" +dependencies = [ + "bitflags", + "libloading", + "winapi", +] + +[[package]] name = "damus" version = "0.1.0" dependencies = [ + "android_logger", + "chrono", "console_error_panic_hook", - "eframe", - "egui", + "egui 0.19.0", + "egui-winit", "egui_extras", + "egui_wgpu_backend", + "egui_winit_platform", "ehttp", + "epi", + "hex", "image", + "log", "poll-promise", + "pollster", "serde", "serde_derive", "serde_json", + "sha2", + "simple_logger", + "tracing", "tracing-subscriber", "tracing-wasm", + "wgpu", + "winit 0.27.5 (git+https://github.com/rust-windowing/winit.git)", ] [[package]] @@ -487,33 +728,13 @@ dependencies = [ ] [[package]] -name = "deflate" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c86f7e25f518f4b81808a2cf1c50996a61f5c2eb394b2393bd87f2a4780a432f" -dependencies = [ - "adler32", -] - -[[package]] -name = "directories-next" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "339ee130d97a610ea5a5872d2bbb130fdf68884ff09d3028b81bec8a1ac23bbc" -dependencies = [ - "cfg-if", - "dirs-sys-next", -] - -[[package]] -name = "dirs-sys-next" -version = "0.1.2" +name = "digest" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" +checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" dependencies = [ - "libc", - "redox_users", - "winapi", + "block-buffer", + "crypto-common", ] [[package]] @@ -552,28 +773,14 @@ dependencies = [ ] [[package]] -name = "eframe" -version = "0.19.0" +name = "egui" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0d49426c3e72a6728b0c790d22db8bf7bbcff10d83b8b6f3a01295be982302e" +checksum = "0a3cd1d47e12f7a17912595241622e373aa652a4e0fa90b3f9278f90a64aedf7" dependencies = [ - "bytemuck", - "directories-next", - "egui", - "egui-winit", - "egui_glow", - "getrandom", - "glow", - "glutin", - "js-sys", - "percent-encoding", - "ron", - "serde", - "tracing", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "winit", + "ahash 0.7.6", + "epaint 0.17.0", + "nohash-hasher", ] [[package]] @@ -582,11 +789,9 @@ version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc9fcd393c3daaaf5909008a1d948319d538b79c51871e4df0993260260a94e4" dependencies = [ - "ahash", - "epaint", + "ahash 0.8.2", + "epaint 0.19.0", "nohash-hasher", - "ron", - "serde", "tracing", ] @@ -597,13 +802,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07ddc525334c416e11580123e147b970f738507f427c9fb1cd09ea2dd7416a3a" dependencies = [ "arboard", - "egui", + "egui 0.19.0", "instant", - "serde", "smithay-clipboard", "tracing", "webbrowser", - "winit", + "winit 0.27.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -612,7 +816,7 @@ version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f698f685bb0ad39e87109e2f695ded0bccde77d5d40bbf7590cb5561c1e3039d" dependencies = [ - "egui", + "egui 0.19.0", "image", "resvg", "tiny-skia 0.6.6", @@ -620,18 +824,23 @@ dependencies = [ ] [[package]] -name = "egui_glow" -version = "0.19.0" +name = "egui_wgpu_backend" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad77d4a00402bae9658ee64be148f4b2a0b38e4fc7874970575ca01ed1c5b75d" +checksum = "3f9a4a022610dec7cb5ccce43d397727d190ca38b7c988dece516d585c96caa6" dependencies = [ "bytemuck", - "egui", - "glow", - "memoffset", - "tracing", - "wasm-bindgen", - "web-sys", + "egui 0.19.0", + "wgpu", +] + +[[package]] +name = "egui_winit_platform" +version = "0.16.0" +source = "git+https://github.com/inferrna/egui_winit_platform.git#0e135a98c3e2fb1a428caa40f4c8587978820d2e" +dependencies = [ + "egui 0.19.0", + "winit 0.27.5 (git+https://github.com/rust-windowing/winit.git)", ] [[package]] @@ -655,12 +864,40 @@ checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" [[package]] name = "emath" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a977a80456be58a2c2d48e69c1d0baadef46cecef5a0c98df141c468da006f12" + +[[package]] +name = "emath" version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9542a40106fdba943a055f418d1746a050e1a903a049b030c2b097d4686a33cf" dependencies = [ "bytemuck", - "serde", +] + +[[package]] +name = "env_logger" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" +dependencies = [ + "log", + "regex", +] + +[[package]] +name = "epaint" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "033292846059f08e03a71e1b5db2ee6ab7c9622c3b48da21f4bd13258ebee2db" +dependencies = [ + "ab_glyph", + "ahash 0.7.6", + "atomic_refcell", + "emath 0.17.0", + "nohash-hasher", ] [[package]] @@ -670,13 +907,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ba04741be7f6602b1a1b28f1082cce45948a7032961c52814f8946b28493300" dependencies = [ "ab_glyph", - "ahash", + "ahash 0.8.2", "atomic_refcell", "bytemuck", - "emath", + "emath 0.19.0", "nohash-hasher", "parking_lot", - "serde", +] + +[[package]] +name = "epi" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c95445deccef4d29fa30488d3f7f2e942dd343eef01228becc7cefd5b918176e" +dependencies = [ + "egui 0.17.0", + "tracing", ] [[package]] @@ -709,19 +955,19 @@ dependencies = [ "flume", "half", "lebe", - "miniz_oxide 0.6.2", + "miniz_oxide", "smallvec", "threadpool", ] [[package]] name = "flate2" -version = "1.0.24" +version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f82b0f4c27ad9f8bfd1f3208d882da2b09c301bc1c828fd3a00d0216d2fbbff6" +checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841" dependencies = [ "crc32fast", - "miniz_oxide 0.5.3", + "miniz_oxide", ] [[package]] @@ -814,11 +1060,10 @@ checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" [[package]] name = "form_urlencoded" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" +checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" dependencies = [ - "matches", "percent-encoding", ] @@ -857,6 +1102,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39c15cf1a4aa79df40f1bb462fb39676d0ad9e366c2a33b590d7c66f4f81fcf9" [[package]] +name = "fxhash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" +dependencies = [ + "byteorder", +] + +[[package]] +name = "generic-array" +version = "0.14.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] name = "gethostname" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -868,14 +1132,14 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6" +checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" dependencies = [ "cfg-if", "js-sys", "libc", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", "wasm-bindgen", ] @@ -890,17 +1154,6 @@ dependencies = [ ] [[package]] -name = "gl_generator" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a95dfc23a2b4a9a2f5ab41d194f8bfda3cabec42af4e39f08c339eb2a0c124d" -dependencies = [ - "khronos_api", - "log", - "xml-rs", -] - -[[package]] name = "glow" version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -913,77 +1166,60 @@ dependencies = [ ] [[package]] -name = "glutin" -version = "0.29.1" +name = "gpu-alloc" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "444c9ad294fdcaf20ccf6726b78f380b5450275540c9b68ab62f49726ad1c713" +checksum = "7fc59e5f710e310e76e6707f86c561dd646f69a8876da9131703b2f717de818d" dependencies = [ - "cgl", - "cocoa", - "core-foundation", - "glutin_egl_sys", - "glutin_gles2_sys", - "glutin_glx_sys", - "glutin_wgl_sys", - "libloading", - "log", - "objc", - "once_cell", - "osmesa-sys", - "parking_lot", - "raw-window-handle 0.5.0", - "wayland-client", - "wayland-egl", - "winapi", - "winit", + "bitflags", + "gpu-alloc-types", ] [[package]] -name = "glutin_egl_sys" -version = "0.1.6" +name = "gpu-alloc-types" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68900f84b471f31ea1d1355567eb865a2cf446294f06cef8d653ed7bcf5f013d" +checksum = "54804d0d6bc9d7f26db4eaec1ad10def69b599315f487d32c334a80d1efe67a5" dependencies = [ - "gl_generator", - "winapi", + "bitflags", ] [[package]] -name = "glutin_gles2_sys" -version = "0.1.5" +name = "gpu-descriptor" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8094e708b730a7c8a1954f4f8a31880af00eb8a1c5b5bf85d28a0a3c6d69103" +checksum = "0b0c02e1ba0bdb14e965058ca34e09c020f8e507a760df1121728e0aef68d57a" dependencies = [ - "gl_generator", - "objc", + "bitflags", + "gpu-descriptor-types", + "hashbrown", ] [[package]] -name = "glutin_glx_sys" -version = "0.1.8" +name = "gpu-descriptor-types" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d93d0575865098580c5b3a423188cd959419912ea60b1e48e8b3b526f6d02468" +checksum = "363e3677e55ad168fef68cf9de3a4a310b53124c5e784c53a1d70e92d23f2126" dependencies = [ - "gl_generator", - "x11-dl", + "bitflags", ] [[package]] -name = "glutin_wgl_sys" -version = "0.1.5" +name = "half" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3da5951a1569dbab865c6f2a863efafff193a93caf05538d193e9e3816d21696" +checksum = "ad6a9459c9c30b177b925162351f97e7d967c7ea8bab3b8352805327daf45554" dependencies = [ - "gl_generator", + "crunchy", ] [[package]] -name = "half" -version = "2.1.0" +name = "hashbrown" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad6a9459c9c30b177b925162351f97e7d967c7ea8bab3b8352805327daf45554" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ - "crunchy", + "ahash 0.7.6", ] [[package]] @@ -996,6 +1232,42 @@ dependencies = [ ] [[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hexf-parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df" + +[[package]] +name = "iana-time-zone" +version = "0.1.53" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "winapi", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" +dependencies = [ + "cxx", + "cxx-build", +] + +[[package]] name = "ident_case" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1003,27 +1275,26 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.2.3" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" +checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" dependencies = [ - "matches", "unicode-bidi", "unicode-normalization", ] [[package]] name = "image" -version = "0.24.4" +version = "0.24.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd8e4fb07cf672b1642304e731ef8a6a4c7891d67bb4fd4f5ce58cd6ed86803c" +checksum = "69b7ea949b537b0fd0af141fff8c77690f2ce96f4f41f042ccb6c69c6c965945" dependencies = [ "bytemuck", "byteorder", "color_quant", "exr", "gif", - "jpeg-decoder", + "jpeg-decoder 0.3.0", "num-rational", "num-traits", "png", @@ -1032,6 +1303,16 @@ dependencies = [ ] [[package]] +name = "indexmap" +version = "1.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" +dependencies = [ + "autocfg", + "hashbrown", +] + +[[package]] name = "instant" version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1070,28 +1351,48 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" [[package]] +name = "jobserver" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "068b1ee6743e4d11fb9c6a1e6064b3693a1b600e7f5f5988047d98b3dc9fb90b" +dependencies = [ + "libc", +] + +[[package]] name = "jpeg-decoder" version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9478aa10f73e7528198d75109c8be5cd7d15fb530238040148d5f9a22d4c5b3b" + +[[package]] +name = "jpeg-decoder" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc0000e42512c92e31c2252315bda326620a4e034105e900c98ec492fa077b3e" dependencies = [ "rayon", ] [[package]] name = "js-sys" -version = "0.3.59" +version = "0.3.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "258451ab10b34f8af53416d1fdab72c22e805f0c92a1136d59470ec0b11138b2" +checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" dependencies = [ "wasm-bindgen", ] [[package]] -name = "khronos_api" -version = "3.1.0" +name = "khronos-egl" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" +checksum = "8c2352bd1d0bceb871cb9d40f24360c8133c11d7486b68b5381c1dd1a32015e3" +dependencies = [ + "libc", + "libloading", + "pkg-config", +] [[package]] name = "kurbo" @@ -1116,25 +1417,34 @@ checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8" [[package]] name = "libc" -version = "0.2.132" +version = "0.2.137" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8371e4e5341c3a96db127eb2465ac681ced4c433e01dd0e938adbef26ba93ba5" +checksum = "fc7fcc620a3bff7cdd7a365be3376c97191aeaccc2a603e600951e452615bf89" [[package]] name = "libloading" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efbc0f03f9a775e9f6aed295c6a1ba2253c5757a9e03d55c6caa46a681abcddd" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" dependencies = [ "cfg-if", "winapi", ] [[package]] +name = "link-cplusplus" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9272ab7b96c9046fbc5bc56c06c117cb639fe2d509df0c421cad82d2915cf369" +dependencies = [ + "cc", +] + +[[package]] name = "lock_api" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53" +checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" dependencies = [ "autocfg", "scopeguard", @@ -1172,9 +1482,9 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memmap2" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95af15f345b17af2efc8ead6080fb8bc376f8cec1b35277b935637595fe77498" +checksum = "4b182332558b18d807c4ce1ca8ca983b34c3ee32765e47b3f0f69b90355cc1dc" dependencies = [ "libc", ] @@ -1189,21 +1499,35 @@ dependencies = [ ] [[package]] -name = "minimal-lexical" -version = "0.2.1" +name = "memoffset" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" +checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" +dependencies = [ + "autocfg", +] [[package]] -name = "miniz_oxide" -version = "0.5.3" +name = "metal" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f5c75688da582b8ffc1f1799e9db273f32133c49e048f614d22ec3256773ccc" +checksum = "de11355d1f6781482d027a3b4d4de7825dcedb197bf573e0596d00008402d060" dependencies = [ - "adler", + "bitflags", + "block", + "core-graphics-types", + "foreign-types 0.3.2", + "log", + "objc", ] [[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] name = "miniz_oxide" version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1214,14 +1538,34 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57ee1c23c7c63b0c9250c339ffdc69255f110b298b901b9f6c82547b7b87caaf" +checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" dependencies = [ "libc", "log", - "wasi", - "windows-sys", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.42.0", +] + +[[package]] +name = "naga" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "262d2840e72dbe250e8cf2f522d080988dfca624c4112c096238a4845f591707" +dependencies = [ + "bit-set", + "bitflags", + "codespan-reporting", + "hexf-parse", + "indexmap", + "log", + "num-traits", + "rustc-hash", + "spirv", + "termcolor", + "thiserror", + "unicode-xid", ] [[package]] @@ -1254,7 +1598,7 @@ checksum = "451422b7e4718271c8b5b3aadf5adedba43dc76312454b387e98fae0fc951aa0" dependencies = [ "bitflags", "jni-sys", - "ndk-sys 0.4.0", + "ndk-sys 0.4.1+23.1.7779620", "num_enum", "raw-window-handle 0.5.0", "thiserror", @@ -1292,7 +1636,7 @@ dependencies = [ "ndk 0.7.0", "ndk-context", "ndk-macro", - "ndk-sys 0.4.0", + "ndk-sys 0.4.1+23.1.7779620", "once_cell", "parking_lot", ] @@ -1321,9 +1665,9 @@ dependencies = [ [[package]] name = "ndk-sys" -version = "0.4.0" +version = "0.4.1+23.1.7779620" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21d83ec9c63ec5bf950200a8e508bdad6659972187b625469f58ef8c08e29046" +checksum = "3cf2aae958bd232cac5069850591667ad422d263686d75b52a065f9badeee5a3" dependencies = [ "jni-sys", ] @@ -1338,7 +1682,7 @@ dependencies = [ "cc", "cfg-if", "libc", - "memoffset", + "memoffset 0.6.5", ] [[package]] @@ -1350,7 +1694,20 @@ dependencies = [ "bitflags", "cfg-if", "libc", - "memoffset", + "memoffset 0.6.5", +] + +[[package]] +name = "nix" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e322c04a9e3440c327fca7b6c8a63e6890a32fa2ad689db972425f07e0d22abb" +dependencies = [ + "autocfg", + "bitflags", + "cfg-if", + "libc", + "memoffset 0.6.5", ] [[package]] @@ -1370,6 +1727,16 @@ dependencies = [ ] [[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + +[[package]] name = "num-integer" version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1431,12 +1798,22 @@ dependencies = [ ] [[package]] +name = "num_threads" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" +dependencies = [ + "libc", +] + +[[package]] name = "objc" version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" dependencies = [ "malloc_buf", + "objc_exception", ] [[package]] @@ -1451,6 +1828,41 @@ dependencies = [ ] [[package]] +name = "objc-sys" +version = "0.2.0-beta.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b9834c1e95694a05a828b59f55fa2afec6288359cda67146126b3f90a55d7" + +[[package]] +name = "objc2" +version = "0.3.0-beta.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe31e5425d3d0b89a15982c024392815da40689aceb34bad364d58732bcfd649" +dependencies = [ + "block2", + "objc-sys", + "objc2-encode", +] + +[[package]] +name = "objc2-encode" +version = "2.0.0-pre.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abfcac41015b00a120608fdaa6938c44cb983fee294351cc4bac7638b4e50512" +dependencies = [ + "objc-sys", +] + +[[package]] +name = "objc_exception" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad970fb455818ad6cba4c122ad012fae53ae8b4795f86378bce65e4f6bab2ca4" +dependencies = [ + "cc", +] + +[[package]] name = "objc_id" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1461,26 +1873,23 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.13.1" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "074864da206b4973b84eb91683020dbefd6a8c3f0f38e054d93954e891935e4e" +checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" [[package]] -name = "osmesa-sys" -version = "0.1.2" +name = "overload" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88cfece6e95d2e717e0872a7f53a8684712ad13822a7979bc760b9c77ec0013b" -dependencies = [ - "shared_library", -] +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "owned_ttf_parser" -version = "0.15.1" +version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07ef1a404ae479dd6906f4fa2c88b3c94028f1284beb42a47c183a7c27ee9a3e" +checksum = "18904d3c65493a9f0d7542293d1a7f69bfdc309a6b9ef4f46dc3e58b0577edc5" dependencies = [ - "ttf-parser 0.15.2", + "ttf-parser 0.17.1", ] [[package]] @@ -1495,22 +1904,22 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.3" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929" +checksum = "7ff9f3fef3968a3ec5945535ed654cb38ff72d7495a25619e2247fb15a2ed9ba" dependencies = [ "cfg-if", "libc", "redox_syscall", "smallvec", - "windows-sys", + "windows-sys 0.42.0", ] [[package]] name = "percent-encoding" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" +checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" [[package]] name = "pico-args" @@ -1546,20 +1955,20 @@ checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" [[package]] name = "pkg-config" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae" +checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" [[package]] name = "png" -version = "0.17.5" +version = "0.17.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc38c0ad57efb786dd57b9864e5b18bae478c00c824dc55a38bbc9da95dde3ba" +checksum = "5d708eaf860a19b19ce538740d2b4bdeeb8337fa53f7738455e706623ad5c638" dependencies = [ "bitflags", "crc32fast", - "deflate", - "miniz_oxide 0.5.3", + "flate2", + "miniz_oxide", ] [[package]] @@ -1572,6 +1981,12 @@ dependencies = [ ] [[package]] +name = "pollster" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5da3b0203fd7ee5720aa0b5e790b591aa5d3f41c3ed2c34a3a393382198af2f7" + +[[package]] name = "proc-macro-crate" version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1584,14 +1999,20 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.43" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a2ca2c61bc9f3d74d2886294ab7b9853abd9c1ad903a3ac7815c58989bb7bab" +checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" dependencies = [ "unicode-ident", ] [[package]] +name = "profiling" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74605f360ce573babfe43964cbe520294dcb081afbf8c108fc6e23036b4da2df" + +[[package]] name = "quote" version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1601,6 +2022,12 @@ dependencies = [ ] [[package]] +name = "range-alloc" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e935c45e09cc6dcf00d2f0b2d630a58f4095320223d47fc68918722f0538b6" + +[[package]] name = "raw-window-handle" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1620,11 +2047,10 @@ dependencies = [ [[package]] name = "rayon" -version = "1.5.3" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd99e5772ead8baa5215278c9b15bf92087709e9c1b2d1f97cdb5a183c933a7d" +checksum = "1e060280438193c554f654141c9ea9417886713b7acd75974c85b18a69a88e0b" dependencies = [ - "autocfg", "crossbeam-deque", "either", "rayon-core", @@ -1632,9 +2058,9 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.9.3" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "258bcdb5ac6dad48491bb2992db6b7cf74878b0384908af124823d118c99683f" +checksum = "cac410af5d00ab6884528b4ab69d1e8e146e8d471201800fa1b4524126de6ad3" dependencies = [ "crossbeam-channel", "crossbeam-deque", @@ -1658,24 +2084,36 @@ dependencies = [ ] [[package]] -name = "redox_users" -version = "0.4.3" +name = "regex" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" +checksum = "e076559ef8e241f2ae3479e36f97bd5741c0330689e217ad51ce2c76808b868a" dependencies = [ - "getrandom", - "redox_syscall", - "thiserror", + "aho-corasick", + "memchr", + "regex-syntax", ] [[package]] +name = "regex-syntax" +version = "0.6.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" + +[[package]] +name = "renderdoc-sys" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1382d1f0a252c4bf97dc20d979a2fdd05b024acd7c2ed0f7595d7817666a157" + +[[package]] name = "resvg" version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34489194784b86c03c3d688258e2ba73f3c82700ba4673ee2ecad5ae540b9438" dependencies = [ "gif", - "jpeg-decoder", + "jpeg-decoder 0.2.6", "log", "pico-args", "png", @@ -1711,17 +2149,6 @@ dependencies = [ ] [[package]] -name = "ron" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "300a51053b1cb55c80b7a9fde4120726ddf25ca241a1cbb926626f62fb136bff" -dependencies = [ - "base64", - "bitflags", - "serde", -] - -[[package]] name = "roxmltree" version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1740,6 +2167,12 @@ dependencies = [ ] [[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] name = "rustls" version = "0.20.7" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1793,9 +2226,9 @@ dependencies = [ [[package]] name = "scoped-tls" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" [[package]] name = "scoped_threadpool" @@ -1810,6 +2243,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] +name = "scratch" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8132065adcfd6e02db789d9285a0deb2f3fcb04002865ab67d5fb103533898" + +[[package]] name = "sct" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1821,9 +2260,9 @@ dependencies = [ [[package]] name = "sctk-adwaita" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04b7c47a572f73de28bee5b5060d085b42b6ce1e4ee2b49c956ea7b25e94b6f0" +checksum = "61270629cc6b4d77ec1907db1033d5c2e1a404c412743621981a871dc9c12339" dependencies = [ "crossfont", "log", @@ -1832,19 +2271,31 @@ dependencies = [ ] [[package]] +name = "sctk-adwaita" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6be6d8911b40c5f91332ce27d2458d57fffc0b061816bf847df23a16f9d3615f" +dependencies = [ + "ab_glyph", + "log", + "smithay-client-toolkit", + "tiny-skia 0.7.0", +] + +[[package]] name = "serde" -version = "1.0.147" +version = "1.0.148" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d193d69bae983fc11a79df82342761dfbf28a99fc8d203dca4c3c1b590948965" +checksum = "e53f64bb4ba0191d6d0676e1b141ca55047d83b74f5607e6d8eb88126c52c2dc" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.147" +version = "1.0.148" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f1d362ca8fc9c3e3a7484440752472d68a6caa98f1ab81d99b5dfe517cec852" +checksum = "a55492425aa53521babf6137309e7d34c20bbfbbfcfe2c7f3a047fd1f6b92c0c" dependencies = [ "proc-macro2", "quote", @@ -1853,9 +2304,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.87" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce777b7b150d76b9cf60d28b55f5847135a003f7d7350c6be7a773508ce7d45" +checksum = "020ff22c755c2ed3f8cf162dbb41a7268d934702f3ed3631656ea597e08fc3db" dependencies = [ "itoa", "ryu", @@ -1884,6 +2335,17 @@ dependencies = [ ] [[package]] +name = "sha2" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] name = "sharded-slab" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1893,13 +2355,16 @@ dependencies = [ ] [[package]] -name = "shared_library" -version = "0.1.9" +name = "simple_logger" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a9e7e0f2bfae24d8a5b5a66c5b257a83c7412304311512a0c054cd5e619da11" +checksum = "e190a521c2044948158666916d9e872cbb9984f755e9bb3b5b75a836205affcd" dependencies = [ - "lazy_static", - "libc", + "atty", + "colored", + "log", + "time 0.3.17", + "windows-sys 0.42.0", ] [[package]] @@ -1928,9 +2393,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fd0db749597d91ff862fd1d55ea87f7855a744a8425a64695b6fca237d1dad1" +checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" [[package]] name = "smithay-client-toolkit" @@ -1977,6 +2442,16 @@ dependencies = [ ] [[package]] +name = "spirv" +version = "0.2.0+1.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "246bfa38fe3db3f1dfc8ca5a2cdeb7348c78be2112740cc0ec8ef18b6d94f830" +dependencies = [ + "bitflags", + "num-traits", +] + +[[package]] name = "static_assertions" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2015,9 +2490,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.99" +version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58dbef6ec655055e20b86b15a8cc6d439cca19b667537ac6a1369572d151ab13" +checksum = "4ae548ec36cf198c0ef7710d3c230987c2d6d7bd98ad6edc0274462724c585ce" dependencies = [ "proc-macro2", "quote", @@ -2025,19 +2500,28 @@ dependencies = [ ] [[package]] +name = "termcolor" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" +dependencies = [ + "winapi-util", +] + +[[package]] name = "thiserror" -version = "1.0.32" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5f6586b7f764adc0231f4c79be7b920e766bb2f3e51b3661cdb263828f19994" +checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.32" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12bafc5b54507e0149cdf1b145a5d80ab80a90bcd9275df43d4fff68460f6c21" +checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" dependencies = [ "proc-macro2", "quote", @@ -2064,16 +2548,56 @@ dependencies = [ [[package]] name = "tiff" -version = "0.7.4" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f71e422515e83e3ab8a03d4781d05ebf864fc61f4546e6ecffa58cbd34181a0" +checksum = "f17def29300a156c19ae30814710d9c63cd50288a49c6fd3a10ccfbe4cf886fd" dependencies = [ "flate2", - "jpeg-decoder", + "jpeg-decoder 0.3.0", "weezl", ] [[package]] +name = "time" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" +dependencies = [ + "libc", + "wasi 0.10.0+wasi-snapshot-preview1", + "winapi", +] + +[[package]] +name = "time" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a561bf4617eebd33bca6434b988f39ed798e527f51a1e797d0ee4f61c0a38376" +dependencies = [ + "itoa", + "libc", + "num_threads", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" + +[[package]] +name = "time-macros" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d967f99f534ca7e495c575c62638eebc2898a8c84c119b89e250477bc4ba16b2" +dependencies = [ + "time-core", +] + +[[package]] name = "tiny-skia" version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2138,9 +2662,9 @@ dependencies = [ [[package]] name = "tracing" -version = "0.1.36" +version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fce9567bd60a67d08a16488756721ba392f24f29006402881e43b19aac64307" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ "cfg-if", "pin-project-lite", @@ -2150,9 +2674,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11c75893af559bc8e10716548bdef5cb2b983f8e637db9d0e15126b61b484ee2" +checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" dependencies = [ "proc-macro2", "quote", @@ -2161,9 +2685,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.29" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aeea4303076558a00714b823f9ad67d58a3bbda1df83d8827d21193156e22f7" +checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" dependencies = [ "once_cell", "valuable", @@ -2182,11 +2706,11 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.15" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60db860322da191b40952ad9affe65ea23e7dd6a5c442c2c42865810c6ab8e6b" +checksum = "a6176eae26dd70d0c919749377897b54a9276bd7061339665dd68777926b5a70" dependencies = [ - "ansi_term", + "nu-ansi-term", "sharded-slab", "smallvec", "thread_local", @@ -2218,6 +2742,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "375812fa44dab6df41c195cd2f7fecb488f6c09fbaafb62807488cefab642bff" [[package]] +name = "typenum" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" + +[[package]] name = "unicode-bidi" version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2243,15 +2773,15 @@ checksum = "07547e3ee45e28326cc23faac56d44f58f16ab23e413db526debce3b0bfd2742" [[package]] name = "unicode-ident" -version = "1.0.3" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4f5b37a154999a8f3f98cc23a628d850e154479cd94decf3414696e12e31aaf" +checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" [[package]] name = "unicode-normalization" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "854cbdc4f7bc6ae19c820d44abdc3277ac3e1b2b93db20a636825d9322fb60e6" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" dependencies = [ "tinyvec", ] @@ -2269,6 +2799,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1d386ff53b415b7fe27b50bb44679e2cc4660272694b7b6f3326d8480823a94" [[package]] +name = "unicode-width" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" + +[[package]] +name = "unicode-xid" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" + +[[package]] name = "untrusted" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2293,9 +2835,9 @@ dependencies = [ [[package]] name = "url" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22fe195a4f217c25b25cb5058ced57059824a678474874038dc88d211bf508d3" +checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" dependencies = [ "form_urlencoded", "idna", @@ -2360,15 +2902,21 @@ dependencies = [ [[package]] name = "wasi" +version = "0.10.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" + +[[package]] +name = "wasi" version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.82" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc7652e3f6c4706c8d9cd54832c4a4ccb9b5336e2c3bd154d5cccfbf1c1f5f7d" +checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -2376,9 +2924,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.82" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "662cd44805586bd52971b9586b1df85cdbbd9112e4ef4d8f41559c334dc6ac3f" +checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" dependencies = [ "bumpalo", "log", @@ -2391,9 +2939,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.32" +version = "0.4.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa76fb221a1f8acddf5b54ace85912606980ad661ac7a503b4570ffd3a624dad" +checksum = "23639446165ca5a5de86ae1d8896b737ae80319560fbaa4c2887b7da6e7ebd7d" dependencies = [ "cfg-if", "js-sys", @@ -2403,9 +2951,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.82" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b260f13d3012071dfb1512849c033b1925038373aea48ced3012c09df952c602" +checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2413,9 +2961,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.82" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5be8e654bdd9b79216c2929ab90721aa82faf65c48cdf08bdc4e7f51357b80da" +checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" dependencies = [ "proc-macro2", "quote", @@ -2426,20 +2974,20 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.82" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6598dd0bd3c7d51095ff6531a5b23e02acdc81804e30d8f07afb77b7215a140a" +checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" [[package]] name = "wayland-client" -version = "0.29.4" +version = "0.29.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91223460e73257f697d9e23d401279123d36039a3f7a449e983f123292d4458f" +checksum = "3f3b068c05a039c9f755f881dc50f01732214f5685e379829759088967c46715" dependencies = [ "bitflags", "downcast-rs", "libc", - "nix 0.22.3", + "nix 0.24.2", "scoped-tls", "wayland-commons", "wayland-scanner", @@ -2448,11 +2996,11 @@ dependencies = [ [[package]] name = "wayland-commons" -version = "0.29.4" +version = "0.29.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94f6e5e340d7c13490eca867898c4cec5af56c27a5ffe5c80c6fc4708e22d33e" +checksum = "8691f134d584a33a6606d9d717b95c4fa20065605f798a3f350d78dced02a902" dependencies = [ - "nix 0.22.3", + "nix 0.24.2", "once_cell", "smallvec", "wayland-sys", @@ -2460,30 +3008,20 @@ dependencies = [ [[package]] name = "wayland-cursor" -version = "0.29.4" +version = "0.29.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c52758f13d5e7861fc83d942d3d99bf270c83269575e52ac29e5b73cb956a6bd" +checksum = "6865c6b66f13d6257bef1cd40cbfe8ef2f150fb8ebbdb1e8e873455931377661" dependencies = [ - "nix 0.22.3", + "nix 0.24.2", "wayland-client", "xcursor", ] [[package]] -name = "wayland-egl" -version = "0.29.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83281d69ee162b59031c666385e93bde4039ec553b90c4191cdb128ceea29a3a" -dependencies = [ - "wayland-client", - "wayland-sys", -] - -[[package]] name = "wayland-protocols" -version = "0.29.4" +version = "0.29.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60147ae23303402e41fe034f74fb2c35ad0780ee88a1c40ac09a3be1e7465741" +checksum = "b950621f9354b322ee817a23474e479b34be96c2e909c14f7bc0100e9a970bc6" dependencies = [ "bitflags", "wayland-client", @@ -2493,9 +3031,9 @@ dependencies = [ [[package]] name = "wayland-scanner" -version = "0.29.4" +version = "0.29.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39a1ed3143f7a143187156a2ab52742e89dac33245ba505c17224df48939f9e0" +checksum = "8f4303d8fa22ab852f789e75a967f0a2cdc430a607751c0499bada3e451cbd53" dependencies = [ "proc-macro2", "quote", @@ -2504,9 +3042,9 @@ dependencies = [ [[package]] name = "wayland-sys" -version = "0.29.4" +version = "0.29.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9341df79a8975679188e37dab3889bfa57c44ac2cb6da166f519a81cbe452d4" +checksum = "be12ce1a3c39ec7dba25594b97b42cb3195d54953ddb9d3d95a7c3902bc6e9d4" dependencies = [ "dlib", "lazy_static", @@ -2515,9 +3053,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.59" +version = "0.3.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed055ab27f941423197eb86b2035720b1a3ce40504df082cac2ecc6ed73335a1" +checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" dependencies = [ "js-sys", "wasm-bindgen", @@ -2563,6 +3101,100 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb" [[package]] +name = "wgpu" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2272b17bffc8a0c7d53897435da7c1db587c87d3a14e8dae9cdb8d1d210fc0f" +dependencies = [ + "arrayvec 0.7.2", + "js-sys", + "log", + "naga", + "parking_lot", + "raw-window-handle 0.5.0", + "smallvec", + "static_assertions", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "wgpu-core", + "wgpu-hal", + "wgpu-types", +] + +[[package]] +name = "wgpu-core" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73d14cad393054caf992ee02b7da6a372245d39a484f7461c1f44f6f6359bd28" +dependencies = [ + "arrayvec 0.7.2", + "bit-vec", + "bitflags", + "cfg_aliases", + "codespan-reporting", + "fxhash", + "log", + "naga", + "parking_lot", + "profiling", + "raw-window-handle 0.5.0", + "smallvec", + "thiserror", + "web-sys", + "wgpu-hal", + "wgpu-types", +] + +[[package]] +name = "wgpu-hal" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cc320a61acb26be4f549c9b1b53405c10a223fbfea363ec39474c32c348d12f" +dependencies = [ + "android_system_properties", + "arrayvec 0.7.2", + "ash", + "bit-set", + "bitflags", + "block", + "core-graphics-types", + "d3d12", + "foreign-types 0.3.2", + "fxhash", + "glow", + "gpu-alloc", + "gpu-descriptor", + "js-sys", + "khronos-egl", + "libloading", + "log", + "metal", + "naga", + "objc", + "parking_lot", + "profiling", + "range-alloc", + "raw-window-handle 0.5.0", + "renderdoc-sys", + "smallvec", + "thiserror", + "wasm-bindgen", + "web-sys", + "wgpu-types", + "winapi", +] + +[[package]] +name = "wgpu-types" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb6b28ef22cac17b9109b25b3bf8c9a103eeb293d7c5f78653979b09140375f6" +dependencies = [ + "bitflags", +] + +[[package]] name = "widestring" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2614,48 +3246,105 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" dependencies = [ - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_msvc", + "windows_aarch64_msvc 0.36.1", + "windows_i686_gnu 0.36.1", + "windows_i686_msvc 0.36.1", + "windows_x86_64_gnu 0.36.1", + "windows_x86_64_msvc 0.36.1", ] [[package]] +name = "windows-sys" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc 0.42.0", + "windows_i686_gnu 0.42.0", + "windows_i686_msvc 0.42.0", + "windows_x86_64_gnu 0.42.0", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc 0.42.0", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" + +[[package]] name = "windows_aarch64_msvc" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" [[package]] +name = "windows_aarch64_msvc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" + +[[package]] name = "windows_i686_gnu" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" [[package]] +name = "windows_i686_gnu" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" + +[[package]] name = "windows_i686_msvc" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" [[package]] +name = "windows_i686_msvc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" + +[[package]] name = "windows_x86_64_gnu" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" [[package]] +name = "windows_x86_64_gnu" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" + +[[package]] name = "windows_x86_64_msvc" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" [[package]] +name = "windows_x86_64_msvc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" + +[[package]] name = "winit" -version = "0.27.2" +version = "0.27.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83a8f3e9d742401efcfe833b8f84960397482ff049cb7bf59a112e14a4be97f7" +checksum = "bb796d6fbd86b2fd896c9471e6f04d39d750076ebe5680a3958f00f5ab97657c" dependencies = [ "bitflags", "cocoa", @@ -2674,13 +3363,43 @@ dependencies = [ "percent-encoding", "raw-window-handle 0.4.3", "raw-window-handle 0.5.0", - "sctk-adwaita", + "sctk-adwaita 0.4.3", + "smithay-client-toolkit", + "wasm-bindgen", + "wayland-client", + "wayland-protocols", + "web-sys", + "windows-sys 0.36.1", + "x11-dl", +] + +[[package]] +name = "winit" +version = "0.27.5" +source = "git+https://github.com/rust-windowing/winit.git#2a58b785fed2a3746f7c7eebce95bce67ddfd27c" +dependencies = [ + "android-activity", + "bitflags", + "core-foundation", + "core-graphics", + "dispatch", + "instant", + "libc", + "log", + "mio", + "ndk 0.7.0", + "objc2", + "once_cell", + "percent-encoding", + "raw-window-handle 0.4.3", + "raw-window-handle 0.5.0", + "sctk-adwaita 0.5.2", "smithay-client-toolkit", "wasm-bindgen", "wayland-client", "wayland-protocols", "web-sys", - "windows-sys", + "windows-sys 0.42.0", "x11-dl", ] @@ -2695,9 +3414,9 @@ dependencies = [ [[package]] name = "x11-dl" -version = "2.20.0" +version = "2.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c83627bc137605acc00bb399c7b908ef460b621fc37c953db2b09f88c449ea6" +checksum = "b1536d6965a5d4e573c7ef73a2c15ebcd0b2de3347bdf526c34c297c00ac40f0" dependencies = [ "lazy_static", "libc", diff --git a/Cargo.toml b/Cargo.toml @@ -7,39 +7,101 @@ rust-version = "1.60" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +[lib] +crate-type = ["lib", "cdylib"] [dependencies] +chrono = "0.4" egui = "0.19.0" -eframe = { version = "0.19.0", features = ["persistence"] } -serde = { version = "1", features = ["derive"] } # You only need this if you want app persistence -#nostr_rust = { git = "git://jb55.com/nostr_rust", rev = "ccf7e521fe3bb9ca8f86516aef2c1f71db0213ed" } +egui_extras = { version = "0.19.0", features = ["image", "svg"] } +egui_wgpu_backend = "0.20.0" +egui-winit = "0.19.0" +egui_winit_platform = {git = "https://github.com/inferrna/egui_winit_platform.git"} ehttp = "0.2.0" +epi = "0.17.0" +hex = "0.4.3" image = { version = "0.24", features = ["jpeg", "png", "webp"] } -egui_extras = { version = "0.19.0", features = ["image", "svg"] } +log = "0.4.17" +#nostr_rust = { git = "git://jb55.com/nostr_rust", rev = "ccf7e521fe3bb9ca8f86516aef2c1f71db0213ed" } poll-promise = "0.2.0" -serde_json = { version = "1", default-features = false, features = ["std"] } +pollster = "0.2" serde_derive = "1" - -# native: -[target.'cfg(not(target_arch = "wasm32"))'.dependencies] +serde_json = { version = "1", default-features = false, features = ["std"] } +serde = { version = "1", features = ["derive"] } # You only need this if you want app persistence +sha2 = "0.10.6" +tracing = "0.1.37" tracing-subscriber = "0.3" +wgpu = "0.14.0" +#winit = "0.27.1" + +[target.'cfg(debug_assertions)'.dependencies] +simple_logger = "*" +android_logger = "0.11.1" + +# This dependency will only be included when targeting Android +[target.'cfg(not(target_os = "android"))'.dependencies] +winit = { git="https://github.com/rust-windowing/winit.git" } + +# This dependency will only be included when targeting Android +[target.'cfg(target_os = "android")'.dependencies] +winit = { git="https://github.com/rust-windowing/winit.git", default-features = false, features = ["android-native-activity"] } # web: [target.'cfg(target_arch = "wasm32")'.dependencies] console_error_panic_hook = "0.1.6" tracing-wasm = "0.2" +# This dependency will only be included when targeting Android +#[target.'cfg(target_os = "android")'.dependencies] +#winit = { git="https://github.com/rust-windowing/winit.git", default-features = false, features = ["android-native-activity"] } + +[package.metadata.android] +package = "com.damus" +apk_name = "damus" +#assets = "assets" + +[[package.metadata.android.uses_feature]] +name = "android.hardware.vulkan.level" +required = true +version = 1 + +[[package.metadata.android.uses_permission]] +name = "android.permission.WRITE_EXTERNAL_STORAGE" +max_sdk_version = 18 + +# See https://developer.android.com/guide/topics/manifest/application-element +[package.metadata.android.application] +label = "Damus" + +# See https://developer.android.com/guide/topics/manifest/application-element#debug +# +# Defaults to false. +debuggable = false + +# See https://developer.android.com/guide/topics/manifest/application-element#theme +# +# Example shows setting the theme of an application to fullscreen. +#theme = "@android:style/Theme.DeviceDefault.NoActionBar.Fullscreen" + +# Virtual path your application's icon for any mipmap level. +# If not specified, an icon will not be included in the APK. +#icon = "@mipmap/ic_launcher" + +# See https://developer.android.com/guide/topics/manifest/application-element#label +# +# Defaults to the compiled artifact's name. -[profile.release] -opt-level = 2 # fast and small wasm +#[profile.release] +#opt-level = 2 # fast and small wasm -[patch.crates-io] +#[patch.crates-io] # If you want to use the bleeding edge version of egui and eframe: # egui = { git = "https://github.com/emilk/egui", branch = "master" } # eframe = { git = "https://github.com/emilk/egui", branch = "master" } # If you fork https://github.com/emilk/egui you can test with: -# egui = { path = "../egui/crates/egui" } -# eframe = { path = "../egui/crates/eframe" } +#egui = { path = "../egui/crates/egui" } +#eframe = { path = "../egui/crates/eframe" } +#egui_extras = { path = "../egui/crates/egui_extras", features = ["image", "svg"] } diff --git a/Trunk.toml b/Trunk.toml @@ -1,3 +1,3 @@ [build] filehash = true -public_url = "/webv3/" +#public_url = "/webv3/" diff --git a/src/app.rs b/src/app.rs @@ -1,39 +1,53 @@ -//use egui::{Align, Layout, RichText, WidgetText}; +//use egui::TextureFilter; use egui_extras::RetainedImage; + //use nostr_rust::events::Event; use poll_promise::Promise; //use std::borrow::{Borrow, Cow}; +use egui::Context; use std::collections::HashMap; +use std::hash::Hash; +use tracing::debug; use crate::Event; -type ImageCache = HashMap<String, Promise<ehttp::Result<RetainedImage>>>; +#[derive(Hash, Eq, PartialEq, Clone, Debug)] +enum UrlKey<'a> { + Orig(&'a str), + Failed(&'a str), +} + +type ImageCache<'a> = HashMap<UrlKey<'a>, Promise<ehttp::Result<RetainedImage>>>; /// We derive Deserialize/Serialize so we can persist app state on shutdown. #[derive(serde::Deserialize, serde::Serialize)] -#[serde(default)] // if we add new fields, give them default values when deserializing old state -pub struct Damus { +#[serde(default)] // if we add new fields, give them default values when + // deserializing old state +pub struct Damus<'a> { // Example stuff: label: String, + composing: bool, + n_panels: u32, #[serde(skip)] events: Vec<Event>, #[serde(skip)] - img_cache: ImageCache, + img_cache: ImageCache<'a>, // this how you opt-out of serialization of a member #[serde(skip)] value: f32, } -impl Default for Damus { +impl Default for Damus<'_> { fn default() -> Self { Self { // Example stuff: label: "Hello World!".to_owned(), + composing: false, events: vec![], img_cache: HashMap::new(), value: 2.7, @@ -42,17 +56,34 @@ impl Default for Damus { } } -impl Damus { +pub fn is_mobile(ctx: &egui::Context) -> bool { + let screen_size = ctx.input().screen_rect().size(); + screen_size.x < 550.0 +} + +impl Damus<'_> { + pub fn ui(&mut self, ctx: &Context) { + if is_mobile(ctx) { + render_damus_mobile(ctx, self) + } else { + render_damus_desktop(ctx, self) + } + } + + pub fn add_test_events(&mut self) { + add_test_events(self); + } + /// Called once before the first frame. - pub fn new(cc: &eframe::CreationContext<'_>) -> Self { + pub fn new() -> Self { // This is also where you can customized the look at feel of egui using // `cc.egui_ctx.set_visuals` and `cc.egui_ctx.set_fonts`. // Load previous app state (if any). // Note that you must enable the `persistence` feature for this to work. - if let Some(storage) = cc.storage { - return eframe::get_value(storage, eframe::APP_KEY).unwrap_or_default(); - } + //if let Some(storage) = cc.storage { + //return eframe::get_value(storage, eframe::APP_KEY).unwrap_or_default(); + //} Default::default() } @@ -80,30 +111,60 @@ fn fetch_img(ctx: &egui::Context, url: &str) -> Promise<ehttp::Result<RetainedIm let ctx = ctx.clone(); ehttp::fetch(request, move |response| { let image = response.and_then(parse_response); - sender.send(image); // send the results back to the UI thread. ctx.request_repaint(); + sender.send(image); // send the results back to the UI thread. + ctx.request_repaint(); }); promise } -fn render_pfp(ui: &mut egui::Ui, img_cache: &mut ImageCache, url: String) { - let m_cached_promise = img_cache.get_mut(&url); +fn robohash(hash: &str) -> String { + return format!("https://robohash.org/{}", hash); +} + +fn render_pfp<'a>(ui: &mut egui::Ui, img_cache: &mut ImageCache<'a>, pk: &str, url: &'a str) { + let urlkey = UrlKey::Orig(url); + let m_cached_promise = img_cache.get(&urlkey); if m_cached_promise.is_none() { - img_cache.insert(url.clone(), fetch_img(ui.ctx(), &url)); + debug!("urlkey: {:?}", &urlkey); + img_cache.insert(UrlKey::Orig(url), fetch_img(ui.ctx(), &url)); } - match img_cache[&url].ready() { + let pfp_size = 50.0; + + match img_cache[&urlkey].ready() { None => { ui.spinner(); // still loading } - Some(Err(err)) => { - ui.colored_label(ui.visuals().error_fg_color, err); // something went wrong + Some(Err(_err)) => { + let failed_key = UrlKey::Failed(&url); + let m_failed_promise = img_cache.get_mut(&failed_key); + if m_failed_promise.is_none() { + debug!("failed key: {:?}", &failed_key); + img_cache.insert(UrlKey::Failed(url), fetch_img(ui.ctx(), &robohash(pk))); + } + + match img_cache[&failed_key].ready() { + None => { + ui.spinner(); // still loading + } + Some(Err(_err)) => { + ui.label("❌"); + } + Some(Ok(img)) => { + pfp_image(ui, img, pfp_size); + } + } } - Some(Ok(image)) => { - image.show_max_size(ui, egui::vec2(64.0, 64.0)); + Some(Ok(img)) => { + pfp_image(ui, img, pfp_size); } } } +fn pfp_image(ui: &mut egui::Ui, img: &RetainedImage, size: f32) -> egui::Response { + img.show_max_size(ui, egui::vec2(size, size)) +} + fn render_username(ui: &mut egui::Ui, pk: &str) { ui.horizontal(|ui| { ui.spacing_mut().item_spacing.x = 0.0; @@ -113,7 +174,7 @@ fn render_username(ui: &mut egui::Ui, pk: &str) { }); } -fn render_event(ui: &mut egui::Ui, img_cache: &mut ImageCache, ev: &Event) { +fn render_event(ui: &mut egui::Ui, img_cache: &mut ImageCache<'_>, ev: &Event) { ui.with_layout(egui::Layout::left_to_right(egui::Align::TOP), |ui| { let damus_pic = "https://damus.io/img/damus.svg".into(); let jb55_pic = "https://damus.io/img/red-me.jpg".into(); @@ -124,7 +185,7 @@ fn render_event(ui: &mut egui::Ui, img_cache: &mut ImageCache, ev: &Event) { damus_pic }; - render_pfp(ui, img_cache, pic); + render_pfp(ui, img_cache, &ev.pub_key, pic); ui.with_layout(egui::Layout::top_down(egui::Align::LEFT), |ui| { render_username(ui, &ev.pub_key); @@ -134,7 +195,7 @@ fn render_event(ui: &mut egui::Ui, img_cache: &mut ImageCache, ev: &Event) { }); } -fn timeline_view(ui: &mut egui::Ui, app: &mut Damus) { +fn timeline_view(ui: &mut egui::Ui, app: &mut Damus<'_>) { ui.heading("Timeline"); egui::ScrollArea::vertical() @@ -147,7 +208,7 @@ fn timeline_view(ui: &mut egui::Ui, app: &mut Damus) { }); } -fn render_damus(ctx: &egui::Context, _frame: &mut eframe::Frame, app: &mut Damus) { +fn render_panel(ctx: &egui::Context, app: &mut Damus<'_>) { egui::TopBottomPanel::top("top_panel").show(ctx, |ui| { ui.horizontal_wrapped(|ui| { ui.visuals_mut().button_frame = false; @@ -172,6 +233,17 @@ fn render_damus(ctx: &egui::Context, _frame: &mut eframe::Frame, app: &mut Damus } }); }); +} + +fn render_damus_mobile(ctx: &egui::Context, app: &mut Damus<'_>) { + let panel_width = ctx.input().screen_rect.width(); + egui::CentralPanel::default().show(ctx, |ui| { + timeline_panel(ui, app, panel_width, 0); + }); +} + +fn render_damus_desktop(ctx: &egui::Context, app: &mut Damus<'_>) { + render_panel(ctx, app); let screen_size = ctx.input().screen_rect.width(); let calc_panel_width = (screen_size / app.n_panels as f32) - 30.0; @@ -194,7 +266,7 @@ fn render_damus(ctx: &egui::Context, _frame: &mut eframe::Frame, app: &mut Damus }); } -fn timeline_panel(ui: &mut egui::Ui, app: &mut Damus, panel_width: f32, ind: u32) { +fn timeline_panel(ui: &mut egui::Ui, app: &mut Damus<'_>, panel_width: f32, ind: u32) { egui::SidePanel::left(format!("l{}", ind)) .resizable(false) .max_width(panel_width) @@ -204,56 +276,58 @@ fn timeline_panel(ui: &mut egui::Ui, app: &mut Damus, panel_width: f32, ind: u32 }); } -impl eframe::App for Damus { - /// Called by the frame work to save state before shutdown. - fn save(&mut self, storage: &mut dyn eframe::Storage) { - eframe::set_value(storage, eframe::APP_KEY, self); - } +fn add_test_events(damus: &mut Damus<'_>) { + // Examples of how to create different panels and windows. + // Pick whichever suits you. + // Tip: a good default choice is to just keep the `CentralPanel`. + // For inspiration and more examples, go to https://emilk.github.io/egui + + let test_event = Event { + id: "6938e3cd841f3111dbdbd909f87fd52c3d1f1e4a07fd121d1243196e532811cb".to_string(), + pub_key: "f0a6ff7f70b872de6d82c8daec692a433fd23b6a49f25923c6f034df715cdeec".to_string(), + created_at: 1667781968, + kind: 1, + tags: vec![], + content: LOREM_IPSUM.into(), + sig: "af02c971015995f79e07fa98aaf98adeeb6a56d0005e451ee4e78844cff712a6bc0f2109f72a878975f162dcefde4173b65ebd4c3d3ab3b520a9dcac6acf092d".to_string(), + }; - /// Called each time the UI needs repainting, which may be many times per second. - /// Put your widgets into a `SidePanel`, `TopPanel`, `CentralPanel`, `Window` or `Area`. - fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) { - // Examples of how to create different panels and windows. - // Pick whichever suits you. - // Tip: a good default choice is to just keep the `CentralPanel`. - // For inspiration and more examples, go to https://emilk.github.io/egui - - let test_event = Event { - id: "6938e3cd841f3111dbdbd909f87fd52c3d1f1e4a07fd121d1243196e532811cb".to_string(), - pub_key: "f0a6ff7f70b872de6d82c8daec692a433fd23b6a49f25923c6f034df715cdeec".to_string(), - created_at: 1667781968, - kind: 1, - tags: vec![], - content: LOREM_IPSUM.into(), - sig: "af02c971015995f79e07fa98aaf98adeeb6a56d0005e451ee4e78844cff712a6bc0f2109f72a878975f162dcefde4173b65ebd4c3d3ab3b520a9dcac6acf092d".to_string(), - }; - - let test_event2 = Event { - id: "6938e3cd841f3111dbdbd909f87fd52c3d1f1e4a07fd121d1243196e532811cb".to_string(), - pub_key: "32e1827635450ebb3c5a7d12c1f8e7b2b514439ac10a67eef3d9fd9c5c68e245".to_string(), - created_at: 1667781968, - kind: 1, - tags: vec![], - content: LOREM_IPSUM_LONG.into(), - sig: "af02c971015995f79e07fa98aaf98adeeb6a56d0005e451ee4e78844cff712a6bc0f2109f72a878975f162dcefde4173b65ebd4c3d3ab3b520a9dcac6acf092d".to_string(), - }; - - if self.events.len() == 0 { - self.events.push(test_event.clone()); - self.events.push(test_event2.clone()); - self.events.push(test_event.clone()); - self.events.push(test_event2.clone()); - self.events.push(test_event.clone()); - self.events.push(test_event2.clone()); - self.events.push(test_event.clone()); - self.events.push(test_event2.clone()); - self.events.push(test_event.clone()); - } + let test_event2 = Event { + id: "6938e3cd841f3111dbdbd909f87fd52c3d1f1e4a07fd121d1243196e532811cb".to_string(), + pub_key: "32e1827635450ebb3c5a7d12c1f8e7b2b514439ac10a67eef3d9fd9c5c68e245".to_string(), + created_at: 1667781968, + kind: 1, + tags: vec![], + content: LOREM_IPSUM_LONG.into(), + sig: "af02c971015995f79e07fa98aaf98adeeb6a56d0005e451ee4e78844cff712a6bc0f2109f72a878975f162dcefde4173b65ebd4c3d3ab3b520a9dcac6acf092d".to_string(), + }; - render_damus(ctx, _frame, self); + if damus.events.len() == 0 { + damus.events.push(test_event.clone()); + damus.events.push(test_event2.clone()); + damus.events.push(test_event.clone()); + damus.events.push(test_event2.clone()); + damus.events.push(test_event.clone()); + damus.events.push(test_event2.clone()); + damus.events.push(test_event.clone()); + damus.events.push(test_event2.clone()); + damus.events.push(test_event.clone()); } } +//impl eframe::App for Damus<'_> { +// /// Called by the frame work to save state before shutdown. +// fn save(&mut self, storage: &mut dyn eframe::Storage) { +// eframe::set_value(storage, eframe::APP_KEY, self); +// } +// +// /// Called each time the UI needs repainting, which may be many times per second. +// /// Put your widgets into a `SidePanel`, `TopPanel`, `CentralPanel`, `Window` or `Area`. +// fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) { +// update_damus(ctx) +// } +//} + pub const LOREM_IPSUM: &str = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."; pub const LOREM_IPSUM_LONG: &str = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. diff --git a/src/main.rs b/src/main.rs @@ -1,34 +1,361 @@ -#![warn(clippy::all, rust_2018_idioms)] -#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] // hide console window on Windows in release +use ::egui::FontDefinitions; +use chrono::Timelike; +use damus::Damus; +use egui_wgpu_backend::{RenderPass, ScreenDescriptor}; +use egui_winit_platform::{Platform, PlatformDescriptor}; +use log::{error, warn}; +use std::iter; +use std::time::Instant; +use wgpu::CompositeAlphaMode; +use winit::event::Event::*; +use winit::event_loop::ControlFlow; +use winit::event_loop::EventLoop; -// When compiling natively: -#[cfg(not(target_arch = "wasm32"))] -fn main() { - // Log to stdout (if you run with `RUST_LOG=debug`). - tracing_subscriber::fmt::init(); - - let native_options = eframe::NativeOptions::default(); - eframe::run_native( - "Damus Desktop", - native_options, - Box::new(|cc| Box::new(damus::Damus::new(cc))), - ); +#[cfg(target_os = "android")] +use winit::{ + event::StartCause, platform::android::EventLoopBuilderExtAndroid, + platform::run_return::EventLoopExtRunReturn, +}; + +/// A custom event type for the winit app. +#[derive(Debug, Clone, Copy)] +pub enum Event { + RequestRedraw, +} + +/// This is the repaint signal type that egui needs for requesting a repaint from another thread. +/// It sends the custom RequestRedraw event to the winit event loop. +struct ExampleRepaintSignal(std::sync::Mutex<winit::event_loop::EventLoopProxy<Event>>); + +impl epi::backend::RepaintSignal for ExampleRepaintSignal { + fn request_repaint(&self) { + self.0 + .lock() + .unwrap_or_else(|e| { + panic!( + "Failed to lock guard at {} line {} with error\n{}", + file!(), + line!(), + e + ) + }) + .send_event(Event::RequestRedraw) + .ok(); + } +} + +#[cfg(target_os = "android")] +#[no_mangle] +fn android_main(app: winit::platform::android::activity::AndroidApp) { + #[cfg(debug_assertions)] + { + std::env::set_var("RUST_BACKTRACE", "full"); + android_logger::init_once( + android_logger::Config::default().with_min_level(log::Level::Trace), + ); + } + let event_loop = winit::event_loop::EventLoopBuilder::<Event>::with_user_event() + .with_android_app(app) + .build(); + run_evloop(event_loop); } -// when compiling to web using trunk. -#[cfg(target_arch = "wasm32")] fn main() { - // Make sure panics are logged using `console.error`. - console_error_panic_hook::set_once(); - - // Redirect tracing to console.log and friends: - tracing_wasm::set_as_global_default(); - - let web_options = eframe::WebOptions::default(); - eframe::start_web( - "the_canvas_id", // hardcode it - web_options, - Box::new(|cc| Box::new(damus::Damus::new(cc))), - ) - .expect("failed to start eframe"); + #[cfg(debug_assertions)] + simple_logger::init().unwrap(); + let event_loop = winit::event_loop::EventLoopBuilder::<Event>::with_user_event().build(); + run_evloop(event_loop); +} + +pub fn run_evloop(mut event_loop: EventLoop<Event>) { + //'Cannot get the native window, it's null and will always be null before Event::Resumed and after Event::Suspended. Make sure you only call this function between those events.', ..../winit-c2fdb27092aba5a7/418cc44/src/platform_impl/android/mod.rs:1028:13 + warn!("Winit build window at {} line {}", file!(), line!()); + let window = winit::window::WindowBuilder::new() + .with_decorations(!cfg!(android)) /* !cfg!(android) */ + .with_resizable(!cfg!(android)) + .with_transparent(false) + .with_title("egui-wgpu_winit example") + .build(&event_loop) + .unwrap_or_else(|e| { + panic!( + "Failed to init window at {} line {} with error\n{:?}", + file!(), + line!(), + e + ) + }); + + warn!("WGPU new instance at {} line {}", file!(), line!()); + let mut instance = wgpu::Instance::new(wgpu::Backends::PRIMARY); + + let mut size = window.inner_size(); + let outer_size = window.outer_size(); + + warn!("outer_size = {:?}", outer_size); + warn!("size = {:?}", size); + + warn!("Create platform at {} line {}", file!(), line!()); + // We use the egui_winit_platform crate as the platform. + let mut platform = Platform::new(PlatformDescriptor { + physical_width: size.width as u32, + physical_height: size.height as u32, + scale_factor: window.scale_factor(), + font_definitions: FontDefinitions::default(), + style: Default::default(), + }); + + #[cfg(target_os = "android")] + let mut platform = { + //Just find the actual screen size on android + event_loop.run_return(|main_event, tgt, control_flow| { + control_flow.set_poll(); + warn!( + "Got event: {:?} at {} line {}", + &main_event, + file!(), + line!() + ); + match main_event { + NewEvents(e) => match e { + StartCause::ResumeTimeReached { .. } => {} + StartCause::WaitCancelled { .. } => {} + StartCause::Poll => {} + StartCause::Init => {} + }, + WindowEvent { + window_id, + ref event, + } => { + if let winit::event::WindowEvent::Resized(r) = event { + size = *r; + } + } + DeviceEvent { .. } => {} + UserEvent(_) => {} + Suspended => { + control_flow.set_poll(); + } + Resumed => { + if let Some(primary_mon) = tgt.primary_monitor() { + size = primary_mon.size(); + window.set_inner_size(size); + warn!( + "Set to new size: {:?} at {} line {}", + &size, + file!(), + line!() + ); + } else if let Some(other_mon) = tgt.available_monitors().next() { + size = other_mon.size(); + window.set_inner_size(size); + warn!( + "Set to new size: {:?} at {} line {}", + &size, + file!(), + line!() + ); + } + control_flow.set_exit(); + } + MainEventsCleared => {} + RedrawRequested(rdr) => {} + RedrawEventsCleared => {} + LoopDestroyed => {} + }; + platform.handle_event(&main_event); + }); + + warn!("Recreate platform at {} line {}", file!(), line!()); + // We use the egui_winit_platform crate as the platform. + Platform::new(PlatformDescriptor { + physical_width: size.width as u32, + physical_height: size.height as u32, + scale_factor: window.scale_factor(), + font_definitions: FontDefinitions::default(), + style: Default::default(), + }) + }; + + warn!("WGPU new surface at {} line {}", file!(), line!()); + let mut surface = unsafe { instance.create_surface(&window) }; + + warn!("instance request_adapter at {} line {}", file!(), line!()); + // WGPU 0.11+ support force fallback (if HW implementation not supported), set it to true or false (optional). + let adapter = pollster::block_on(instance.request_adapter(&wgpu::RequestAdapterOptions { + power_preference: wgpu::PowerPreference::HighPerformance, + compatible_surface: Some(&surface), + force_fallback_adapter: false, + })) + .unwrap_or_else(|| panic!("Failed get adapter at {} line {}", file!(), line!())); + + warn!("adapter request_device at {} line {}", file!(), line!()); + let (device, queue) = pollster::block_on(adapter.request_device( + &wgpu::DeviceDescriptor { + features: wgpu::Features::default(), + limits: wgpu::Limits::default(), + label: None, + }, + None, + )) + .unwrap_or_else(|e| { + panic!( + "Failed to request device at {} line {} with error\n{:?}", + file!(), + line!(), + e + ) + }); + + let surface_format = surface.get_supported_formats(&adapter)[0]; + let mut surface_config = wgpu::SurfaceConfiguration { + usage: wgpu::TextureUsages::RENDER_ATTACHMENT, + format: surface_format, + width: size.width as u32, + height: size.height as u32, + present_mode: wgpu::PresentMode::AutoNoVsync, + alpha_mode: CompositeAlphaMode::Auto, + }; + + warn!("surface configure at {} line {}", file!(), line!()); + surface.configure(&device, &surface_config); + + warn!("RenderPass new at {} line {}", file!(), line!()); + // We use the egui_wgpu_backend crate as the render backend. + let mut egui_rpass = RenderPass::new(&device, surface_format, 1); + + warn!("DemoWindows default at {} line {}", file!(), line!()); + // Display the demo application that ships with egui. + let mut app = Damus::new(); + app.add_test_events(); + + let start_time = Instant::now(); + + let mut in_bad_state = false; + + warn!("Enter the loop"); + event_loop.run(move |event, _, control_flow| { + // Pass the winit events to the platform integration. + warn!("Got event: {:?} at {} line {}", &event, file!(), line!()); + platform.handle_event(&event); + match event { + RedrawRequested(..) => { + platform.update_time(start_time.elapsed().as_secs_f64()); + + let output_frame = match surface.get_current_texture() { + Ok(frame) => frame, + Err(wgpu::SurfaceError::Outdated) => { + // This error occurs when the app is minimized on Windows. + // Silently return here to prevent spamming the console with: + error!("The underlying surface has changed, and therefore the swap chain must be updated"); + in_bad_state = true; + return; + } + Err(wgpu::SurfaceError::Lost) => { + // This error occurs when the app is minimized on Windows. + // Silently return here to prevent spamming the console with: + error!("LOST surface, drop frame. Originally: \"The swap chain has been lost and needs to be recreated\""); + in_bad_state = true; + return; + } + Err(e) => { + error!("Dropped frame with error: {}", e); + return; + } + }; + let output_view = output_frame + .texture + .create_view(&wgpu::TextureViewDescriptor::default()); + + // Begin to draw the UI frame. + platform.begin_frame(); + + // Draw the demo application. + app.ui(&platform.context()); + + // End the UI frame. We could now handle the output and draw the UI with the backend. + let full_output = platform.end_frame(Some(&window)); + let paint_jobs = platform.context().tessellate(full_output.shapes); + + let mut encoder = device.create_command_encoder(&wgpu::CommandEncoderDescriptor { + label: Some("encoder"), + }); + + // Upload all resources for the GPU. + let screen_descriptor = ScreenDescriptor { + physical_width: surface_config.width, + physical_height: surface_config.height, + scale_factor: window.scale_factor() as f32 + }; + let tdelta: egui::TexturesDelta = full_output.textures_delta; + egui_rpass + .add_textures(&device, &queue, &tdelta) + .expect("add texture ok"); + egui_rpass.update_buffers(&device, &queue, &paint_jobs, &screen_descriptor); + + // Record all render passes. + egui_rpass + .execute( + &mut encoder, + &output_view, + &paint_jobs, + &screen_descriptor, + Some(wgpu::Color::BLACK), + ) + .unwrap_or_else(|e| panic!("Failed to render pass at {} line {} with error\n{:?}", file!(), line!(), e)); + // Submit the commands. + queue.submit(iter::once(encoder.finish())); + + // Redraw egui + output_frame.present(); + + egui_rpass + .remove_textures(tdelta) + .expect("remove texture ok"); + + // Support reactive on windows only, but not on linux. + // if _output.needs_repaint { + // *control_flow = ControlFlow::Poll; + // } else { + // *control_flow = ControlFlow::Wait; + // } + } + MainEventsCleared | UserEvent(Event::RequestRedraw) => { + window.request_redraw(); + } + WindowEvent { event, .. } => match event { + winit::event::WindowEvent::Resized(size) => { + // Resize with 0 width and height is used by winit to signal a minimize event on Windows. + // See: https://github.com/rust-windowing/winit/issues/208 + // This solves an issue where the app would panic when minimizing on Windows. + if size.width > 0 && size.height > 0 { + surface_config.width = size.width; + surface_config.height = size.height; + surface.configure(&device, &surface_config); + } + } + winit::event::WindowEvent::CloseRequested => { + *control_flow = ControlFlow::Exit; + } + _ => {} + }, + Resumed => { + if in_bad_state { + //https://github.com/gfx-rs/wgpu/issues/2302 + warn!("WGPU new surface at {} line {}", file!(), line!()); + surface = unsafe { instance.create_surface(&window) }; + warn!("surface configure at {} line {}", file!(), line!()); + surface.configure(&device, &surface_config); + in_bad_state = false; + } + }, + Suspended => (), + _ => (), + } + }); +} + +/// Time of day as seconds since midnight. Used for clock in demo app. +pub fn seconds_since_midnight() -> f64 { + let time = chrono::Local::now().time(); + time.num_seconds_from_midnight() as f64 + 1e-9 * (time.nanosecond() as f64) }