From a8d5295ed5507f7df17fcbd547443dcce90bb630 Mon Sep 17 00:00:00 2001 From: Red Artist Date: Thu, 14 Sep 2023 00:04:24 +0530 Subject: [PATCH] update chrono. rm audit.toml. fix lints jokolink --- .cargo/audit.toml | 3 - Cargo.lock | 386 ++++++++------------------------- architecture.md | 11 - crates/jokolink/src/win/dll.rs | 14 +- crates/jokolink/src/win/mod.rs | 37 +--- 5 files changed, 105 insertions(+), 346 deletions(-) delete mode 100644 .cargo/audit.toml delete mode 100755 architecture.md diff --git a/.cargo/audit.toml b/.cargo/audit.toml deleted file mode 100644 index 765775d..0000000 --- a/.cargo/audit.toml +++ /dev/null @@ -1,3 +0,0 @@ - -[advisories] -ignore = ["RUSTSEC-2020-0071"] # for chrono in arcdps_bindings dependency diff --git a/Cargo.lock b/Cargo.lock index 0727da6..ffa63c2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -135,40 +135,11 @@ dependencies = [ "libloading 0.7.4", ] -[[package]] -name = "async-io" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" -dependencies = [ - "async-lock", - "autocfg", - "cfg-if", - "concurrent-queue", - "futures-lite", - "log", - "parking", - "polling", - "rustix 0.37.23", - "slab", - "socket2", - "waker-fn", -] - -[[package]] -name = "async-lock" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" -dependencies = [ - "event-listener", -] - [[package]] name = "atk-sys" -version = "0.16.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11ad703eb64dc058024f0e57ccfa069e15a413b98dbd50a1a950e743b7f11148" +checksum = "251e0b7d90e33e0ba930891a505a9a35ece37b2dd37a14f3ffc306c13b980009" dependencies = [ "glib-sys", "gobject-sys", @@ -214,9 +185,9 @@ dependencies = [ [[package]] name = "base64" -version = "0.21.3" +version = "0.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "414dcefbc63d77c526a76b3afcf6fbb9b5e2791c19c3aa2297733208750c6e53" +checksum = "9ba43ea6f343b788c8764558649e08df62f86c6ef251fdaeb1ffd010a9ae50a2" [[package]] name = "bit-set" @@ -270,22 +241,22 @@ checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" [[package]] name = "bytemuck" -version = "1.13.1" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea" +checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdde5c9cd29ebd706ce1b35600920a33550e402fc998a2e53ad3b42c3c47a192" +checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.30", + "syn 2.0.32", ] [[package]] @@ -296,9 +267,9 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "cairo-sys-rs" -version = "0.16.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c48f4af05fabdcfa9658178e1326efa061853f040ce7d72e33af6885196f421" +checksum = "bd4d115132e01c0165e3bf5f56aedee8980b0b96ede4eb000b693c05a8adb8ff" dependencies = [ "libc", "system-deps", @@ -318,7 +289,7 @@ checksum = "182588d07579a8ca97dbfbea2787d450341d068b16062c8caa2205158ddb269d" dependencies = [ "cap-std", "directories-next", - "rustix 0.38.11", + "rustix", "windows-sys 0.48.0", ] @@ -331,10 +302,10 @@ dependencies = [ "ambient-authority", "fs-set-times", "io-extras", - "io-lifetimes 2.0.2", + "io-lifetimes", "ipnet", "maybe-owned", - "rustix 0.38.11", + "rustix", "windows-sys 0.48.0", "winx", ] @@ -348,8 +319,8 @@ dependencies = [ "camino", "cap-primitives", "io-extras", - "io-lifetimes 2.0.2", - "rustix 0.38.11", + "io-lifetimes", + "rustix", ] [[package]] @@ -363,9 +334,9 @@ dependencies = [ [[package]] name = "cfg-expr" -version = "0.15.4" +version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b40ccee03b5175c18cde8f37e7d2a33bcef6f8ec8f7cc0d81090d1bb380949c9" +checksum = "03915af431787e6ffdcc74c645077518c6b6e01f80b761e0fbbfa288536311b3" dependencies = [ "smallvec", "target-lexicon", @@ -379,15 +350,14 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.28" +version = "0.4.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95ed24df0632f708f5f6d8082675bef2596f7084dee3dd55f632290bf35bfe0f" +checksum = "defd4e7873dbddba6c7c91e199c7fcb946abc4a6a4ac3195400bcfb01b5de877" dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", "num-traits", - "time 0.1.45", "wasm-bindgen", "windows-targets 0.48.5", ] @@ -423,15 +393,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf43edc576402991846b093a7ca18a3477e0ef9c588cde84964b5d3e43016642" -[[package]] -name = "concurrent-queue" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c" -dependencies = [ - "crossbeam-utils", -] - [[package]] name = "console" version = "0.15.7" @@ -567,7 +528,7 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.30", + "syn 2.0.32", ] [[package]] @@ -584,7 +545,7 @@ checksum = "2fa16a70dd58129e4dfffdff535fb1bce66673f7bbeec4a5a1765a504e1ccd84" dependencies = [ "proc-macro2", "quote", - "syn 2.0.30", + "syn 2.0.32", ] [[package]] @@ -747,7 +708,7 @@ checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" dependencies = [ "proc-macro2", "quote", - "syn 2.0.30", + "syn 2.0.32", ] [[package]] @@ -758,7 +719,7 @@ checksum = "c2ad8cef1d801a4686bfd8919f0b30eac4c8e48968c437a6405ded4fb5272d2b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.30", + "syn 2.0.32", ] [[package]] @@ -805,21 +766,6 @@ dependencies = [ "libc", ] -[[package]] -name = "event-listener" -version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" - -[[package]] -name = "fastrand" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] - [[package]] name = "fdeflate" version = "0.3.0" @@ -869,7 +815,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.30", + "syn 2.0.32", ] [[package]] @@ -893,64 +839,16 @@ version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd738b84894214045e8414eaded76359b4a5773f0a0a56b16575110739cdcf39" dependencies = [ - "io-lifetimes 2.0.2", - "rustix 0.38.11", + "io-lifetimes", + "rustix", "windows-sys 0.48.0", ] -[[package]] -name = "futures-core" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" - -[[package]] -name = "futures-io" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" - -[[package]] -name = "futures-lite" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" -dependencies = [ - "fastrand", - "futures-core", - "futures-io", - "memchr", - "parking", - "pin-project-lite", - "waker-fn", -] - -[[package]] -name = "futures-task" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" - -[[package]] -name = "futures-util" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" -dependencies = [ - "futures-core", - "futures-io", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", -] - [[package]] name = "gdk-pixbuf-sys" -version = "0.16.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3092cf797a5f1210479ea38070d9ae8a5b8e9f8f1be9f32f4643c529c7d70016" +checksum = "3f9839ea644ed9c97a34d129ad56d38a25e6756f99f3a88e15cd39c20629caf7" dependencies = [ "gio-sys", "glib-sys", @@ -961,9 +859,9 @@ dependencies = [ [[package]] name = "gdk-sys" -version = "0.16.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d76354f97a913e55b984759a997b693aa7dc71068c9e98bcce51aa167a0a5c5a" +checksum = "31ff856cb3386dae1703a920f803abafcc580e9b5f711ca62ed1620c25b51ff2" dependencies = [ "cairo-sys-rs", "gdk-pixbuf-sys", @@ -994,7 +892,7 @@ checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", ] [[package]] @@ -1005,9 +903,9 @@ checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" [[package]] name = "gio-sys" -version = "0.16.3" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9b693b8e39d042a95547fc258a7b07349b1f0b48f4b2fa3108ba3c51c0b5229" +checksum = "37566df850baf5e4cb0dfb78af2e4b9898d817ed9263d1090a2df958c64737d2" dependencies = [ "glib-sys", "gobject-sys", @@ -1049,9 +947,9 @@ dependencies = [ [[package]] name = "glib-sys" -version = "0.16.3" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61a4f46316d06bfa33a7ac22df6f0524c8be58e3db2d9ca99ccb1f357b62a65" +checksum = "063ce2eb6a8d0ea93d2bf8ba1957e78dbab6be1c2220dd3daca57d5a9d869898" dependencies = [ "libc", "system-deps", @@ -1077,9 +975,9 @@ dependencies = [ [[package]] name = "gobject-sys" -version = "0.16.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3520bb9c07ae2a12c7f2fbb24d4efc11231c8146a86956413fb1a79bb760a0f1" +checksum = "0850127b514d1c4a4654ead6dedadb18198999985908e6ffe4436f53c785ce44" dependencies = [ "glib-sys", "libc", @@ -1140,9 +1038,9 @@ dependencies = [ [[package]] name = "gtk-sys" -version = "0.16.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b5f8946685d5fe44497007786600c2f368ff6b1e61a16251c89f72a97520a3" +checksum = "771437bf1de2c1c0b496c11505bdf748e26066bbe942dfc8f614c9460f6d7722" dependencies = [ "atk-sys", "cairo-sys-rs", @@ -1297,33 +1195,13 @@ dependencies = [ "libc", ] -[[package]] -name = "instant" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if", -] - [[package]] name = "io-extras" version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d3c230ee517ee76b1cc593b52939ff68deda3fae9e41eca426c6b4993df51c4" dependencies = [ - "io-lifetimes 2.0.2", - "windows-sys 0.48.0", -] - -[[package]] -name = "io-lifetimes" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" -dependencies = [ - "hermit-abi", - "libc", + "io-lifetimes", "windows-sys 0.48.0", ] @@ -1346,7 +1224,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi", - "rustix 0.38.11", + "rustix", "windows-sys 0.48.0", ] @@ -1462,7 +1340,7 @@ dependencies = [ "num-traits", "serde", "serde_json", - "time 0.3.28", + "time", "tracing", "tracing-appender", "tracing-subscriber", @@ -1554,15 +1432,9 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" - -[[package]] -name = "linux-raw-sys" -version = "0.4.5" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" +checksum = "1a9bad9f94746442c783ca431b22403b519cd7fbeed0533fdd6328b2f2212128" [[package]] name = "lock_api" @@ -1672,7 +1544,7 @@ checksum = "49e7bc1560b95a3c4a25d03de42fe76ca718ab92d1a22a55b9b4cf67b3ae635c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.30", + "syn 2.0.32", ] [[package]] @@ -1693,7 +1565,7 @@ checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" dependencies = [ "libc", "log", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", "windows-sys 0.48.0", ] @@ -1791,7 +1663,7 @@ checksum = "9e6a0fd4f737c707bd9086cc16c925f294943eb62eb71499e9fd4cf71f8b9f4e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.30", + "syn 2.0.32", ] [[package]] @@ -1911,9 +1783,9 @@ checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" [[package]] name = "pango-sys" -version = "0.16.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e134909a9a293e04d2cc31928aa95679c5e4df954d0b85483159bd20d8f047f" +checksum = "436737e391a843e5933d6d9aa102cb126d501e815b83601365a948a518555dc5" dependencies = [ "glib-sys", "gobject-sys", @@ -1921,12 +1793,6 @@ dependencies = [ "system-deps", ] -[[package]] -name = "parking" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14f2252c834a40ed9bb5422029649578e63aa341ac401f74e719dd1afda8394e" - [[package]] name = "parking_lot" version = "0.12.1" @@ -1968,12 +1834,6 @@ version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" -[[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.27" @@ -1993,22 +1853,6 @@ dependencies = [ "miniz_oxide", ] -[[package]] -name = "polling" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" -dependencies = [ - "autocfg", - "bitflags 1.3.2", - "cfg-if", - "concurrent-queue", - "libc", - "log", - "pin-project-lite", - "windows-sys 0.48.0", -] - [[package]] name = "pollster" version = "0.3.0" @@ -2196,14 +2040,12 @@ checksum = "216080ab382b992234dda86873c18d4c48358f5cfcb70fd693d7f6f2131b628b" [[package]] name = "rfd" -version = "0.11.4" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fe664af397d2b6a13a8ba1d172a2b5c87c6c5149039edbf8fa122b98c9ed96f" +checksum = "241a0deb168c88050d872294f7b3106c1dfa8740942bcc97bc91b98e97b5c501" dependencies = [ - "async-io", "block", "dispatch", - "futures-util", "glib-sys", "gobject-sys", "gtk-sys", @@ -2216,7 +2058,7 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "windows 0.44.0", + "windows-sys 0.48.0", ] [[package]] @@ -2263,7 +2105,7 @@ dependencies = [ "regex", "relative-path", "rustc_version", - "syn 2.0.30", + "syn 2.0.32", "unicode-ident", ] @@ -2290,29 +2132,15 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" -dependencies = [ - "bitflags 1.3.2", - "errno", - "io-lifetimes 1.0.11", - "libc", - "linux-raw-sys 0.3.8", - "windows-sys 0.48.0", -] - -[[package]] -name = "rustix" -version = "0.38.11" +version = "0.38.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0c3dde1fc030af041adc40e79c0e7fbcf431dd24870053d187d7c66e4b87453" +checksum = "d7db8590df6dfcd144d22afd1b83b36c21a18d7cbc1dc4bb5295a8712e9eb662" dependencies = [ "bitflags 2.4.0", "errno", "itoa", "libc", - "linux-raw-sys 0.4.5", + "linux-raw-sys", "once_cell", "windows-sys 0.48.0", ] @@ -2325,15 +2153,15 @@ checksum = "cd8d6c9f025a446bc4d18ad9632e69aec8f287aa84499ee335599fabd20c3fd8" dependencies = [ "log", "ring", - "rustls-webpki 0.101.4", + "rustls-webpki 0.101.5", "sct", ] [[package]] name = "rustls-webpki" -version = "0.100.2" +version = "0.100.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e98ff011474fa39949b7e5c0428f9b4937eda7da7848bbb947786b7be0b27dab" +checksum = "5f6a5fc258f1c1276dfe3016516945546e2d5383911efc0fc4f1cdc5df3a4ae3" dependencies = [ "ring", "untrusted", @@ -2341,9 +2169,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.101.4" +version = "0.101.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d93931baf2d282fff8d3a532bbfd7653f734643161b87e3e01e59a04439bf0d" +checksum = "45a27e3b59326c16e23d30aeb7a36a24cc0d29e71d68ff611cdfb4a01d013bed" dependencies = [ "ring", "untrusted", @@ -2409,14 +2237,14 @@ checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.30", + "syn 2.0.32", ] [[package]] name = "serde_json" -version = "1.0.105" +version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693151e1ac27563d6dbcec9dee9fbd5da8539b20fa14ad3752b2e6d363ace360" +checksum = "2cc66a619ed80bf7a0f6b17dd063a84b88f6dea1813737cf469aef1d081142c2" dependencies = [ "itoa", "ryu", @@ -2467,15 +2295,6 @@ dependencies = [ "similar", ] -[[package]] -name = "slab" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] - [[package]] name = "slotmap" version = "1.0.6" @@ -2497,16 +2316,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f67ad224767faa3c7d8b6d91985b78e70a1324408abcb1cfcc2be4c06bc06043" -[[package]] -name = "socket2" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" -dependencies = [ - "libc", - "winapi", -] - [[package]] name = "spin" version = "0.5.2" @@ -2570,9 +2379,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.30" +version = "2.0.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ddc1f908d32ec46858c2d3b3daa00cc35bf4b6841ce4355c7bb3eedf2283a68" +checksum = "239814284fd6f1a4ffe4ca893952cdd93c224b6a1571c9a9eadd670295c0c9e2" dependencies = [ "proc-macro2", "quote", @@ -2645,7 +2454,7 @@ checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35" dependencies = [ "proc-macro2", "quote", - "syn 2.0.30", + "syn 2.0.32", ] [[package]] @@ -2658,17 +2467,6 @@ dependencies = [ "once_cell", ] -[[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.28" @@ -2714,9 +2512,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "toml" -version = "0.7.6" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17e963a819c331dcacd7ab957d80bc2b9a9c1e71c804826d2f283dd65306542" +checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" dependencies = [ "serde", "serde_spanned", @@ -2735,9 +2533,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.19.14" +version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ "indexmap 2.0.0", "serde", @@ -2765,7 +2563,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09d48f71a791638519505cefafe162606f706c25592e4bde4d97600c0195312e" dependencies = [ "crossbeam-channel", - "time 0.3.28", + "time", "tracing-subscriber", ] @@ -2777,7 +2575,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.30", + "syn 2.0.32", ] [[package]] @@ -2814,7 +2612,7 @@ dependencies = [ "sharded-slab", "smallvec", "thread_local", - "time 0.3.28", + "time", "tracing", "tracing-core", "tracing-log", @@ -2834,9 +2632,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-linebreak" @@ -2894,7 +2692,7 @@ dependencies = [ "log", "once_cell", "rustls", - "rustls-webpki 0.100.2", + "rustls-webpki 0.100.3", "serde", "serde_json", "url", @@ -2932,7 +2730,7 @@ checksum = "f7e1ba1f333bd65ce3c9f27de592fcbc256dafe3af2717f56d7c87761fbaccf4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.30", + "syn 2.0.32", ] [[package]] @@ -2953,28 +2751,16 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -[[package]] -name = "waker-fn" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" - [[package]] name = "walkdir" -version = "2.3.3" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" dependencies = [ "same-file", "winapi-util", ] -[[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" @@ -3002,7 +2788,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.30", + "syn 2.0.32", "wasm-bindgen-shared", ] @@ -3036,7 +2822,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.30", + "syn 2.0.32", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3063,7 +2849,7 @@ version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b03058f88386e5ff5310d9111d53f48b17d732b401aeb83a8d5190f2ac459338" dependencies = [ - "rustls-webpki 0.100.2", + "rustls-webpki 0.100.3", ] [[package]] @@ -3435,9 +3221,9 @@ checksum = "4d25c75bf9ea12c4040a97f829154768bbbce366287e2dc044af160cd79a13fd" [[package]] name = "xot" -version = "0.14.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c87f5acd64c726f097006a03db8d5b1b8cee70589b320125e93a864cc3e3fd15" +checksum = "55dc1c3603e452c78983b59f466cd8251695db1729b230f473d004d70b3d94d8" dependencies = [ "ahash 0.8.3", "encoding_rs", diff --git a/architecture.md b/architecture.md deleted file mode 100755 index 7cf64b5..0000000 --- a/architecture.md +++ /dev/null @@ -1,11 +0,0 @@ -# Configuration -1. jokolay_directory -2. log levels -3. input configuration: scroll power, shortcuts. -4. egui: theme (style + fonts priority) - - - - - - diff --git a/crates/jokolink/src/win/dll.rs b/crates/jokolink/src/win/dll.rs index 16c1fe8..cccbf92 100644 --- a/crates/jokolink/src/win/dll.rs +++ b/crates/jokolink/src/win/dll.rs @@ -135,16 +135,17 @@ pub mod d3d11 { pub static mut JOKOLINK_QUIT_REQUESTER: Option> = None; /// This is used to wait for wine_main fn thread to quit and send us a signal pub static mut JOKOLINK_QUIT_RESPONDER: Option> = None; + /// This function is called whenever the dll is loaded into process or thread, and whenever the dll is unloaded out of process/thread. + /// # Safety + /// Don't do *anything* complicated at all. It can easily lead to a deadlock + /// https://learn.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-best-practices + /// Improper synchronization within DllMain can cause an application to deadlock or access data or code in an uninitialized DLL. #[no_mangle] pub unsafe extern "system" fn DllMain( _dll_module: HINSTANCE, call_reason: u32, _: *mut (), ) -> bool { - // This function is called when our dll is loaded. - // https://learn.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-best-practices - // Improper synchronization within DllMain can cause an application to deadlock or access data or code in an uninitialized DLL. - match call_reason { // process detach 0 => { @@ -169,6 +170,11 @@ pub mod d3d11 { } true } + /// This is the function we will "hook" into. + /// GW2 will call this function right after the "login window" when creating the main window + /// This is where we initialize our jokolink thread. + /// # Safety + /// Just need to load d3d11.dll from windows/system32 equivalent directory and call that function for gw2 #[no_mangle] pub unsafe extern "system" fn D3D11CreateDevice( padapter: *mut ::core::ffi::c_void, diff --git a/crates/jokolink/src/win/mod.rs b/crates/jokolink/src/win/mod.rs index 5bb1546..96a3c4c 100644 --- a/crates/jokolink/src/win/mod.rs +++ b/crates/jokolink/src/win/mod.rs @@ -130,7 +130,7 @@ impl MumbleWinImpl { let gw2_config_path = std::path::PathBuf::from_str(&gw2_config_path) .into_diagnostic() .wrap_err("failed to create pathbuf from gw2 config path in roaming appdata")?; - std::fs::create_dir_all(&gw2_config_path.parent().unwrap()) + std::fs::create_dir_all(gw2_config_path.parent().unwrap()) .into_diagnostic() .wrap_err("failed to create gw2 config dir in appdata roaming ")?; if !gw2_config_path.exists() { @@ -500,7 +500,6 @@ impl MumbleWinImpl { self.client_pos_size = client_pos_size; self.last_ui_tick_update = Instant::now(); self.previous_pid = pid; - return; } Err(e) => { error!(?e, "failed to get client rect"); @@ -523,10 +522,10 @@ fn check_dpi_scaling_enabled(path: &std::path::Path) -> Result { .into_diagnostic() .wrap_err("failed to read gw2 file")?; - if contents.find(DPI_SCALING_FALSE).is_some() { + if contents.contains(DPI_SCALING_FALSE) { return Ok(0); }; - if contents.find(DPI_SCALING_TRUE).is_some() { + if contents.contains(DPI_SCALING_TRUE) { return Ok(1); }; error!(contents, "failed to read dpi scaling from gw2 config file"); @@ -646,14 +645,8 @@ fn get_window_pos_size(window_handle: isize) -> Result<[i32; 4]> { Ok([ rect.left, rect.top, - (rect.right - rect.left) - .try_into() - .into_diagnostic() - .wrap_err("gw2 window width could not be cast into u32")?, - (rect.bottom - rect.top) - .try_into() - .into_diagnostic() - .wrap_err("gw2 height could not be cast into u32")?, + (rect.right - rect.left), + (rect.bottom - rect.top), ]) } } @@ -676,14 +669,8 @@ fn get_window_pos_size_without_borders(window_handle: HWND) -> Result<[i32; 4]> Ok([ rect.left, rect.top, - (rect.right - rect.left) - .try_into() - .into_diagnostic() - .wrap_err("gw2 window width could not be cast into u32")?, - (rect.bottom - rect.top) - .try_into() - .into_diagnostic() - .wrap_err("gw2 height could not be cast into u32")?, + (rect.right - rect.left), + (rect.bottom - rect.top), ]) } } @@ -708,14 +695,8 @@ fn get_client_rect_in_screen_coords(window_handle: HWND) -> Result<[i32; 4]> { Ok([ point.x, point.y, - (rect.right - rect.left) - .try_into() - .into_diagnostic() - .wrap_err("gw2 window width could not be cast into u32")?, - (rect.bottom - rect.top) - .try_into() - .into_diagnostic() - .wrap_err("gw2 height could not be cast into u32")?, + (rect.right - rect.left), + (rect.bottom - rect.top), ]) } }