remove some dependencies (#226)

* remove some dependencies

* more

* more

* more

* more
This commit is contained in:
Logan McNaughton 2025-02-05 19:31:38 +01:00 committed by GitHub
parent a8e7c3c136
commit 58eaad1742
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 186 additions and 679 deletions

580
Cargo.lock generated
View File

@ -18,98 +18,6 @@ version = "0.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c71b1793ee61086797f5c80b6efa2b8ffa6d5dd703f118545808a7f2e27f7046"
[[package]]
name = "accesskit"
version = "0.17.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3d3b8f9bae46a948369bc4a03e815d4ed6d616bd00de4051133a5019dc31c5a"
[[package]]
name = "accesskit_atspi_common"
version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7c5dd55e6e94949498698daf4d48fb5659e824d7abec0d394089656ceaf99d4f"
dependencies = [
"accesskit",
"accesskit_consumer",
"atspi-common",
"serde",
"thiserror 1.0.69",
"zvariant 4.2.0",
]
[[package]]
name = "accesskit_consumer"
version = "0.26.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f47983a1084940ba9a39c077a8c63e55c619388be5476ac04c804cfbd1e63459"
dependencies = [
"accesskit",
"hashbrown 0.15.2",
"immutable-chunkmap",
]
[[package]]
name = "accesskit_macos"
version = "0.18.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7329821f3bd1101e03a7d2e03bd339e3ac0dc64c70b4c9f9ae1949e3ba8dece1"
dependencies = [
"accesskit",
"accesskit_consumer",
"hashbrown 0.15.2",
"objc2",
"objc2-app-kit",
"objc2-foundation",
]
[[package]]
name = "accesskit_unix"
version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fcee751cc20d88678c33edaf9c07e8b693cd02819fe89053776f5313492273f5"
dependencies = [
"accesskit",
"accesskit_atspi_common",
"async-channel",
"async-executor",
"async-task",
"atspi",
"futures-lite",
"futures-util",
"serde",
"zbus 4.4.0",
]
[[package]]
name = "accesskit_windows"
version = "0.24.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24fcd5d23d70670992b823e735e859374d694a3d12bfd8dd32bd3bd8bedb5d81"
dependencies = [
"accesskit",
"accesskit_consumer",
"hashbrown 0.15.2",
"paste",
"static_assertions",
"windows",
"windows-core 0.58.0",
]
[[package]]
name = "accesskit_winit"
version = "0.23.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6a6a48dad5530b6deb9fc7a52cc6c3bf72cdd9eb8157ac9d32d69f2427a5e879"
dependencies = [
"accesskit",
"accesskit_macos",
"accesskit_unix",
"accesskit_windows",
"raw-window-handle",
"winit",
]
[[package]]
name = "addr2line"
version = "0.24.2"
@ -277,12 +185,6 @@ dependencies = [
"x11rb",
]
[[package]]
name = "arrayref"
version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb"
[[package]]
name = "arrayvec"
version = "0.7.6"
@ -310,8 +212,6 @@ version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e9c39d707614dbcc6bed00015539f488d8e3fe3e66ed60961efc0c90f4b380b3"
dependencies = [
"async-fs",
"async-net",
"enumflags2",
"futures-channel",
"futures-util",
@ -319,11 +219,12 @@ dependencies = [
"raw-window-handle",
"serde",
"serde_repr",
"tokio",
"url",
"wayland-backend",
"wayland-client",
"wayland-protocols",
"zbus 5.4.0",
"zbus",
]
[[package]]
@ -338,102 +239,6 @@ dependencies = [
"pin-project-lite",
]
[[package]]
name = "async-channel"
version = "2.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a"
dependencies = [
"concurrent-queue",
"event-listener-strategy",
"futures-core",
"pin-project-lite",
]
[[package]]
name = "async-executor"
version = "1.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "30ca9a001c1e8ba5149f91a74362376cc6bc5b919d92d988668657bd570bdcec"
dependencies = [
"async-task",
"concurrent-queue",
"fastrand",
"futures-lite",
"slab",
]
[[package]]
name = "async-fs"
version = "2.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ebcd09b382f40fcd159c2d695175b2ae620ffa5f3bd6f664131efff4e8b9e04a"
dependencies = [
"async-lock",
"blocking",
"futures-lite",
]
[[package]]
name = "async-io"
version = "2.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "43a2b323ccce0a1d90b449fd71f2a06ca7faa7c54c2751f06c9bd851fc061059"
dependencies = [
"async-lock",
"cfg-if",
"concurrent-queue",
"futures-io",
"futures-lite",
"parking",
"polling",
"rustix",
"slab",
"tracing",
"windows-sys 0.59.0",
]
[[package]]
name = "async-lock"
version = "3.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18"
dependencies = [
"event-listener",
"event-listener-strategy",
"pin-project-lite",
]
[[package]]
name = "async-net"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b948000fad4873c1c9339d60f2623323a0cfd3816e5181033c6a5cb68b2accf7"
dependencies = [
"async-io",
"blocking",
"futures-lite",
]
[[package]]
name = "async-process"
version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "63255f1dc2381611000436537bbedfe83183faa303a5a0edaf191edef06526bb"
dependencies = [
"async-channel",
"async-io",
"async-lock",
"async-signal",
"async-task",
"blocking",
"cfg-if",
"event-listener",
"futures-lite",
"rustix",
"tracing",
]
[[package]]
name = "async-recursion"
version = "1.1.1"
@ -445,30 +250,6 @@ dependencies = [
"syn",
]
[[package]]
name = "async-signal"
version = "0.2.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "637e00349800c0bdf8bfc21ebbc0b6524abea702b0da4168ac00d070d0c0b9f3"
dependencies = [
"async-io",
"async-lock",
"atomic-waker",
"cfg-if",
"futures-core",
"futures-io",
"rustix",
"signal-hook-registry",
"slab",
"windows-sys 0.59.0",
]
[[package]]
name = "async-task"
version = "4.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de"
[[package]]
name = "async-trait"
version = "0.1.86"
@ -495,57 +276,6 @@ version = "1.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0"
[[package]]
name = "atspi"
version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "be534b16650e35237bb1ed189ba2aab86ce65e88cc84c66f4935ba38575cecbf"
dependencies = [
"atspi-common",
"atspi-connection",
"atspi-proxies",
]
[[package]]
name = "atspi-common"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1909ed2dc01d0a17505d89311d192518507e8a056a48148e3598fef5e7bb6ba7"
dependencies = [
"enumflags2",
"serde",
"static_assertions",
"zbus 4.4.0",
"zbus-lockstep",
"zbus-lockstep-macros",
"zbus_names 3.0.0",
"zvariant 4.2.0",
]
[[package]]
name = "atspi-connection"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "430c5960624a4baaa511c9c0fcc2218e3b58f5dbcc47e6190cafee344b873333"
dependencies = [
"atspi-common",
"atspi-proxies",
"futures-lite",
"zbus 4.4.0",
]
[[package]]
name = "atspi-proxies"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a5e6c5de3e524cf967569722446bcd458d5032348554d9a17d7d72b041ab7496"
dependencies = [
"atspi-common",
"serde",
"zbus 4.4.0",
"zvariant 4.2.0",
]
[[package]]
name = "autocfg"
version = "1.4.0"
@ -662,19 +392,6 @@ dependencies = [
"objc2",
]
[[package]]
name = "blocking"
version = "1.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "703f41c54fc768e63e091340b424302bb1c29ef4aa0c7f10fe849dfb114d29ea"
dependencies = [
"async-channel",
"async-task",
"futures-io",
"futures-lite",
"piper",
]
[[package]]
name = "bumpalo"
version = "3.17.0"
@ -1212,7 +929,6 @@ dependencies = [
"egui-wgpu",
"egui-winit",
"egui_glow",
"glow",
"glutin",
"glutin-winit",
"image",
@ -1223,6 +939,7 @@ dependencies = [
"objc2-foundation",
"parking_lot",
"percent-encoding",
"pollster",
"profiling",
"raw-window-handle",
"static_assertions",
@ -1230,6 +947,7 @@ dependencies = [
"wasm-bindgen-futures",
"web-sys",
"web-time",
"wgpu",
"winapi",
"windows-sys 0.59.0",
"winit",
@ -1241,7 +959,6 @@ version = "0.31.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7d2768eaa6d5c80a6e2a008da1f0e062dff3c83eb2b28605ea2d0732d46e74d6"
dependencies = [
"accesskit",
"ahash",
"bitflags 2.8.0",
"emath",
@ -1277,7 +994,6 @@ version = "0.31.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ace791b367c1f63e6044aef2f3834904509d1d1a6912fd23ebf3f6a9af92cd84"
dependencies = [
"accesskit_winit",
"ahash",
"arboard",
"bytemuck",
@ -1383,19 +1099,12 @@ dependencies = [
"bytemuck",
"ecolor",
"emath",
"epaint_default_fonts",
"log",
"nohash-hasher",
"parking_lot",
"profiling",
]
[[package]]
name = "epaint_default_fonts"
version = "0.31.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9343d356d7cac894dacafc161b4654e0881301097bdf32a122ed503d97cb94b6"
[[package]]
name = "equivalent"
version = "1.0.1"
@ -1554,7 +1263,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10"
dependencies = [
"futures-core",
"futures-sink",
]
[[package]]
@ -1563,25 +1271,6 @@ version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e"
[[package]]
name = "futures-io"
version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6"
[[package]]
name = "futures-lite"
version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f5edaec856126859abb19ed65f39e90fea3a9574b9707f13539acf4abf7eb532"
dependencies = [
"fastrand",
"futures-core",
"futures-io",
"parking",
"pin-project-lite",
]
[[package]]
name = "futures-macro"
version = "0.3.31"
@ -1618,11 +1307,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81"
dependencies = [
"futures-core",
"futures-io",
"futures-macro",
"futures-sink",
"futures-task",
"memchr",
"pin-project-lite",
"pin-utils",
"slab",
@ -1800,6 +1487,7 @@ dependencies = [
"sha2",
"socket2",
"spin_sleep",
"tokio",
"tungstenite",
"winres",
"zip",
@ -2236,15 +1924,6 @@ dependencies = [
"tiff",
]
[[package]]
name = "immutable-chunkmap"
version = "2.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "12f97096f508d54f8f8ab8957862eee2ccd628847b6217af1a335e1c44dee578"
dependencies = [
"arrayvec",
]
[[package]]
name = "indexmap"
version = "2.7.1"
@ -3051,17 +2730,6 @@ version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
[[package]]
name = "piper"
version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066"
dependencies = [
"atomic-waker",
"fastrand",
"futures-io",
]
[[package]]
name = "pkg-config"
version = "0.3.31"
@ -3185,16 +2853,6 @@ dependencies = [
"winapi",
]
[[package]]
name = "quick-xml"
version = "0.30.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eff6510e86862b57b210fd8cbe8ed3f0d7d600b9c2863cd4549a2e033c66e956"
dependencies = [
"memchr",
"serde",
]
[[package]]
name = "quick-xml"
version = "0.37.2"
@ -3383,7 +3041,6 @@ dependencies = [
"base64",
"bytes",
"encoding_rs",
"futures-channel",
"futures-core",
"futures-util",
"h2",
@ -3591,19 +3248,6 @@ version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
[[package]]
name = "sctk-adwaita"
version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6277f0217056f77f1d8f49f2950ac6c278c0d607c45f5ee99328d792ede24ec"
dependencies = [
"ab_glyph",
"log",
"memmap2",
"smithay-client-toolkit",
"tiny-skia",
]
[[package]]
name = "sdl3-src"
version = "3.2.2"
@ -3869,12 +3513,6 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
[[package]]
name = "strict-num"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731"
[[package]]
name = "strsim"
version = "0.11.1"
@ -4044,31 +3682,6 @@ dependencies = [
"time-core",
]
[[package]]
name = "tiny-skia"
version = "0.11.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "83d13394d44dae3207b52a326c0c85a8bf87f1541f23b0d143811088497b09ab"
dependencies = [
"arrayref",
"arrayvec",
"bytemuck",
"cfg-if",
"log",
"tiny-skia-path",
]
[[package]]
name = "tiny-skia-path"
version = "0.11.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c9e7fc0c2e86a30b117d0462aa261b72b7a99b7ebd7deb3a14ceda95c5bdc93"
dependencies = [
"arrayref",
"bytemuck",
"strict-num",
]
[[package]]
name = "tinystr"
version = "0.7.6"
@ -4105,10 +3718,24 @@ dependencies = [
"libc",
"mio",
"pin-project-lite",
"signal-hook-registry",
"socket2",
"tokio-macros",
"tracing",
"windows-sys 0.52.0",
]
[[package]]
name = "tokio-macros"
version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "tokio-rustls"
version = "0.26.1"
@ -4554,7 +4181,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "896fdafd5d28145fce7958917d69f2fd44469b1d4e861cb5961bcbeebc6d1484"
dependencies = [
"proc-macro2",
"quick-xml 0.37.2",
"quick-xml",
"quote",
]
@ -4635,6 +4262,7 @@ dependencies = [
"document-features",
"js-sys",
"log",
"naga",
"parking_lot",
"profiling",
"raw-window-handle",
@ -4683,6 +4311,7 @@ dependencies = [
"arrayvec",
"ash",
"bitflags 2.8.0",
"block",
"bytemuck",
"cfg_aliases",
"core-graphics-types",
@ -5088,7 +4717,6 @@ dependencies = [
"raw-window-handle",
"redox_syscall 0.4.1",
"rustix",
"sctk-adwaita",
"smithay-client-toolkit",
"smol_str",
"tracing",
@ -5243,44 +4871,6 @@ dependencies = [
"synstructure",
]
[[package]]
name = "zbus"
version = "4.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bb97012beadd29e654708a0fdb4c84bc046f537aecfde2c3ee0a9e4b4d48c725"
dependencies = [
"async-broadcast",
"async-executor",
"async-fs",
"async-io",
"async-lock",
"async-process",
"async-recursion",
"async-task",
"async-trait",
"blocking",
"enumflags2",
"event-listener",
"futures-core",
"futures-sink",
"futures-util",
"hex",
"nix",
"ordered-stream",
"rand",
"serde",
"serde_repr",
"sha1",
"static_assertions",
"tracing",
"uds_windows",
"windows-sys 0.52.0",
"xdg-home",
"zbus_macros 4.4.0",
"zbus_names 3.0.0",
"zvariant 4.2.0",
]
[[package]]
name = "zbus"
version = "5.4.0"
@ -5288,15 +4878,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cbddd8b6cb25d5d8ec1b23277b45299a98bfb220f1761ca11e186d5c702507f8"
dependencies = [
"async-broadcast",
"async-executor",
"async-fs",
"async-io",
"async-lock",
"async-process",
"async-recursion",
"async-task",
"async-trait",
"blocking",
"enumflags2",
"event-listener",
"futures-core",
@ -5307,51 +4890,15 @@ dependencies = [
"serde",
"serde_repr",
"static_assertions",
"tokio",
"tracing",
"uds_windows",
"windows-sys 0.59.0",
"winnow",
"xdg-home",
"zbus_macros 5.4.0",
"zbus_names 4.2.0",
"zvariant 5.3.0",
]
[[package]]
name = "zbus-lockstep"
version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4ca2c5dceb099bddaade154055c926bb8ae507a18756ba1d8963fd7b51d8ed1d"
dependencies = [
"zbus_xml",
"zvariant 4.2.0",
]
[[package]]
name = "zbus-lockstep-macros"
version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "709ab20fc57cb22af85be7b360239563209258430bccf38d8b979c5a2ae3ecce"
dependencies = [
"proc-macro2",
"quote",
"syn",
"zbus-lockstep",
"zbus_xml",
"zvariant 4.2.0",
]
[[package]]
name = "zbus_macros"
version = "4.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "267db9407081e90bbfa46d841d3cbc60f59c0351838c4bc65199ecd79ab1983e"
dependencies = [
"proc-macro-crate",
"proc-macro2",
"quote",
"syn",
"zvariant_utils 2.1.0",
"zbus_macros",
"zbus_names",
"zvariant",
]
[[package]]
@ -5364,20 +4911,9 @@ dependencies = [
"proc-macro2",
"quote",
"syn",
"zbus_names 4.2.0",
"zvariant 5.3.0",
"zvariant_utils 3.2.0",
]
[[package]]
name = "zbus_names"
version = "3.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4b9b1fef7d021261cc16cba64c351d291b715febe0fa10dc3a443ac5a5022e6c"
dependencies = [
"serde",
"static_assertions",
"zvariant 4.2.0",
"zbus_names",
"zvariant",
"zvariant_utils",
]
[[package]]
@ -5389,20 +4925,7 @@ dependencies = [
"serde",
"static_assertions",
"winnow",
"zvariant 5.3.0",
]
[[package]]
name = "zbus_xml"
version = "4.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ab3f374552b954f6abb4bd6ce979e6c9b38fb9d0cd7cc68a7d796e70c9f3a233"
dependencies = [
"quick-xml 0.30.0",
"serde",
"static_assertions",
"zbus_names 3.0.0",
"zvariant 4.2.0",
"zvariant",
]
[[package]]
@ -5560,19 +5083,6 @@ dependencies = [
"pkg-config",
]
[[package]]
name = "zvariant"
version = "4.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2084290ab9a1c471c38fc524945837734fbf124487e105daec2bb57fd48c81fe"
dependencies = [
"endi",
"enumflags2",
"serde",
"static_assertions",
"zvariant_derive 4.2.0",
]
[[package]]
name = "zvariant"
version = "5.3.0"
@ -5585,21 +5095,8 @@ dependencies = [
"static_assertions",
"url",
"winnow",
"zvariant_derive 5.3.0",
"zvariant_utils 3.2.0",
]
[[package]]
name = "zvariant_derive"
version = "4.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "73e2ba546bda683a90652bac4a279bc146adad1386f25379cf73200d2002c449"
dependencies = [
"proc-macro-crate",
"proc-macro2",
"quote",
"syn",
"zvariant_utils 2.1.0",
"zvariant_derive",
"zvariant_utils",
]
[[package]]
@ -5612,18 +5109,7 @@ dependencies = [
"proc-macro2",
"quote",
"syn",
"zvariant_utils 3.2.0",
]
[[package]]
name = "zvariant_utils"
version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c51bcff7cc3dbb5055396bcf774748c3dab426b4b8659046963523cee4808340"
dependencies = [
"proc-macro2",
"quote",
"syn",
"zvariant_utils",
]
[[package]]

View File

@ -14,11 +14,12 @@ sevenz-rust = "0.6"
chrono = "0.4"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
eframe = "0.31"
eframe = { version = "0.31", default-features = false, features = ["wayland", "x11", "wgpu"] }
sha2 = "0.10"
rusttype = "0.9"
sdl3-sys = { version = "0.4", features = ["build-from-source-static"] }
rfd = "0.15"
rfd = { version = "0.15", default-features = false, features = ["xdg-portal", "tokio"] }
tokio = {version = "1.43", features = ["rt-multi-thread", "macros"] }
spin_sleep = "1.3"
encoding_rs = "0.8"
mimalloc = "0.1"
@ -28,7 +29,7 @@ socket2 = "0.5"
fatfs = "0.3"
postcard = { version = "1.1", features = ["use-std"] }
clap = { version = "4.4", features = ["derive"] }
reqwest = { version = "0.12", default-features = false, features = ["http2","rustls-tls","charset","json","blocking"] }
reqwest = { version = "0.12", default-features = false, features = ["http2","rustls-tls","charset","json"] }
[build-dependencies]
winres = "0.1"

View File

@ -26,8 +26,8 @@ pub struct Vru {
pub words: Vec<String>,
pub talking: bool,
pub word_mappings: HashMap<String, String>,
pub window_notifier: Option<std::sync::mpsc::Sender<Vec<String>>>,
pub word_receiver: Option<std::sync::mpsc::Receiver<String>>,
pub window_notifier: Option<tokio::sync::mpsc::Sender<Vec<String>>>,
pub word_receiver: Option<tokio::sync::mpsc::Receiver<String>>,
pub gui_ctx: Option<egui::Context>,
}
@ -187,7 +187,7 @@ pub fn process(device: &mut device::Device, channel: usize) {
ui::vru::prompt_for_match(
&device.vru.words,
device.vru.window_notifier.as_ref().unwrap(),
device.vru.word_receiver.as_ref().unwrap(),
device.vru.word_receiver.as_mut().unwrap(),
device.vru.gui_ctx.as_ref().unwrap(),
)
} else {

View File

@ -64,7 +64,8 @@ struct Args {
clear_input_bindings: bool,
}
fn main() {
#[tokio::main]
async fn main() {
let dirs = ui::get_dirs();
let mut result = std::fs::create_dir_all(dirs.config_dir);

View File

@ -30,7 +30,7 @@ pub struct Netplay {
status: u8,
buffer_target: u8,
pub fast_forward: bool,
pub error_notifier: std::sync::mpsc::Sender<String>,
pub error_notifier: tokio::sync::mpsc::Sender<String>,
pub gui_ctx: egui::Context,
}
@ -47,7 +47,7 @@ struct InputEvent {
}
fn send_error(netplay: &mut Netplay, error: String) {
netplay.error_notifier.send(error).unwrap();
netplay.error_notifier.try_send(error).unwrap();
netplay.gui_ctx.request_repaint(); // this is so the window pops up right away
}
@ -219,7 +219,7 @@ pub fn init(
mut peer_addr: std::net::SocketAddr,
session: ui::gui::gui_netplay::NetplayRoom,
player_number: u8,
error_notifier: std::sync::mpsc::Sender<String>,
error_notifier: tokio::sync::mpsc::Sender<String>,
gui_ctx: egui::Context,
) -> Netplay {
peer_addr.set_port(session.port.unwrap() as u16);

View File

@ -21,9 +21,9 @@ pub struct GopherEguiApp {
emulate_vru: bool,
dinput: bool,
show_vru_dialog: bool,
vru_window_receiver: Option<std::sync::mpsc::Receiver<Vec<String>>>,
netplay_error_receiver: Option<std::sync::mpsc::Receiver<String>>,
vru_word_notifier: Option<std::sync::mpsc::Sender<String>>,
vru_window_receiver: Option<tokio::sync::mpsc::Receiver<Vec<String>>>,
netplay_error_receiver: Option<tokio::sync::mpsc::Receiver<String>>,
vru_word_notifier: Option<tokio::sync::mpsc::Sender<String>>,
vru_word_list: Vec<String>,
pub netplay: gui_netplay::GuiNetplay,
}
@ -84,7 +84,7 @@ impl GopherEguiApp {
controller_paths: Vec<String>,
controller_names: Vec<String>,
) -> GopherEguiApp {
add_japanese_font(&cc.egui_ctx);
add_fonts(&cc.egui_ctx);
let config = ui::config::Config::new();
let mut selected_controller = [-1, -1, -1, -1];
@ -236,7 +236,7 @@ fn show_vru_dialog(app: &mut GopherEguiApp, ctx: &egui::Context) {
app.vru_word_notifier
.as_ref()
.unwrap()
.send(v.clone())
.try_send(v.clone())
.unwrap();
app.show_vru_dialog = false;
}
@ -248,7 +248,7 @@ fn show_vru_dialog(app: &mut GopherEguiApp, ctx: &egui::Context) {
app.vru_word_notifier
.as_ref()
.unwrap()
.send(String::from(""))
.try_send(String::from(""))
.unwrap();
app.show_vru_dialog = false;
}
@ -285,19 +285,19 @@ pub fn open_rom(app: &mut GopherEguiApp, ctx: &egui::Context) {
}
let (netplay_error_notifier, netplay_error_receiver): (
std::sync::mpsc::Sender<String>,
std::sync::mpsc::Receiver<String>,
) = std::sync::mpsc::channel();
tokio::sync::mpsc::Sender<String>,
tokio::sync::mpsc::Receiver<String>,
) = tokio::sync::mpsc::channel(1);
let (vru_window_notifier, vru_window_receiver): (
std::sync::mpsc::Sender<Vec<String>>,
std::sync::mpsc::Receiver<Vec<String>>,
) = std::sync::mpsc::channel();
tokio::sync::mpsc::Sender<Vec<String>>,
tokio::sync::mpsc::Receiver<Vec<String>>,
) = tokio::sync::mpsc::channel(1);
let (vru_word_notifier, vru_word_receiver): (
std::sync::mpsc::Sender<String>,
std::sync::mpsc::Receiver<String>,
) = std::sync::mpsc::channel();
tokio::sync::mpsc::Sender<String>,
tokio::sync::mpsc::Receiver<String>,
) = tokio::sync::mpsc::channel(1);
if netplay {
app.netplay_error_receiver = Some(netplay_error_receiver);
@ -312,83 +312,89 @@ pub fn open_rom(app: &mut GopherEguiApp, ctx: &egui::Context) {
let rom_contents = app.netplay.rom_contents.clone();
let gui_ctx = ctx.clone();
std::thread::spawn(move || {
let file = if !netplay {
rfd::FileDialog::new().pick_file()
} else {
None
};
let save_config_items = SaveConfig {
selected_controller,
selected_profile,
controller_enabled,
upscale,
integer_scaling,
fullscreen,
emulate_vru,
};
let mut task = None;
if !netplay {
task = Some(rfd::AsyncFileDialog::new().pick_file());
}
tokio::spawn(async move {
let file = if !netplay { task.unwrap().await } else { None };
if cfg!(target_os = "macos") && file.is_some() {
// mac os requires the process to be started on the main thread
// this means that netplay and VRU emulation will not work on mac os
{
let mut config = ui::config::Config::new();
save_config(&mut config, controller_paths, save_config_items);
}
let mut command = std::process::Command::new(std::env::current_exe().unwrap());
if fullscreen {
command.arg("--fullscreen");
}
command.arg(file.unwrap().as_path());
std::thread::Builder::new()
.name("n64".to_string())
.spawn(move || {
let save_config_items = SaveConfig {
selected_controller,
selected_profile,
controller_enabled,
upscale,
integer_scaling,
fullscreen,
emulate_vru,
};
let status = command.status().expect("failed to execute process");
if !status.success() {
panic!("process exited with: {}", status);
}
} else if file.is_some() || netplay {
let running_file = cache_dir.join("game_running");
if running_file.exists() {
println!("Game already running");
return;
}
let result = std::fs::File::create(running_file.clone());
if result.is_err() {
panic!("could not create running file: {}", result.err().unwrap())
}
if cfg!(target_os = "macos") && file.is_some() {
// mac os requires the process to be started on the main thread
// this means that netplay and VRU emulation will not work on mac os
{
let mut config = ui::config::Config::new();
save_config(&mut config, controller_paths, save_config_items);
}
let mut command = std::process::Command::new(std::env::current_exe().unwrap());
if fullscreen {
command.arg("--fullscreen");
}
command.arg(file.unwrap().path());
let mut device = device::Device::new();
save_config(&mut device.ui.config, controller_paths, save_config_items);
let status = command.status().expect("failed to execute process");
if !status.success() {
panic!("process exited with: {}", status);
}
} else if file.is_some() || netplay {
let running_file = cache_dir.join("game_running");
if running_file.exists() {
println!("Game already running");
return;
}
let result = std::fs::File::create(running_file.clone());
if result.is_err() {
panic!("could not create running file: {}", result.err().unwrap())
}
if netplay {
device.netplay = Some(netplay::init(
peer_addr.unwrap(),
session.unwrap(),
player_number.unwrap(),
netplay_error_notifier,
gui_ctx,
));
device::run_game(rom_contents, &mut device, fullscreen);
netplay::close(&mut device);
} else {
if emulate_vru {
device.vru.window_notifier = Some(vru_window_notifier);
device.vru.word_receiver = Some(vru_word_receiver);
device.vru.gui_ctx = Some(gui_ctx);
let mut device = device::Device::new();
save_config(&mut device.ui.config, controller_paths, save_config_items);
if netplay {
device.netplay = Some(netplay::init(
peer_addr.unwrap(),
session.unwrap(),
player_number.unwrap(),
netplay_error_notifier,
gui_ctx,
));
device::run_game(rom_contents, &mut device, fullscreen);
netplay::close(&mut device);
} else {
if emulate_vru {
device.vru.window_notifier = Some(vru_window_notifier);
device.vru.word_receiver = Some(vru_word_receiver);
device.vru.gui_ctx = Some(gui_ctx);
}
let rom_contents = device::get_rom_contents(file.unwrap().path());
if rom_contents.is_empty() {
println!("Could not read rom file");
} else {
device::run_game(rom_contents, &mut device, fullscreen);
}
}
let result = std::fs::remove_file(running_file);
if result.is_err() {
panic!("could not remove running file: {}", result.err().unwrap())
}
}
let rom_contents = device::get_rom_contents(file.unwrap().as_path());
if rom_contents.is_empty() {
println!("Could not read rom file");
} else {
device::run_game(rom_contents, &mut device, fullscreen);
}
}
let result = std::fs::remove_file(running_file);
if result.is_err() {
panic!("could not remove running file: {}", result.err().unwrap())
}
}
})
.unwrap();
});
}
@ -407,7 +413,7 @@ impl eframe::App for GopherEguiApp {
}
if self.netplay_error_receiver.is_some() {
let result = self.netplay_error_receiver.as_ref().unwrap().try_recv();
let result = self.netplay_error_receiver.as_mut().unwrap().try_recv();
if result.is_ok() {
self.netplay.error = result.unwrap();
}
@ -518,7 +524,7 @@ impl eframe::App for GopherEguiApp {
});
if self.emulate_vru && self.vru_window_receiver.is_some() {
let result = self.vru_window_receiver.as_ref().unwrap().try_recv();
let result = self.vru_window_receiver.as_mut().unwrap().try_recv();
if result.is_ok() {
self.show_vru_dialog = true;
self.vru_word_list = result.unwrap();
@ -531,7 +537,21 @@ impl eframe::App for GopherEguiApp {
}
}
fn add_japanese_font(ctx: &egui::Context) {
fn add_fonts(ctx: &egui::Context) {
ctx.add_font(eframe::epaint::text::FontInsert::new(
"regular_font",
egui::FontData::from_static(include_bytes!("../../data/Roboto-Regular.ttf")),
vec![
eframe::epaint::text::InsertFontFamily {
family: egui::FontFamily::Proportional,
priority: egui::epaint::text::FontPriority::Highest,
},
eframe::epaint::text::InsertFontFamily {
family: egui::FontFamily::Monospace,
priority: egui::epaint::text::FontPriority::Highest,
},
],
));
ctx.add_font(eframe::epaint::text::FontInsert::new(
"japanese_font",
egui::FontData::from_static(include_bytes!("../../data/NotoSansJP-Regular.ttf")),

View File

@ -41,8 +41,8 @@ pub struct GuiNetplay {
pub socket:
Option<tungstenite::WebSocket<tungstenite::stream::MaybeTlsStream<std::net::TcpStream>>>,
pub server_receiver:
Option<std::sync::mpsc::Receiver<std::collections::HashMap<String, String>>>,
pub game_info_receiver: Option<std::sync::mpsc::Receiver<GameInfo>>,
Option<tokio::sync::mpsc::Receiver<std::collections::HashMap<String, String>>>,
pub game_info_receiver: Option<tokio::sync::mpsc::Receiver<GameInfo>>,
pub broadcast_socket: Option<std::net::UdpSocket>,
pub broadcast_timer: Option<std::time::Instant>,
}
@ -99,16 +99,14 @@ fn get_servers(app: &mut GopherEguiApp, ctx: &egui::Context) {
ctx.request_repaint();
}
if app.netplay.server_receiver.is_none() {
let (tx, rx) = std::sync::mpsc::channel();
let (tx, rx) = tokio::sync::mpsc::channel(1);
app.netplay.server_receiver = Some(rx);
let gui_ctx = ctx.clone();
std::thread::spawn(move || {
if let Ok(response) =
reqwest::blocking::get("https://m64p.s3.amazonaws.com/servers.json")
.unwrap()
.json::<std::collections::HashMap<String, String>>()
{
tx.send(response).unwrap();
let task = reqwest::get("https://m64p.s3.amazonaws.com/servers.json");
tokio::spawn(async move {
let response = task.await;
if let Ok(response) = response {
tx.send(response.json().await.unwrap()).await.unwrap();
gui_ctx.request_repaint();
}
});
@ -143,7 +141,7 @@ fn get_servers(app: &mut GopherEguiApp, ctx: &egui::Context) {
ctx.request_repaint();
}
if app.netplay.server_receiver.is_some() {
let result = app.netplay.server_receiver.as_ref().unwrap().try_recv();
let result = app.netplay.server_receiver.as_mut().unwrap().try_recv();
if result.is_ok() {
app.netplay.servers.extend(result.unwrap());
app.netplay.server_receiver = None;
@ -181,15 +179,16 @@ pub fn netplay_create(app: &mut GopherEguiApp, ctx: &egui::Context) {
app.netplay.create_rom_label = "Open ROM".to_string();
}
if ui.button(&app.netplay.create_rom_label).clicked() {
let (tx, rx) = std::sync::mpsc::channel();
let (tx, rx) = tokio::sync::mpsc::channel(1);
app.netplay.game_info_receiver = Some(rx);
let gui_ctx = ctx.clone();
app.netplay.create_rom_label = "Inspecting ROM".to_string();
std::thread::spawn(move || {
let file = rfd::FileDialog::new().pick_file();
let task = rfd::AsyncFileDialog::new().pick_file();
tokio::spawn(async move {
let file = task.await;
if let Some(file) = file {
parse_rom_file(file, tx);
parse_rom_file(file, tx).await;
} else {
tx.send((
"".to_string(),
@ -197,6 +196,7 @@ pub fn netplay_create(app: &mut GopherEguiApp, ctx: &egui::Context) {
"Open ROM".to_string(),
vec![],
))
.await
.unwrap();
}
gui_ctx.request_repaint();
@ -217,7 +217,7 @@ pub fn netplay_create(app: &mut GopherEguiApp, ctx: &egui::Context) {
get_servers(app, ctx);
if app.netplay.game_info_receiver.is_some() {
let result = app.netplay.game_info_receiver.as_ref().unwrap().try_recv();
let result = app.netplay.game_info_receiver.as_mut().unwrap().try_recv();
if result.is_ok() {
app.netplay.game_info_receiver = None;
let data = result.unwrap();
@ -391,19 +391,15 @@ fn get_sessions(app: &mut GopherEguiApp, ctx: &egui::Context) {
}
}
fn parse_rom_file(file: std::path::PathBuf, tx: std::sync::mpsc::Sender<GameInfo>) {
let rom_contents = device::get_rom_contents(file.as_path());
async fn parse_rom_file(file: rfd::FileHandle, tx: tokio::sync::mpsc::Sender<GameInfo>) {
let rom_contents = device::get_rom_contents(file.path());
if !rom_contents.is_empty() {
let hash = device::cart::rom::calculate_hash(&rom_contents);
let game_name = ui::storage::get_game_name(&rom_contents);
tx.send((
hash,
game_name,
file.file_name().unwrap().to_string_lossy().to_string(),
rom_contents,
))
.unwrap();
tx.send((hash, game_name, file.file_name(), rom_contents))
.await
.unwrap();
} else {
tx.send((
"".to_string(),
@ -411,6 +407,7 @@ fn parse_rom_file(file: std::path::PathBuf, tx: std::sync::mpsc::Sender<GameInfo
"Invalid ROM".to_string(),
vec![],
))
.await
.unwrap();
}
}
@ -441,7 +438,7 @@ pub fn netplay_join(app: &mut GopherEguiApp, ctx: &egui::Context) {
ctx.request_repaint();
}
if app.netplay.game_info_receiver.is_some() {
let result = app.netplay.game_info_receiver.as_ref().unwrap().try_recv();
let result = app.netplay.game_info_receiver.as_mut().unwrap().try_recv();
if result.is_ok() {
app.netplay.game_info_receiver = None;
let data = result.unwrap();
@ -582,15 +579,16 @@ pub fn netplay_join(app: &mut GopherEguiApp, ctx: &egui::Context) {
{
app.netplay.error = "Session requires a password".to_string();
} else {
let (tx, rx) = std::sync::mpsc::channel();
let (tx, rx) = tokio::sync::mpsc::channel(1);
app.netplay.game_info_receiver = Some(rx);
let gui_ctx = ctx.clone();
app.netplay.join_rom_label = "Inspecting ROM".to_string();
std::thread::spawn(move || {
let file = rfd::FileDialog::new().pick_file();
let task = rfd::AsyncFileDialog::new().pick_file();
tokio::spawn(async move {
let file = task.await;
if let Some(file) = file {
parse_rom_file(file, tx);
parse_rom_file(file, tx).await;
} else {
tx.send((
"".to_string(),
@ -598,6 +596,7 @@ pub fn netplay_join(app: &mut GopherEguiApp, ctx: &egui::Context) {
"No ROM selected".to_string(),
vec![],
))
.await
.unwrap();
}
gui_ctx.request_repaint();

View File

@ -4,14 +4,14 @@ use crate::ui;
pub fn prompt_for_match(
words: &[String],
window_notifier: &std::sync::mpsc::Sender<Vec<String>>,
word_index_receiver: &std::sync::mpsc::Receiver<String>,
window_notifier: &tokio::sync::mpsc::Sender<Vec<String>>,
word_index_receiver: &mut tokio::sync::mpsc::Receiver<String>,
gui_ctx: &egui::Context,
) -> u16 {
let mut dedup_words = words.to_owned();
dedup_words.sort();
dedup_words.dedup();
window_notifier.send(dedup_words).unwrap();
window_notifier.try_send(dedup_words).unwrap();
gui_ctx.request_repaint(); // this is so the window pops up right away
let mut result = word_index_receiver.try_recv();
while result.is_err() {