diff --git a/.github/update.log b/.github/update.log index f553fc7b3a..eb56a0a029 100644 --- a/.github/update.log +++ b/.github/update.log @@ -765,3 +765,4 @@ Update On Thu Sep 12 20:35:54 CEST 2024 Update On Fri Sep 13 20:34:47 CEST 2024 Update On Sat Sep 14 20:32:28 CEST 2024 Update On Sun Sep 15 20:33:53 CEST 2024 +Update On Mon Sep 16 20:36:05 CEST 2024 diff --git a/clash-nyanpasu/backend/Cargo.lock b/clash-nyanpasu/backend/Cargo.lock index 6e9aaa7f4b..ee448d0b30 100644 --- a/clash-nyanpasu/backend/Cargo.lock +++ b/clash-nyanpasu/backend/Cargo.lock @@ -168,9 +168,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.87" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10f00e1f6e58a40e807377c75c6a7f97bf9044fab57816f2414e6f5f4499d7b8" +checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" [[package]] name = "arbitrary" @@ -183,9 +183,9 @@ dependencies = [ [[package]] name = "arboard" -version = "3.4.0" +version = "3.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb4009533e8ff8f1450a5bcbc30f4242a1d34442221f72314bea1f5dc9c7f89" +checksum = "df099ccb16cd014ff054ac1bf392c67feeef57164b05c42f037cd40f5d4357f4" dependencies = [ "clipboard-win", "core-graphics 0.23.2", @@ -355,7 +355,7 @@ dependencies = [ "futures-lite 2.3.0", "parking", "polling 3.7.3", - "rustix 0.38.36", + "rustix 0.38.37", "slab", "tracing", "windows-sys 0.59.0", @@ -416,15 +416,15 @@ dependencies = [ "cfg-if", "event-listener 3.1.0", "futures-lite 1.13.0", - "rustix 0.38.36", + "rustix 0.38.37", "windows-sys 0.48.0", ] [[package]] name = "async-process" -version = "2.2.4" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8a07789659a4d385b79b18b9127fc27e1a59e1e89117c78c5ea3b806f016374" +checksum = "63255f1dc2381611000436537bbedfe83183faa303a5a0edaf191edef06526bb" dependencies = [ "async-channel 2.3.1", "async-io 2.3.4", @@ -435,9 +435,8 @@ dependencies = [ "cfg-if", "event-listener 5.3.0", "futures-lite 2.3.0", - "rustix 0.38.36", + "rustix 0.38.37", "tracing", - "windows-sys 0.59.0", ] [[package]] @@ -463,7 +462,7 @@ dependencies = [ "cfg-if", "futures-core", "futures-io", - "rustix 0.38.36", + "rustix 0.38.37", "signal-hook-registry", "slab", "windows-sys 0.59.0", @@ -1130,9 +1129,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.18" +version = "1.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62ac837cdb5cb22e10a256099b4fc502b1dfe560cb282963a974d7abd80e476" +checksum = "2d74707dde2ba56f86ae90effb3b43ddd369504387e718014de010cec7959800" dependencies = [ "jobserver", "libc", @@ -1752,9 +1751,9 @@ dependencies = [ [[package]] name = "curl-sys" -version = "0.4.74+curl-8.9.0" +version = "0.4.75+curl-8.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8af10b986114528fcdc4b63b6f5f021b7057618411046a4de2ba0f0149a097bf" +checksum = "2a4fd752d337342e4314717c0d9b6586b059a120c80029ebe4d49b11fec7875e" dependencies = [ "cc", "libc", @@ -2806,7 +2805,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc3655aa6818d65bc620d6911f05aa7b6aeb596291e1e9f79e52df85583d1e30" dependencies = [ - "rustix 0.38.36", + "rustix 0.38.37", "windows-targets 0.52.6", ] @@ -4178,9 +4177,9 @@ checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" [[package]] name = "mac-notification-sys" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51fca4d74ff9dbaac16a01b924bc3693fa2bba0862c2c633abc73f9a8ea21f64" +checksum = "dce8f34f3717aa37177e723df6c1fc5fb02b2a1087374ea3fe0ea42316dc8f91" dependencies = [ "cc", "dirs-next", @@ -4260,9 +4259,9 @@ checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "memmap2" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe751422e4a8caa417e13c3ea66452215d7d63e19e604f4980461212f3ae1322" +checksum = "fd3f7eed9d3848f8b98834af67102b720745c4ec028fcd0aa0239277e7de374f" dependencies = [ "libc", ] @@ -4920,9 +4919,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "33ea5043e58958ee56f3e15a90aee535795cd7dfd319846288d93c5b57d85cbe" [[package]] name = "opaque-debug" @@ -5580,7 +5579,7 @@ dependencies = [ "concurrent-queue", "hermit-abi 0.4.0", "pin-project-lite", - "rustix 0.38.36", + "rustix 0.38.37", "tracing", "windows-sys 0.59.0", ] @@ -5626,9 +5625,9 @@ checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" [[package]] name = "pretty_assertions" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af7cee1a6c8a5b9208b3cb1061f10c0cb689087b3d8ce85fb9d2dd7a29b6ba66" +checksum = "3ae130e2f271fbc2ac3a40fb1d07180839cdbbe443c7a27e1e3c13c5cac0116d" dependencies = [ "diff", "yansi", @@ -5994,18 +5993,18 @@ checksum = "d3edd4d5d42c92f0a659926464d4cce56b562761267ecf0f469d85b7de384175" [[package]] name = "redb" -version = "2.1.2" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58323dc32ea52a8ae105ff94bc0460c5d906307533ba3401aa63db3cbe491fe5" +checksum = "e4760ad04a88ef77075ba86ba9ea79b919e6bab29c1764c5747237cd6eaedcaa" dependencies = [ "libc", ] [[package]] name = "redox_syscall" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" +checksum = "0884ad60e090bf1345b93da0a5de8923c93884cd03f40dfcfddd3b4bee661853" dependencies = [ "bitflags 2.6.0", ] @@ -6322,9 +6321,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.36" +version = "0.38.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f55e80d50763938498dd5ebb18647174e0c76dc38c5505294bb224624f30f36" +checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" dependencies = [ "bitflags 2.6.0", "errno", @@ -6930,7 +6929,7 @@ dependencies = [ "libc", "log", "memmap2", - "rustix 0.38.36", + "rustix 0.38.37", "thiserror", "wayland-backend", "wayland-client", @@ -6971,7 +6970,7 @@ dependencies = [ "async-io 2.3.4", "async-lock 3.4.0", "async-net 2.0.0", - "async-process 2.2.4", + "async-process 2.3.0", "blocking", "futures-lite 2.3.0", ] @@ -7323,13 +7322,12 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tauri" -version = "2.0.0-rc.11" +version = "2.0.0-rc.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f60dc86a0513f775a6515d79cf2a54ce38f2fa7225e0c5b9d5ae8241e599afa" +checksum = "2fa32e2741bda64c1da02d93252a466893180052fc6de61c8803b0356504b70d" dependencies = [ "anyhow", "bytes", - "cocoa", "dirs 5.0.1", "dunce", "embed_plist", @@ -7345,8 +7343,11 @@ dependencies = [ "log", "mime", "muda", - "objc", + "objc2", + "objc2-app-kit", + "objc2-foundation", "percent-encoding", + "plist", "raw-window-handle", "reqwest", "serde", @@ -7359,7 +7360,7 @@ dependencies = [ "tauri-macros", "tauri-runtime", "tauri-runtime-wry", - "tauri-utils 2.0.0-rc.10", + "tauri-utils 2.0.0-rc.11", "thiserror", "tokio", "tray-icon", @@ -7373,9 +7374,9 @@ dependencies = [ [[package]] name = "tauri-build" -version = "2.0.0-rc.10" +version = "2.0.0-rc.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d6fc774b19bedadd547b0310fbdbfadbc7546978eccd6d3e389be7cabc437a" +checksum = "148441d64674b2885c1ba5baf3ae61662bb8753859ffcfb541962cbc6b847f39" dependencies = [ "anyhow", "cargo_toml", @@ -7387,7 +7388,7 @@ dependencies = [ "semver 1.0.23", "serde", "serde_json", - "tauri-utils 2.0.0-rc.10", + "tauri-utils 2.0.0-rc.11", "tauri-winres", "toml 0.8.2", "walkdir", @@ -7395,9 +7396,9 @@ dependencies = [ [[package]] name = "tauri-codegen" -version = "2.0.0-rc.10" +version = "2.0.0-rc.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d14af7a85713898cb8a6be3ece89eb1c39392d8756dd1cc0309ebd6fdc966eb3" +checksum = "72a15c3f9282c82871c69ddb65d02ae552738bbac848c8adcab521bf14d8b9e6" dependencies = [ "base64 0.22.1", "brotli", @@ -7412,7 +7413,7 @@ dependencies = [ "serde_json", "sha2 0.10.8", "syn 2.0.77", - "tauri-utils 2.0.0-rc.10", + "tauri-utils 2.0.0-rc.11", "thiserror", "time", "url", @@ -7422,23 +7423,23 @@ dependencies = [ [[package]] name = "tauri-macros" -version = "2.0.0-rc.9" +version = "2.0.0-rc.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f698301cd7297a7876bb81181a830d40d401461eb14fdaf7ae189b1b56ef76" +checksum = "f12d1aa317bec56f78388cf6012d788876d838595a48f95cbd7835642db356a0" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", "syn 2.0.77", "tauri-codegen", - "tauri-utils 2.0.0-rc.10", + "tauri-utils 2.0.0-rc.11", ] [[package]] name = "tauri-plugin" -version = "2.0.0-rc.10" +version = "2.0.0-rc.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad2b0b4fe684059a1b700c1a0d7d51698c05b2257ca64eca2a730d7be2e47c6a" +checksum = "d82a2adea16b8a71b7a5ad23f720bb13f8d2830b820cc1c266512314ba99bf67" dependencies = [ "anyhow", "glob", @@ -7446,15 +7447,15 @@ dependencies = [ "schemars", "serde", "serde_json", - "tauri-utils 2.0.0-rc.10", + "tauri-utils 2.0.0-rc.11", "toml 0.8.2", "walkdir", ] [[package]] name = "tauri-plugin-clipboard-manager" -version = "2.0.0-rc.3" -source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#3715f3c9a64d7a0b96696c96a0d1646a576556bd" +version = "2.0.0-rc.4" +source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#5d39ddcf227a4579fe0f4027ee55b9459142944f" dependencies = [ "arboard", "image 0.24.9", @@ -7483,8 +7484,8 @@ dependencies = [ [[package]] name = "tauri-plugin-dialog" -version = "2.0.0-rc.5" -source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#3715f3c9a64d7a0b96696c96a0d1646a576556bd" +version = "2.0.0-rc.7" +source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#5d39ddcf227a4579fe0f4027ee55b9459142944f" dependencies = [ "log", "raw-window-handle", @@ -7500,12 +7501,13 @@ dependencies = [ [[package]] name = "tauri-plugin-fs" -version = "2.0.0-rc.3" -source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#3715f3c9a64d7a0b96696c96a0d1646a576556bd" +version = "2.0.0-rc.5" +source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#5d39ddcf227a4579fe0f4027ee55b9459142944f" dependencies = [ "anyhow", "dunce", "glob", + "percent-encoding", "schemars", "serde", "serde_json", @@ -7520,7 +7522,7 @@ dependencies = [ [[package]] name = "tauri-plugin-global-shortcut" version = "2.0.0-rc.2" -source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#3715f3c9a64d7a0b96696c96a0d1646a576556bd" +source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#5d39ddcf227a4579fe0f4027ee55b9459142944f" dependencies = [ "global-hotkey", "log", @@ -7533,8 +7535,8 @@ dependencies = [ [[package]] name = "tauri-plugin-notification" -version = "2.0.0-rc.4" -source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#3715f3c9a64d7a0b96696c96a0d1646a576556bd" +version = "2.0.0-rc.5" +source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#5d39ddcf227a4579fe0f4027ee55b9459142944f" dependencies = [ "log", "notify-rust", @@ -7552,7 +7554,7 @@ dependencies = [ [[package]] name = "tauri-plugin-os" version = "2.0.0-rc.1" -source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#3715f3c9a64d7a0b96696c96a0d1646a576556bd" +source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#5d39ddcf227a4579fe0f4027ee55b9459142944f" dependencies = [ "gethostname 0.5.0", "log", @@ -7569,7 +7571,7 @@ dependencies = [ [[package]] name = "tauri-plugin-process" version = "2.0.0-rc.1" -source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#3715f3c9a64d7a0b96696c96a0d1646a576556bd" +source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#5d39ddcf227a4579fe0f4027ee55b9459142944f" dependencies = [ "tauri", "tauri-plugin", @@ -7578,7 +7580,7 @@ dependencies = [ [[package]] name = "tauri-plugin-shell" version = "2.0.0-rc.3" -source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#3715f3c9a64d7a0b96696c96a0d1646a576556bd" +source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#5d39ddcf227a4579fe0f4027ee55b9459142944f" dependencies = [ "encoding_rs", "log", @@ -7598,7 +7600,7 @@ dependencies = [ [[package]] name = "tauri-plugin-updater" version = "2.0.0-rc.3" -source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#3715f3c9a64d7a0b96696c96a0d1646a576556bd" +source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#5d39ddcf227a4579fe0f4027ee55b9459142944f" dependencies = [ "base64 0.22.1", "dirs 5.0.1", @@ -7625,9 +7627,9 @@ dependencies = [ [[package]] name = "tauri-runtime" -version = "2.0.0-rc.10" +version = "2.0.0-rc.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a0758dce4f9e08ebeee877d84de0062859495507e1d16f647f97b29f881b43d" +checksum = "389f78c8e8e6eff3897d8d9581087943b5976ea96a0ab5036be691f28c2b0df0" dependencies = [ "dpi", "gtk", @@ -7636,7 +7638,7 @@ dependencies = [ "raw-window-handle", "serde", "serde_json", - "tauri-utils 2.0.0-rc.10", + "tauri-utils 2.0.0-rc.11", "thiserror", "url", "windows 0.58.0", @@ -7644,21 +7646,23 @@ dependencies = [ [[package]] name = "tauri-runtime-wry" -version = "2.0.0-rc.10" +version = "2.0.0-rc.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78dd7f77e769630da5d91a55e4f102a84ff9c5a99c71e1b5c916a18b5ccafc16" +checksum = "e17625b7cf63958d53945e199391d11c9f195fb3d1cb8aeb64dc3084d0091b92" dependencies = [ - "cocoa", "gtk", "http 1.1.0", "jni", "log", + "objc2", + "objc2-app-kit", + "objc2-foundation", "percent-encoding", "raw-window-handle", "softbuffer", "tao", "tauri-runtime", - "tauri-utils 2.0.0-rc.10", + "tauri-utils 2.0.0-rc.11", "url", "webkit2gtk", "webview2-com", @@ -7693,9 +7697,9 @@ dependencies = [ [[package]] name = "tauri-utils" -version = "2.0.0-rc.10" +version = "2.0.0-rc.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba92ad9cdf7658fefa29a7218dda0acead9400c021bbf9c3f88e98f5e3b9bbab" +checksum = "3019641087c9039b57ebfca95fa42a93c07056845b7d8d57c8966061bcee83b4" dependencies = [ "brotli", "cargo_metadata", @@ -7756,7 +7760,7 @@ dependencies = [ "cfg-if", "fastrand 2.1.1", "once_cell", - "rustix 0.38.36", + "rustix 0.38.37", "windows-sys 0.59.0", ] @@ -8424,9 +8428,9 @@ dependencies = [ [[package]] name = "unicode-segmentation" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "unicode-width" @@ -8731,7 +8735,7 @@ checksum = "056535ced7a150d45159d3a8dc30f91a2e2d588ca0b23f70e56033622b8016f6" dependencies = [ "cc", "downcast-rs", - "rustix 0.38.36", + "rustix 0.38.37", "scoped-tls", "smallvec", "wayland-sys", @@ -8744,7 +8748,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3f45d1222915ef1fd2057220c1d9d9624b7654443ea35c3877f7a52bd0a5a2d" dependencies = [ "bitflags 2.6.0", - "rustix 0.38.36", + "rustix 0.38.37", "wayland-backend", "wayland-scanner", ] @@ -8766,7 +8770,7 @@ version = "0.31.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a94697e66e76c85923b0d28a0c251e8f0666f58fc47d316c0f4da6da75d37cb" dependencies = [ - "rustix 0.38.36", + "rustix 0.38.37", "wayland-client", "xcursor", ] @@ -8932,7 +8936,7 @@ dependencies = [ "either", "home", "once_cell", - "rustix 0.38.36", + "rustix 0.38.37", ] [[package]] @@ -8943,7 +8947,7 @@ checksum = "b4ee928febd44d98f2f459a4a79bd4d928591333a494a10a868418ac1b39cf1f" dependencies = [ "either", "home", - "rustix 0.38.36", + "rustix 0.38.37", "winsafe", ] @@ -9552,7 +9556,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d91ffca73ee7f68ce055750bf9f6eca0780b8c85eff9bc046a3b0da41755e12" dependencies = [ "gethostname 0.4.3", - "rustix 0.38.36", + "rustix 0.38.37", "x11rb-protocol", ] @@ -9570,7 +9574,7 @@ checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f" dependencies = [ "libc", "linux-raw-sys 0.4.14", - "rustix 0.38.36", + "rustix 0.38.37", ] [[package]] @@ -9614,9 +9618,9 @@ checksum = "b9cc00251562a284751c9973bace760d86c0276c471b4be569fe6b068ee97a56" [[package]] name = "yansi" -version = "0.5.1" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" +checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" [[package]] name = "yoke" @@ -9653,7 +9657,7 @@ dependencies = [ "async-fs 2.1.2", "async-io 2.3.4", "async-lock 3.4.0", - "async-process 2.2.4", + "async-process 2.3.0", "async-recursion", "async-task", "async-trait", diff --git a/clash-nyanpasu/backend/tauri/tauri.conf.json b/clash-nyanpasu/backend/tauri/tauri.conf.json index 907546b983..21a8795eaa 100644 --- a/clash-nyanpasu/backend/tauri/tauri.conf.json +++ b/clash-nyanpasu/backend/tauri/tauri.conf.json @@ -1,5 +1,6 @@ { "$schema": "../../node_modules/@tauri-apps/cli/config.schema.json", + "mainBinaryName": "Clash Nyanpasu", "bundle": { "active": true, "targets": "all", diff --git a/clash-nyanpasu/frontend/nyanpasu/package.json b/clash-nyanpasu/frontend/nyanpasu/package.json index 9c8e01efa3..7573ad841d 100644 --- a/clash-nyanpasu/frontend/nyanpasu/package.json +++ b/clash-nyanpasu/frontend/nyanpasu/package.json @@ -51,8 +51,8 @@ "@csstools/normalize.css": "12.1.1", "@emotion/babel-plugin": "11.12.0", "@emotion/react": "11.13.3", - "@iconify/json": "2.2.248", - "@monaco-editor/react": "^4.6.0", + "@iconify/json": "2.2.249", + "@monaco-editor/react": "4.6.0", "@tauri-apps/plugin-clipboard-manager": "2.0.0-rc.2", "@tauri-apps/plugin-dialog": "2.0.0-rc.1", "@tauri-apps/plugin-fs": "2.0.0-rc.2", @@ -71,14 +71,14 @@ "monaco-yaml": "5.2.2", "nanoid": "5.0.7", "sass": "1.78.0", - "shiki": "1.17.6", + "shiki": "1.17.7", "tailwindcss-textshadow": "2.1.3", "unplugin-auto-import": "0.18.3", "unplugin-icons": "0.19.3", "validator": "13.12.0", "vite": "5.4.5", "vite-plugin-monaco-editor": "1.1.3", - "vite-plugin-sass-dts": "1.3.28", + "vite-plugin-sass-dts": "1.3.29", "vite-plugin-svgr": "4.2.0", "vite-tsconfig-paths": "5.0.1", "zod": "3.23.8" diff --git a/clash-nyanpasu/frontend/nyanpasu/src/components/app/app-drawer.tsx b/clash-nyanpasu/frontend/nyanpasu/src/components/app/app-drawer.tsx index a410f456a1..9058ed5962 100644 --- a/clash-nyanpasu/frontend/nyanpasu/src/components/app/app-drawer.tsx +++ b/clash-nyanpasu/frontend/nyanpasu/src/components/app/app-drawer.tsx @@ -2,14 +2,7 @@ import { AnimatePresence, motion } from "framer-motion"; import { useState } from "react"; import getSystem from "@/utils/get-system"; import { MenuOpen } from "@mui/icons-material"; -import { - alpha, - Backdrop, - darken, - IconButton, - lighten, - useTheme, -} from "@mui/material"; +import { alpha, Backdrop, darken, IconButton, lighten } from "@mui/material"; import { cn } from "@nyanpasu/ui"; import AnimatedLogo from "../layout/animated-logo"; import DrawerContent from "./drawer-content"; @@ -17,8 +10,6 @@ import DrawerContent from "./drawer-content"; const OS = getSystem(); export const AppDrawer = () => { - const { palette } = useTheme(); - const [open, setOpen] = useState(false); const DrawerTitle = () => { @@ -32,10 +23,12 @@ export const AppDrawer = () => { > ({ + backgroundColor: alpha(theme.palette.primary.main, 0.1), + svg: { transform: "scale(0.9)" }, + }), + ]} onClick={() => setOpen(true)} > @@ -58,13 +51,17 @@ export const AppDrawer = () => { + OS === "linux" + ? { + backgroundColor: null, + } + : { + backgroundColor: alpha(theme.palette.primary.light, 0.1), + ...theme.applyStyles("dark", { + backgroundColor: alpha(theme.palette.primary.dark, 0.1), + }), + }, ]} open={open} onClick={() => setOpen(false)} @@ -88,14 +85,23 @@ export const AppDrawer = () => { > OS === "linux" - ? palette.mode === "light" - ? lighten(palette.primary[palette.mode], 0.9) - : darken(palette.primary[palette.mode], 0.7) - : undefined, - }} + ? { + backgroundColor: lighten( + theme.palette.primary.light, + 0.9, + ), + ...theme.applyStyles("dark", { + backgroundColor: darken( + theme.palette.primary.dark, + 0.9, + ), + }), + } + : {}, + ]} /> diff --git a/clash-nyanpasu/frontend/nyanpasu/src/components/app/drawer-content.tsx b/clash-nyanpasu/frontend/nyanpasu/src/components/app/drawer-content.tsx index 858a62ff04..966d7c29eb 100644 --- a/clash-nyanpasu/frontend/nyanpasu/src/components/app/drawer-content.tsx +++ b/clash-nyanpasu/frontend/nyanpasu/src/components/app/drawer-content.tsx @@ -1,11 +1,11 @@ import { useSize } from "ahooks"; import { useAtom } from "jotai"; -import { merge } from "lodash-es"; -import { CSSProperties, useCallback, useEffect, useRef } from "react"; +import { useCallback, useEffect, useRef } from "react"; import { atomIsDrawerOnlyIcon } from "@/store"; import getSystem from "@/utils/get-system"; import { languageQuirks } from "@/utils/language"; import { getRoutesWithIcon } from "@/utils/routes-utils"; +import { Box, SxProps, Theme } from "@mui/material"; import { useNyanpasu } from "@nyanpasu/interface"; import { cn } from "@nyanpasu/ui"; import AnimatedLogo from "../layout/animated-logo"; @@ -13,10 +13,10 @@ import RouteListItem from "./modules/route-list-item"; export const DrawerContent = ({ className, - style, + sx, }: { className?: string; - style?: CSSProperties; + sx?: SxProps; }) => { const [onlyIcon, setOnlyIcon] = useAtom(atomIsDrawerOnlyIcon); @@ -51,7 +51,7 @@ export const DrawerContent = ({ }, [handleResize, size?.width]); return ( -
@@ -99,7 +98,7 @@ export const DrawerContent = ({ ); })}
-
+ ); }; diff --git a/clash-nyanpasu/frontend/nyanpasu/src/components/layout/use-custom-theme.tsx b/clash-nyanpasu/frontend/nyanpasu/src/components/layout/use-custom-theme.tsx index bbdceefefa..f6351cefb9 100644 --- a/clash-nyanpasu/frontend/nyanpasu/src/components/layout/use-custom-theme.tsx +++ b/clash-nyanpasu/frontend/nyanpasu/src/components/layout/use-custom-theme.tsx @@ -16,7 +16,7 @@ const applyRootStyleVar = (mode: "light" | "dark", theme: Theme) => { const palette = theme.colorSchemes[mode]!.palette; const isLightMode = mode !== "light"; - root.className = cn(mode === "dark" && "dark"); + root.className = cn(mode === "dark" ? "dark" : "light"); const backgroundColor = isLightMode ? darken(palette.secondary.dark, 0.95) : lighten(palette.secondary.light, 0.95); @@ -32,6 +32,11 @@ const applyRootStyleVar = (mode: "light" | "dark", theme: Theme) => { "--background-color-alpha", alpha(palette.primary.main, 0.1), ); + + const reactRootDom = document.getElementById("root"); + if (reactRootDom) { + reactRootDom.className = cn(mode === "dark" ? "dark" : "light"); + } }; /** @@ -78,20 +83,22 @@ export const ThemeModeProvider = () => { setMode(m); } }); - - const unlisten = appWindow.onThemeChanged((e) => { - setThemeMode(e.payload); - setMode(e.payload); - }); - - return () => { - unlisten.then((fn) => fn()); - }; + } else { + const chosenThemeMode = nyanpasuConfig?.theme_mode || "light"; + setThemeMode(chosenThemeMode); + setMode(chosenThemeMode); } - const chosenThemeMode = nyanpasuConfig?.theme_mode || "light"; - setThemeMode(chosenThemeMode); - setMode(chosenThemeMode); + const unlisten = appWindow.onThemeChanged((e) => { + if (nyanpasuConfig?.theme_mode === "system") { + setThemeMode(e.payload); + setMode(e.payload); + } + }); + + return () => { + unlisten.then((fn) => fn()); + }; }, [nyanpasuConfig?.theme_mode, setMode, setThemeMode]); return null; diff --git a/clash-nyanpasu/frontend/nyanpasu/src/pages/_app.tsx b/clash-nyanpasu/frontend/nyanpasu/src/pages/_app.tsx index 5f165ca20e..311390b25b 100644 --- a/clash-nyanpasu/frontend/nyanpasu/src/pages/_app.tsx +++ b/clash-nyanpasu/frontend/nyanpasu/src/pages/_app.tsx @@ -16,7 +16,7 @@ import { useNyanpasuStorageSubscribers } from "@/hooks/use-store"; import useUpdater from "@/hooks/use-updater"; import { Path } from "@/router"; import { atomIsDrawer, memorizedRoutePathAtom } from "@/store"; -import { useTheme } from "@mui/material"; +import { CssBaseline, useTheme } from "@mui/material"; import { StyledEngineProvider, ThemeProvider } from "@mui/material/styles"; import { cn, useBreakpoint } from "@nyanpasu/ui"; import { emit } from "@tauri-apps/api/event"; @@ -79,6 +79,7 @@ export default function App() { > + diff --git a/clash-nyanpasu/frontend/ui/src/materialYou/components/baseCard/index.tsx b/clash-nyanpasu/frontend/ui/src/materialYou/components/baseCard/index.tsx index b2445ef03b..4eb177640f 100644 --- a/clash-nyanpasu/frontend/ui/src/materialYou/components/baseCard/index.tsx +++ b/clash-nyanpasu/frontend/ui/src/materialYou/components/baseCard/index.tsx @@ -7,7 +7,6 @@ import { CardContent, CircularProgress, Typography, - useTheme, } from "@mui/material"; import style from "./style.module.scss"; @@ -22,8 +21,6 @@ export const BaseCard = ({ loading?: boolean; children?: ReactNode; }) => { - const { palette } = useTheme(); - return ( @@ -58,14 +55,16 @@ export const BaseCard = ({ }, }} > -
({ + backgroundColor: alpha(theme.palette.grey[100], 0.1), + }), + ]} > -
+
); diff --git a/clash-nyanpasu/frontend/ui/src/materialYou/createTheme.ts b/clash-nyanpasu/frontend/ui/src/materialYou/createTheme.ts index b142e8035d..183df2e0a0 100644 --- a/clash-nyanpasu/frontend/ui/src/materialYou/createTheme.ts +++ b/clash-nyanpasu/frontend/ui/src/materialYou/createTheme.ts @@ -58,36 +58,47 @@ export const createMDYTheme = (themeSchema: ThemeSchema) => { }, }); }; - - const theme = createTheme({ - cssVariables: true, - colorSchemes: { - light: { - palette: generatePalette("light"), + const colorSchemes = { + light: { + palette: generatePalette("light"), + }, + dark: { + palette: generatePalette("dark"), + }, + }; + console.log(colorSchemes); + const theme = createTheme( + { + cssVariables: { + colorSchemeSelector: "class", }, - dark: { - palette: generatePalette("dark"), + colorSchemes: { + light: true, + dark: true, }, + typography: { + fontFamily: themeSchema?.font_family, + }, + components: { + MuiButton, + MuiButtonGroup, + MuiCard, + MuiCardContent, + MuiDialog, + MuiDialogActions, + MuiDialogContent, + MuiDialogTitle, + MuiLinearProgress, + MuiMenu, + MuiPaper, + MuiSwitch, + }, + breakpoints: MUI_BREAKPOINTS, }, - typography: { - fontFamily: themeSchema?.font_family, + { + colorSchemes, }, - components: { - MuiButton, - MuiButtonGroup, - MuiCard, - MuiCardContent, - MuiDialog, - MuiDialogActions, - MuiDialogContent, - MuiDialogTitle, - MuiLinearProgress, - MuiMenu, - MuiPaper, - MuiSwitch, - }, - breakpoints: MUI_BREAKPOINTS, - }); + ); return theme; }; diff --git a/clash-nyanpasu/frontend/ui/src/materialYou/themeComponents/MuiButtonGroup.ts b/clash-nyanpasu/frontend/ui/src/materialYou/themeComponents/MuiButtonGroup.ts index 17e6847c7f..ee84f63233 100644 --- a/clash-nyanpasu/frontend/ui/src/materialYou/themeComponents/MuiButtonGroup.ts +++ b/clash-nyanpasu/frontend/ui/src/materialYou/themeComponents/MuiButtonGroup.ts @@ -10,7 +10,7 @@ export const MuiButtonGroup: Components["MuiButtonGroup"] = { border: `1px solid ${darken(theme.palette.primary.main, 0.09)}`, color: darken(theme.palette.primary.main, 0.2), - "&.MuiButton-containedPrimary": { + "&.MuiButton-contained.MuiButton-colorPrimary": { boxShadow: "none", border: `1px solid ${theme.palette.primary.mainChannel}`, backgroundColor: alpha(theme.palette.primary.main, 0.2), diff --git a/clash-nyanpasu/frontend/ui/src/materialYou/themeComponents/MuiSwitch.ts b/clash-nyanpasu/frontend/ui/src/materialYou/themeComponents/MuiSwitch.ts index ff7bba53a2..5de4ec2ece 100644 --- a/clash-nyanpasu/frontend/ui/src/materialYou/themeComponents/MuiSwitch.ts +++ b/clash-nyanpasu/frontend/ui/src/materialYou/themeComponents/MuiSwitch.ts @@ -92,10 +92,10 @@ export const MuiSwitch: Components["MuiSwitch"] = { backgroundColor: theme.palette.grey.A200, opacity: `1 !important`, - [theme.getColorSchemeSelector("dark")]: { + ...theme.applyStyles("dark", { backgroundColor: theme.palette.grey.A700, opacity: `0.7 !important`, - }, + }), "&::before": { content: '""', @@ -116,9 +116,9 @@ export const MuiSwitch: Components["MuiSwitch"] = { boxShadow: "none", color: theme.palette.grey.A700, - [theme.getColorSchemeSelector("dark")]: { + ...theme.applyStyles("dark", { backgroundColor: theme.palette.grey.A200, - }, + }), }), }, }; diff --git a/clash-nyanpasu/manifest/version.json b/clash-nyanpasu/manifest/version.json index 6272d87796..599110b122 100644 --- a/clash-nyanpasu/manifest/version.json +++ b/clash-nyanpasu/manifest/version.json @@ -3,7 +3,7 @@ "latest": { "mihomo": "v1.18.8", "mihomo_alpha": "alpha-e33d4a4", - "clash_rs": "v0.3.1", + "clash_rs": "v0.3.2", "clash_premium": "2023-09-05-gdcc8d87" }, "arch_template": { @@ -52,5 +52,5 @@ "linux-armv7hf": "clash-linux-armv7-n{}.gz" } }, - "updated_at": "2024-09-12T22:20:40.988Z" + "updated_at": "2024-09-15T22:20:32.028Z" } diff --git a/clash-nyanpasu/package.json b/clash-nyanpasu/package.json index 0288ce8e60..4acbd27b05 100644 --- a/clash-nyanpasu/package.json +++ b/clash-nyanpasu/package.json @@ -59,7 +59,7 @@ "@commitlint/cli": "19.4.1", "@commitlint/config-conventional": "19.4.1", "@ianvs/prettier-plugin-sort-imports": "4.3.1", - "@tauri-apps/cli": "2.0.0-rc.14", + "@tauri-apps/cli": "2.0.0-rc.15", "@types/fs-extra": "11.0.4", "@types/lodash-es": "4.17.12", "@types/node": "22.5.4", diff --git a/clash-nyanpasu/pnpm-lock.yaml b/clash-nyanpasu/pnpm-lock.yaml index b79f6d9a74..33ec373eef 100644 --- a/clash-nyanpasu/pnpm-lock.yaml +++ b/clash-nyanpasu/pnpm-lock.yaml @@ -30,8 +30,8 @@ importers: specifier: 4.3.1 version: 4.3.1(prettier@3.3.3) '@tauri-apps/cli': - specifier: 2.0.0-rc.14 - version: 2.0.0-rc.14 + specifier: 2.0.0-rc.15 + version: 2.0.0-rc.15 '@types/fs-extra': specifier: 11.0.4 version: 11.0.4 @@ -305,10 +305,10 @@ importers: specifier: 11.13.3 version: 11.13.3(react@19.0.0-rc-206df66e-20240912)(types-react@19.0.0-rc.1) '@iconify/json': - specifier: 2.2.248 - version: 2.2.248 + specifier: 2.2.249 + version: 2.2.249 '@monaco-editor/react': - specifier: ^4.6.0 + specifier: 4.6.0 version: 4.6.0(monaco-editor@0.51.0)(react-dom@19.0.0-rc-206df66e-20240912(react@19.0.0-rc-206df66e-20240912))(react@19.0.0-rc-206df66e-20240912) '@tauri-apps/plugin-clipboard-manager': specifier: 2.0.0-rc.2 @@ -365,8 +365,8 @@ importers: specifier: 1.78.0 version: 1.78.0 shiki: - specifier: 1.17.6 - version: 1.17.6 + specifier: 1.17.7 + version: 1.17.7 tailwindcss-textshadow: specifier: 2.1.3 version: 2.1.3 @@ -386,8 +386,8 @@ importers: specifier: npm:vite-plugin-monaco-editor-new@1.1.3 version: vite-plugin-monaco-editor-new@1.1.3(monaco-editor@0.51.0) vite-plugin-sass-dts: - specifier: 1.3.28 - version: 1.3.28(postcss@8.4.47)(prettier@3.3.3)(sass-embedded@1.78.0)(vite@5.4.5(@types/node@22.5.4)(less@4.2.0)(sass-embedded@1.78.0)(sass@1.78.0)(stylus@0.62.0)) + specifier: 1.3.29 + version: 1.3.29(postcss@8.4.47)(prettier@3.3.3)(sass-embedded@1.78.0)(vite@5.4.5(@types/node@22.5.4)(less@4.2.0)(sass-embedded@1.78.0)(sass@1.78.0)(stylus@0.62.0)) vite-plugin-svgr: specifier: 4.2.0 version: 4.2.0(rollup@4.21.0)(typescript@5.5.4)(vite@5.4.5(@types/node@22.5.4)(less@4.2.0)(sass-embedded@1.78.0)(sass@1.78.0)(stylus@0.62.0)) @@ -535,8 +535,8 @@ importers: specifier: 7.4.3 version: 7.4.3 telegram: - specifier: 2.24.11 - version: 2.24.11 + specifier: 2.25.4 + version: 2.25.4 undici: specifier: 6.19.8 version: 6.19.8 @@ -1475,8 +1475,8 @@ packages: '@vue/compiler-sfc': optional: true - '@iconify/json@2.2.248': - resolution: {integrity: sha512-hoNQIDqx071K3ny1+kJwwC1YClHex+VnPfYAWFK0YfBmdA3DP4Ij3zsPttpX3dVqsYEnJSpy50tVit0Fsqp9Sg==} + '@iconify/json@2.2.249': + resolution: {integrity: sha512-nOvcrdep4qB8L3WedGWC6238rU+oYfqLpTfQp8uV0Avxg7aXPvl9rGW0vnaq53exSgfvhQ1h7JcVUwJUuDHrzQ==} '@iconify/types@2.0.0': resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==} @@ -1748,8 +1748,8 @@ packages: moment: ^2.29.4 moment-hijri: ^2.1.2 moment-jalaali: ^0.7.4 || ^0.8.0 || ^0.9.0 || ^0.10.0 - react: npm:react@rc - react-dom: npm:react-dom@rc + react: ^17.0.0 || ^18.0.0 + react-dom: ^17.0.0 || ^18.0.0 peerDependenciesMeta: '@emotion/react': optional: true @@ -2091,55 +2091,46 @@ packages: resolution: {integrity: sha512-pWJsfQjNWNGsoCq53KjMtwdJDmh/6NubwQcz52aEwLEuvx08bzcy6tOUuawAOncPnxz/3siRtd8hiQ32G1y8VA==} cpu: [arm] os: [linux] - libc: [glibc] '@rollup/rollup-linux-arm-musleabihf@4.21.0': resolution: {integrity: sha512-efRIANsz3UHZrnZXuEvxS9LoCOWMGD1rweciD6uJQIx2myN3a8Im1FafZBzh7zk1RJ6oKcR16dU3UPldaKd83w==} cpu: [arm] os: [linux] - libc: [musl] '@rollup/rollup-linux-arm64-gnu@4.21.0': resolution: {integrity: sha512-ZrPhydkTVhyeGTW94WJ8pnl1uroqVHM3j3hjdquwAcWnmivjAwOYjTEAuEDeJvGX7xv3Z9GAvrBkEzCgHq9U1w==} cpu: [arm64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-arm64-musl@4.21.0': resolution: {integrity: sha512-cfaupqd+UEFeURmqNP2eEvXqgbSox/LHOyN9/d2pSdV8xTrjdg3NgOFJCtc1vQ/jEke1qD0IejbBfxleBPHnPw==} cpu: [arm64] os: [linux] - libc: [musl] '@rollup/rollup-linux-powerpc64le-gnu@4.21.0': resolution: {integrity: sha512-ZKPan1/RvAhrUylwBXC9t7B2hXdpb/ufeu22pG2psV7RN8roOfGurEghw1ySmX/CmDDHNTDDjY3lo9hRlgtaHg==} cpu: [ppc64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-riscv64-gnu@4.21.0': resolution: {integrity: sha512-H1eRaCwd5E8eS8leiS+o/NqMdljkcb1d6r2h4fKSsCXQilLKArq6WS7XBLDu80Yz+nMqHVFDquwcVrQmGr28rg==} cpu: [riscv64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-s390x-gnu@4.21.0': resolution: {integrity: sha512-zJ4hA+3b5tu8u7L58CCSI0A9N1vkfwPhWd/puGXwtZlsB5bTkwDNW/+JCU84+3QYmKpLi+XvHdmrlwUwDA6kqw==} cpu: [s390x] os: [linux] - libc: [glibc] '@rollup/rollup-linux-x64-gnu@4.21.0': resolution: {integrity: sha512-e2hrvElFIh6kW/UNBQK/kzqMNY5mO+67YtEh9OA65RM5IJXYTWiXjX6fjIiPaqOkBthYF1EqgiZ6OXKcQsM0hg==} cpu: [x64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-x64-musl@4.21.0': resolution: {integrity: sha512-1vvmgDdUSebVGXWX2lIcgRebqfQSff0hMEkLJyakQ9JQUbLDkEaMsPTLOmyccyC6IJ/l3FZuJbmrBw/u0A0uCQ==} cpu: [x64] os: [linux] - libc: [musl] '@rollup/rollup-win32-arm64-msvc@4.21.0': resolution: {integrity: sha512-s5oFkZ/hFcrlAyBTONFY1TWndfyre1wOMwU+6KCpm/iatybvrRgmZVM+vCFwxmC5ZhdlgfE0N4XorsDpi7/4XQ==} @@ -2178,17 +2169,17 @@ packages: '@rushstack/ts-command-line@4.22.6': resolution: {integrity: sha512-QSRqHT/IfoC5nk9zn6+fgyqOPXHME0BfchII9EUPR19pocsNp/xSbeBCbD3PIR2Lg+Q5qk7OFqk1VhWPMdKHJg==} - '@shikijs/core@1.17.6': - resolution: {integrity: sha512-9ztslig6/YmCg/XwESAXbKjAjOhaq6HVced9NY6qcbDz1X5g/S90Wco2vMjBNX/6V71ASkzri76JewSGPa7kiQ==} + '@shikijs/core@1.17.7': + resolution: {integrity: sha512-ZnIDxFu/yvje3Q8owSHaEHd+bu/jdWhHAaJ17ggjXofHx5rc4bhpCSW+OjC6smUBi5s5dd023jWtZ1gzMu/yrw==} - '@shikijs/engine-javascript@1.17.6': - resolution: {integrity: sha512-5EEZj8tVcierNxm4V0UMS2PVoflb0UJPalWWV8l9rRg+oOfnr5VivqBJbkyq5grltVPvByIXvVbY8GSM/356jQ==} + '@shikijs/engine-javascript@1.17.7': + resolution: {integrity: sha512-wwSf7lKPsm+hiYQdX+1WfOXujtnUG6fnN4rCmExxa4vo+OTmvZ9B1eKauilvol/LHUPrQgW12G3gzem7pY5ckw==} - '@shikijs/engine-oniguruma@1.17.6': - resolution: {integrity: sha512-NLfWDMXFYe0nDHFbEoyZdz89aIIey3bTfF3zLYSUNTXks5s4uinZVmuPOFf1HfTeGqIn8uErJSBc3VnpJO7Alw==} + '@shikijs/engine-oniguruma@1.17.7': + resolution: {integrity: sha512-pvSYGnVeEIconU28NEzBXqSQC/GILbuNbAHwMoSfdTBrobKAsV1vq2K4cAgiaW1TJceLV9QMGGh18hi7cCzbVQ==} - '@shikijs/types@1.17.6': - resolution: {integrity: sha512-ndTFa2TJi2w51ddKQDn3Jy8f6K4E5Q2x3dA3Hmsd3+YmxDQ10UWHjcw7VbVbKzv3VcUvYPLy+z9neqytSzUMUg==} + '@shikijs/types@1.17.7': + resolution: {integrity: sha512-+qA4UyhWLH2q4EFd+0z4K7GpERDU+c+CN2XYD3sC+zjvAr5iuwD1nToXZMt1YODshjkEGEDV86G7j66bKjqDdg==} '@shikijs/vscode-textmate@9.2.2': resolution: {integrity: sha512-TMp15K+GGYrWlZM8+Lnj9EaHEFmOen0WJBrfa17hF7taDOYthuPPV0GWzfd/9iMij0akS/8Yw2ikquH7uVi/fg==} @@ -2293,28 +2284,24 @@ packages: engines: {node: '>=10'} cpu: [arm64] os: [linux] - libc: [glibc] '@swc/core-linux-arm64-musl@1.6.1': resolution: {integrity: sha512-dr6YbLBg/SsNxs1hDqJhxdcrS8dGMlOXJwXIrUvACiA8jAd6S5BxYCaqsCefLYXtaOmu0bbx1FB/evfodqB70Q==} engines: {node: '>=10'} cpu: [arm64] os: [linux] - libc: [musl] '@swc/core-linux-x64-gnu@1.6.1': resolution: {integrity: sha512-A0b/3V+yFy4LXh3O9umIE7LXPC7NBWdjl6AQYqymSMcMu0EOb1/iygA6s6uWhz9y3e172Hpb9b/CGsuD8Px/bg==} engines: {node: '>=10'} cpu: [x64] os: [linux] - libc: [glibc] '@swc/core-linux-x64-musl@1.6.1': resolution: {integrity: sha512-5dJjlzZXhC87nZZZWbpiDP8kBIO0ibis893F/rtPIQBI5poH+iJuA32EU3wN4/WFHeK4et8z6SGSVghPtWyk4g==} engines: {node: '>=10'} cpu: [x64] os: [linux] - libc: [musl] '@swc/core-win32-arm64-msvc@1.6.1': resolution: {integrity: sha512-HBi1ZlwvfcUibLtT3g/lP57FaDPC799AD6InolB2KSgkqyBbZJ9wAXM8/CcH67GLIP0tZ7FqblrJTzGXxetTJQ==} @@ -2386,72 +2373,68 @@ packages: '@tauri-apps/api@2.0.0-rc.4': resolution: {integrity: sha512-UNiIhhKG08j4ooss2oEEVexffmWkgkYlC2M3GcX3VPtNsqFgVNL8Mcw/4Y7rO9M9S+ffAMnLOF5ypzyuyb8tyg==} - '@tauri-apps/cli-darwin-arm64@2.0.0-rc.14': - resolution: {integrity: sha512-QBdzhwj+ewRi2tA+3jCiEMp5y9WYR3p33bwVHPC33oyrDFlXMNOpwsJa9VBHUU04pr6mq1ujrouHNBAlj78Lvw==} + '@tauri-apps/cli-darwin-arm64@2.0.0-rc.15': + resolution: {integrity: sha512-WuzQRELJTeSHe/uLu6IClCCEkwQy4qtZdHUmcAW3baKD217WCytn4jQ5+NFs2GxhK1a2GLHMQtQZSFTLkKiXkw==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] - '@tauri-apps/cli-darwin-x64@2.0.0-rc.14': - resolution: {integrity: sha512-m48s2+EIUYoq5T26CKq11TThRBlY5LorCmUKDO+OzIL87h5sXhYwAYKkskJ1aDc8gf3incq+cQhw2FfCkHk60A==} + '@tauri-apps/cli-darwin-x64@2.0.0-rc.15': + resolution: {integrity: sha512-71H1dNWlEr+Hyi096Ir3SnlClw4CSR4MhJ8UG8IUBqYwydJPYFzA+GFWRAgnPgcV6sBzdt8trcV9BLV4teDzEw==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] - '@tauri-apps/cli-linux-arm-gnueabihf@2.0.0-rc.14': - resolution: {integrity: sha512-otGNUBERFQhuR+qYTTjMgoMUptc+EefyXsPQap7gFRAY6j5bBTiKOofE4XyOd6wFZ6OLI12uICm9j4kMjiPkzA==} + '@tauri-apps/cli-linux-arm-gnueabihf@2.0.0-rc.15': + resolution: {integrity: sha512-hO7AS09l6XZRCu/vqvB/iv6CvIlD//h9njhyw++0tJPCNH3X4rl13ji6SnoO0V6ZUCEeCeQBTAALsanYAlZelQ==} engines: {node: '>= 10'} cpu: [arm] os: [linux] - '@tauri-apps/cli-linux-arm64-gnu@2.0.0-rc.14': - resolution: {integrity: sha512-ZCfd2N/IPQCEjrRyIeBK7nII//i34taAS6BbhDMuOXzBAz6r9angQKL42qW89mQDJZwckNHFiVMcOqBrrVo7TQ==} + '@tauri-apps/cli-linux-arm64-gnu@2.0.0-rc.15': + resolution: {integrity: sha512-r9FrwY83TD4w3vX7J9zS3GPSeis0YWq52p/MVLYR1i8sSJppbvYY72EXi5pR2CZ3vb+6z9/w7LpYTv+hOd2RbA==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - libc: [glibc] - '@tauri-apps/cli-linux-arm64-musl@2.0.0-rc.14': - resolution: {integrity: sha512-8zMZGVvehZSSn+TCt0D8uKXDqMviWYMNgfAc+XKWcbEpJKsAaDfC8UEFikpr1HBV/1kGrq0AMko+91f6o5/g6w==} + '@tauri-apps/cli-linux-arm64-musl@2.0.0-rc.15': + resolution: {integrity: sha512-PqMn3/GiqLAhs7p0jr5XqwWN1t7SAgvo6+bFuYNL/SWx1Ui6mOck3ncfDkf+dQAnXnrhX2Qfwkl3agiOZxUZtA==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - libc: [musl] - '@tauri-apps/cli-linux-x64-gnu@2.0.0-rc.14': - resolution: {integrity: sha512-NgEQ9f/Ce2SLDT0CNSpeew7BikTAOO3I2WM+FPuYyAaDnvrHnC67v3RyC5/j5xTkMMjRPsVPvsedtQNZjlq3tw==} + '@tauri-apps/cli-linux-x64-gnu@2.0.0-rc.15': + resolution: {integrity: sha512-o8lvgVBGXwthMV8+8EzEwXQY5jk2q+c700xeC/LY+J0lBL5ai3i0revlhO+3RwKnjnRLZMCXatr5K3gGtXIsoQ==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - libc: [glibc] - '@tauri-apps/cli-linux-x64-musl@2.0.0-rc.14': - resolution: {integrity: sha512-h+/eJqWfwqzBXEJhmdNsYrUII7d9sz8UYWWS1cQFeCQRPW5rMVotySI7TCrmKOx0mZDKd9zWClYwUviBinG6Kg==} + '@tauri-apps/cli-linux-x64-musl@2.0.0-rc.15': + resolution: {integrity: sha512-cmANCyhcdInZSfIM3CPjA0eDu1toYABapSttA1rHbNrcJrHIq2KPKRCNuXIjWiBggxfIhJKWX7mTgQCQIyHd/w==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - libc: [musl] - '@tauri-apps/cli-win32-arm64-msvc@2.0.0-rc.14': - resolution: {integrity: sha512-bM8kGZJQCahTJQCdaF3h4ta83HvrIA8JEBUEHvrxxpiUpdtymOyW7uSSdjYB0pdmotZx44oEKiXeK2xcc9rZaw==} + '@tauri-apps/cli-win32-arm64-msvc@2.0.0-rc.15': + resolution: {integrity: sha512-FyWwCQb+uCCBtEDTDKtILH3wv0TWCQ2mXwMyZlibpbZ4RbaV5yDY82h8h7usfEuPHtBtAJHknHvX5WV1ETl5kw==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] - '@tauri-apps/cli-win32-ia32-msvc@2.0.0-rc.14': - resolution: {integrity: sha512-dxzPebtvI9EhqIzP33WbsPKoxyBejozw7Ie6GMpQ8oV2bogYfOgEu2r9hwzZ7nNfVldOD6PWKzgo0rwAvfxnAQ==} + '@tauri-apps/cli-win32-ia32-msvc@2.0.0-rc.15': + resolution: {integrity: sha512-+bOBX7EdpmkCSBxgd9HcC/p9LoG/q1a5dJebWFuL9GhmdPeb5hv4plB/OTUAtg1OnEVGPXhTiSkcdRatZVryfA==} engines: {node: '>= 10'} cpu: [ia32] os: [win32] - '@tauri-apps/cli-win32-x64-msvc@2.0.0-rc.14': - resolution: {integrity: sha512-XZ97TfOAL3KFr6pF51oWKZNXueFSmkpjkZdyk2/aVvzsiqGZtfPwGkL7YMCBbUA8q9ysaosdMvcGpBmvhHkLPQ==} + '@tauri-apps/cli-win32-x64-msvc@2.0.0-rc.15': + resolution: {integrity: sha512-Phpk18bs1YxC+OFYaZNWiddYRmiZvMjB9Rzjl6M128gIkgnqDGnZyfWtM5GZ85/BmX1HVGgILK/46RU6Q88z1g==} engines: {node: '>= 10'} cpu: [x64] os: [win32] - '@tauri-apps/cli@2.0.0-rc.14': - resolution: {integrity: sha512-AQST26ixCoVf32PSsSjfUCQY9SrawzDEgUpKXjelUeD9oROzbxlRw5tOYRTsxg9YDat2uWJ3xz7WXW6T0VEfNw==} + '@tauri-apps/cli@2.0.0-rc.15': + resolution: {integrity: sha512-w5cq2WBKYRJDCE5wi5gyjM79Cq3AchTFImbcGBB+uyB/m3PDBXEidaTBTHqwiup2hKbMivuBAzGUCHt+OfgBhA==} engines: {node: '>= 10'} hasBin: true @@ -6289,8 +6272,8 @@ packages: shell-quote@1.8.1: resolution: {integrity: sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==} - shiki@1.17.6: - resolution: {integrity: sha512-RejGugKpDM75vh6YtF9R771acxHRDikC/01kxsUGW+Pnaz3pTY+c8aZB5CnD7p0vuFPs1HaoAIU/4E+NCfS+mQ==} + shiki@1.17.7: + resolution: {integrity: sha512-Zf6hNtWhFyF4XP5OOsXkBTEx9JFPiN0TQx4wSe+Vqeuczewgk2vT4IZhF4gka55uelm052BD5BaHavNqUNZd+A==} side-channel@1.0.6: resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==} @@ -6620,8 +6603,8 @@ packages: resolution: {integrity: sha512-5S7Va8hKfV7W5U6g3aYxXmlPoZVAwUMy9AOKyF2fVuZa2UD3qZjg578OrLRt8PcNN1PleVaL/5/yYATNL0ICUw==} engines: {node: '>=18'} - telegram@2.24.11: - resolution: {integrity: sha512-d4rqMeOI7itNzLXRIcRHdZrCXXV8K6h/aFiJXdMVNWhl0PsCePytsdtjpgmgAuO1tQ8k6jW+aR/DoZk5nE0x9g==} + telegram@2.25.4: + resolution: {integrity: sha512-s5UCYF3xmOQ2mfbXOBF/hGnYfUXYfQEb71CI7QilYR6oIeY8GV+yC26QDLVilZ/Jnf/ED2KuD5Qv2PFCTDe7Hw==} term-size@1.2.0: resolution: {integrity: sha512-7dPUZQGy/+m3/wjVz3ZW5dobSoD/02NxJpoXUX0WIyjfVS3l0c+b/+9phIDFA7FHzkYtwtMFgeGZ/Y8jVTeqQQ==} @@ -6979,8 +6962,8 @@ packages: peerDependencies: monaco-editor: '>=0.45.0' - vite-plugin-sass-dts@1.3.28: - resolution: {integrity: sha512-E8iLRUjWAwEqR6q8kdP+TdUE5GD1rt7kDca0vviakgcZDwzOxlsES7k/Evt3eyC1Ki/x5AvRI5BwKOnNfXhRYg==} + vite-plugin-sass-dts@1.3.29: + resolution: {integrity: sha512-N0OnqpEZBWeMJL6LHCmeQMRe7bfZrVwImZRzpyIn/YUF7xSzjoPAJCrplIUB2CsOpTOqByt1BjyZVoglGcRYdQ==} engines: {node: '>=20'} peerDependencies: postcss: ^8 @@ -8128,7 +8111,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@iconify/json@2.2.248': + '@iconify/json@2.2.249': dependencies: '@iconify/types': 2.0.0 pathe: 1.1.2 @@ -8830,26 +8813,27 @@ snapshots: transitivePeerDependencies: - '@types/node' - '@shikijs/core@1.17.6': + '@shikijs/core@1.17.7': dependencies: - '@shikijs/engine-javascript': 1.17.6 - '@shikijs/engine-oniguruma': 1.17.6 - '@shikijs/types': 1.17.6 + '@shikijs/engine-javascript': 1.17.7 + '@shikijs/engine-oniguruma': 1.17.7 + '@shikijs/types': 1.17.7 '@shikijs/vscode-textmate': 9.2.2 '@types/hast': 3.0.4 hast-util-to-html: 9.0.2 - '@shikijs/engine-javascript@1.17.6': + '@shikijs/engine-javascript@1.17.7': dependencies: - '@shikijs/types': 1.17.6 + '@shikijs/types': 1.17.7 + '@shikijs/vscode-textmate': 9.2.2 oniguruma-to-js: 0.4.3 - '@shikijs/engine-oniguruma@1.17.6': + '@shikijs/engine-oniguruma@1.17.7': dependencies: - '@shikijs/types': 1.17.6 + '@shikijs/types': 1.17.7 '@shikijs/vscode-textmate': 9.2.2 - '@shikijs/types@1.17.6': + '@shikijs/types@1.17.7': dependencies: '@shikijs/vscode-textmate': 9.2.2 '@types/hast': 3.0.4 @@ -9018,48 +9002,48 @@ snapshots: '@tauri-apps/api@2.0.0-rc.4': {} - '@tauri-apps/cli-darwin-arm64@2.0.0-rc.14': + '@tauri-apps/cli-darwin-arm64@2.0.0-rc.15': optional: true - '@tauri-apps/cli-darwin-x64@2.0.0-rc.14': + '@tauri-apps/cli-darwin-x64@2.0.0-rc.15': optional: true - '@tauri-apps/cli-linux-arm-gnueabihf@2.0.0-rc.14': + '@tauri-apps/cli-linux-arm-gnueabihf@2.0.0-rc.15': optional: true - '@tauri-apps/cli-linux-arm64-gnu@2.0.0-rc.14': + '@tauri-apps/cli-linux-arm64-gnu@2.0.0-rc.15': optional: true - '@tauri-apps/cli-linux-arm64-musl@2.0.0-rc.14': + '@tauri-apps/cli-linux-arm64-musl@2.0.0-rc.15': optional: true - '@tauri-apps/cli-linux-x64-gnu@2.0.0-rc.14': + '@tauri-apps/cli-linux-x64-gnu@2.0.0-rc.15': optional: true - '@tauri-apps/cli-linux-x64-musl@2.0.0-rc.14': + '@tauri-apps/cli-linux-x64-musl@2.0.0-rc.15': optional: true - '@tauri-apps/cli-win32-arm64-msvc@2.0.0-rc.14': + '@tauri-apps/cli-win32-arm64-msvc@2.0.0-rc.15': optional: true - '@tauri-apps/cli-win32-ia32-msvc@2.0.0-rc.14': + '@tauri-apps/cli-win32-ia32-msvc@2.0.0-rc.15': optional: true - '@tauri-apps/cli-win32-x64-msvc@2.0.0-rc.14': + '@tauri-apps/cli-win32-x64-msvc@2.0.0-rc.15': optional: true - '@tauri-apps/cli@2.0.0-rc.14': + '@tauri-apps/cli@2.0.0-rc.15': optionalDependencies: - '@tauri-apps/cli-darwin-arm64': 2.0.0-rc.14 - '@tauri-apps/cli-darwin-x64': 2.0.0-rc.14 - '@tauri-apps/cli-linux-arm-gnueabihf': 2.0.0-rc.14 - '@tauri-apps/cli-linux-arm64-gnu': 2.0.0-rc.14 - '@tauri-apps/cli-linux-arm64-musl': 2.0.0-rc.14 - '@tauri-apps/cli-linux-x64-gnu': 2.0.0-rc.14 - '@tauri-apps/cli-linux-x64-musl': 2.0.0-rc.14 - '@tauri-apps/cli-win32-arm64-msvc': 2.0.0-rc.14 - '@tauri-apps/cli-win32-ia32-msvc': 2.0.0-rc.14 - '@tauri-apps/cli-win32-x64-msvc': 2.0.0-rc.14 + '@tauri-apps/cli-darwin-arm64': 2.0.0-rc.15 + '@tauri-apps/cli-darwin-x64': 2.0.0-rc.15 + '@tauri-apps/cli-linux-arm-gnueabihf': 2.0.0-rc.15 + '@tauri-apps/cli-linux-arm64-gnu': 2.0.0-rc.15 + '@tauri-apps/cli-linux-arm64-musl': 2.0.0-rc.15 + '@tauri-apps/cli-linux-x64-gnu': 2.0.0-rc.15 + '@tauri-apps/cli-linux-x64-musl': 2.0.0-rc.15 + '@tauri-apps/cli-win32-arm64-msvc': 2.0.0-rc.15 + '@tauri-apps/cli-win32-ia32-msvc': 2.0.0-rc.15 + '@tauri-apps/cli-win32-x64-msvc': 2.0.0-rc.15 '@tauri-apps/plugin-clipboard-manager@2.0.0-rc.2': dependencies: @@ -9718,7 +9702,7 @@ snapshots: async-mutex@0.3.2: dependencies: - tslib: 2.6.2 + tslib: 2.7.0 autoprefixer@10.4.20(postcss@8.4.47): dependencies: @@ -13292,12 +13276,12 @@ snapshots: shell-quote@1.8.1: {} - shiki@1.17.6: + shiki@1.17.7: dependencies: - '@shikijs/core': 1.17.6 - '@shikijs/engine-javascript': 1.17.6 - '@shikijs/engine-oniguruma': 1.17.6 - '@shikijs/types': 1.17.6 + '@shikijs/core': 1.17.7 + '@shikijs/engine-javascript': 1.17.7 + '@shikijs/engine-oniguruma': 1.17.7 + '@shikijs/types': 1.17.7 '@shikijs/vscode-textmate': 9.2.2 '@types/hast': 3.0.4 @@ -13728,7 +13712,7 @@ snapshots: mkdirp: 3.0.1 yallist: 5.0.0 - telegram@2.24.11: + telegram@2.25.4: dependencies: '@cryptography/aes': 0.1.1 async-mutex: 0.3.2 @@ -14135,7 +14119,7 @@ snapshots: esbuild: 0.19.12 monaco-editor: 0.51.0 - vite-plugin-sass-dts@1.3.28(postcss@8.4.47)(prettier@3.3.3)(sass-embedded@1.78.0)(vite@5.4.5(@types/node@22.5.4)(less@4.2.0)(sass-embedded@1.78.0)(sass@1.78.0)(stylus@0.62.0)): + vite-plugin-sass-dts@1.3.29(postcss@8.4.47)(prettier@3.3.3)(sass-embedded@1.78.0)(vite@5.4.5(@types/node@22.5.4)(less@4.2.0)(sass-embedded@1.78.0)(sass@1.78.0)(stylus@0.62.0)): dependencies: postcss: 8.4.47 postcss-js: 4.0.1(postcss@8.4.47) diff --git a/clash-nyanpasu/scripts/package.json b/clash-nyanpasu/scripts/package.json index ce2d0ddc72..499c76f2b1 100644 --- a/clash-nyanpasu/scripts/package.json +++ b/clash-nyanpasu/scripts/package.json @@ -20,7 +20,7 @@ "octokit": "4.0.2", "picocolors": "1.1.0", "tar": "7.4.3", - "telegram": "2.24.11", + "telegram": "2.25.4", "undici": "6.19.8" } } diff --git a/lede/package/kernel/r8125/Makefile b/lede/package/kernel/r8125/Makefile index 3846450005..feac65acdc 100644 --- a/lede/package/kernel/r8125/Makefile +++ b/lede/package/kernel/r8125/Makefile @@ -27,6 +27,7 @@ endef define KernelPackage/r8125-rss $(call KernelPackage/r8125) + CONFLICTS:=kmod-r8125 TITLE+= (RSS) VARIANT:=rss endef diff --git a/lede/package/kernel/r8126/Makefile b/lede/package/kernel/r8126/Makefile index 4f175ce9ec..3798addc85 100644 --- a/lede/package/kernel/r8126/Makefile +++ b/lede/package/kernel/r8126/Makefile @@ -27,6 +27,7 @@ endef define KernelPackage/r8126-rss $(call KernelPackage/r8126) + CONFLICTS:=kmod-r8126 TITLE+= (RSS) VARIANT:=rss endef diff --git a/openwrt-packages/alist/Makefile b/openwrt-packages/alist/Makefile index b9e57bb754..cd6174494c 100644 --- a/openwrt-packages/alist/Makefile +++ b/openwrt-packages/alist/Makefile @@ -7,13 +7,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=alist -PKG_VERSION:=3.37.2 +PKG_VERSION:=3.37.3 PKG_WEB_VERSION:=3.37.1 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/alist-org/alist/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=e27a17b3ff57bf78bd612a92199c72449152e41d34da73f3576c25d4581bea45 +PKG_HASH:=a9f974498a2e7dc34198d6d1994a379ac97b4a295f3ccfbea0c17eaae79b1281 PKG_LICENSE:=GPL-3.0 PKG_LICENSE_FILE:=LICENSE diff --git a/ryujinx/src/ARMeilleure/Translation/DelegateInfo.cs b/ryujinx/src/ARMeilleure/Translation/DelegateInfo.cs index 27479a0038..7066254375 100644 --- a/ryujinx/src/ARMeilleure/Translation/DelegateInfo.cs +++ b/ryujinx/src/ARMeilleure/Translation/DelegateInfo.cs @@ -1,5 +1,4 @@ using System; -using System.Runtime.InteropServices; namespace ARMeilleure.Translation { @@ -11,11 +10,10 @@ namespace ARMeilleure.Translation public IntPtr FuncPtr { get; } - public DelegateInfo(Delegate dlg) + public DelegateInfo(Delegate dlg, IntPtr funcPtr) { _dlg = dlg; - - FuncPtr = Marshal.GetFunctionPointerForDelegate(dlg); + FuncPtr = funcPtr; } } } diff --git a/ryujinx/src/ARMeilleure/Translation/Delegates.cs b/ryujinx/src/ARMeilleure/Translation/Delegates.cs index 63db789dfa..66412b8e68 100644 --- a/ryujinx/src/ARMeilleure/Translation/Delegates.cs +++ b/ryujinx/src/ARMeilleure/Translation/Delegates.cs @@ -3,6 +3,7 @@ using ARMeilleure.State; using System; using System.Collections.Generic; using System.Reflection; +using System.Runtime.InteropServices; namespace ARMeilleure.Translation { @@ -64,11 +65,11 @@ namespace ARMeilleure.Translation return index; } - private static void SetDelegateInfo(Delegate dlg) + private static void SetDelegateInfo(Delegate dlg, IntPtr funcPtr) { string key = GetKey(dlg.Method); - _delegates.Add(key, new DelegateInfo(dlg)); // ArgumentException (key). + _delegates.Add(key, new DelegateInfo(dlg, funcPtr)); // ArgumentException (key). } private static string GetKey(MethodInfo info) @@ -82,179 +83,353 @@ namespace ARMeilleure.Translation { _delegates = new SortedList(); - SetDelegateInfo(new MathAbs(Math.Abs)); - SetDelegateInfo(new MathCeiling(Math.Ceiling)); - SetDelegateInfo(new MathFloor(Math.Floor)); - SetDelegateInfo(new MathRound(Math.Round)); - SetDelegateInfo(new MathTruncate(Math.Truncate)); + var dlgMathAbs = new MathAbs(Math.Abs); + var dlgMathCeiling = new MathCeiling(Math.Ceiling); + var dlgMathFloor = new MathFloor(Math.Floor); + var dlgMathRound = new MathRound(Math.Round); + var dlgMathTruncate = new MathTruncate(Math.Truncate); - SetDelegateInfo(new MathFAbs(MathF.Abs)); - SetDelegateInfo(new MathFCeiling(MathF.Ceiling)); - SetDelegateInfo(new MathFFloor(MathF.Floor)); - SetDelegateInfo(new MathFRound(MathF.Round)); - SetDelegateInfo(new MathFTruncate(MathF.Truncate)); + var dlgMathFAbs = new MathFAbs(MathF.Abs); + var dlgMathFCeiling = new MathFCeiling(MathF.Ceiling); + var dlgMathFFloor = new MathFFloor(MathF.Floor); + var dlgMathFRound = new MathFRound(MathF.Round); + var dlgMathFTruncate = new MathFTruncate(MathF.Truncate); - SetDelegateInfo(new NativeInterfaceBreak(NativeInterface.Break)); - SetDelegateInfo(new NativeInterfaceCheckSynchronization(NativeInterface.CheckSynchronization)); - SetDelegateInfo(new NativeInterfaceEnqueueForRejit(NativeInterface.EnqueueForRejit)); - SetDelegateInfo(new NativeInterfaceGetCntfrqEl0(NativeInterface.GetCntfrqEl0)); - SetDelegateInfo(new NativeInterfaceGetCntpctEl0(NativeInterface.GetCntpctEl0)); - SetDelegateInfo(new NativeInterfaceGetCntvctEl0(NativeInterface.GetCntvctEl0)); - SetDelegateInfo(new NativeInterfaceGetCtrEl0(NativeInterface.GetCtrEl0)); - SetDelegateInfo(new NativeInterfaceGetDczidEl0(NativeInterface.GetDczidEl0)); - SetDelegateInfo(new NativeInterfaceGetFunctionAddress(NativeInterface.GetFunctionAddress)); - SetDelegateInfo(new NativeInterfaceInvalidateCacheLine(NativeInterface.InvalidateCacheLine)); - SetDelegateInfo(new NativeInterfaceReadByte(NativeInterface.ReadByte)); - SetDelegateInfo(new NativeInterfaceReadUInt16(NativeInterface.ReadUInt16)); - SetDelegateInfo(new NativeInterfaceReadUInt32(NativeInterface.ReadUInt32)); - SetDelegateInfo(new NativeInterfaceReadUInt64(NativeInterface.ReadUInt64)); - SetDelegateInfo(new NativeInterfaceReadVector128(NativeInterface.ReadVector128)); - SetDelegateInfo(new NativeInterfaceSignalMemoryTracking(NativeInterface.SignalMemoryTracking)); - SetDelegateInfo(new NativeInterfaceSupervisorCall(NativeInterface.SupervisorCall)); - SetDelegateInfo(new NativeInterfaceThrowInvalidMemoryAccess(NativeInterface.ThrowInvalidMemoryAccess)); - SetDelegateInfo(new NativeInterfaceUndefined(NativeInterface.Undefined)); - SetDelegateInfo(new NativeInterfaceWriteByte(NativeInterface.WriteByte)); - SetDelegateInfo(new NativeInterfaceWriteUInt16(NativeInterface.WriteUInt16)); - SetDelegateInfo(new NativeInterfaceWriteUInt32(NativeInterface.WriteUInt32)); - SetDelegateInfo(new NativeInterfaceWriteUInt64(NativeInterface.WriteUInt64)); - SetDelegateInfo(new NativeInterfaceWriteVector128(NativeInterface.WriteVector128)); + var dlgNativeInterfaceBreak = new NativeInterfaceBreak(NativeInterface.Break); + var dlgNativeInterfaceCheckSynchronization = new NativeInterfaceCheckSynchronization(NativeInterface.CheckSynchronization); + var dlgNativeInterfaceEnqueueForRejit = new NativeInterfaceEnqueueForRejit(NativeInterface.EnqueueForRejit); + var dlgNativeInterfaceGetCntfrqEl0 = new NativeInterfaceGetCntfrqEl0(NativeInterface.GetCntfrqEl0); + var dlgNativeInterfaceGetCntpctEl0 = new NativeInterfaceGetCntpctEl0(NativeInterface.GetCntpctEl0); + var dlgNativeInterfaceGetCntvctEl0 = new NativeInterfaceGetCntvctEl0(NativeInterface.GetCntvctEl0); + var dlgNativeInterfaceGetCtrEl0 = new NativeInterfaceGetCtrEl0(NativeInterface.GetCtrEl0); + var dlgNativeInterfaceGetDczidEl0 = new NativeInterfaceGetDczidEl0(NativeInterface.GetDczidEl0); + var dlgNativeInterfaceGetFunctionAddress = new NativeInterfaceGetFunctionAddress(NativeInterface.GetFunctionAddress); + var dlgNativeInterfaceInvalidateCacheLine = new NativeInterfaceInvalidateCacheLine(NativeInterface.InvalidateCacheLine); + var dlgNativeInterfaceReadByte = new NativeInterfaceReadByte(NativeInterface.ReadByte); + var dlgNativeInterfaceReadUInt16 = new NativeInterfaceReadUInt16(NativeInterface.ReadUInt16); + var dlgNativeInterfaceReadUInt32 = new NativeInterfaceReadUInt32(NativeInterface.ReadUInt32); + var dlgNativeInterfaceReadUInt64 = new NativeInterfaceReadUInt64(NativeInterface.ReadUInt64); + var dlgNativeInterfaceReadVector128 = new NativeInterfaceReadVector128(NativeInterface.ReadVector128); + var dlgNativeInterfaceSignalMemoryTracking = new NativeInterfaceSignalMemoryTracking(NativeInterface.SignalMemoryTracking); + var dlgNativeInterfaceSupervisorCall = new NativeInterfaceSupervisorCall(NativeInterface.SupervisorCall); + var dlgNativeInterfaceThrowInvalidMemoryAccess = new NativeInterfaceThrowInvalidMemoryAccess(NativeInterface.ThrowInvalidMemoryAccess); + var dlgNativeInterfaceUndefined = new NativeInterfaceUndefined(NativeInterface.Undefined); + var dlgNativeInterfaceWriteByte = new NativeInterfaceWriteByte(NativeInterface.WriteByte); + var dlgNativeInterfaceWriteUInt16 = new NativeInterfaceWriteUInt16(NativeInterface.WriteUInt16); + var dlgNativeInterfaceWriteUInt32 = new NativeInterfaceWriteUInt32(NativeInterface.WriteUInt32); + var dlgNativeInterfaceWriteUInt64 = new NativeInterfaceWriteUInt64(NativeInterface.WriteUInt64); + var dlgNativeInterfaceWriteVector128 = new NativeInterfaceWriteVector128(NativeInterface.WriteVector128); - SetDelegateInfo(new SoftFallbackCountLeadingSigns(SoftFallback.CountLeadingSigns)); - SetDelegateInfo(new SoftFallbackCountLeadingZeros(SoftFallback.CountLeadingZeros)); - SetDelegateInfo(new SoftFallbackCrc32b(SoftFallback.Crc32b)); - SetDelegateInfo(new SoftFallbackCrc32cb(SoftFallback.Crc32cb)); - SetDelegateInfo(new SoftFallbackCrc32ch(SoftFallback.Crc32ch)); - SetDelegateInfo(new SoftFallbackCrc32cw(SoftFallback.Crc32cw)); - SetDelegateInfo(new SoftFallbackCrc32cx(SoftFallback.Crc32cx)); - SetDelegateInfo(new SoftFallbackCrc32h(SoftFallback.Crc32h)); - SetDelegateInfo(new SoftFallbackCrc32w(SoftFallback.Crc32w)); - SetDelegateInfo(new SoftFallbackCrc32x(SoftFallback.Crc32x)); - SetDelegateInfo(new SoftFallbackDecrypt(SoftFallback.Decrypt)); - SetDelegateInfo(new SoftFallbackEncrypt(SoftFallback.Encrypt)); - SetDelegateInfo(new SoftFallbackFixedRotate(SoftFallback.FixedRotate)); - SetDelegateInfo(new SoftFallbackHashChoose(SoftFallback.HashChoose)); - SetDelegateInfo(new SoftFallbackHashLower(SoftFallback.HashLower)); - SetDelegateInfo(new SoftFallbackHashMajority(SoftFallback.HashMajority)); - SetDelegateInfo(new SoftFallbackHashParity(SoftFallback.HashParity)); - SetDelegateInfo(new SoftFallbackHashUpper(SoftFallback.HashUpper)); - SetDelegateInfo(new SoftFallbackInverseMixColumns(SoftFallback.InverseMixColumns)); - SetDelegateInfo(new SoftFallbackMixColumns(SoftFallback.MixColumns)); - SetDelegateInfo(new SoftFallbackPolynomialMult64_128(SoftFallback.PolynomialMult64_128)); - SetDelegateInfo(new SoftFallbackSatF32ToS32(SoftFallback.SatF32ToS32)); - SetDelegateInfo(new SoftFallbackSatF32ToS64(SoftFallback.SatF32ToS64)); - SetDelegateInfo(new SoftFallbackSatF32ToU32(SoftFallback.SatF32ToU32)); - SetDelegateInfo(new SoftFallbackSatF32ToU64(SoftFallback.SatF32ToU64)); - SetDelegateInfo(new SoftFallbackSatF64ToS32(SoftFallback.SatF64ToS32)); - SetDelegateInfo(new SoftFallbackSatF64ToS64(SoftFallback.SatF64ToS64)); - SetDelegateInfo(new SoftFallbackSatF64ToU32(SoftFallback.SatF64ToU32)); - SetDelegateInfo(new SoftFallbackSatF64ToU64(SoftFallback.SatF64ToU64)); - SetDelegateInfo(new SoftFallbackSha1SchedulePart1(SoftFallback.Sha1SchedulePart1)); - SetDelegateInfo(new SoftFallbackSha1SchedulePart2(SoftFallback.Sha1SchedulePart2)); - SetDelegateInfo(new SoftFallbackSha256SchedulePart1(SoftFallback.Sha256SchedulePart1)); - SetDelegateInfo(new SoftFallbackSha256SchedulePart2(SoftFallback.Sha256SchedulePart2)); - SetDelegateInfo(new SoftFallbackSignedShrImm64(SoftFallback.SignedShrImm64)); - SetDelegateInfo(new SoftFallbackTbl1(SoftFallback.Tbl1)); - SetDelegateInfo(new SoftFallbackTbl2(SoftFallback.Tbl2)); - SetDelegateInfo(new SoftFallbackTbl3(SoftFallback.Tbl3)); - SetDelegateInfo(new SoftFallbackTbl4(SoftFallback.Tbl4)); - SetDelegateInfo(new SoftFallbackTbx1(SoftFallback.Tbx1)); - SetDelegateInfo(new SoftFallbackTbx2(SoftFallback.Tbx2)); - SetDelegateInfo(new SoftFallbackTbx3(SoftFallback.Tbx3)); - SetDelegateInfo(new SoftFallbackTbx4(SoftFallback.Tbx4)); - SetDelegateInfo(new SoftFallbackUnsignedShrImm64(SoftFallback.UnsignedShrImm64)); + var dlgSoftFallbackCountLeadingSigns = new SoftFallbackCountLeadingSigns(SoftFallback.CountLeadingSigns); + var dlgSoftFallbackCountLeadingZeros = new SoftFallbackCountLeadingZeros(SoftFallback.CountLeadingZeros); + var dlgSoftFallbackCrc32b = new SoftFallbackCrc32b(SoftFallback.Crc32b); + var dlgSoftFallbackCrc32cb = new SoftFallbackCrc32cb(SoftFallback.Crc32cb); + var dlgSoftFallbackCrc32ch = new SoftFallbackCrc32ch(SoftFallback.Crc32ch); + var dlgSoftFallbackCrc32cw = new SoftFallbackCrc32cw(SoftFallback.Crc32cw); + var dlgSoftFallbackCrc32cx = new SoftFallbackCrc32cx(SoftFallback.Crc32cx); + var dlgSoftFallbackCrc32h = new SoftFallbackCrc32h(SoftFallback.Crc32h); + var dlgSoftFallbackCrc32w = new SoftFallbackCrc32w(SoftFallback.Crc32w); + var dlgSoftFallbackCrc32x = new SoftFallbackCrc32x(SoftFallback.Crc32x); + var dlgSoftFallbackDecrypt = new SoftFallbackDecrypt(SoftFallback.Decrypt); + var dlgSoftFallbackEncrypt = new SoftFallbackEncrypt(SoftFallback.Encrypt); + var dlgSoftFallbackFixedRotate = new SoftFallbackFixedRotate(SoftFallback.FixedRotate); + var dlgSoftFallbackHashChoose = new SoftFallbackHashChoose(SoftFallback.HashChoose); + var dlgSoftFallbackHashLower = new SoftFallbackHashLower(SoftFallback.HashLower); + var dlgSoftFallbackHashMajority = new SoftFallbackHashMajority(SoftFallback.HashMajority); + var dlgSoftFallbackHashParity = new SoftFallbackHashParity(SoftFallback.HashParity); + var dlgSoftFallbackHashUpper = new SoftFallbackHashUpper(SoftFallback.HashUpper); + var dlgSoftFallbackInverseMixColumns = new SoftFallbackInverseMixColumns(SoftFallback.InverseMixColumns); + var dlgSoftFallbackMixColumns = new SoftFallbackMixColumns(SoftFallback.MixColumns); + var dlgSoftFallbackPolynomialMult64_128 = new SoftFallbackPolynomialMult64_128(SoftFallback.PolynomialMult64_128); + var dlgSoftFallbackSatF32ToS32 = new SoftFallbackSatF32ToS32(SoftFallback.SatF32ToS32); + var dlgSoftFallbackSatF32ToS64 = new SoftFallbackSatF32ToS64(SoftFallback.SatF32ToS64); + var dlgSoftFallbackSatF32ToU32 = new SoftFallbackSatF32ToU32(SoftFallback.SatF32ToU32); + var dlgSoftFallbackSatF32ToU64 = new SoftFallbackSatF32ToU64(SoftFallback.SatF32ToU64); + var dlgSoftFallbackSatF64ToS32 = new SoftFallbackSatF64ToS32(SoftFallback.SatF64ToS32); + var dlgSoftFallbackSatF64ToS64 = new SoftFallbackSatF64ToS64(SoftFallback.SatF64ToS64); + var dlgSoftFallbackSatF64ToU32 = new SoftFallbackSatF64ToU32(SoftFallback.SatF64ToU32); + var dlgSoftFallbackSatF64ToU64 = new SoftFallbackSatF64ToU64(SoftFallback.SatF64ToU64); + var dlgSoftFallbackSha1SchedulePart1 = new SoftFallbackSha1SchedulePart1(SoftFallback.Sha1SchedulePart1); + var dlgSoftFallbackSha1SchedulePart2 = new SoftFallbackSha1SchedulePart2(SoftFallback.Sha1SchedulePart2); + var dlgSoftFallbackSha256SchedulePart1 = new SoftFallbackSha256SchedulePart1(SoftFallback.Sha256SchedulePart1); + var dlgSoftFallbackSha256SchedulePart2 = new SoftFallbackSha256SchedulePart2(SoftFallback.Sha256SchedulePart2); + var dlgSoftFallbackSignedShrImm64 = new SoftFallbackSignedShrImm64(SoftFallback.SignedShrImm64); + var dlgSoftFallbackTbl1 = new SoftFallbackTbl1(SoftFallback.Tbl1); + var dlgSoftFallbackTbl2 = new SoftFallbackTbl2(SoftFallback.Tbl2); + var dlgSoftFallbackTbl3 = new SoftFallbackTbl3(SoftFallback.Tbl3); + var dlgSoftFallbackTbl4 = new SoftFallbackTbl4(SoftFallback.Tbl4); + var dlgSoftFallbackTbx1 = new SoftFallbackTbx1(SoftFallback.Tbx1); + var dlgSoftFallbackTbx2 = new SoftFallbackTbx2(SoftFallback.Tbx2); + var dlgSoftFallbackTbx3 = new SoftFallbackTbx3(SoftFallback.Tbx3); + var dlgSoftFallbackTbx4 = new SoftFallbackTbx4(SoftFallback.Tbx4); + var dlgSoftFallbackUnsignedShrImm64 = new SoftFallbackUnsignedShrImm64(SoftFallback.UnsignedShrImm64); - SetDelegateInfo(new SoftFloat16_32FPConvert(SoftFloat16_32.FPConvert)); - SetDelegateInfo(new SoftFloat16_64FPConvert(SoftFloat16_64.FPConvert)); + var dlgSoftFloat16_32FPConvert = new SoftFloat16_32FPConvert(SoftFloat16_32.FPConvert); + var dlgSoftFloat16_64FPConvert = new SoftFloat16_64FPConvert(SoftFloat16_64.FPConvert); - SetDelegateInfo(new SoftFloat32FPAdd(SoftFloat32.FPAdd)); - SetDelegateInfo(new SoftFloat32FPAddFpscr(SoftFloat32.FPAddFpscr)); // A32 only. - SetDelegateInfo(new SoftFloat32FPCompare(SoftFloat32.FPCompare)); - SetDelegateInfo(new SoftFloat32FPCompareEQ(SoftFloat32.FPCompareEQ)); - SetDelegateInfo(new SoftFloat32FPCompareEQFpscr(SoftFloat32.FPCompareEQFpscr)); // A32 only. - SetDelegateInfo(new SoftFloat32FPCompareGE(SoftFloat32.FPCompareGE)); - SetDelegateInfo(new SoftFloat32FPCompareGEFpscr(SoftFloat32.FPCompareGEFpscr)); // A32 only. - SetDelegateInfo(new SoftFloat32FPCompareGT(SoftFloat32.FPCompareGT)); - SetDelegateInfo(new SoftFloat32FPCompareGTFpscr(SoftFloat32.FPCompareGTFpscr)); // A32 only. - SetDelegateInfo(new SoftFloat32FPCompareLE(SoftFloat32.FPCompareLE)); - SetDelegateInfo(new SoftFloat32FPCompareLEFpscr(SoftFloat32.FPCompareLEFpscr)); // A32 only. - SetDelegateInfo(new SoftFloat32FPCompareLT(SoftFloat32.FPCompareLT)); - SetDelegateInfo(new SoftFloat32FPCompareLTFpscr(SoftFloat32.FPCompareLTFpscr)); // A32 only. - SetDelegateInfo(new SoftFloat32FPDiv(SoftFloat32.FPDiv)); - SetDelegateInfo(new SoftFloat32FPMax(SoftFloat32.FPMax)); - SetDelegateInfo(new SoftFloat32FPMaxFpscr(SoftFloat32.FPMaxFpscr)); // A32 only. - SetDelegateInfo(new SoftFloat32FPMaxNum(SoftFloat32.FPMaxNum)); - SetDelegateInfo(new SoftFloat32FPMaxNumFpscr(SoftFloat32.FPMaxNumFpscr)); // A32 only. - SetDelegateInfo(new SoftFloat32FPMin(SoftFloat32.FPMin)); - SetDelegateInfo(new SoftFloat32FPMinFpscr(SoftFloat32.FPMinFpscr)); // A32 only. - SetDelegateInfo(new SoftFloat32FPMinNum(SoftFloat32.FPMinNum)); - SetDelegateInfo(new SoftFloat32FPMinNumFpscr(SoftFloat32.FPMinNumFpscr)); // A32 only. - SetDelegateInfo(new SoftFloat32FPMul(SoftFloat32.FPMul)); - SetDelegateInfo(new SoftFloat32FPMulFpscr(SoftFloat32.FPMulFpscr)); // A32 only. - SetDelegateInfo(new SoftFloat32FPMulAdd(SoftFloat32.FPMulAdd)); - SetDelegateInfo(new SoftFloat32FPMulAddFpscr(SoftFloat32.FPMulAddFpscr)); // A32 only. - SetDelegateInfo(new SoftFloat32FPMulSub(SoftFloat32.FPMulSub)); - SetDelegateInfo(new SoftFloat32FPMulSubFpscr(SoftFloat32.FPMulSubFpscr)); // A32 only. - SetDelegateInfo(new SoftFloat32FPMulX(SoftFloat32.FPMulX)); - SetDelegateInfo(new SoftFloat32FPNegMulAdd(SoftFloat32.FPNegMulAdd)); - SetDelegateInfo(new SoftFloat32FPNegMulSub(SoftFloat32.FPNegMulSub)); - SetDelegateInfo(new SoftFloat32FPRecipEstimate(SoftFloat32.FPRecipEstimate)); - SetDelegateInfo(new SoftFloat32FPRecipEstimateFpscr(SoftFloat32.FPRecipEstimateFpscr)); // A32 only. - SetDelegateInfo(new SoftFloat32FPRecipStep(SoftFloat32.FPRecipStep)); // A32 only. - SetDelegateInfo(new SoftFloat32FPRecipStepFused(SoftFloat32.FPRecipStepFused)); - SetDelegateInfo(new SoftFloat32FPRecpX(SoftFloat32.FPRecpX)); - SetDelegateInfo(new SoftFloat32FPRSqrtEstimate(SoftFloat32.FPRSqrtEstimate)); - SetDelegateInfo(new SoftFloat32FPRSqrtEstimateFpscr(SoftFloat32.FPRSqrtEstimateFpscr)); // A32 only. - SetDelegateInfo(new SoftFloat32FPRSqrtStep(SoftFloat32.FPRSqrtStep)); // A32 only. - SetDelegateInfo(new SoftFloat32FPRSqrtStepFused(SoftFloat32.FPRSqrtStepFused)); - SetDelegateInfo(new SoftFloat32FPSqrt(SoftFloat32.FPSqrt)); - SetDelegateInfo(new SoftFloat32FPSub(SoftFloat32.FPSub)); + var dlgSoftFloat32FPAdd = new SoftFloat32FPAdd(SoftFloat32.FPAdd); + var dlgSoftFloat32FPAddFpscr = new SoftFloat32FPAddFpscr(SoftFloat32.FPAddFpscr); // A32 only. + var dlgSoftFloat32FPCompare = new SoftFloat32FPCompare(SoftFloat32.FPCompare); + var dlgSoftFloat32FPCompareEQ = new SoftFloat32FPCompareEQ(SoftFloat32.FPCompareEQ); + var dlgSoftFloat32FPCompareEQFpscr = new SoftFloat32FPCompareEQFpscr(SoftFloat32.FPCompareEQFpscr); // A32 only. + var dlgSoftFloat32FPCompareGE = new SoftFloat32FPCompareGE(SoftFloat32.FPCompareGE); + var dlgSoftFloat32FPCompareGEFpscr = new SoftFloat32FPCompareGEFpscr(SoftFloat32.FPCompareGEFpscr); // A32 only. + var dlgSoftFloat32FPCompareGT = new SoftFloat32FPCompareGT(SoftFloat32.FPCompareGT); + var dlgSoftFloat32FPCompareGTFpscr = new SoftFloat32FPCompareGTFpscr(SoftFloat32.FPCompareGTFpscr); // A32 only. + var dlgSoftFloat32FPCompareLE = new SoftFloat32FPCompareLE(SoftFloat32.FPCompareLE); + var dlgSoftFloat32FPCompareLEFpscr = new SoftFloat32FPCompareLEFpscr(SoftFloat32.FPCompareLEFpscr); // A32 only. + var dlgSoftFloat32FPCompareLT = new SoftFloat32FPCompareLT(SoftFloat32.FPCompareLT); + var dlgSoftFloat32FPCompareLTFpscr = new SoftFloat32FPCompareLTFpscr(SoftFloat32.FPCompareLTFpscr); // A32 only. + var dlgSoftFloat32FPDiv = new SoftFloat32FPDiv(SoftFloat32.FPDiv); + var dlgSoftFloat32FPMax = new SoftFloat32FPMax(SoftFloat32.FPMax); + var dlgSoftFloat32FPMaxFpscr = new SoftFloat32FPMaxFpscr(SoftFloat32.FPMaxFpscr); // A32 only. + var dlgSoftFloat32FPMaxNum = new SoftFloat32FPMaxNum(SoftFloat32.FPMaxNum); + var dlgSoftFloat32FPMaxNumFpscr = new SoftFloat32FPMaxNumFpscr(SoftFloat32.FPMaxNumFpscr); // A32 only. + var dlgSoftFloat32FPMin = new SoftFloat32FPMin(SoftFloat32.FPMin); + var dlgSoftFloat32FPMinFpscr = new SoftFloat32FPMinFpscr(SoftFloat32.FPMinFpscr); // A32 only. + var dlgSoftFloat32FPMinNum = new SoftFloat32FPMinNum(SoftFloat32.FPMinNum); + var dlgSoftFloat32FPMinNumFpscr = new SoftFloat32FPMinNumFpscr(SoftFloat32.FPMinNumFpscr); // A32 only. + var dlgSoftFloat32FPMul = new SoftFloat32FPMul(SoftFloat32.FPMul); + var dlgSoftFloat32FPMulFpscr = new SoftFloat32FPMulFpscr(SoftFloat32.FPMulFpscr); // A32 only. + var dlgSoftFloat32FPMulAdd = new SoftFloat32FPMulAdd(SoftFloat32.FPMulAdd); + var dlgSoftFloat32FPMulAddFpscr = new SoftFloat32FPMulAddFpscr(SoftFloat32.FPMulAddFpscr); // A32 only. + var dlgSoftFloat32FPMulSub = new SoftFloat32FPMulSub(SoftFloat32.FPMulSub); + var dlgSoftFloat32FPMulSubFpscr = new SoftFloat32FPMulSubFpscr(SoftFloat32.FPMulSubFpscr); // A32 only. + var dlgSoftFloat32FPMulX = new SoftFloat32FPMulX(SoftFloat32.FPMulX); + var dlgSoftFloat32FPNegMulAdd = new SoftFloat32FPNegMulAdd(SoftFloat32.FPNegMulAdd); + var dlgSoftFloat32FPNegMulSub = new SoftFloat32FPNegMulSub(SoftFloat32.FPNegMulSub); + var dlgSoftFloat32FPRecipEstimate = new SoftFloat32FPRecipEstimate(SoftFloat32.FPRecipEstimate); + var dlgSoftFloat32FPRecipEstimateFpscr = new SoftFloat32FPRecipEstimateFpscr(SoftFloat32.FPRecipEstimateFpscr); // A32 only. + var dlgSoftFloat32FPRecipStep = new SoftFloat32FPRecipStep(SoftFloat32.FPRecipStep); // A32 only. + var dlgSoftFloat32FPRecipStepFused = new SoftFloat32FPRecipStepFused(SoftFloat32.FPRecipStepFused); + var dlgSoftFloat32FPRecpX = new SoftFloat32FPRecpX(SoftFloat32.FPRecpX); + var dlgSoftFloat32FPRSqrtEstimate = new SoftFloat32FPRSqrtEstimate(SoftFloat32.FPRSqrtEstimate); + var dlgSoftFloat32FPRSqrtEstimateFpscr = new SoftFloat32FPRSqrtEstimateFpscr(SoftFloat32.FPRSqrtEstimateFpscr); // A32 only. + var dlgSoftFloat32FPRSqrtStep = new SoftFloat32FPRSqrtStep(SoftFloat32.FPRSqrtStep); // A32 only. + var dlgSoftFloat32FPRSqrtStepFused = new SoftFloat32FPRSqrtStepFused(SoftFloat32.FPRSqrtStepFused); + var dlgSoftFloat32FPSqrt = new SoftFloat32FPSqrt(SoftFloat32.FPSqrt); + var dlgSoftFloat32FPSub = new SoftFloat32FPSub(SoftFloat32.FPSub); - SetDelegateInfo(new SoftFloat32_16FPConvert(SoftFloat32_16.FPConvert)); + var dlgSoftFloat32_16FPConvert = new SoftFloat32_16FPConvert(SoftFloat32_16.FPConvert); - SetDelegateInfo(new SoftFloat64FPAdd(SoftFloat64.FPAdd)); - SetDelegateInfo(new SoftFloat64FPAddFpscr(SoftFloat64.FPAddFpscr)); // A32 only. - SetDelegateInfo(new SoftFloat64FPCompare(SoftFloat64.FPCompare)); - SetDelegateInfo(new SoftFloat64FPCompareEQ(SoftFloat64.FPCompareEQ)); - SetDelegateInfo(new SoftFloat64FPCompareEQFpscr(SoftFloat64.FPCompareEQFpscr)); // A32 only. - SetDelegateInfo(new SoftFloat64FPCompareGE(SoftFloat64.FPCompareGE)); - SetDelegateInfo(new SoftFloat64FPCompareGEFpscr(SoftFloat64.FPCompareGEFpscr)); // A32 only. - SetDelegateInfo(new SoftFloat64FPCompareGT(SoftFloat64.FPCompareGT)); - SetDelegateInfo(new SoftFloat64FPCompareGTFpscr(SoftFloat64.FPCompareGTFpscr)); // A32 only. - SetDelegateInfo(new SoftFloat64FPCompareLE(SoftFloat64.FPCompareLE)); - SetDelegateInfo(new SoftFloat64FPCompareLEFpscr(SoftFloat64.FPCompareLEFpscr)); // A32 only. - SetDelegateInfo(new SoftFloat64FPCompareLT(SoftFloat64.FPCompareLT)); - SetDelegateInfo(new SoftFloat64FPCompareLTFpscr(SoftFloat64.FPCompareLTFpscr)); // A32 only. - SetDelegateInfo(new SoftFloat64FPDiv(SoftFloat64.FPDiv)); - SetDelegateInfo(new SoftFloat64FPMax(SoftFloat64.FPMax)); - SetDelegateInfo(new SoftFloat64FPMaxFpscr(SoftFloat64.FPMaxFpscr)); // A32 only. - SetDelegateInfo(new SoftFloat64FPMaxNum(SoftFloat64.FPMaxNum)); - SetDelegateInfo(new SoftFloat64FPMaxNumFpscr(SoftFloat64.FPMaxNumFpscr)); // A32 only. - SetDelegateInfo(new SoftFloat64FPMin(SoftFloat64.FPMin)); - SetDelegateInfo(new SoftFloat64FPMinFpscr(SoftFloat64.FPMinFpscr)); // A32 only. - SetDelegateInfo(new SoftFloat64FPMinNum(SoftFloat64.FPMinNum)); - SetDelegateInfo(new SoftFloat64FPMinNumFpscr(SoftFloat64.FPMinNumFpscr)); // A32 only. - SetDelegateInfo(new SoftFloat64FPMul(SoftFloat64.FPMul)); - SetDelegateInfo(new SoftFloat64FPMulFpscr(SoftFloat64.FPMulFpscr)); // A32 only. - SetDelegateInfo(new SoftFloat64FPMulAdd(SoftFloat64.FPMulAdd)); - SetDelegateInfo(new SoftFloat64FPMulAddFpscr(SoftFloat64.FPMulAddFpscr)); // A32 only. - SetDelegateInfo(new SoftFloat64FPMulSub(SoftFloat64.FPMulSub)); - SetDelegateInfo(new SoftFloat64FPMulSubFpscr(SoftFloat64.FPMulSubFpscr)); // A32 only. - SetDelegateInfo(new SoftFloat64FPMulX(SoftFloat64.FPMulX)); - SetDelegateInfo(new SoftFloat64FPNegMulAdd(SoftFloat64.FPNegMulAdd)); - SetDelegateInfo(new SoftFloat64FPNegMulSub(SoftFloat64.FPNegMulSub)); - SetDelegateInfo(new SoftFloat64FPRecipEstimate(SoftFloat64.FPRecipEstimate)); - SetDelegateInfo(new SoftFloat64FPRecipEstimateFpscr(SoftFloat64.FPRecipEstimateFpscr)); // A32 only. - SetDelegateInfo(new SoftFloat64FPRecipStep(SoftFloat64.FPRecipStep)); // A32 only. - SetDelegateInfo(new SoftFloat64FPRecipStepFused(SoftFloat64.FPRecipStepFused)); - SetDelegateInfo(new SoftFloat64FPRecpX(SoftFloat64.FPRecpX)); - SetDelegateInfo(new SoftFloat64FPRSqrtEstimate(SoftFloat64.FPRSqrtEstimate)); - SetDelegateInfo(new SoftFloat64FPRSqrtEstimateFpscr(SoftFloat64.FPRSqrtEstimateFpscr)); // A32 only. - SetDelegateInfo(new SoftFloat64FPRSqrtStep(SoftFloat64.FPRSqrtStep)); // A32 only. - SetDelegateInfo(new SoftFloat64FPRSqrtStepFused(SoftFloat64.FPRSqrtStepFused)); - SetDelegateInfo(new SoftFloat64FPSqrt(SoftFloat64.FPSqrt)); - SetDelegateInfo(new SoftFloat64FPSub(SoftFloat64.FPSub)); + var dlgSoftFloat64FPAdd = new SoftFloat64FPAdd(SoftFloat64.FPAdd); + var dlgSoftFloat64FPAddFpscr = new SoftFloat64FPAddFpscr(SoftFloat64.FPAddFpscr); // A32 only. + var dlgSoftFloat64FPCompare = new SoftFloat64FPCompare(SoftFloat64.FPCompare); + var dlgSoftFloat64FPCompareEQ = new SoftFloat64FPCompareEQ(SoftFloat64.FPCompareEQ); + var dlgSoftFloat64FPCompareEQFpscr = new SoftFloat64FPCompareEQFpscr(SoftFloat64.FPCompareEQFpscr); // A32 only. + var dlgSoftFloat64FPCompareGE = new SoftFloat64FPCompareGE(SoftFloat64.FPCompareGE); + var dlgSoftFloat64FPCompareGEFpscr = new SoftFloat64FPCompareGEFpscr(SoftFloat64.FPCompareGEFpscr); // A32 only. + var dlgSoftFloat64FPCompareGT = new SoftFloat64FPCompareGT(SoftFloat64.FPCompareGT); + var dlgSoftFloat64FPCompareGTFpscr = new SoftFloat64FPCompareGTFpscr(SoftFloat64.FPCompareGTFpscr); // A32 only. + var dlgSoftFloat64FPCompareLE = new SoftFloat64FPCompareLE(SoftFloat64.FPCompareLE); + var dlgSoftFloat64FPCompareLEFpscr = new SoftFloat64FPCompareLEFpscr(SoftFloat64.FPCompareLEFpscr); // A32 only. + var dlgSoftFloat64FPCompareLT = new SoftFloat64FPCompareLT(SoftFloat64.FPCompareLT); + var dlgSoftFloat64FPCompareLTFpscr = new SoftFloat64FPCompareLTFpscr(SoftFloat64.FPCompareLTFpscr); // A32 only. + var dlgSoftFloat64FPDiv = new SoftFloat64FPDiv(SoftFloat64.FPDiv); + var dlgSoftFloat64FPMax = new SoftFloat64FPMax(SoftFloat64.FPMax); + var dlgSoftFloat64FPMaxFpscr = new SoftFloat64FPMaxFpscr(SoftFloat64.FPMaxFpscr); // A32 only. + var dlgSoftFloat64FPMaxNum = new SoftFloat64FPMaxNum(SoftFloat64.FPMaxNum); + var dlgSoftFloat64FPMaxNumFpscr = new SoftFloat64FPMaxNumFpscr(SoftFloat64.FPMaxNumFpscr); // A32 only. + var dlgSoftFloat64FPMin = new SoftFloat64FPMin(SoftFloat64.FPMin); + var dlgSoftFloat64FPMinFpscr = new SoftFloat64FPMinFpscr(SoftFloat64.FPMinFpscr); // A32 only. + var dlgSoftFloat64FPMinNum = new SoftFloat64FPMinNum(SoftFloat64.FPMinNum); + var dlgSoftFloat64FPMinNumFpscr = new SoftFloat64FPMinNumFpscr(SoftFloat64.FPMinNumFpscr); // A32 only. + var dlgSoftFloat64FPMul = new SoftFloat64FPMul(SoftFloat64.FPMul); + var dlgSoftFloat64FPMulFpscr = new SoftFloat64FPMulFpscr(SoftFloat64.FPMulFpscr); // A32 only. + var dlgSoftFloat64FPMulAdd = new SoftFloat64FPMulAdd(SoftFloat64.FPMulAdd); + var dlgSoftFloat64FPMulAddFpscr = new SoftFloat64FPMulAddFpscr(SoftFloat64.FPMulAddFpscr); // A32 only. + var dlgSoftFloat64FPMulSub = new SoftFloat64FPMulSub(SoftFloat64.FPMulSub); + var dlgSoftFloat64FPMulSubFpscr = new SoftFloat64FPMulSubFpscr(SoftFloat64.FPMulSubFpscr); // A32 only. + var dlgSoftFloat64FPMulX = new SoftFloat64FPMulX(SoftFloat64.FPMulX); + var dlgSoftFloat64FPNegMulAdd = new SoftFloat64FPNegMulAdd(SoftFloat64.FPNegMulAdd); + var dlgSoftFloat64FPNegMulSub = new SoftFloat64FPNegMulSub(SoftFloat64.FPNegMulSub); + var dlgSoftFloat64FPRecipEstimate = new SoftFloat64FPRecipEstimate(SoftFloat64.FPRecipEstimate); + var dlgSoftFloat64FPRecipEstimateFpscr = new SoftFloat64FPRecipEstimateFpscr(SoftFloat64.FPRecipEstimateFpscr); // A32 only. + var dlgSoftFloat64FPRecipStep = new SoftFloat64FPRecipStep(SoftFloat64.FPRecipStep); // A32 only. + var dlgSoftFloat64FPRecipStepFused = new SoftFloat64FPRecipStepFused(SoftFloat64.FPRecipStepFused); + var dlgSoftFloat64FPRecpX = new SoftFloat64FPRecpX(SoftFloat64.FPRecpX); + var dlgSoftFloat64FPRSqrtEstimate = new SoftFloat64FPRSqrtEstimate(SoftFloat64.FPRSqrtEstimate); + var dlgSoftFloat64FPRSqrtEstimateFpscr = new SoftFloat64FPRSqrtEstimateFpscr(SoftFloat64.FPRSqrtEstimateFpscr); // A32 only. + var dlgSoftFloat64FPRSqrtStep = new SoftFloat64FPRSqrtStep(SoftFloat64.FPRSqrtStep); // A32 only. + var dlgSoftFloat64FPRSqrtStepFused = new SoftFloat64FPRSqrtStepFused(SoftFloat64.FPRSqrtStepFused); + var dlgSoftFloat64FPSqrt = new SoftFloat64FPSqrt(SoftFloat64.FPSqrt); + var dlgSoftFloat64FPSub = new SoftFloat64FPSub(SoftFloat64.FPSub); - SetDelegateInfo(new SoftFloat64_16FPConvert(SoftFloat64_16.FPConvert)); + var dlgSoftFloat64_16FPConvert = new SoftFloat64_16FPConvert(SoftFloat64_16.FPConvert); + + SetDelegateInfo(dlgMathAbs, Marshal.GetFunctionPointerForDelegate(dlgMathAbs)); + SetDelegateInfo(dlgMathCeiling, Marshal.GetFunctionPointerForDelegate(dlgMathCeiling)); + SetDelegateInfo(dlgMathFloor, Marshal.GetFunctionPointerForDelegate(dlgMathFloor)); + SetDelegateInfo(dlgMathRound, Marshal.GetFunctionPointerForDelegate(dlgMathRound)); + SetDelegateInfo(dlgMathTruncate, Marshal.GetFunctionPointerForDelegate(dlgMathTruncate)); + + SetDelegateInfo(dlgMathFAbs, Marshal.GetFunctionPointerForDelegate(dlgMathFAbs)); + SetDelegateInfo(dlgMathFCeiling, Marshal.GetFunctionPointerForDelegate(dlgMathFCeiling)); + SetDelegateInfo(dlgMathFFloor, Marshal.GetFunctionPointerForDelegate(dlgMathFFloor)); + SetDelegateInfo(dlgMathFRound, Marshal.GetFunctionPointerForDelegate(dlgMathFRound)); + SetDelegateInfo(dlgMathFTruncate, Marshal.GetFunctionPointerForDelegate(dlgMathFTruncate)); + + SetDelegateInfo(dlgNativeInterfaceBreak, Marshal.GetFunctionPointerForDelegate(dlgNativeInterfaceBreak)); + SetDelegateInfo(dlgNativeInterfaceCheckSynchronization, Marshal.GetFunctionPointerForDelegate(dlgNativeInterfaceCheckSynchronization)); + SetDelegateInfo(dlgNativeInterfaceEnqueueForRejit, Marshal.GetFunctionPointerForDelegate(dlgNativeInterfaceEnqueueForRejit)); + SetDelegateInfo(dlgNativeInterfaceGetCntfrqEl0, Marshal.GetFunctionPointerForDelegate(dlgNativeInterfaceGetCntfrqEl0)); + SetDelegateInfo(dlgNativeInterfaceGetCntpctEl0, Marshal.GetFunctionPointerForDelegate(dlgNativeInterfaceGetCntpctEl0)); + SetDelegateInfo(dlgNativeInterfaceGetCntvctEl0, Marshal.GetFunctionPointerForDelegate(dlgNativeInterfaceGetCntvctEl0)); + SetDelegateInfo(dlgNativeInterfaceGetCtrEl0, Marshal.GetFunctionPointerForDelegate(dlgNativeInterfaceGetCtrEl0)); + SetDelegateInfo(dlgNativeInterfaceGetDczidEl0, Marshal.GetFunctionPointerForDelegate(dlgNativeInterfaceGetDczidEl0)); + SetDelegateInfo(dlgNativeInterfaceGetFunctionAddress, Marshal.GetFunctionPointerForDelegate(dlgNativeInterfaceGetFunctionAddress)); + SetDelegateInfo(dlgNativeInterfaceInvalidateCacheLine, Marshal.GetFunctionPointerForDelegate(dlgNativeInterfaceInvalidateCacheLine)); + SetDelegateInfo(dlgNativeInterfaceReadByte, Marshal.GetFunctionPointerForDelegate(dlgNativeInterfaceReadByte)); + SetDelegateInfo(dlgNativeInterfaceReadUInt16, Marshal.GetFunctionPointerForDelegate(dlgNativeInterfaceReadUInt16)); + SetDelegateInfo(dlgNativeInterfaceReadUInt32, Marshal.GetFunctionPointerForDelegate(dlgNativeInterfaceReadUInt32)); + SetDelegateInfo(dlgNativeInterfaceReadUInt64, Marshal.GetFunctionPointerForDelegate(dlgNativeInterfaceReadUInt64)); + SetDelegateInfo(dlgNativeInterfaceReadVector128, Marshal.GetFunctionPointerForDelegate(dlgNativeInterfaceReadVector128)); + SetDelegateInfo(dlgNativeInterfaceSignalMemoryTracking, Marshal.GetFunctionPointerForDelegate(dlgNativeInterfaceSignalMemoryTracking)); + SetDelegateInfo(dlgNativeInterfaceSupervisorCall, Marshal.GetFunctionPointerForDelegate(dlgNativeInterfaceSupervisorCall)); + SetDelegateInfo(dlgNativeInterfaceThrowInvalidMemoryAccess, Marshal.GetFunctionPointerForDelegate(dlgNativeInterfaceThrowInvalidMemoryAccess)); + SetDelegateInfo(dlgNativeInterfaceUndefined, Marshal.GetFunctionPointerForDelegate(dlgNativeInterfaceUndefined)); + SetDelegateInfo(dlgNativeInterfaceWriteByte, Marshal.GetFunctionPointerForDelegate(dlgNativeInterfaceWriteByte)); + SetDelegateInfo(dlgNativeInterfaceWriteUInt16, Marshal.GetFunctionPointerForDelegate(dlgNativeInterfaceWriteUInt16)); + SetDelegateInfo(dlgNativeInterfaceWriteUInt32, Marshal.GetFunctionPointerForDelegate(dlgNativeInterfaceWriteUInt32)); + SetDelegateInfo(dlgNativeInterfaceWriteUInt64, Marshal.GetFunctionPointerForDelegate(dlgNativeInterfaceWriteUInt64)); + SetDelegateInfo(dlgNativeInterfaceWriteVector128, Marshal.GetFunctionPointerForDelegate(dlgNativeInterfaceWriteVector128)); + + SetDelegateInfo(dlgSoftFallbackCountLeadingSigns, Marshal.GetFunctionPointerForDelegate(dlgSoftFallbackCountLeadingSigns)); + SetDelegateInfo(dlgSoftFallbackCountLeadingZeros, Marshal.GetFunctionPointerForDelegate(dlgSoftFallbackCountLeadingZeros)); + SetDelegateInfo(dlgSoftFallbackCrc32b, Marshal.GetFunctionPointerForDelegate(dlgSoftFallbackCrc32b)); + SetDelegateInfo(dlgSoftFallbackCrc32cb, Marshal.GetFunctionPointerForDelegate(dlgSoftFallbackCrc32cb)); + SetDelegateInfo(dlgSoftFallbackCrc32ch, Marshal.GetFunctionPointerForDelegate(dlgSoftFallbackCrc32ch)); + SetDelegateInfo(dlgSoftFallbackCrc32cw, Marshal.GetFunctionPointerForDelegate(dlgSoftFallbackCrc32cw)); + SetDelegateInfo(dlgSoftFallbackCrc32cx, Marshal.GetFunctionPointerForDelegate(dlgSoftFallbackCrc32cx)); + SetDelegateInfo(dlgSoftFallbackCrc32h, Marshal.GetFunctionPointerForDelegate(dlgSoftFallbackCrc32h)); + SetDelegateInfo(dlgSoftFallbackCrc32w, Marshal.GetFunctionPointerForDelegate(dlgSoftFallbackCrc32w)); + SetDelegateInfo(dlgSoftFallbackCrc32x, Marshal.GetFunctionPointerForDelegate(dlgSoftFallbackCrc32x)); + SetDelegateInfo(dlgSoftFallbackDecrypt, Marshal.GetFunctionPointerForDelegate(dlgSoftFallbackDecrypt)); + SetDelegateInfo(dlgSoftFallbackEncrypt, Marshal.GetFunctionPointerForDelegate(dlgSoftFallbackEncrypt)); + SetDelegateInfo(dlgSoftFallbackFixedRotate, Marshal.GetFunctionPointerForDelegate(dlgSoftFallbackFixedRotate)); + SetDelegateInfo(dlgSoftFallbackHashChoose, Marshal.GetFunctionPointerForDelegate(dlgSoftFallbackHashChoose)); + SetDelegateInfo(dlgSoftFallbackHashLower, Marshal.GetFunctionPointerForDelegate(dlgSoftFallbackHashLower)); + SetDelegateInfo(dlgSoftFallbackHashMajority, Marshal.GetFunctionPointerForDelegate(dlgSoftFallbackHashMajority)); + SetDelegateInfo(dlgSoftFallbackHashParity, Marshal.GetFunctionPointerForDelegate(dlgSoftFallbackHashParity)); + SetDelegateInfo(dlgSoftFallbackHashUpper, Marshal.GetFunctionPointerForDelegate(dlgSoftFallbackHashUpper)); + SetDelegateInfo(dlgSoftFallbackInverseMixColumns, Marshal.GetFunctionPointerForDelegate(dlgSoftFallbackInverseMixColumns)); + SetDelegateInfo(dlgSoftFallbackMixColumns, Marshal.GetFunctionPointerForDelegate(dlgSoftFallbackMixColumns)); + SetDelegateInfo(dlgSoftFallbackPolynomialMult64_128, Marshal.GetFunctionPointerForDelegate(dlgSoftFallbackPolynomialMult64_128)); + SetDelegateInfo(dlgSoftFallbackSatF32ToS32, Marshal.GetFunctionPointerForDelegate(dlgSoftFallbackSatF32ToS32)); + SetDelegateInfo(dlgSoftFallbackSatF32ToS64, Marshal.GetFunctionPointerForDelegate(dlgSoftFallbackSatF32ToS64)); + SetDelegateInfo(dlgSoftFallbackSatF32ToU32, Marshal.GetFunctionPointerForDelegate(dlgSoftFallbackSatF32ToU32)); + SetDelegateInfo(dlgSoftFallbackSatF32ToU64, Marshal.GetFunctionPointerForDelegate(dlgSoftFallbackSatF32ToU64)); + SetDelegateInfo(dlgSoftFallbackSatF64ToS32, Marshal.GetFunctionPointerForDelegate(dlgSoftFallbackSatF64ToS32)); + SetDelegateInfo(dlgSoftFallbackSatF64ToS64, Marshal.GetFunctionPointerForDelegate(dlgSoftFallbackSatF64ToS64)); + SetDelegateInfo(dlgSoftFallbackSatF64ToU32, Marshal.GetFunctionPointerForDelegate(dlgSoftFallbackSatF64ToU32)); + SetDelegateInfo(dlgSoftFallbackSatF64ToU64, Marshal.GetFunctionPointerForDelegate(dlgSoftFallbackSatF64ToU64)); + SetDelegateInfo(dlgSoftFallbackSha1SchedulePart1, Marshal.GetFunctionPointerForDelegate(dlgSoftFallbackSha1SchedulePart1)); + SetDelegateInfo(dlgSoftFallbackSha1SchedulePart2, Marshal.GetFunctionPointerForDelegate(dlgSoftFallbackSha1SchedulePart2)); + SetDelegateInfo(dlgSoftFallbackSha256SchedulePart1, Marshal.GetFunctionPointerForDelegate(dlgSoftFallbackSha256SchedulePart1)); + SetDelegateInfo(dlgSoftFallbackSha256SchedulePart2, Marshal.GetFunctionPointerForDelegate(dlgSoftFallbackSha256SchedulePart2)); + SetDelegateInfo(dlgSoftFallbackSignedShrImm64, Marshal.GetFunctionPointerForDelegate(dlgSoftFallbackSignedShrImm64)); + SetDelegateInfo(dlgSoftFallbackTbl1, Marshal.GetFunctionPointerForDelegate(dlgSoftFallbackTbl1)); + SetDelegateInfo(dlgSoftFallbackTbl2, Marshal.GetFunctionPointerForDelegate(dlgSoftFallbackTbl2)); + SetDelegateInfo(dlgSoftFallbackTbl3, Marshal.GetFunctionPointerForDelegate(dlgSoftFallbackTbl3)); + SetDelegateInfo(dlgSoftFallbackTbl4, Marshal.GetFunctionPointerForDelegate(dlgSoftFallbackTbl4)); + SetDelegateInfo(dlgSoftFallbackTbx1, Marshal.GetFunctionPointerForDelegate(dlgSoftFallbackTbx1)); + SetDelegateInfo(dlgSoftFallbackTbx2, Marshal.GetFunctionPointerForDelegate(dlgSoftFallbackTbx2)); + SetDelegateInfo(dlgSoftFallbackTbx3, Marshal.GetFunctionPointerForDelegate(dlgSoftFallbackTbx3)); + SetDelegateInfo(dlgSoftFallbackTbx4, Marshal.GetFunctionPointerForDelegate(dlgSoftFallbackTbx4)); + SetDelegateInfo(dlgSoftFallbackUnsignedShrImm64, Marshal.GetFunctionPointerForDelegate(dlgSoftFallbackUnsignedShrImm64)); + + SetDelegateInfo(dlgSoftFloat16_32FPConvert, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat16_32FPConvert)); + SetDelegateInfo(dlgSoftFloat16_64FPConvert, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat16_64FPConvert)); + + SetDelegateInfo(dlgSoftFloat32FPAdd, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat32FPAdd)); + SetDelegateInfo(dlgSoftFloat32FPAddFpscr, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat32FPAddFpscr)); // A32 only. + SetDelegateInfo(dlgSoftFloat32FPCompare, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat32FPCompare)); + SetDelegateInfo(dlgSoftFloat32FPCompareEQ, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat32FPCompareEQ)); + SetDelegateInfo(dlgSoftFloat32FPCompareEQFpscr, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat32FPCompareEQFpscr)); // A32 only. + SetDelegateInfo(dlgSoftFloat32FPCompareGE, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat32FPCompareGE)); + SetDelegateInfo(dlgSoftFloat32FPCompareGEFpscr, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat32FPCompareGEFpscr)); // A32 only. + SetDelegateInfo(dlgSoftFloat32FPCompareGT, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat32FPCompareGT)); + SetDelegateInfo(dlgSoftFloat32FPCompareGTFpscr, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat32FPCompareGTFpscr)); // A32 only. + SetDelegateInfo(dlgSoftFloat32FPCompareLE, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat32FPCompareLE)); + SetDelegateInfo(dlgSoftFloat32FPCompareLEFpscr, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat32FPCompareLEFpscr)); // A32 only. + SetDelegateInfo(dlgSoftFloat32FPCompareLT, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat32FPCompareLT)); + SetDelegateInfo(dlgSoftFloat32FPCompareLTFpscr, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat32FPCompareLTFpscr)); // A32 only. + SetDelegateInfo(dlgSoftFloat32FPDiv, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat32FPDiv)); + SetDelegateInfo(dlgSoftFloat32FPMax, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat32FPMax)); + SetDelegateInfo(dlgSoftFloat32FPMaxFpscr, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat32FPMaxFpscr)); // A32 only. + SetDelegateInfo(dlgSoftFloat32FPMaxNum, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat32FPMaxNum)); + SetDelegateInfo(dlgSoftFloat32FPMaxNumFpscr, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat32FPMaxNumFpscr)); // A32 only. + SetDelegateInfo(dlgSoftFloat32FPMin, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat32FPMin)); + SetDelegateInfo(dlgSoftFloat32FPMinFpscr, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat32FPMinFpscr)); // A32 only. + SetDelegateInfo(dlgSoftFloat32FPMinNum, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat32FPMinNum)); + SetDelegateInfo(dlgSoftFloat32FPMinNumFpscr, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat32FPMinNumFpscr)); // A32 only. + SetDelegateInfo(dlgSoftFloat32FPMul, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat32FPMul)); + SetDelegateInfo(dlgSoftFloat32FPMulFpscr, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat32FPMulFpscr)); // A32 only. + SetDelegateInfo(dlgSoftFloat32FPMulAdd, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat32FPMulAdd)); + SetDelegateInfo(dlgSoftFloat32FPMulAddFpscr, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat32FPMulAddFpscr)); // A32 only. + SetDelegateInfo(dlgSoftFloat32FPMulSub, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat32FPMulSub)); + SetDelegateInfo(dlgSoftFloat32FPMulSubFpscr, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat32FPMulSubFpscr)); // A32 only. + SetDelegateInfo(dlgSoftFloat32FPMulX, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat32FPMulX)); + SetDelegateInfo(dlgSoftFloat32FPNegMulAdd, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat32FPNegMulAdd)); + SetDelegateInfo(dlgSoftFloat32FPNegMulSub, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat32FPNegMulSub)); + SetDelegateInfo(dlgSoftFloat32FPRecipEstimate, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat32FPRecipEstimate)); + SetDelegateInfo(dlgSoftFloat32FPRecipEstimateFpscr, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat32FPRecipEstimateFpscr)); // A32 only. + SetDelegateInfo(dlgSoftFloat32FPRecipStep, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat32FPRecipStep)); // A32 only. + SetDelegateInfo(dlgSoftFloat32FPRecipStepFused, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat32FPRecipStepFused)); + SetDelegateInfo(dlgSoftFloat32FPRecpX, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat32FPRecpX)); + SetDelegateInfo(dlgSoftFloat32FPRSqrtEstimate, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat32FPRSqrtEstimate)); + SetDelegateInfo(dlgSoftFloat32FPRSqrtEstimateFpscr, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat32FPRSqrtEstimateFpscr)); // A32 only. + SetDelegateInfo(dlgSoftFloat32FPRSqrtStep, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat32FPRSqrtStep)); // A32 only. + SetDelegateInfo(dlgSoftFloat32FPRSqrtStepFused, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat32FPRSqrtStepFused)); + SetDelegateInfo(dlgSoftFloat32FPSqrt, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat32FPSqrt)); + SetDelegateInfo(dlgSoftFloat32FPSub, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat32FPSub)); + + SetDelegateInfo(dlgSoftFloat32_16FPConvert, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat32_16FPConvert)); + + SetDelegateInfo(dlgSoftFloat64FPAdd, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat64FPAdd)); + SetDelegateInfo(dlgSoftFloat64FPAddFpscr, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat64FPAddFpscr)); // A32 only. + SetDelegateInfo(dlgSoftFloat64FPCompare, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat64FPCompare)); + SetDelegateInfo(dlgSoftFloat64FPCompareEQ, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat64FPCompareEQ)); + SetDelegateInfo(dlgSoftFloat64FPCompareEQFpscr, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat64FPCompareEQFpscr)); // A32 only. + SetDelegateInfo(dlgSoftFloat64FPCompareGE, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat64FPCompareGE)); + SetDelegateInfo(dlgSoftFloat64FPCompareGEFpscr, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat64FPCompareGEFpscr)); // A32 only. + SetDelegateInfo(dlgSoftFloat64FPCompareGT, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat64FPCompareGT)); + SetDelegateInfo(dlgSoftFloat64FPCompareGTFpscr, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat64FPCompareGTFpscr)); // A32 only. + SetDelegateInfo(dlgSoftFloat64FPCompareLE, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat64FPCompareLE)); + SetDelegateInfo(dlgSoftFloat64FPCompareLEFpscr, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat64FPCompareLEFpscr)); // A32 only. + SetDelegateInfo(dlgSoftFloat64FPCompareLT, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat64FPCompareLT)); + SetDelegateInfo(dlgSoftFloat64FPCompareLTFpscr, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat64FPCompareLTFpscr)); // A32 only. + SetDelegateInfo(dlgSoftFloat64FPDiv, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat64FPDiv)); + SetDelegateInfo(dlgSoftFloat64FPMax, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat64FPMax)); + SetDelegateInfo(dlgSoftFloat64FPMaxFpscr, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat64FPMaxFpscr)); // A32 only. + SetDelegateInfo(dlgSoftFloat64FPMaxNum, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat64FPMaxNum)); + SetDelegateInfo(dlgSoftFloat64FPMaxNumFpscr, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat64FPMaxNumFpscr)); // A32 only. + SetDelegateInfo(dlgSoftFloat64FPMin, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat64FPMin)); + SetDelegateInfo(dlgSoftFloat64FPMinFpscr, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat64FPMinFpscr)); // A32 only. + SetDelegateInfo(dlgSoftFloat64FPMinNum, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat64FPMinNum)); + SetDelegateInfo(dlgSoftFloat64FPMinNumFpscr, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat64FPMinNumFpscr)); // A32 only. + SetDelegateInfo(dlgSoftFloat64FPMul, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat64FPMul)); + SetDelegateInfo(dlgSoftFloat64FPMulFpscr, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat64FPMulFpscr)); // A32 only. + SetDelegateInfo(dlgSoftFloat64FPMulAdd, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat64FPMulAdd)); + SetDelegateInfo(dlgSoftFloat64FPMulAddFpscr, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat64FPMulAddFpscr)); // A32 only. + SetDelegateInfo(dlgSoftFloat64FPMulSub, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat64FPMulSub)); + SetDelegateInfo(dlgSoftFloat64FPMulSubFpscr, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat64FPMulSubFpscr)); // A32 only. + SetDelegateInfo(dlgSoftFloat64FPMulX, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat64FPMulX)); + SetDelegateInfo(dlgSoftFloat64FPNegMulAdd, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat64FPNegMulAdd)); + SetDelegateInfo(dlgSoftFloat64FPNegMulSub, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat64FPNegMulSub)); + SetDelegateInfo(dlgSoftFloat64FPRecipEstimate, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat64FPRecipEstimate)); + SetDelegateInfo(dlgSoftFloat64FPRecipEstimateFpscr, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat64FPRecipEstimateFpscr)); // A32 only. + SetDelegateInfo(dlgSoftFloat64FPRecipStep, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat64FPRecipStep)); // A32 only. + SetDelegateInfo(dlgSoftFloat64FPRecipStepFused, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat64FPRecipStepFused)); + SetDelegateInfo(dlgSoftFloat64FPRecpX, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat64FPRecpX)); + SetDelegateInfo(dlgSoftFloat64FPRSqrtEstimate, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat64FPRSqrtEstimate)); + SetDelegateInfo(dlgSoftFloat64FPRSqrtEstimateFpscr, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat64FPRSqrtEstimateFpscr)); // A32 only. + SetDelegateInfo(dlgSoftFloat64FPRSqrtStep, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat64FPRSqrtStep)); // A32 only. + SetDelegateInfo(dlgSoftFloat64FPRSqrtStepFused, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat64FPRSqrtStepFused)); + SetDelegateInfo(dlgSoftFloat64FPSqrt, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat64FPSqrt)); + SetDelegateInfo(dlgSoftFloat64FPSub, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat64FPSub)); + + SetDelegateInfo(dlgSoftFloat64_16FPConvert, Marshal.GetFunctionPointerForDelegate(dlgSoftFloat64_16FPConvert)); } private delegate double MathAbs(double value); diff --git a/ryujinx/src/Ryujinx.Graphics.Gpu/Engine/Dma/DmaClass.cs b/ryujinx/src/Ryujinx.Graphics.Gpu/Engine/Dma/DmaClass.cs index 218db15cfd..f2bfd8eaa1 100644 --- a/ryujinx/src/Ryujinx.Graphics.Gpu/Engine/Dma/DmaClass.cs +++ b/ryujinx/src/Ryujinx.Graphics.Gpu/Engine/Dma/DmaClass.cs @@ -276,8 +276,6 @@ namespace Ryujinx.Graphics.Gpu.Engine.Dma dstBaseOffset += dstStride * (yCount - 1); } - ReadOnlySpan srcSpan = memoryManager.GetSpan(srcGpuVa + (ulong)srcBaseOffset, srcSize, true); - // If remapping is disabled, we always copy the components directly, in order. // If it's enabled, but the mapping is just XYZW, we also copy them in order. bool isIdentityRemap = !remap || @@ -289,6 +287,52 @@ namespace Ryujinx.Graphics.Gpu.Engine.Dma bool completeSource = IsTextureCopyComplete(src, srcLinear, srcBpp, srcStride, xCount, yCount); bool completeDest = IsTextureCopyComplete(dst, dstLinear, dstBpp, dstStride, xCount, yCount); + // Check if the source texture exists on the GPU, if it does, do a GPU side copy. + // Otherwise, we would need to flush the source texture which is costly. + // We don't expect the source to be linear in such cases, as linear source usually indicates buffer or CPU written data. + + if (completeSource && completeDest && !srcLinear && isIdentityRemap) + { + var source = memoryManager.Physical.TextureCache.FindTexture( + memoryManager, + srcGpuVa, + srcBpp, + srcStride, + src.Height, + xCount, + yCount, + srcLinear, + src.MemoryLayout.UnpackGobBlocksInY(), + src.MemoryLayout.UnpackGobBlocksInZ()); + + if (source != null && source.Height == yCount) + { + source.SynchronizeMemory(); + + var target = memoryManager.Physical.TextureCache.FindOrCreateTexture( + memoryManager, + source.Info.FormatInfo, + dstGpuVa, + xCount, + yCount, + dstStride, + dstLinear, + dst.MemoryLayout.UnpackGobBlocksInY(), + dst.MemoryLayout.UnpackGobBlocksInZ()); + + if (source.ScaleFactor != target.ScaleFactor) + { + target.PropagateScale(source); + } + + source.HostTexture.CopyTo(target.HostTexture, 0, 0); + target.SignalModified(); + return; + } + } + + ReadOnlySpan srcSpan = memoryManager.GetSpan(srcGpuVa + (ulong)srcBaseOffset, srcSize, true); + // Try to set the texture data directly, // but only if we are doing a complete copy, // and not for block linear to linear copies, since those are typically accessed from the CPU. diff --git a/ryujinx/src/Ryujinx.Graphics.Gpu/Image/TextureCache.cs b/ryujinx/src/Ryujinx.Graphics.Gpu/Image/TextureCache.cs index b6fa842e35..5a3319b06a 100644 --- a/ryujinx/src/Ryujinx.Graphics.Gpu/Image/TextureCache.cs +++ b/ryujinx/src/Ryujinx.Graphics.Gpu/Image/TextureCache.cs @@ -347,6 +347,53 @@ namespace Ryujinx.Graphics.Gpu.Image return texture; } + /// + /// Tries to find an existing texture, or create a new one if not found. + /// + /// GPU memory manager where the texture is mapped + /// Format of the texture + /// GPU virtual address of the texture + /// Texture width in bytes + /// Texture height + /// Texture stride if linear, otherwise ignored + /// Indicates if the texture is linear or block linear + /// GOB blocks in Y for block linear textures + /// GOB blocks in Z for 3D block linear textures + /// The texture + public Texture FindOrCreateTexture( + MemoryManager memoryManager, + FormatInfo formatInfo, + ulong gpuAddress, + int xCount, + int yCount, + int stride, + bool isLinear, + int gobBlocksInY, + int gobBlocksInZ) + { + TextureInfo info = new( + gpuAddress, + xCount / formatInfo.BytesPerPixel, + yCount, + 1, + 1, + 1, + 1, + stride, + isLinear, + gobBlocksInY, + gobBlocksInZ, + 1, + Target.Texture2D, + formatInfo); + + Texture texture = FindOrCreateTexture(memoryManager, TextureSearchFlags.ForCopy, info, 0, sizeHint: new Size(xCount, yCount, 1)); + + texture?.SynchronizeMemory(); + + return texture; + } + /// /// Tries to find an existing texture, or create a new one if not found. /// diff --git a/shadowsocks-rust/Cargo.lock b/shadowsocks-rust/Cargo.lock index c0eba4ab2e..35c1692e0e 100644 --- a/shadowsocks-rust/Cargo.lock +++ b/shadowsocks-rust/Cargo.lock @@ -399,9 +399,9 @@ dependencies = [ [[package]] name = "bson" -version = "2.11.0" +version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8a88e82b9106923b5c4d6edfca9e7db958d4e98a478ec115022e81b9b38e2c8" +checksum = "80cf6f7806607bd58ad490bab34bf60e25455ea4aaf995f897a13324d41ea580" dependencies = [ "ahash", "base64 0.13.1", @@ -457,18 +457,18 @@ checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" [[package]] name = "c2rust-bitfields" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b43c3f07ab0ef604fa6f595aa46ec2f8a22172c975e186f6f5bf9829a3b72c41" +checksum = "367e5d1b30f28be590b6b3868da1578361d29d9bfac516d22f497d28ed7c9055" dependencies = [ "c2rust-bitfields-derive", ] [[package]] name = "c2rust-bitfields-derive" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3cbc102e2597c9744c8bd8c15915d554300601c91a079430d309816b0912545" +checksum = "a279db9c50c4024eeca1a763b6e0f033848ce74e83e47454bcf8a8a98f7b0b56" dependencies = [ "proc-macro2", "quote", @@ -4001,9 +4001,9 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "tun2" -version = "3.1.2" +version = "3.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2104af96dec2277bc9727a05846b0566b5f94c00005e701c3e861cebc45e095c" +checksum = "af810bc5d0c82f056aabd0d7448ba3ccb8bb586f2d5cb95692111ee67ccbccda" dependencies = [ "bytes", "cfg-if", @@ -4011,7 +4011,6 @@ dependencies = [ "futures-core", "ipnet", "libc", - "libloading", "log", "nix", "thiserror", @@ -4522,9 +4521,9 @@ dependencies = [ [[package]] name = "wintun-bindings" -version = "0.7.5" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "783cff3c8f19b31b6ba858e474c2ff34f4fa19e86d30fd98b8385abd7b45c6d1" +checksum = "a6f572ad34e725f31baeea033439ef52837fdc544099958775fd6299dadb27c7" dependencies = [ "blocking", "c2rust-bitfields", diff --git a/shadowsocks-rust/crates/shadowsocks-service/Cargo.toml b/shadowsocks-rust/crates/shadowsocks-service/Cargo.toml index 7777de2741..be2f63b7e9 100644 --- a/shadowsocks-rust/crates/shadowsocks-service/Cargo.toml +++ b/shadowsocks-rust/crates/shadowsocks-service/Cargo.toml @@ -186,7 +186,7 @@ flate2 = { version = "1.0", optional = true } brotli = { version = "6.0", optional = true } zstd = { version = "0.13", optional = true } -tun2 = { version = "3.1.0", optional = true, default-features = false, features = [ +tun2 = { version = "3.1.4", optional = true, default-features = false, features = [ "async", ] } etherparse = { version = "0.15", optional = true } @@ -203,7 +203,7 @@ smoltcp = { version = "0.11", optional = true, default-features = false, feature serde = { version = "1.0", features = ["derive"] } json5 = "0.4" -bson = { version = "2.10.0", optional = true } +bson = { version = "2.12.0", optional = true } shadowsocks = { version = "1.20.2", path = "../shadowsocks", default-features = false } diff --git a/small/luci-app-mihomo/Makefile b/small/luci-app-mihomo/Makefile index b1429409ac..0dc3a917e7 100644 --- a/small/luci-app-mihomo/Makefile +++ b/small/luci-app-mihomo/Makefile @@ -1,6 +1,6 @@ include $(TOPDIR)/rules.mk -PKG_VERSION:=1.8.2 +PKG_VERSION:=1.8.3 LUCI_TITLE:=LuCI Support for mihomo LUCI_DEPENDS:=+luci-base +mihomo diff --git a/small/luci-app-mosdns/root/etc/init.d/mosdns b/small/luci-app-mosdns/root/etc/init.d/mosdns index b4ddc15386..387d8b7461 100755 --- a/small/luci-app-mosdns/root/etc/init.d/mosdns +++ b/small/luci-app-mosdns/root/etc/init.d/mosdns @@ -19,7 +19,7 @@ # along with this program. If not, see . # -START=51 +START=75 USE_PROCD=1 PROG=/usr/bin/mosdns diff --git a/small/mihomo/Makefile b/small/mihomo/Makefile index ae7d3fce5b..d0693ab49a 100644 --- a/small/mihomo/Makefile +++ b/small/mihomo/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mihomo -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/MetaCubeX/mihomo.git diff --git a/small/mihomo/files/mihomo.init b/small/mihomo/files/mihomo.init index 74d0484607..1bd1546073 100644 --- a/small/mihomo/files/mihomo.init +++ b/small/mihomo/files/mihomo.init @@ -201,6 +201,7 @@ start_service() { yq ea -M -i '. as $item ireduce ({}; . * $item ) | ... comments=""' "$RUN_PROFILE_PATH" "$MIXIN_FILE_PATH" fi fi + yq -M -i 'del (.bind-address)' "$RUN_PROFILE_PATH" if [ "$tun_enable" == 1 ]; then yq -M -i '.tun.auto-route = false | .tun.auto-redirect = false | .tun.auto-detect-interface = false | .tun.dns-hijack = []' "$RUN_PROFILE_PATH" fi @@ -408,7 +409,7 @@ cleanup() { ip -6 route flush table "$TPROXY_ROUTE_TABLE" > /dev/null 2>&1 ip -6 route flush table "$TUN_ROUTE_TABLE" > /dev/null 2>&1 # delete tun - ip link set "$TUN_DEVICE" down + ip link set "$TUN_DEVICE" down > /dev/null 2>&1 ip tuntap del dev "$TUN_DEVICE" mode tun > /dev/null 2>&1 # delete hijack nft delete table inet "$FW_TABLE" > /dev/null 2>&1 diff --git a/small/v2ray-core/Makefile b/small/v2ray-core/Makefile index 8911524acc..22c65771ae 100644 --- a/small/v2ray-core/Makefile +++ b/small/v2ray-core/Makefile @@ -5,12 +5,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=v2ray-core -PKG_VERSION:=5.18.0 +PKG_VERSION:=5.19.0 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/v2fly/v2ray-core/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=15acf65228867d47dcab27f87af048a2f0e6ed5d347a2e68730d30ae2a3871eb +PKG_HASH:=3c1fec2c5fb787d2929ecb68a6d4d3f0afa2d820a2b825d66a1632105864c8f4 PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE diff --git a/small/v2ray-geodata/Makefile b/small/v2ray-geodata/Makefile index defe9291cd..327b506d9f 100644 --- a/small/v2ray-geodata/Makefile +++ b/small/v2ray-geodata/Makefile @@ -30,13 +30,13 @@ define Download/geosite HASH:=c171f61d3ba8e0dcf31a9548e9fd928a9416e064ad9417664eadda8d25eb6ad9 endef -GEOSITE_IRAN_VER:=202409090033 +GEOSITE_IRAN_VER:=202409160034 GEOSITE_IRAN_FILE:=iran.dat.$(GEOSITE_IRAN_VER) define Download/geosite-ir URL:=https://github.com/bootmortis/iran-hosted-domains/releases/download/$(GEOSITE_IRAN_VER)/ URL_FILE:=iran.dat FILE:=$(GEOSITE_IRAN_FILE) - HASH:=661a65a42608fe77610b04b20e209b34d83160fce7ced3980ac86e78d5fbb56f + HASH:=d4f7a05bb3c81a52a511a7ea5d2d865adadcb2d0ccdf4dd3a7bca5851d1e9d27 endef define Package/v2ray-geodata/template diff --git a/suyu/src/shader_recompiler/backend/spirv/emit_spirv_image.cpp b/suyu/src/shader_recompiler/backend/spirv/emit_spirv_image.cpp index 945cdb42bc..75767448c3 100644 --- a/suyu/src/shader_recompiler/backend/spirv/emit_spirv_image.cpp +++ b/suyu/src/shader_recompiler/backend/spirv/emit_spirv_image.cpp @@ -196,8 +196,11 @@ Id Texture(EmitContext& ctx, IR::TextureInstInfo info, [[maybe_unused]] const IR } Id TextureImage(EmitContext& ctx, IR::TextureInstInfo info, const IR::Value& index) { - if (!index.IsImmediate() || index.U32() != 0) { - throw NotImplementedException("Indirect image indexing"); + // if (!index.IsImmediate() || index.Type() != Shader::IR::Type::U32 || index.U32() != 0) { + // throw NotImplementedException("Indirect image indexing"); + // } + if (index.Type() != Shader::IR::Type::U32) { + LOG_WARNING(Shader_SPIRV, "Non-U32 type provided as index: {}", index.Type()); } if (info.type == TextureType::Buffer) { const TextureBufferDefinition& def{ctx.texture_buffers.at(info.descriptor_index)}; @@ -215,8 +218,11 @@ Id TextureImage(EmitContext& ctx, IR::TextureInstInfo info, const IR::Value& ind } std::pair Image(EmitContext& ctx, const IR::Value& index, IR::TextureInstInfo info) { - if (!index.IsImmediate() || index.U32() != 0) { - throw NotImplementedException("Indirect image indexing"); + // if (!index.IsImmediate() || index.Type() != Shader::IR::Type::U32 || index.U32() != 0) { + // throw NotImplementedException("Indirect image indexing"); + // } + if (index.Type() != Shader::IR::Type::U32) { + LOG_WARNING(Shader_SPIRV, "Non-U32 type provided as index: {}", index.Type()); } if (info.type == TextureType::Buffer) { const ImageBufferDefinition def{ctx.image_buffers.at(info.descriptor_index)}; diff --git a/v2ray-core/testing/scenarios/cert/self-signed_cert.pem b/v2ray-core/testing/scenarios/cert/self-signed_cert.pem new file mode 100644 index 0000000000..6eb3dc155a --- /dev/null +++ b/v2ray-core/testing/scenarios/cert/self-signed_cert.pem @@ -0,0 +1,11 @@ +-----BEGIN CERTIFICATE----- +MIIBhDCCASmgAwIBAgIQOGW77bhKIQBVcKBkruQEjDAKBggqhkjOPQQDAjAoMRIw +EAYDVQQKEwlWMlJheSBJbmMxEjAQBgNVBAMTCVYyUmF5IEluYzAeFw0yNDA5MTUx +NjIyMjRaFw0yNDEyMTQxNzIyMjRaMCgxEjAQBgNVBAoTCVYyUmF5IEluYzESMBAG +A1UEAxMJVjJSYXkgSW5jMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEmKTCe3pJ +6qYR8JSt4LHurI9ukGQISTBBLrFw8fDsWTeJielnHZdqgKL9swcC+IF/ikjzbT5W +iP0EGUBGk6wbPKM1MDMwDgYDVR0PAQH/BAQDAgWgMBMGA1UdJQQMMAoGCCsGAQUF +BwMBMAwGA1UdEwEB/wQCMAAwCgYIKoZIzj0EAwIDSQAwRgIhAKIZM1xlaHwSHsZP +V6aN+AbWnoRgwVVJuY4I5q17FY0cAiEAiLr9NkHd9glFz0BzALygvo7gnNpgF69l +DdiZ4828MXY= +-----END CERTIFICATE----- diff --git a/v2ray-core/testing/scenarios/cert/self-signed_key.pem b/v2ray-core/testing/scenarios/cert/self-signed_key.pem new file mode 100644 index 0000000000..4b77ce2227 --- /dev/null +++ b/v2ray-core/testing/scenarios/cert/self-signed_key.pem @@ -0,0 +1,5 @@ +-----BEGIN RSA PRIVATE KEY----- +MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgmkOATgwafiG4sDs/ +J1xVZfimvgREFJy0mtZHeGM2O6ehRANCAASYpMJ7eknqphHwlK3gse6sj26QZAhJ +MEEusXDx8OxZN4mJ6Wcdl2qAov2zBwL4gX+KSPNtPlaI/QQZQEaTrBs8 +-----END RSA PRIVATE KEY----- diff --git a/v2ray-core/testing/scenarios/common.go b/v2ray-core/testing/scenarios/common.go index 8bafee0e01..f23291aac3 100644 --- a/v2ray-core/testing/scenarios/common.go +++ b/v2ray-core/testing/scenarios/common.go @@ -4,6 +4,7 @@ import ( "bytes" "crypto/rand" "fmt" + "golang.org/x/net/proxy" "io" "os" "os/exec" @@ -168,6 +169,26 @@ func withDefaultApps(config *core.Config) *core.Config { return config } +func testTCPConnViaSocks(socksPort, testPort net.Port, payloadSize int, timeout time.Duration) func() error { + return func() error { + socksDialer, err := proxy.SOCKS5("tcp", "127.0.0.1:"+socksPort.String(), nil, nil) + if err != nil { + return err + } + destAddr := &net.TCPAddr{ + IP: []byte{127, 0, 0, 1}, + Port: int(testPort), + } + conn, err := socksDialer.Dial("tcp", destAddr.String()) + if err != nil { + return err + } + defer conn.Close() + + return testTCPConn2(conn, payloadSize, timeout)() + } +} + func testTCPConn(port net.Port, payloadSize int, timeout time.Duration) func() error { return func() error { conn, err := net.DialTCP("tcp", nil, &net.TCPAddr{ diff --git a/v2ray-core/testing/scenarios/common_instanceMgr.go b/v2ray-core/testing/scenarios/common_instanceMgr.go new file mode 100644 index 0000000000..59fbf5db2d --- /dev/null +++ b/v2ray-core/testing/scenarios/common_instanceMgr.go @@ -0,0 +1,27 @@ +package scenarios + +import ( + core "github.com/v2fly/v2ray-core/v5" + "github.com/v2fly/v2ray-core/v5/app/instman" + "github.com/v2fly/v2ray-core/v5/common" + "github.com/v2fly/v2ray-core/v5/common/serial" + "github.com/v2fly/v2ray-core/v5/features/extension" +) + +func NewInstanceManagerInstanceConfig() *core.Config { + config := &core.Config{} + config.App = append(config.App, serial.ToTypedMessage(&instman.Config{})) + return config +} + +func NewInstanceManagerCoreInstance() (*core.Instance, extension.InstanceManagement) { + coreConfig := NewInstanceManagerInstanceConfig() + instance, err := core.New(coreConfig) + if err != nil { + panic(err) + } + common.Must(instance.Start()) + instanceMgr := instance.GetFeature(extension.InstanceManagementType()) + InstanceMgrIfce := instanceMgr.(extension.InstanceManagement) + return instance, InstanceMgrIfce +} diff --git a/v2ray-core/testing/scenarios/common_instanceMgr_test.go b/v2ray-core/testing/scenarios/common_instanceMgr_test.go new file mode 100644 index 0000000000..49e85d5e12 --- /dev/null +++ b/v2ray-core/testing/scenarios/common_instanceMgr_test.go @@ -0,0 +1,7 @@ +package scenarios + +import "testing" + +func TestInstanceMgrInit(t *testing.T) { + NewInstanceManagerCoreInstance() +} diff --git a/v2ray-core/testing/scenarios/config/grpc_client.json b/v2ray-core/testing/scenarios/config/grpc_client.json new file mode 100644 index 0000000000..b815e36855 --- /dev/null +++ b/v2ray-core/testing/scenarios/config/grpc_client.json @@ -0,0 +1,45 @@ +{ + "log": { + "error": { + "level": "Debug", + "type": "Console" + }, + "access": { + "type": "None" + } + }, + "outbounds": [ + { + "protocol": "vmess", + "settings": { + "address": "127.0.0.1", + "port": 17783, + "uuid": "bcc71618-e552-42c2-a2a3-d4c17a9df764" + }, + "streamSettings": { + "transport": "grpc", + "transportSettings": { + }, + "security": "tls", + "securitySettings": { + "pinnedPeerCertificateChainSha256": [ + "kqHyvea27Pn+JiSqA72lhu9IKAKeGR+3yCyA8JR1mug=" + ], + "allowInsecureIfPinnedPeerCertificate": true + } + } + } + ], + "inbounds": [ + { + "protocol": "socks", + "settings": { + "udpEnabled": false, + "address": "127.0.0.1", + "packetEncoding": "Packet" + }, + "port": 17784, + "listen": "127.0.0.1" + } + ] +} diff --git a/v2ray-core/testing/scenarios/config/grpc_server.json b/v2ray-core/testing/scenarios/config/grpc_server.json new file mode 100644 index 0000000000..dc307010d8 --- /dev/null +++ b/v2ray-core/testing/scenarios/config/grpc_server.json @@ -0,0 +1,43 @@ +{ + "log": { + "error": { + "level": "Debug", + "type": "Console" + }, + "access": { + "type": "None" + } + }, + "outbounds": [ + { + "protocol": "freedom" + } + ], + "inbounds": [ + { + "listen": "127.0.0.1", + "port": 17783, + "protocol": "vmess", + "settings": { + "users": [ + "bcc71618-e552-42c2-a2a3-d4c17a9df764" + ] + }, + "streamSettings": { + "transport": "grpc", + "transportSettings": { + }, + "security": "tls", + "securitySettings": { + "certificate": [ + { + "usage": "ENCIPHERMENT", + "certificateFile": "cert/self-signed_cert.pem", + "keyFile": "cert/self-signed_key.pem" + } + ] + } + } + } + ] +} diff --git a/v2ray-core/testing/scenarios/config/grpc_servicename_client.json b/v2ray-core/testing/scenarios/config/grpc_servicename_client.json new file mode 100644 index 0000000000..c624bd4366 --- /dev/null +++ b/v2ray-core/testing/scenarios/config/grpc_servicename_client.json @@ -0,0 +1,46 @@ +{ + "log": { + "error": { + "level": "Debug", + "type": "Console" + }, + "access": { + "type": "None" + } + }, + "outbounds": [ + { + "protocol": "vmess", + "settings": { + "address": "127.0.0.1", + "port": 17793, + "uuid": "bcc71618-e552-42c2-a2a3-d4c17a9df764" + }, + "streamSettings": { + "transport": "grpc", + "transportSettings": { + "serviceName": "0eae44595474" + }, + "security": "tls", + "securitySettings": { + "pinnedPeerCertificateChainSha256": [ + "kqHyvea27Pn+JiSqA72lhu9IKAKeGR+3yCyA8JR1mug=" + ], + "allowInsecureIfPinnedPeerCertificate": true + } + } + } + ], + "inbounds": [ + { + "protocol": "socks", + "settings": { + "udpEnabled": false, + "address": "127.0.0.1", + "packetEncoding": "Packet" + }, + "port": 17794, + "listen": "127.0.0.1" + } + ] +} diff --git a/v2ray-core/testing/scenarios/config/grpc_servicename_server.json b/v2ray-core/testing/scenarios/config/grpc_servicename_server.json new file mode 100644 index 0000000000..22c8ca312b --- /dev/null +++ b/v2ray-core/testing/scenarios/config/grpc_servicename_server.json @@ -0,0 +1,44 @@ +{ + "log": { + "error": { + "level": "Debug", + "type": "Console" + }, + "access": { + "type": "None" + } + }, + "outbounds": [ + { + "protocol": "freedom" + } + ], + "inbounds": [ + { + "listen": "127.0.0.1", + "port": 17793, + "protocol": "vmess", + "settings": { + "users": [ + "bcc71618-e552-42c2-a2a3-d4c17a9df764" + ] + }, + "streamSettings": { + "transport": "grpc", + "transportSettings": { + "serviceName": "0eae44595474" + }, + "security": "tls", + "securitySettings": { + "certificate": [ + { + "usage": "ENCIPHERMENT", + "certificateFile": "cert/self-signed_cert.pem", + "keyFile": "cert/self-signed_key.pem" + } + ] + } + } + } + ] +} diff --git a/v2ray-core/testing/scenarios/config/httpupgrade_client.json b/v2ray-core/testing/scenarios/config/httpupgrade_client.json new file mode 100644 index 0000000000..47f56899ed --- /dev/null +++ b/v2ray-core/testing/scenarios/config/httpupgrade_client.json @@ -0,0 +1,46 @@ +{ + "log": { + "error": { + "level": "Debug", + "type": "Console" + }, + "access": { + "type": "None" + } + }, + "outbounds": [ + { + "protocol": "vmess", + "settings": { + "address": "127.0.0.1", + "port": 17793, + "uuid": "bcc71618-e552-42c2-a2a3-d4c17a9df764" + }, + "streamSettings": { + "transport": "httpupgrade", + "transportSettings": { + "path": "b66efc0c7752" + }, + "security": "tls", + "securitySettings": { + "pinnedPeerCertificateChainSha256": [ + "kqHyvea27Pn+JiSqA72lhu9IKAKeGR+3yCyA8JR1mug=" + ], + "allowInsecureIfPinnedPeerCertificate": true + } + } + } + ], + "inbounds": [ + { + "protocol": "socks", + "settings": { + "udpEnabled": false, + "address": "127.0.0.1", + "packetEncoding": "Packet" + }, + "port": 17794, + "listen": "127.0.0.1" + } + ] +} diff --git a/v2ray-core/testing/scenarios/config/httpupgrade_server.json b/v2ray-core/testing/scenarios/config/httpupgrade_server.json new file mode 100644 index 0000000000..7bf734ea3d --- /dev/null +++ b/v2ray-core/testing/scenarios/config/httpupgrade_server.json @@ -0,0 +1,44 @@ +{ + "log": { + "error": { + "level": "Debug", + "type": "Console" + }, + "access": { + "type": "None" + } + }, + "outbounds": [ + { + "protocol": "freedom" + } + ], + "inbounds": [ + { + "listen": "127.0.0.1", + "port": 17793, + "protocol": "vmess", + "settings": { + "users": [ + "bcc71618-e552-42c2-a2a3-d4c17a9df764" + ] + }, + "streamSettings": { + "transport": "httpupgrade", + "transportSettings": { + "path": "b66efc0c7752" + }, + "security": "tls", + "securitySettings": { + "certificate": [ + { + "usage": "ENCIPHERMENT", + "certificateFile": "cert/self-signed_cert.pem", + "keyFile": "cert/self-signed_key.pem" + } + ] + } + } + } + ] +} diff --git a/v2ray-core/testing/scenarios/config/meek_client.json b/v2ray-core/testing/scenarios/config/meek_client.json new file mode 100644 index 0000000000..98d23f594d --- /dev/null +++ b/v2ray-core/testing/scenarios/config/meek_client.json @@ -0,0 +1,46 @@ +{ + "log": { + "error": { + "level": "Debug", + "type": "Console" + }, + "access": { + "type": "None" + } + }, + "outbounds": [ + { + "protocol": "vmess", + "settings": { + "address": "127.0.0.1", + "port": 17773, + "uuid": "bcc71618-e552-42c2-a2a3-d4c17a9df764" + }, + "streamSettings": { + "transport": "meek", + "transportSettings": { + "url": "https://127.0.0.1:17773/mrss48bvxrkfq1qzeqte5o61mmvc9gx6hq51" + }, + "security": "tls", + "securitySettings": { + "pinnedPeerCertificateChainSha256": [ + "kqHyvea27Pn+JiSqA72lhu9IKAKeGR+3yCyA8JR1mug=" + ], + "allowInsecureIfPinnedPeerCertificate": true + } + } + } + ], + "inbounds": [ + { + "protocol": "socks", + "settings": { + "udpEnabled": false, + "address": "127.0.0.1", + "packetEncoding": "Packet" + }, + "port": 17774, + "listen": "127.0.0.1" + } + ] +} diff --git a/v2ray-core/testing/scenarios/config/meek_server.json b/v2ray-core/testing/scenarios/config/meek_server.json new file mode 100644 index 0000000000..776b23afa6 --- /dev/null +++ b/v2ray-core/testing/scenarios/config/meek_server.json @@ -0,0 +1,44 @@ +{ + "log": { + "error": { + "level": "Debug", + "type": "Console" + }, + "access": { + "type": "None" + } + }, + "outbounds": [ + { + "protocol": "freedom" + } + ], + "inbounds": [ + { + "listen": "127.0.0.1", + "port": 17773, + "protocol": "vmess", + "settings": { + "users": [ + "bcc71618-e552-42c2-a2a3-d4c17a9df764" + ] + }, + "streamSettings": { + "transport": "meek", + "transportSettings": { + "url": "http://127.0.0.1:12777" + }, + "security": "tls", + "securitySettings": { + "certificate": [ + { + "usage": "ENCIPHERMENT", + "certificateFile": "cert/self-signed_cert.pem", + "keyFile": "cert/self-signed_key.pem" + } + ] + } + } + } + ] +} diff --git a/v2ray-core/testing/scenarios/grpc_test.go b/v2ray-core/testing/scenarios/grpc_test.go new file mode 100644 index 0000000000..19df73d424 --- /dev/null +++ b/v2ray-core/testing/scenarios/grpc_test.go @@ -0,0 +1,91 @@ +package scenarios + +import ( + "context" + "os" + "testing" + "time" + + "github.com/v2fly/v2ray-core/v5/common" + "github.com/v2fly/v2ray-core/v5/testing/servers/tcp" + + _ "github.com/v2fly/v2ray-core/v5/main/distro/all" +) + +func TestGRPCDefault(t *testing.T) { + tcpServer := tcp.Server{ + MsgProcessor: xor, + } + dest, err := tcpServer.Start() + common.Must(err) + defer tcpServer.Close() + + coreInst, InstMgrIfce := NewInstanceManagerCoreInstance() + defer coreInst.Close() + + common.Must(InstMgrIfce.AddInstance( + context.TODO(), + "grpc_client", + common.Must2(os.ReadFile("config/grpc_client.json")).([]byte), + "jsonv5")) + + common.Must(InstMgrIfce.AddInstance( + context.TODO(), + "grpc_server", + common.Must2(os.ReadFile("config/grpc_server.json")).([]byte), + "jsonv5")) + + common.Must(InstMgrIfce.StartInstance(context.TODO(), "grpc_server")) + common.Must(InstMgrIfce.StartInstance(context.TODO(), "grpc_client")) + + defer func() { + common.Must(InstMgrIfce.StopInstance(context.TODO(), "grpc_server")) + common.Must(InstMgrIfce.StopInstance(context.TODO(), "grpc_client")) + common.Must(InstMgrIfce.UntrackInstance(context.TODO(), "grpc_server")) + common.Must(InstMgrIfce.UntrackInstance(context.TODO(), "grpc_client")) + coreInst.Close() + }() + + if err := testTCPConnViaSocks(17784, dest.Port, 1024, time.Second*2)(); err != nil { + t.Error(err) + } +} + +func TestGRPCWithServiceName(t *testing.T) { + tcpServer := tcp.Server{ + MsgProcessor: xor, + } + dest, err := tcpServer.Start() + common.Must(err) + defer tcpServer.Close() + + coreInst, InstMgrIfce := NewInstanceManagerCoreInstance() + defer coreInst.Close() + + common.Must(InstMgrIfce.AddInstance( + context.TODO(), + "grpc_client", + common.Must2(os.ReadFile("config/grpc_servicename_client.json")).([]byte), + "jsonv5")) + + common.Must(InstMgrIfce.AddInstance( + context.TODO(), + "grpc_server", + common.Must2(os.ReadFile("config/grpc_servicename_server.json")).([]byte), + "jsonv5")) + + common.Must(InstMgrIfce.StartInstance(context.TODO(), "grpc_server")) + common.Must(InstMgrIfce.StartInstance(context.TODO(), "grpc_client")) + + defer func() { + common.Must(InstMgrIfce.StopInstance(context.TODO(), "grpc_server")) + common.Must(InstMgrIfce.StopInstance(context.TODO(), "grpc_client")) + common.Must(InstMgrIfce.UntrackInstance(context.TODO(), "grpc_server")) + common.Must(InstMgrIfce.UntrackInstance(context.TODO(), "grpc_client")) + coreInst.Close() + }() + + if err := testTCPConnViaSocks(17794, dest.Port, 1024, time.Second*2)(); err != nil { + t.Error(err) + } +} diff --git a/v2ray-core/testing/scenarios/httpupgrade_test.go b/v2ray-core/testing/scenarios/httpupgrade_test.go new file mode 100644 index 0000000000..6a7366c3b8 --- /dev/null +++ b/v2ray-core/testing/scenarios/httpupgrade_test.go @@ -0,0 +1,52 @@ +package scenarios + +import ( + "context" + "os" + "testing" + "time" + + "github.com/v2fly/v2ray-core/v5/common" + "github.com/v2fly/v2ray-core/v5/testing/servers/tcp" + + _ "github.com/v2fly/v2ray-core/v5/main/distro/all" +) + +func TestHTTPUpgrade(t *testing.T) { + tcpServer := tcp.Server{ + MsgProcessor: xor, + } + dest, err := tcpServer.Start() + common.Must(err) + defer tcpServer.Close() + + coreInst, InstMgrIfce := NewInstanceManagerCoreInstance() + defer coreInst.Close() + + common.Must(InstMgrIfce.AddInstance( + context.TODO(), + "httpupgrade_client", + common.Must2(os.ReadFile("config/httpupgrade_client.json")).([]byte), + "jsonv5")) + + common.Must(InstMgrIfce.AddInstance( + context.TODO(), + "httpupgrade_server", + common.Must2(os.ReadFile("config/httpupgrade_server.json")).([]byte), + "jsonv5")) + + common.Must(InstMgrIfce.StartInstance(context.TODO(), "httpupgrade_server")) + common.Must(InstMgrIfce.StartInstance(context.TODO(), "httpupgrade_client")) + + defer func() { + common.Must(InstMgrIfce.StopInstance(context.TODO(), "httpupgrade_server")) + common.Must(InstMgrIfce.StopInstance(context.TODO(), "httpupgrade_client")) + common.Must(InstMgrIfce.UntrackInstance(context.TODO(), "httpupgrade_server")) + common.Must(InstMgrIfce.UntrackInstance(context.TODO(), "httpupgrade_client")) + coreInst.Close() + }() + + if err := testTCPConnViaSocks(17794, dest.Port, 1024, time.Second*2)(); err != nil { + t.Error(err) + } +} diff --git a/v2ray-core/testing/scenarios/meek_test.go b/v2ray-core/testing/scenarios/meek_test.go new file mode 100644 index 0000000000..1d6a6b4338 --- /dev/null +++ b/v2ray-core/testing/scenarios/meek_test.go @@ -0,0 +1,52 @@ +package scenarios + +import ( + "context" + "os" + "testing" + "time" + + "github.com/v2fly/v2ray-core/v5/common" + "github.com/v2fly/v2ray-core/v5/testing/servers/tcp" + + _ "github.com/v2fly/v2ray-core/v5/main/distro/all" +) + +func TestMeek(t *testing.T) { + tcpServer := tcp.Server{ + MsgProcessor: xor, + } + dest, err := tcpServer.Start() + common.Must(err) + defer tcpServer.Close() + + coreInst, InstMgrIfce := NewInstanceManagerCoreInstance() + defer coreInst.Close() + + common.Must(InstMgrIfce.AddInstance( + context.TODO(), + "meek_client", + common.Must2(os.ReadFile("config/meek_client.json")).([]byte), + "jsonv5")) + + common.Must(InstMgrIfce.AddInstance( + context.TODO(), + "meek_server", + common.Must2(os.ReadFile("config/meek_server.json")).([]byte), + "jsonv5")) + + common.Must(InstMgrIfce.StartInstance(context.TODO(), "meek_server")) + common.Must(InstMgrIfce.StartInstance(context.TODO(), "meek_client")) + + defer func() { + common.Must(InstMgrIfce.StopInstance(context.TODO(), "meek_server")) + common.Must(InstMgrIfce.StopInstance(context.TODO(), "meek_client")) + common.Must(InstMgrIfce.UntrackInstance(context.TODO(), "meek_server")) + common.Must(InstMgrIfce.UntrackInstance(context.TODO(), "meek_client")) + coreInst.Close() + }() + + if err := testTCPConnViaSocks(17774, dest.Port, 1024, time.Second*2)(); err != nil { + t.Error(err) + } +} diff --git a/v2rayn/v2rayN/ProtosLib/ProtosLib.csproj b/v2rayn/v2rayN/ProtosLib/ProtosLib.csproj index af2339ddfb..91569b53c5 100644 --- a/v2rayn/v2rayN/ProtosLib/ProtosLib.csproj +++ b/v2rayn/v2rayN/ProtosLib/ProtosLib.csproj @@ -9,7 +9,7 @@ - + all diff --git a/v2rayn/v2rayN/ServiceLib/Common/FileManager.cs b/v2rayn/v2rayN/ServiceLib/Common/FileManager.cs index 2e952bd8cd..014393a75b 100644 --- a/v2rayn/v2rayN/ServiceLib/Common/FileManager.cs +++ b/v2rayn/v2rayN/ServiceLib/Common/FileManager.cs @@ -102,6 +102,24 @@ namespace ServiceLib.Common return true; } + public static List? GetFilesFromZip(string fileName) + { + if (!File.Exists(fileName)) + { + return null; + } + try + { + using ZipArchive archive = ZipFile.OpenRead(fileName); + return archive.Entries.Select(entry => entry.FullName).ToList(); + } + catch (Exception ex) + { + Logging.SaveLog(ex.Message, ex); + return null; + } + } + public static bool CreateFromDirectory(string sourceDirectoryName, string destinationArchiveFileName) { try @@ -143,6 +161,10 @@ namespace ServiceLib.Common { continue; } + if (file.Extension == file.Name) + { + continue; + } string targetFilePath = Path.Combine(destinationDir, file.Name); file.CopyTo(targetFilePath); } diff --git a/v2rayn/v2rayN/ServiceLib/Common/Utils.cs b/v2rayn/v2rayN/ServiceLib/Common/Utils.cs index dd36758d7e..9830213c69 100644 --- a/v2rayn/v2rayN/ServiceLib/Common/Utils.cs +++ b/v2rayn/v2rayN/ServiceLib/Common/Utils.cs @@ -567,13 +567,12 @@ namespace ServiceLib.Common { try { - string location = GetExePath(); if (blFull) { return string.Format("{0} - V{1} - {2}", Global.AppName, GetVersionInfo(), - File.GetLastWriteTime(location).ToString("yyyy/MM/dd")); + File.GetLastWriteTime(GetExePath()).ToString("yyyy/MM/dd")); } else { @@ -593,7 +592,7 @@ namespace ServiceLib.Common { try { - return Assembly.GetExecutingAssembly()?.GetName()?.Version?.ToString() ?? "0.0"; + return Assembly.GetExecutingAssembly()?.GetName()?.Version?.ToString(3) ?? "0.0"; } catch (Exception ex) { diff --git a/v2rayn/v2rayN/ServiceLib/Handler/UpdateHandler.cs b/v2rayn/v2rayN/ServiceLib/Handler/UpdateHandler.cs index 48c4f5e94d..11e7787457 100644 --- a/v2rayn/v2rayN/ServiceLib/Handler/UpdateHandler.cs +++ b/v2rayn/v2rayN/ServiceLib/Handler/UpdateHandler.cs @@ -261,14 +261,10 @@ namespace ServiceLib.Handler _updateFunc(true, string.Format(ResUI.MsgDownloadGeoFileSuccessfully, "geo")); } - public void RunAvailabilityCheck(Action update) + public async Task RunAvailabilityCheck(Action update) { - Task.Run(async () => - { - var time = await (new DownloadHandler()).RunAvailabilityCheck(null); - - update(false, string.Format(ResUI.TestMeOutput, time)); - }); + var time = await (new DownloadHandler()).RunAvailabilityCheck(null); + update(false, string.Format(ResUI.TestMeOutput, time)); } #region private diff --git a/v2rayn/v2rayN/ServiceLib/Resx/ResUI.Designer.cs b/v2rayn/v2rayN/ServiceLib/Resx/ResUI.Designer.cs index a7e2a98bdc..7248e78911 100644 --- a/v2rayn/v2rayN/ServiceLib/Resx/ResUI.Designer.cs +++ b/v2rayn/v2rayN/ServiceLib/Resx/ResUI.Designer.cs @@ -321,6 +321,15 @@ namespace ServiceLib.Resx { } } + /// + /// 查找类似 Invalid backup file 的本地化字符串。 + /// + public static string LocalRestoreInvalidZipTips { + get { + return ResourceManager.GetString("LocalRestoreInvalidZipTips", resourceCulture); + } + } + /// /// 查找类似 Address 的本地化字符串。 /// diff --git a/v2rayn/v2rayN/ServiceLib/Resx/ResUI.resx b/v2rayn/v2rayN/ServiceLib/Resx/ResUI.resx index 615ba3c4e3..2d51cec7e4 100644 --- a/v2rayn/v2rayN/ServiceLib/Resx/ResUI.resx +++ b/v2rayn/v2rayN/ServiceLib/Resx/ResUI.resx @@ -1315,4 +1315,7 @@ Remote folder name (optional) + + Invalid backup file + \ No newline at end of file diff --git a/v2rayn/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx b/v2rayn/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx index cc652cd3a1..c7ae08e20d 100644 --- a/v2rayn/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx +++ b/v2rayn/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx @@ -1312,4 +1312,7 @@ 远程文件夹名称(可选) + + 无效备份文件 + \ No newline at end of file diff --git a/v2rayn/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx b/v2rayn/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx index 1da20edc6f..367aabcbf9 100644 --- a/v2rayn/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx +++ b/v2rayn/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx @@ -1192,4 +1192,7 @@ 遠端資料夾名稱(可選) + + 無效備份文件 + \ No newline at end of file diff --git a/v2rayn/v2rayN/ServiceLib/ServiceLib.csproj b/v2rayn/v2rayN/ServiceLib/ServiceLib.csproj index 4b86181536..ddef44e2c8 100644 --- a/v2rayn/v2rayN/ServiceLib/ServiceLib.csproj +++ b/v2rayn/v2rayN/ServiceLib/ServiceLib.csproj @@ -14,7 +14,7 @@ - + diff --git a/v2rayn/v2rayN/ServiceLib/ViewModels/BackupAndRestoreViewModel.cs b/v2rayn/v2rayN/ServiceLib/ViewModels/BackupAndRestoreViewModel.cs index 9fca6a70b4..e83abe1f5c 100644 --- a/v2rayn/v2rayN/ServiceLib/ViewModels/BackupAndRestoreViewModel.cs +++ b/v2rayn/v2rayN/ServiceLib/ViewModels/BackupAndRestoreViewModel.cs @@ -7,6 +7,9 @@ namespace ServiceLib.ViewModels { public class BackupAndRestoreViewModel : MyReactiveObject { + private readonly string _guiConfigs = "guiConfigs"; + private static string BackupFileName => $"backup_{DateTime.Now:yyyyMMddHHmmss}.zip"; + public ReactiveCommand RemoteBackupCmd { get; } public ReactiveCommand RemoteRestoreCmd { get; } public ReactiveCommand WebDavCheckCmd { get; } @@ -65,7 +68,7 @@ namespace ServiceLib.ViewModels private async Task RemoteBackup() { DisplayOperationMsg(); - var fileName = Utils.GetBackupPath($"backup_{DateTime.Now:yyyyMMddHHmmss}.zip"); + var fileName = Utils.GetBackupPath(BackupFileName); var result = await CreateZipFileFromDirectory(fileName); if (result) { @@ -122,9 +125,16 @@ namespace ServiceLib.ViewModels { return; } + //check + var lstFiles = FileManager.GetFilesFromZip(fileName); + if (lstFiles is null || !lstFiles.Where(t => t.Contains(_guiConfigs)).Any()) + { + DisplayOperationMsg(ResUI.LocalRestoreInvalidZipTips); + return; + } //backup first - var fileBackup = Utils.GetBackupPath($"backup_{DateTime.Now:yyyyMMddHHmmss}.zip"); + var fileBackup = Utils.GetBackupPath(BackupFileName); var result = await CreateZipFileFromDirectory(fileBackup); if (result) { @@ -145,9 +155,9 @@ namespace ServiceLib.ViewModels var configDir = Utils.GetConfigPath(); var configDirZipTemp = Utils.GetTempPath($"v2rayN_{DateTime.Now:yyyyMMddHHmmss}"); - var configDirTemp = Path.Combine(configDirZipTemp, "guiConfigs"); + var configDirTemp = Path.Combine(configDirZipTemp, _guiConfigs); - await Task.Run(() => FileManager.CopyDirectory(configDir, configDirTemp, true, "cache.db")); + await Task.Run(() => FileManager.CopyDirectory(configDir, configDirTemp, false, "cache.db")); var ret = await Task.Run(() => FileManager.CreateFromDirectory(configDirZipTemp, fileName)); await Task.Run(() => Directory.Delete(configDirZipTemp, true)); return ret; diff --git a/v2rayn/v2rayN/ServiceLib/ViewModels/MainWindowViewModel.cs b/v2rayn/v2rayN/ServiceLib/ViewModels/MainWindowViewModel.cs index c11f60350d..7977bce281 100644 --- a/v2rayn/v2rayN/ServiceLib/ViewModels/MainWindowViewModel.cs +++ b/v2rayn/v2rayN/ServiceLib/ViewModels/MainWindowViewModel.cs @@ -349,10 +349,6 @@ namespace ServiceLib.ViewModels private void UpdateHandler(bool notify, string msg) { - if (!_config.uiItem.showInTaskbar) - { - return; - } _noticeHandler?.SendMessage(msg); if (notify) { @@ -611,21 +607,16 @@ namespace ServiceLib.ViewModels SetDefaultServer(SelectedServer.ID); } - public void TestServerAvailability() + public async Task TestServerAvailability() { var item = ConfigHandler.GetDefaultServer(_config); if (item == null) { return; } - (new UpdateHandler()).RunAvailabilityCheck(async (bool success, string msg) => + await (new UpdateHandler()).RunAvailabilityCheck(async (bool success, string msg) => { _noticeHandler?.SendMessageEx(msg); - - if (!_config.uiItem.showInTaskbar) - { - return; - } await _updateView?.Invoke(EViewAction.DispatcherServerAvailability, msg); }); } @@ -715,7 +706,7 @@ namespace ServiceLib.ViewModels LoadCore().ContinueWith(async task => { - TestServerAvailability(); + await TestServerAvailability(); await _updateView?.Invoke(EViewAction.DispatcherReload, null); }); diff --git a/v2rayn/v2rayN/ServiceLib/ViewModels/MsgViewModel.cs b/v2rayn/v2rayN/ServiceLib/ViewModels/MsgViewModel.cs index e638410646..c2d9f1cd54 100644 --- a/v2rayn/v2rayN/ServiceLib/ViewModels/MsgViewModel.cs +++ b/v2rayn/v2rayN/ServiceLib/ViewModels/MsgViewModel.cs @@ -60,6 +60,10 @@ namespace ServiceLib.ViewModels } _blLockShow = true; + if (!_config.uiItem.showInTaskbar) + { + await Task.Delay(1000); + } await Task.Delay(100); var txt = string.Join("", _queueMsg.ToArray()); diff --git a/v2rayn/v2rayN/v2rayN.Desktop/Styles/GlobalStyles.axaml b/v2rayn/v2rayN/v2rayN.Desktop/Styles/GlobalStyles.axaml index ca5f9081fa..aaeec2c53a 100644 --- a/v2rayn/v2rayN/v2rayN.Desktop/Styles/GlobalStyles.axaml +++ b/v2rayn/v2rayN/v2rayN.Desktop/Styles/GlobalStyles.axaml @@ -5,22 +5,6 @@ - - - - - - diff --git a/v2rayn/v2rayN/v2rayN.Desktop/Views/AddServer2Window.axaml b/v2rayn/v2rayN/v2rayN.Desktop/Views/AddServer2Window.axaml index 2f54573d15..797d8117e4 100644 --- a/v2rayn/v2rayN/v2rayN.Desktop/Views/AddServer2Window.axaml +++ b/v2rayn/v2rayN/v2rayN.Desktop/Views/AddServer2Window.axaml @@ -16,7 +16,7 @@ @@ -75,14 +75,14 @@ Grid.Row="2" Grid.Column="0" VerticalAlignment="Center" - Classes="Margin4" + Classes="Margin8" Text="protocol" /> @@ -90,13 +90,13 @@ Grid.Row="3" Grid.Column="0" VerticalAlignment="Center" - Classes="Margin4" + Classes="Margin8" Text="inboundTag" /> @@ -104,34 +104,34 @@ Grid.Row="4" Grid.Column="0" VerticalAlignment="Center" - Classes="Margin4" + Classes="Margin8" Text="network" /> + Classes="Margin8" /> diff --git a/v2rayn/v2rayN/v2rayN.Desktop/Views/RoutingRuleSettingWindow.axaml b/v2rayn/v2rayN/v2rayN.Desktop/Views/RoutingRuleSettingWindow.axaml index 27a76c06b1..0f56a2a08d 100644 --- a/v2rayn/v2rayN/v2rayN.Desktop/Views/RoutingRuleSettingWindow.axaml +++ b/v2rayn/v2rayN/v2rayN.Desktop/Views/RoutingRuleSettingWindow.axaml @@ -62,7 +62,7 @@ Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" - Classes="Margin4" + Classes="Margin8" Text="{x:Static resx:ResUI.LvRemarks}" /> + Classes="Margin8" /> + Classes="Margin8" /> + Classes="Margin8" /> @@ -168,13 +168,13 @@ Width="600" HorizontalAlignment="Left" VerticalAlignment="Center" - Classes="Margin4" + Classes="Margin8" TextWrapping="Wrap" />