domus

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

commit b6f5d8dc035c7bd227c8ecf76b89c2beb1812c48
parent 3f64dedf76c605685855bea558b0550068281556
Author: William Casarin <jb55@jb55.com>
Date:   Sat, 10 Dec 2022 16:57:46 -0800

wgpu + egui 0.20.0

android broken but let's just fix it on the egui/winit side once that's
all updated

Diffstat:
M.envrc | 2++
MCargo.lock | 1026++++++++++++++++++++++++++++++++++++++++---------------------------------------
MCargo.toml | 85++++++++++++++++---------------------------------------------------------------
Mshell.nix | 4+++-
Dsrc/android.rs | 366-------------------------------------------------------------------------------
Msrc/app.rs | 32+++++++++++++++++++++-----------
Msrc/bin/main.rs | 25++++++++++++++++---------
Msrc/lib.rs | 29++++++++++++++++++++++++++---
8 files changed, 603 insertions(+), 966 deletions(-)

diff --git a/.envrc b/.envrc @@ -1 +1,3 @@ use nix + +export PATH=$PATH:$HOME/.cargo/bin diff --git a/Cargo.lock b/Cargo.lock @@ -19,6 +19,67 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "330223a1aecc308757b9926e9391c9b47f8ef2dbd8aea9df88312aea18c5e8d6" [[package]] +name = "accesskit" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3083ac5a97521e35388ca80cf365b6be5210962cc59f11ee238cd92ac2fa9524" +dependencies = [ + "enumset", + "kurbo", +] + +[[package]] +name = "accesskit_consumer" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df122220244ca3ab93f6a42da59a5f8b379c8846dbcaedf922d95636d22c4e10" +dependencies = [ + "accesskit", + "parking_lot", +] + +[[package]] +name = "accesskit_macos" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55c97d7b5cbb2409e05b016406a1bd057237d120205cb63220ca86c2ea3790a1" +dependencies = [ + "accesskit", + "accesskit_consumer", + "objc2", + "once_cell", + "parking_lot", +] + +[[package]] +name = "accesskit_windows" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b0cfda25182b83b24e350434a3f63676252a00a295f32760a14d3f55feb8493" +dependencies = [ + "accesskit", + "accesskit_consumer", + "arrayvec 0.7.2", + "once_cell", + "parking_lot", + "paste", + "windows", +] + +[[package]] +name = "accesskit_winit" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdf20fecd6573e03bebcb4de267f82431e5ea39a293b62aa51a45bdfd69ef39b" +dependencies = [ + "accesskit", + "accesskit_macos", + "accesskit_windows", + "parking_lot", + "winit", +] + +[[package]] name = "adler" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -42,7 +103,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf6ccdb167abbf410dcb915cabd428929d7f6a04980b54a11f26a39f1c7f7107" dependencies = [ "cfg-if", - "getrandom", "once_cell", "version_check", ] @@ -57,30 +117,6 @@ dependencies = [ ] [[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" @@ -109,15 +145,16 @@ dependencies = [ [[package]] name = "arboard" -version = "2.1.1" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc120354d1b5ec6d7aaf4876b602def75595937b5e15d356eb554ab5177e08bb" +checksum = "d6041616acea41d67c4a984709ddab1587fd0b10efe5cc563fee954d2f011854" dependencies = [ "clipboard-win", "log", "objc", "objc-foundation", "objc_id", + "once_cell", "parking_lot", "thiserror", "winapi", @@ -152,23 +189,33 @@ dependencies = [ ] [[package]] -name = "atomic_refcell" -version = "0.1.8" +name = "async-stream" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73b5e5f48b927f04e952dedc932f31995a65a0bf65ec971c74436e51bf6e970d" +checksum = "dad5c83079eae9969be7fadefe640a1c566901f05ff91ab221de4b6f68d9507e" +dependencies = [ + "async-stream-impl", + "futures-core", +] [[package]] -name = "atty" -version = "0.2.14" +name = "async-stream-impl" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +checksum = "10f203db73a71dfa2fb6dd22763990fa26f3d2625a6da2da900d23b87d26be27" dependencies = [ - "hermit-abi", - "libc", - "winapi", + "proc-macro2", + "quote", + "syn", ] [[package]] +name = "atomic_refcell" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73b5e5f48b927f04e952dedc932f31995a65a0bf65ec971c74436e51bf6e970d" + +[[package]] name = "autocfg" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -297,9 +344,6 @@ name = "cc" version = "1.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e9f73505338f7d905b19d18738976aae232eb46b8efc15554ffc56deb5d9ebe4" -dependencies = [ - "jobserver", -] [[package]] name = "cesu8" @@ -329,21 +373,6 @@ dependencies = [ ] [[package]] -name = "chrono" -version = "0.4.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b0a3d9ed01224b22057780a37bb8c5dbfe1be8ba48678e7bf57ec4b385411f" -dependencies = [ - "iana-time-zone", - "js-sys", - "num-integer", - "num-traits", - "time 0.1.45", - "wasm-bindgen", - "winapi", -] - -[[package]] name = "chunked_transfer" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -417,17 +446,6 @@ 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" @@ -607,50 +625,6 @@ 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" @@ -666,30 +640,21 @@ name = "damus" version = "0.1.0" dependencies = [ "android_logger", - "chrono", "console_error_panic_hook", "eframe", - "egui 0.19.0", + "egui", "egui_extras", - "egui_wgpu_backend", - "egui_winit_platform", "ehttp", - "epi", - "hex", + "ewebsock", "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)", + "wasm-bindgen-futures", ] [[package]] @@ -698,8 +663,18 @@ version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" dependencies = [ - "darling_core", - "darling_macro", + "darling_core 0.13.4", + "darling_macro 0.13.4", +] + +[[package]] +name = "darling" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0dd3cd20dc6b5a876612a6e5accfe7f3dd883db6d07acfbf14c128f61550dfa" +dependencies = [ + "darling_core 0.14.2", + "darling_macro 0.14.2", ] [[package]] @@ -717,12 +692,36 @@ dependencies = [ ] [[package]] +name = "darling_core" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a784d2ccaf7c98501746bf0be29b2022ba41fd62a2e622af997a03e9f972859f" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "syn", +] + +[[package]] name = "darling_macro" version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" dependencies = [ - "darling_core", + "darling_core 0.13.4", + "quote", + "syn", +] + +[[package]] +name = "darling_macro" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7618812407e9402654622dd402b0a89dff9ba93badd6540781526117b92aab7e" +dependencies = [ + "darling_core 0.14.2", "quote", "syn", ] @@ -782,86 +781,104 @@ dependencies = [ ] [[package]] +name = "ecolor" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b601108bca3af7650440ace4ca55b2daf52c36f2635be3587d77b16efd8d0691" +dependencies = [ + "bytemuck", +] + +[[package]] name = "eframe" -version = "0.19.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0d49426c3e72a6728b0c790d22db8bf7bbcff10d83b8b6f3a01295be982302e" +checksum = "8128828b785ecf1552917330354ab2eb9d2c48fbe2ad075fa75f93d4a099a9f1" dependencies = [ "bytemuck", - "egui 0.19.0", + "egui", + "egui-wgpu", "egui-winit", "egui_glow", - "getrandom", "glow", "glutin", "js-sys", "percent-encoding", + "raw-window-handle 0.5.0", "tracing", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "winit 0.27.5 (registry+https://github.com/rust-lang/crates.io-index)", + "wgpu", + "winit", ] [[package]] name = "egui" -version = "0.17.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a3cd1d47e12f7a17912595241622e373aa652a4e0fa90b3f9278f90a64aedf7" +checksum = "2a4daecd807bfd4e30ad92f049b03d92f506a3fddfad852babaa03cba180adfa" dependencies = [ - "ahash 0.7.6", - "epaint 0.17.0", + "accesskit", + "ahash 0.8.2", + "epaint", "nohash-hasher", + "tracing", ] [[package]] -name = "egui" -version = "0.19.0" +name = "egui-wgpu" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc9fcd393c3daaaf5909008a1d948319d538b79c51871e4df0993260260a94e4" +checksum = "d3a6edfac4c02455f5024dc7cda997629b94748571935773d1a0cfab8213c80a" dependencies = [ - "ahash 0.8.2", - "epaint 0.19.0", - "nohash-hasher", + "bytemuck", + "egui", + "pollster", "tracing", + "type-map", + "wgpu", + "winit", ] [[package]] name = "egui-winit" -version = "0.19.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07ddc525334c416e11580123e147b970f738507f427c9fb1cd09ea2dd7416a3a" +checksum = "2217c2c1e63b7b793753efd23dc68efb86bb09bd298e5de8010e9a82dc63f0a9" dependencies = [ + "accesskit_winit", "arboard", - "egui 0.19.0", + "egui", "instant", "smithay-clipboard", "tracing", "webbrowser", - "winit 0.27.5 (registry+https://github.com/rust-lang/crates.io-index)", + "winit", ] [[package]] name = "egui_extras" -version = "0.19.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f698f685bb0ad39e87109e2f695ded0bccde77d5d40bbf7590cb5561c1e3039d" +checksum = "1975cd88ff7430f93b29e6b9868b648a8ff6a43b08b9ff8474ee0a648bd8f9a6" dependencies = [ - "egui 0.19.0", + "egui", "image", "resvg", + "serde", "tiny-skia 0.6.6", "usvg", ] [[package]] name = "egui_glow" -version = "0.19.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad77d4a00402bae9658ee64be148f4b2a0b38e4fc7874970575ca01ed1c5b75d" +checksum = "67655a7138ce9d9617811622a3d81577fb477f4447f1a330e89814f16ad35574" dependencies = [ "bytemuck", - "egui 0.19.0", + "egui", "glow", "memoffset 0.6.5", "tracing", @@ -870,26 +887,6 @@ dependencies = [ ] [[package]] -name = "egui_wgpu_backend" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9a4a022610dec7cb5ccce43d397727d190ca38b7c988dece516d585c96caa6" -dependencies = [ - "bytemuck", - "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]] name = "ehttp" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -910,68 +907,61 @@ checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" [[package]] name = "emath" -version = "0.17.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a977a80456be58a2c2d48e69c1d0baadef46cecef5a0c98df141c468da006f12" +checksum = "5277249c8c3430e7127e4f2c40a77485e7baf11ae132ce9b3253a8ed710df0a0" +dependencies = [ + "bytemuck", +] [[package]] -name = "emath" -version = "0.19.0" +name = "enumset" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9542a40106fdba943a055f418d1746a050e1a903a049b030c2b097d4686a33cf" +checksum = "19be8061a06ab6f3a6cf21106c873578bf01bd42ad15e0311a9c76161cb1c753" dependencies = [ - "bytemuck", + "enumset_derive", ] [[package]] -name = "env_logger" -version = "0.9.3" +name = "enumset_derive" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" +checksum = "03e7b551eba279bf0fa88b83a46330168c1560a52a94f5126f892f0b364ab3e0" dependencies = [ - "log", - "regex", + "darling 0.14.2", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "epaint" -version = "0.17.0" +name = "env_logger" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "033292846059f08e03a71e1b5db2ee6ab7c9622c3b48da21f4bd13258ebee2db" +checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" dependencies = [ - "ab_glyph", - "ahash 0.7.6", - "atomic_refcell", - "emath 0.17.0", - "nohash-hasher", + "log", + "regex", ] [[package]] name = "epaint" -version = "0.19.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ba04741be7f6602b1a1b28f1082cce45948a7032961c52814f8946b28493300" +checksum = "de14b65fe5e423e0058f77a8beb2c863b056d0566d6c4ce0d097aa5814cb705a" dependencies = [ "ab_glyph", "ahash 0.8.2", "atomic_refcell", "bytemuck", - "emath 0.19.0", + "ecolor", + "emath", "nohash-hasher", "parking_lot", ] [[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]] name = "error-code" version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -982,6 +972,25 @@ dependencies = [ ] [[package]] +name = "ewebsock" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "689197e24a57aee379b3bbef527e70607fc6d4b58fae4f1d98a2c6d91503e230" +dependencies = [ + "async-stream", + "futures", + "futures-util", + "js-sys", + "tokio", + "tokio-tungstenite", + "tracing", + "tungstenite", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] name = "expat-sys" version = "2.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1136,18 +1145,95 @@ dependencies = [ ] [[package]] +name = "futures" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38390104763dc37a5145a53c29c63c1290b5d316d6086ec32c293f6736051bb0" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] name = "futures-core" version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac" [[package]] +name = "futures-executor" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7acc85df6714c176ab5edf386123fafe217be88c0840ec11f199441134a074e2" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb" + +[[package]] +name = "futures-macro" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdfb8ce053d86b91919aad980c220b1fb8401a9394410e1c289ed7e66b61835d" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] name = "futures-sink" version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39c15cf1a4aa79df40f1bb462fb39676d0ad9e366c2a33b590d7c66f4f81fcf9" [[package]] +name = "futures-task" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea" + +[[package]] +name = "futures-util" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] name = "fxhash" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1185,7 +1271,7 @@ dependencies = [ "cfg-if", "js-sys", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", "wasm-bindgen", ] @@ -1224,55 +1310,42 @@ dependencies = [ [[package]] name = "glutin" -version = "0.29.1" +version = "0.30.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "444c9ad294fdcaf20ccf6726b78f380b5450275540c9b68ab62f49726ad1c713" +checksum = "524d807cd49a0c56a53ef9a6738cd15e7c8c4e9d37a3b7fdb3c250c1cd5bf7a3" dependencies = [ + "bitflags", + "cfg_aliases", "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 0.27.5 (registry+https://github.com/rust-lang/crates.io-index)", + "wayland-sys 0.30.1", + "windows-sys 0.36.1", + "x11-dl", ] [[package]] name = "glutin_egl_sys" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68900f84b471f31ea1d1355567eb865a2cf446294f06cef8d653ed7bcf5f013d" -dependencies = [ - "gl_generator", - "winapi", -] - -[[package]] -name = "glutin_gles2_sys" -version = "0.1.5" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8094e708b730a7c8a1954f4f8a31880af00eb8a1c5b5bf85d28a0a3c6d69103" +checksum = "3adbb8fec0e18e340f990c78f79f5f0e142d0d83f46b10909aaa7d251c00afdf" dependencies = [ "gl_generator", - "objc", + "windows-sys 0.36.1", ] [[package]] name = "glutin_glx_sys" -version = "0.1.8" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d93d0575865098580c5b3a423188cd959419912ea60b1e48e8b3b526f6d02468" +checksum = "947c4850c58211c9627969c2b4e2674764b81ae5b47bab2c9a477d7942f96e0f" dependencies = [ "gl_generator", "x11-dl", @@ -1280,9 +1353,9 @@ dependencies = [ [[package]] name = "glutin_wgl_sys" -version = "0.1.5" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3da5951a1569dbab865c6f2a863efafff193a93caf05538d193e9e3816d21696" +checksum = "20c33975a6c9d49d72c8f032a60079bf8df536954fbf9e4cee90396ace815c57" dependencies = [ "gl_generator", ] @@ -1354,40 +1427,27 @@ 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" +name = "http" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765" +checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "wasm-bindgen", - "winapi", + "bytes", + "fnv", + "itoa", ] [[package]] -name = "iana-time-zone-haiku" -version = "0.1.1" +name = "httparse" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" -dependencies = [ - "cxx", - "cxx-build", -] +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "ident_case" @@ -1454,9 +1514,9 @@ checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" [[package]] name = "jni" -version = "0.19.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6df18c2e3db7e453d3c6ac5b3e9d5182664d28788126d39b91f2d1e22b017ec" +checksum = "039022cdf4d7b1cf548d31f60ae783138e5fd42013f6271049d7df7afadef96c" dependencies = [ "cesu8", "combine", @@ -1473,15 +1533,6 @@ 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" @@ -1560,15 +1611,6 @@ dependencies = [ ] [[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.9" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1672,7 +1714,7 @@ checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" dependencies = [ "libc", "log", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", "windows-sys 0.42.0", ] @@ -1707,26 +1749,13 @@ dependencies = [ [[package]] name = "ndk" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2032c77e030ddee34a6787a64166008da93f6a352b629261d0fee232b8742dd4" -dependencies = [ - "bitflags", - "jni-sys", - "ndk-sys 0.3.0", - "num_enum", - "thiserror", -] - -[[package]] -name = "ndk" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "451422b7e4718271c8b5b3aadf5adedba43dc76312454b387e98fae0fc951aa0" dependencies = [ "bitflags", "jni-sys", - "ndk-sys 0.4.1+23.1.7779620", + "ndk-sys", "num_enum", "raw-window-handle 0.5.0", "thiserror", @@ -1740,31 +1769,16 @@ checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" [[package]] name = "ndk-glue" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d0c4a7b83860226e6b4183edac21851f05d5a51756e97a1144b7f5a6b63e65f" -dependencies = [ - "lazy_static", - "libc", - "log", - "ndk 0.6.0", - "ndk-context", - "ndk-macro", - "ndk-sys 0.3.0", -] - -[[package]] -name = "ndk-glue" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0434fabdd2c15e0aab768ca31d5b7b333717f03cf02037d5a0a3ff3c278ed67f" dependencies = [ "libc", "log", - "ndk 0.7.0", + "ndk", "ndk-context", "ndk-macro", - "ndk-sys 0.4.1+23.1.7779620", + "ndk-sys", "once_cell", "parking_lot", ] @@ -1775,7 +1789,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0df7ac00c4672f9d5aece54ee3347520b7e20f158656c7db2e6de01902eb7a6c" dependencies = [ - "darling", + "darling 0.13.4", "proc-macro-crate", "proc-macro2", "quote", @@ -1784,33 +1798,11 @@ dependencies = [ [[package]] name = "ndk-sys" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e5a6ae77c8ee183dcbbba6150e2e6b9f3f4196a7666c02a715a95692ec1fa97" -dependencies = [ - "jni-sys", -] - -[[package]] -name = "ndk-sys" version = "0.4.1+23.1.7779620" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cf2aae958bd232cac5069850591667ad422d263686d75b52a065f9badeee5a3" -dependencies = [ - "jni-sys", -] - -[[package]] -name = "nix" -version = "0.22.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4916f159ed8e5de0082076562152a76b7a1f64a01fd9d1e0fea002c37624faf" +checksum = "3cf2aae958bd232cac5069850591667ad422d263686d75b52a065f9badeee5a3" dependencies = [ - "bitflags", - "cc", - "cfg-if", - "libc", - "memoffset 0.6.5", + "jni-sys", ] [[package]] @@ -1926,15 +1918,6 @@ 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" @@ -2006,15 +1989,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" [[package]] -name = "osmesa-sys" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88cfece6e95d2e717e0872a7f53a8684712ad13822a7979bc760b9c77ec0013b" -dependencies = [ - "shared_library", -] - -[[package]] name = "overload" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2053,6 +2027,12 @@ dependencies = [ ] [[package]] +name = "paste" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1de2e551fb905ac83f73f7aedf2f0cb4a0da7e35efa24a202a936269f1f18e1" + +[[package]] name = "percent-encoding" version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2091,6 +2071,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" [[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] name = "pkg-config" version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2124,6 +2110,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5da3b0203fd7ee5720aa0b5e790b591aa5d3f41c3ed2c34a3a393382198af2f7" [[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] name = "proc-macro-crate" version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2159,6 +2151,36 @@ dependencies = [ ] [[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] name = "range-alloc" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2338,12 +2360,6 @@ dependencies = [ ] [[package]] -name = "ryu" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" - -[[package]] name = "safe_arch" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2380,12 +2396,6 @@ 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" @@ -2408,18 +2418,6 @@ 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.148" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2440,17 +2438,6 @@ dependencies = [ ] [[package]] -name = "serde_json" -version = "1.0.89" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "020ff22c755c2ed3f8cf162dbb41a7268d934702f3ed3631656ea597e08fc3db" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] name = "servo-fontconfig" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2472,10 +2459,10 @@ dependencies = [ ] [[package]] -name = "sha2" -version = "0.10.6" +name = "sha-1" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +checksum = "f5058ada175748e33390e40e872bd0fe59a19f265d0158daa551c5a88a76009c" dependencies = [ "cfg-if", "cpufeatures", @@ -2492,29 +2479,6 @@ dependencies = [ ] [[package]] -name = "shared_library" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a9e7e0f2bfae24d8a5b5a66c5b257a83c7412304311512a0c054cd5e619da11" -dependencies = [ - "lazy_static", - "libc", -] - -[[package]] -name = "simple_logger" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e190a521c2044948158666916d9e872cbb9984f755e9bb3b5b75a836205affcd" -dependencies = [ - "atty", - "colored", - "log", - "time 0.3.17", - "windows-sys 0.42.0", -] - -[[package]] name = "simplecss" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2530,6 +2494,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" [[package]] +name = "slab" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" +dependencies = [ + "autocfg", +] + +[[package]] name = "slotmap" version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2574,6 +2547,16 @@ dependencies = [ ] [[package]] +name = "socket2" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" +dependencies = [ + "libc", + "winapi", +] + +[[package]] name = "spin" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2705,46 +2688,6 @@ dependencies = [ ] [[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" @@ -2799,6 +2742,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] +name = "tokio" +version = "1.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d76ce4a75fb488c605c54bf610f221cea8b0dafb53333c1a67e8ee199dcd2ae3" +dependencies = [ + "autocfg", + "bytes", + "libc", + "memchr", + "mio", + "pin-project-lite", + "socket2", + "winapi", +] + +[[package]] +name = "tokio-tungstenite" +version = "0.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f714dd15bead90401d77e04243611caec13726c2408afd5b31901dfcdcb3b181" +dependencies = [ + "futures-util", + "log", + "tokio", + "tungstenite", +] + +[[package]] name = "toml" version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2889,6 +2860,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "375812fa44dab6df41c195cd2f7fecb488f6c09fbaafb62807488cefab642bff" [[package]] +name = "tungstenite" +version = "0.17.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e27992fd6a8c29ee7eef28fc78349aa244134e10ad447ce3b9f0ac0ed0fa4ce0" +dependencies = [ + "base64", + "byteorder", + "bytes", + "http", + "httparse", + "log", + "rand", + "sha-1", + "thiserror", + "url", + "utf-8", +] + +[[package]] +name = "type-map" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "deb68604048ff8fa93347f02441e4487594adc20bb8a084f9e564d2b827a0a9f" +dependencies = [ + "rustc-hash", +] + +[[package]] name = "typenum" version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -3019,6 +3018,12 @@ dependencies = [ ] [[package]] +name = "utf-8" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" + +[[package]] name = "valuable" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -3049,12 +3054,6 @@ 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" @@ -3138,7 +3137,7 @@ dependencies = [ "scoped-tls", "wayland-commons", "wayland-scanner", - "wayland-sys", + "wayland-sys 0.29.5", ] [[package]] @@ -3150,7 +3149,7 @@ dependencies = [ "nix 0.24.2", "once_cell", "smallvec", - "wayland-sys", + "wayland-sys 0.29.5", ] [[package]] @@ -3165,16 +3164,6 @@ dependencies = [ ] [[package]] -name = "wayland-egl" -version = "0.29.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "402de949f81a012926d821a2d659f930694257e76dd92b6e0042ceb27be4107d" -dependencies = [ - "wayland-client", - "wayland-sys", -] - -[[package]] name = "wayland-protocols" version = "0.29.5" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -3209,6 +3198,18 @@ dependencies = [ ] [[package]] +name = "wayland-sys" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96b2a02ac608e07132978689a6f9bf4214949c85998c247abadd4f4129b1aa06" +dependencies = [ + "dlib", + "lazy_static", + "log", + "pkg-config", +] + +[[package]] name = "web-sys" version = "0.3.60" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -3220,12 +3221,14 @@ dependencies = [ [[package]] name = "webbrowser" -version = "0.7.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc6a3cffdb686fbb24d9fb8f03a213803277ed2300f11026a3afe1f108dc021b" +checksum = "2a0cc7962b5aaa0dfcebaeef0161eec6edf5f4606c12e6777fd7d392f52033a5" dependencies = [ "jni", - "ndk-glue 0.6.2", + "ndk-context", + "objc", + "raw-window-handle 0.5.0", "url", "web-sys", "widestring", @@ -3259,9 +3262,9 @@ checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb" [[package]] name = "wgpu" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2272b17bffc8a0c7d53897435da7c1db587c87d3a14e8dae9cdb8d1d210fc0f" +checksum = "81f643110d228fd62a60c5ed2ab56c4d5b3704520bd50561174ec4ec74932937" dependencies = [ "arrayvec 0.7.2", "js-sys", @@ -3281,9 +3284,9 @@ dependencies = [ [[package]] name = "wgpu-core" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73d14cad393054caf992ee02b7da6a372245d39a484f7461c1f44f6f6359bd28" +checksum = "6000d1284ef8eec6076fd5544a73125fd7eb9b635f18dceeb829d826f41724ca" dependencies = [ "arrayvec 0.7.2", "bit-vec", @@ -3398,6 +3401,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] +name = "windows" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0286ba339aa753e70765d521bb0242cc48e1194562bfa2a2ad7ac8a6de28f5d5" +dependencies = [ + "windows-implement", + "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-implement" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9539b6bd3eadbd9de66c9666b22d802b833da7e996bc06896142e09854a61767" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] name = "windows-sys" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -3512,15 +3542,15 @@ dependencies = [ "libc", "log", "mio", - "ndk 0.7.0", - "ndk-glue 0.7.0", + "ndk", + "ndk-glue", "objc", "once_cell", "parking_lot", "percent-encoding", "raw-window-handle 0.4.3", "raw-window-handle 0.5.0", - "sctk-adwaita 0.4.3", + "sctk-adwaita", "smithay-client-toolkit", "wasm-bindgen", "wayland-client", @@ -3531,36 +3561,6 @@ dependencies = [ ] [[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 0.42.0", - "x11-dl", -] - -[[package]] name = "wio" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -3582,14 +3582,24 @@ dependencies = [ [[package]] name = "x11rb" -version = "0.9.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e99be55648b3ae2a52342f9a870c0e138709a3493261ce9b469afe6e4df6d8a" +checksum = "592b4883219f345e712b3209c62654ebda0bb50887f330cbd018d0f654bfd507" dependencies = [ "gethostname", - "nix 0.22.3", + "nix 0.24.2", "winapi", "winapi-wsapoll", + "x11rb-protocol", +] + +[[package]] +name = "x11rb-protocol" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56b245751c0ac9db0e006dc812031482784e434630205a93c73cfefcaabeac67" +dependencies = [ + "nix 0.24.2", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml @@ -11,42 +11,22 @@ edition = "2021" crate-type = ["lib", "cdylib"] [dependencies] -chrono = "0.4" -egui = "0.19.0" -eframe = "0.19.0" -egui_extras = { version = "0.19.0", features = ["image", "svg"] } -#egui-winit = "0.19.0" +#egui-android = { git = "https://github.com/jb55/egui-android.git" } +egui = "0.20.0" +eframe = { version = "0.20.0", features = [ "wgpu" ] } +#eframe = "0.20.0" +egui_extras = { version = "0.20.0", features = ["image", "svg"] } ehttp = "0.2.0" -epi = "0.17.0" -hex = "0.4.3" image = { version = "0.24", features = ["jpeg", "png", "webp"] } log = "0.4.17" -#nostr_rust = { git = "git://jb55.com/nostr_rust", rev = "ccf7e521fe3bb9ca8f86516aef2c1f71db0213ed" } poll-promise = "0.2.0" -pollster = "0.2" serde_derive = "1" -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" - -#winit = "0.27.1" - -# This dependency will only be included when targeting Android -[target.'cfg(target_os = "android")'.dependencies] -egui_wgpu_backend = "0.20.0" -wgpu = "0.14.0" -winit = { git="https://github.com/rust-windowing/winit.git", default-features = false, features = ["android-native-activity"] } -egui_winit_platform = {git = "https://github.com/inferrna/egui_winit_platform.git"} - -[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" } +ewebsock = "0.2.0" +#wasm-bindgen = "0.2.83" +wasm-bindgen-futures = "0.4" # web: @@ -54,12 +34,15 @@ winit = { git="https://github.com/rust-windowing/winit.git" } 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"] } +[target.'cfg(target_os = "android")'.dependencies] +android_logger = "0.11.1" +#android-activity = "0.4.0" +#winit = "0.27.5" +#winit = { version = "0.28", features = [ "android-native-activity" ] } +#winit = { git="https://github.com/rust-windowing/winit.git", rev = "2a58b785fed2a3746f7c7eebce95bce67ddfd27c", features = ["android-native-activity"] } [package.metadata.android] -#package = "com.damus" +package = "com.damus.app" apk_name = "damus" #assets = "assets" @@ -75,39 +58,5 @@ max_sdk_version = 18 [[package.metadata.android.uses_permission]] name = "android.permission.INTERNET" -# 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 - - -#[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_extras = { path = "../egui/crates/egui_extras", features = ["image", "svg"] } +[package.metadata.android.application] +label = "Damus" diff --git a/shell.nix b/shell.nix @@ -20,9 +20,11 @@ in mkShell { nativeBuildInputs = [ - cargo-edit cargo-watch rustup rustfmt libiconv pkgconfig cmake fontconfig + cargo-udeps cargo-edit cargo-watch rustup rustfmt libiconv pkgconfig cmake fontconfig brotli wabt + heaptrack + # android jre openssl libiconv androidsdk ]; diff --git a/src/android.rs b/src/android.rs @@ -1,366 +0,0 @@ -// TODO: replace all of this old stuff with eframe once it supports -// android properly -use crate::app::Damus; - -use ::egui::FontDefinitions; -use chrono::Timelike; -use egui_wgpu_backend::{RenderPass, ScreenDescriptor}; -use egui_winit_platform::{Platform, PlatformDescriptor}; -use log::{error, info, 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; - -#[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 WinitEvent { - 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<WinitEvent>>); - -impl epi::backend::RepaintSignal for ExampleRepaintSignal { - fn request_repaint(&self) { - match self.0.lock() { - Err(e) => { - error!( - "Failed to lock guard at {} line {} with error\n{}", - file!(), - line!(), - e - ); - } - Ok(e) => { - let _ = e.send_event(WinitEvent::RequestRedraw); - } - }; - } -} - -#[cfg(target_os = "android")] -#[no_mangle] -pub 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::<WinitEvent>::with_user_event() - .with_android_app(app) - .build(); - run_evloop(event_loop); -} - -pub fn run_evloop(mut event_loop: EventLoop<WinitEvent>) { - //'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 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(), - }); - - let mut recreate_surface = false; - - #[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 => { - info!("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!() - ); - } - - info!("Resumed"); - recreate_surface = true; - 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(); - - 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"); - recreate_surface = 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\""); - recreate_surface = 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(WinitEvent::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 => { - info!("Damus Resumed (recreate surface? {})", recreate_surface); - if recreate_surface { - //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); - recreate_surface = false; - } - }, - Suspended => { - recreate_surface = true; - }, - _ => (), - } - }); -} - -/// 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) -} diff --git a/src/app.rs b/src/app.rs @@ -1,4 +1,5 @@ //use egui::TextureFilter; +//use egui_android::SimpleApp; use egui_extras::RetainedImage; //use nostr_rust::events::Event; @@ -61,15 +62,15 @@ pub fn is_mobile(ctx: &egui::Context) -> bool { 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) - } +fn damus_update(damus: &mut Damus, ctx: &Context) { + if is_mobile(ctx) { + render_damus_mobile(ctx, damus); + } else { + render_damus_desktop(ctx, damus); } +} +impl Damus<'_> { pub fn add_test_events(&mut self) { add_test_events(self); } @@ -208,8 +209,8 @@ fn timeline_view(ui: &mut egui::Ui, app: &mut Damus<'_>) { .auto_shrink([false; 2]) .show(ui, |ui| { for ev in &app.events { - ui.separator(); render_event(ui, &mut app.img_cache, ev); + ui.separator(); } }); } @@ -231,7 +232,7 @@ fn render_panel(ctx: &egui::Context, app: &mut Damus<'_>) { if app.n_panels != 1 { if ui .add(egui::Button::new("-").frame(false)) - .on_hover_text("Add Timeline") + .on_hover_text("Remove Timeline") .clicked() { app.n_panels -= 1; @@ -261,6 +262,15 @@ fn render_damus_desktop(ctx: &egui::Context, app: &mut Damus<'_>) { calc_panel_width }; + if app.n_panels == 1 { + let panel_width = ctx.input().screen_rect.width(); + egui::CentralPanel::default().show(ctx, |ui| { + timeline_panel(ui, app, panel_width, 0); + }); + + return; + } + egui::CentralPanel::default().show(ctx, |ui| { egui::ScrollArea::horizontal() .auto_shrink([false; 2]) @@ -323,14 +333,14 @@ fn add_test_events(damus: &mut Damus<'_>) { impl eframe::App for Damus<'_> { /// Called by the frame work to save state before shutdown. - fn save(&mut self, storage: &mut dyn eframe::Storage) { + 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) { - self.ui(ctx); + damus_update(self, ctx); } } diff --git a/src/bin/main.rs b/src/bin/main.rs @@ -2,6 +2,11 @@ #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] // hide console window on Windows in release use damus::Damus; use eframe; +use log::info; + +// Entry point for wasm +//#[cfg(target_arch = "wasm32")] +//use wasm_bindgen::prelude::*; // Desktop #[cfg(not(target_arch = "wasm32"))] @@ -17,20 +22,22 @@ fn main() { ); } -// Web #[cfg(target_arch = "wasm32")] -fn main() { +pub 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::new())), - ) - .expect("failed to start eframe"); + wasm_bindgen_futures::spawn_local(async { + let web_options = eframe::WebOptions::default(); + eframe::start_web( + "the_canvas_id", // hardcode it + web_options, + Box::new(|_cc| Box::new(Damus::new())), + ) + .await + .expect("failed to start eframe"); + }); } diff --git a/src/lib.rs b/src/lib.rs @@ -1,8 +1,31 @@ -#[cfg(target_os = "android")] -pub mod android; - mod app; +//mod camera; mod event; pub use app::Damus; pub use event::Event; + +//#[cfg(target_os = "android")] +//use egui_android::run_android; + +#[cfg(target_os = "android")] +use winit::platform::android::activity::AndroidApp; + +#[cfg(target_os = "android")] +#[no_mangle] +pub fn android_main(app: AndroidApp) { + std::env::set_var("RUST_BACKTRACE", "full"); + android_logger::init_once(android_logger::Config::default().with_min_level(log::Level::Info)); + + let mut options = eframe::NativeOptions::default(); + options.renderer = eframe::Renderer::Wgpu; + options.event_loop_builder = Some(Box::new(move |builder| { + builder.with_android_app(app); + })); + + eframe::run_native( + "Damus Desktop", + options, + Box::new(|_cc| Box::new(Damus::new())), + ); +}