Spaces:
Running
Running
Upload folder using huggingface_hub
Browse files- launcher/Cargo.lock +1267 -0
- launcher/Cargo.toml +16 -0
- launcher/build_errors.txt +0 -0
- launcher/check_results.txt +0 -0
- launcher/error.log +0 -0
- launcher/error.txt +0 -0
- launcher/error_ascii.txt +152 -0
- launcher/error_ascii_2.txt +24 -0
- launcher/error_ascii_3.txt +16 -0
- launcher/error_deck_fix.txt +20 -0
- launcher/error_enrichment.txt +20 -0
- launcher/error_enrichment_2.txt +18 -0
- launcher/error_enrichment_3.txt +20 -0
- launcher/error_final.txt +21 -0
- launcher/error_final_2.txt +14 -0
- launcher/error_final_parity.txt +14 -0
- launcher/error_final_parity_2.txt +18 -0
- launcher/error_short.log +0 -0
- launcher/error_utf8.txt +42 -0
- launcher/errors.log +0 -0
- launcher/errors_2.log +0 -0
- launcher/errors_2_utf8.log +86 -0
- launcher/errors_utf8.log +135 -0
- launcher/final_errors.log +0 -0
- launcher/src/main.rs +1120 -0
launcher/Cargo.lock
ADDED
|
@@ -0,0 +1,1267 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
| 3 |
+
version = 4
|
| 4 |
+
|
| 5 |
+
[[package]]
|
| 6 |
+
name = "allocator-api2"
|
| 7 |
+
version = "0.2.21"
|
| 8 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 9 |
+
checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923"
|
| 10 |
+
|
| 11 |
+
[[package]]
|
| 12 |
+
name = "ascii"
|
| 13 |
+
version = "1.1.0"
|
| 14 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 15 |
+
checksum = "d92bec98840b8f03a5ff5413de5293bfcd8bf96467cf5452609f939ec6f5de16"
|
| 16 |
+
|
| 17 |
+
[[package]]
|
| 18 |
+
name = "autocfg"
|
| 19 |
+
version = "1.5.0"
|
| 20 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 21 |
+
checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
|
| 22 |
+
|
| 23 |
+
[[package]]
|
| 24 |
+
name = "block-buffer"
|
| 25 |
+
version = "0.10.4"
|
| 26 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 27 |
+
checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
|
| 28 |
+
dependencies = [
|
| 29 |
+
"generic-array",
|
| 30 |
+
]
|
| 31 |
+
|
| 32 |
+
[[package]]
|
| 33 |
+
name = "bumpalo"
|
| 34 |
+
version = "3.19.1"
|
| 35 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 36 |
+
checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510"
|
| 37 |
+
|
| 38 |
+
[[package]]
|
| 39 |
+
name = "bytes"
|
| 40 |
+
version = "1.11.0"
|
| 41 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 42 |
+
checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3"
|
| 43 |
+
|
| 44 |
+
[[package]]
|
| 45 |
+
name = "cesu8"
|
| 46 |
+
version = "1.1.0"
|
| 47 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 48 |
+
checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c"
|
| 49 |
+
|
| 50 |
+
[[package]]
|
| 51 |
+
name = "cfg-if"
|
| 52 |
+
version = "1.0.4"
|
| 53 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 54 |
+
checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
|
| 55 |
+
|
| 56 |
+
[[package]]
|
| 57 |
+
name = "chunked_transfer"
|
| 58 |
+
version = "1.5.0"
|
| 59 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 60 |
+
checksum = "6e4de3bc4ea267985becf712dc6d9eed8b04c953b3fcfb339ebc87acd9804901"
|
| 61 |
+
|
| 62 |
+
[[package]]
|
| 63 |
+
name = "combine"
|
| 64 |
+
version = "4.6.7"
|
| 65 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 66 |
+
checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd"
|
| 67 |
+
dependencies = [
|
| 68 |
+
"bytes",
|
| 69 |
+
"memchr",
|
| 70 |
+
]
|
| 71 |
+
|
| 72 |
+
[[package]]
|
| 73 |
+
name = "core-foundation"
|
| 74 |
+
version = "0.9.4"
|
| 75 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 76 |
+
checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f"
|
| 77 |
+
dependencies = [
|
| 78 |
+
"core-foundation-sys",
|
| 79 |
+
"libc",
|
| 80 |
+
]
|
| 81 |
+
|
| 82 |
+
[[package]]
|
| 83 |
+
name = "core-foundation-sys"
|
| 84 |
+
version = "0.8.7"
|
| 85 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 86 |
+
checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
|
| 87 |
+
|
| 88 |
+
[[package]]
|
| 89 |
+
name = "cpufeatures"
|
| 90 |
+
version = "0.2.17"
|
| 91 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 92 |
+
checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280"
|
| 93 |
+
dependencies = [
|
| 94 |
+
"libc",
|
| 95 |
+
]
|
| 96 |
+
|
| 97 |
+
[[package]]
|
| 98 |
+
name = "crossbeam-deque"
|
| 99 |
+
version = "0.8.6"
|
| 100 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 101 |
+
checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51"
|
| 102 |
+
dependencies = [
|
| 103 |
+
"crossbeam-epoch",
|
| 104 |
+
"crossbeam-utils",
|
| 105 |
+
]
|
| 106 |
+
|
| 107 |
+
[[package]]
|
| 108 |
+
name = "crossbeam-epoch"
|
| 109 |
+
version = "0.9.18"
|
| 110 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 111 |
+
checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e"
|
| 112 |
+
dependencies = [
|
| 113 |
+
"crossbeam-utils",
|
| 114 |
+
]
|
| 115 |
+
|
| 116 |
+
[[package]]
|
| 117 |
+
name = "crossbeam-utils"
|
| 118 |
+
version = "0.8.21"
|
| 119 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 120 |
+
checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
|
| 121 |
+
|
| 122 |
+
[[package]]
|
| 123 |
+
name = "crypto-common"
|
| 124 |
+
version = "0.1.7"
|
| 125 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 126 |
+
checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a"
|
| 127 |
+
dependencies = [
|
| 128 |
+
"generic-array",
|
| 129 |
+
"typenum",
|
| 130 |
+
]
|
| 131 |
+
|
| 132 |
+
[[package]]
|
| 133 |
+
name = "digest"
|
| 134 |
+
version = "0.10.7"
|
| 135 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 136 |
+
checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
|
| 137 |
+
dependencies = [
|
| 138 |
+
"block-buffer",
|
| 139 |
+
"crypto-common",
|
| 140 |
+
]
|
| 141 |
+
|
| 142 |
+
[[package]]
|
| 143 |
+
name = "displaydoc"
|
| 144 |
+
version = "0.2.5"
|
| 145 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 146 |
+
checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0"
|
| 147 |
+
dependencies = [
|
| 148 |
+
"proc-macro2",
|
| 149 |
+
"quote",
|
| 150 |
+
"syn",
|
| 151 |
+
]
|
| 152 |
+
|
| 153 |
+
[[package]]
|
| 154 |
+
name = "either"
|
| 155 |
+
version = "1.15.0"
|
| 156 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 157 |
+
checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719"
|
| 158 |
+
|
| 159 |
+
[[package]]
|
| 160 |
+
name = "engine_rust"
|
| 161 |
+
version = "0.1.2"
|
| 162 |
+
dependencies = [
|
| 163 |
+
"getrandom 0.3.4",
|
| 164 |
+
"lru",
|
| 165 |
+
"ndarray",
|
| 166 |
+
"rand 0.9.2",
|
| 167 |
+
"rand_pcg",
|
| 168 |
+
"rayon",
|
| 169 |
+
"serde",
|
| 170 |
+
"serde-wasm-bindgen",
|
| 171 |
+
"serde_json",
|
| 172 |
+
"serde_repr",
|
| 173 |
+
"smallvec",
|
| 174 |
+
"wasm-bindgen",
|
| 175 |
+
]
|
| 176 |
+
|
| 177 |
+
[[package]]
|
| 178 |
+
name = "equivalent"
|
| 179 |
+
version = "1.0.2"
|
| 180 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 181 |
+
checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
|
| 182 |
+
|
| 183 |
+
[[package]]
|
| 184 |
+
name = "foldhash"
|
| 185 |
+
version = "0.1.5"
|
| 186 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 187 |
+
checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2"
|
| 188 |
+
|
| 189 |
+
[[package]]
|
| 190 |
+
name = "form_urlencoded"
|
| 191 |
+
version = "1.2.2"
|
| 192 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 193 |
+
checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf"
|
| 194 |
+
dependencies = [
|
| 195 |
+
"percent-encoding",
|
| 196 |
+
]
|
| 197 |
+
|
| 198 |
+
[[package]]
|
| 199 |
+
name = "generic-array"
|
| 200 |
+
version = "0.14.7"
|
| 201 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 202 |
+
checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
|
| 203 |
+
dependencies = [
|
| 204 |
+
"typenum",
|
| 205 |
+
"version_check",
|
| 206 |
+
]
|
| 207 |
+
|
| 208 |
+
[[package]]
|
| 209 |
+
name = "getrandom"
|
| 210 |
+
version = "0.2.17"
|
| 211 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 212 |
+
checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0"
|
| 213 |
+
dependencies = [
|
| 214 |
+
"cfg-if",
|
| 215 |
+
"libc",
|
| 216 |
+
"wasi",
|
| 217 |
+
]
|
| 218 |
+
|
| 219 |
+
[[package]]
|
| 220 |
+
name = "getrandom"
|
| 221 |
+
version = "0.3.4"
|
| 222 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 223 |
+
checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd"
|
| 224 |
+
dependencies = [
|
| 225 |
+
"cfg-if",
|
| 226 |
+
"js-sys",
|
| 227 |
+
"libc",
|
| 228 |
+
"r-efi",
|
| 229 |
+
"wasip2",
|
| 230 |
+
"wasm-bindgen",
|
| 231 |
+
]
|
| 232 |
+
|
| 233 |
+
[[package]]
|
| 234 |
+
name = "hashbrown"
|
| 235 |
+
version = "0.15.5"
|
| 236 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 237 |
+
checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1"
|
| 238 |
+
dependencies = [
|
| 239 |
+
"allocator-api2",
|
| 240 |
+
"equivalent",
|
| 241 |
+
"foldhash",
|
| 242 |
+
]
|
| 243 |
+
|
| 244 |
+
[[package]]
|
| 245 |
+
name = "home"
|
| 246 |
+
version = "0.5.12"
|
| 247 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 248 |
+
checksum = "cc627f471c528ff0c4a49e1d5e60450c8f6461dd6d10ba9dcd3a61d3dff7728d"
|
| 249 |
+
dependencies = [
|
| 250 |
+
"windows-sys 0.61.2",
|
| 251 |
+
]
|
| 252 |
+
|
| 253 |
+
[[package]]
|
| 254 |
+
name = "httpdate"
|
| 255 |
+
version = "1.0.3"
|
| 256 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 257 |
+
checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9"
|
| 258 |
+
|
| 259 |
+
[[package]]
|
| 260 |
+
name = "icu_collections"
|
| 261 |
+
version = "2.1.1"
|
| 262 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 263 |
+
checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43"
|
| 264 |
+
dependencies = [
|
| 265 |
+
"displaydoc",
|
| 266 |
+
"potential_utf",
|
| 267 |
+
"yoke",
|
| 268 |
+
"zerofrom",
|
| 269 |
+
"zerovec",
|
| 270 |
+
]
|
| 271 |
+
|
| 272 |
+
[[package]]
|
| 273 |
+
name = "icu_locale_core"
|
| 274 |
+
version = "2.1.1"
|
| 275 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 276 |
+
checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6"
|
| 277 |
+
dependencies = [
|
| 278 |
+
"displaydoc",
|
| 279 |
+
"litemap",
|
| 280 |
+
"tinystr",
|
| 281 |
+
"writeable",
|
| 282 |
+
"zerovec",
|
| 283 |
+
]
|
| 284 |
+
|
| 285 |
+
[[package]]
|
| 286 |
+
name = "icu_normalizer"
|
| 287 |
+
version = "2.1.1"
|
| 288 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 289 |
+
checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599"
|
| 290 |
+
dependencies = [
|
| 291 |
+
"icu_collections",
|
| 292 |
+
"icu_normalizer_data",
|
| 293 |
+
"icu_properties",
|
| 294 |
+
"icu_provider",
|
| 295 |
+
"smallvec",
|
| 296 |
+
"zerovec",
|
| 297 |
+
]
|
| 298 |
+
|
| 299 |
+
[[package]]
|
| 300 |
+
name = "icu_normalizer_data"
|
| 301 |
+
version = "2.1.1"
|
| 302 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 303 |
+
checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a"
|
| 304 |
+
|
| 305 |
+
[[package]]
|
| 306 |
+
name = "icu_properties"
|
| 307 |
+
version = "2.1.2"
|
| 308 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 309 |
+
checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec"
|
| 310 |
+
dependencies = [
|
| 311 |
+
"icu_collections",
|
| 312 |
+
"icu_locale_core",
|
| 313 |
+
"icu_properties_data",
|
| 314 |
+
"icu_provider",
|
| 315 |
+
"zerotrie",
|
| 316 |
+
"zerovec",
|
| 317 |
+
]
|
| 318 |
+
|
| 319 |
+
[[package]]
|
| 320 |
+
name = "icu_properties_data"
|
| 321 |
+
version = "2.1.2"
|
| 322 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 323 |
+
checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af"
|
| 324 |
+
|
| 325 |
+
[[package]]
|
| 326 |
+
name = "icu_provider"
|
| 327 |
+
version = "2.1.1"
|
| 328 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 329 |
+
checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614"
|
| 330 |
+
dependencies = [
|
| 331 |
+
"displaydoc",
|
| 332 |
+
"icu_locale_core",
|
| 333 |
+
"writeable",
|
| 334 |
+
"yoke",
|
| 335 |
+
"zerofrom",
|
| 336 |
+
"zerotrie",
|
| 337 |
+
"zerovec",
|
| 338 |
+
]
|
| 339 |
+
|
| 340 |
+
[[package]]
|
| 341 |
+
name = "idna"
|
| 342 |
+
version = "1.1.0"
|
| 343 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 344 |
+
checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de"
|
| 345 |
+
dependencies = [
|
| 346 |
+
"idna_adapter",
|
| 347 |
+
"smallvec",
|
| 348 |
+
"utf8_iter",
|
| 349 |
+
]
|
| 350 |
+
|
| 351 |
+
[[package]]
|
| 352 |
+
name = "idna_adapter"
|
| 353 |
+
version = "1.2.1"
|
| 354 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 355 |
+
checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344"
|
| 356 |
+
dependencies = [
|
| 357 |
+
"icu_normalizer",
|
| 358 |
+
"icu_properties",
|
| 359 |
+
]
|
| 360 |
+
|
| 361 |
+
[[package]]
|
| 362 |
+
name = "itoa"
|
| 363 |
+
version = "1.0.17"
|
| 364 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 365 |
+
checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2"
|
| 366 |
+
|
| 367 |
+
[[package]]
|
| 368 |
+
name = "jni"
|
| 369 |
+
version = "0.21.1"
|
| 370 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 371 |
+
checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97"
|
| 372 |
+
dependencies = [
|
| 373 |
+
"cesu8",
|
| 374 |
+
"cfg-if",
|
| 375 |
+
"combine",
|
| 376 |
+
"jni-sys",
|
| 377 |
+
"log",
|
| 378 |
+
"thiserror",
|
| 379 |
+
"walkdir",
|
| 380 |
+
"windows-sys 0.45.0",
|
| 381 |
+
]
|
| 382 |
+
|
| 383 |
+
[[package]]
|
| 384 |
+
name = "jni-sys"
|
| 385 |
+
version = "0.3.0"
|
| 386 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 387 |
+
checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130"
|
| 388 |
+
|
| 389 |
+
[[package]]
|
| 390 |
+
name = "js-sys"
|
| 391 |
+
version = "0.3.85"
|
| 392 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 393 |
+
checksum = "8c942ebf8e95485ca0d52d97da7c5a2c387d0e7f0ba4c35e93bfcaee045955b3"
|
| 394 |
+
dependencies = [
|
| 395 |
+
"once_cell",
|
| 396 |
+
"wasm-bindgen",
|
| 397 |
+
]
|
| 398 |
+
|
| 399 |
+
[[package]]
|
| 400 |
+
name = "libc"
|
| 401 |
+
version = "0.2.180"
|
| 402 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 403 |
+
checksum = "bcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fc"
|
| 404 |
+
|
| 405 |
+
[[package]]
|
| 406 |
+
name = "litemap"
|
| 407 |
+
version = "0.8.1"
|
| 408 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 409 |
+
checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77"
|
| 410 |
+
|
| 411 |
+
[[package]]
|
| 412 |
+
name = "log"
|
| 413 |
+
version = "0.4.29"
|
| 414 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 415 |
+
checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897"
|
| 416 |
+
|
| 417 |
+
[[package]]
|
| 418 |
+
name = "loveca_launcher"
|
| 419 |
+
version = "0.1.0"
|
| 420 |
+
dependencies = [
|
| 421 |
+
"engine_rust",
|
| 422 |
+
"mime",
|
| 423 |
+
"mime_guess",
|
| 424 |
+
"rand 0.8.5",
|
| 425 |
+
"rust-embed",
|
| 426 |
+
"serde",
|
| 427 |
+
"serde_json",
|
| 428 |
+
"tiny_http",
|
| 429 |
+
"uuid",
|
| 430 |
+
"webbrowser",
|
| 431 |
+
]
|
| 432 |
+
|
| 433 |
+
[[package]]
|
| 434 |
+
name = "lru"
|
| 435 |
+
version = "0.13.0"
|
| 436 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 437 |
+
checksum = "227748d55f2f0ab4735d87fd623798cb6b664512fe979705f829c9f81c934465"
|
| 438 |
+
dependencies = [
|
| 439 |
+
"hashbrown",
|
| 440 |
+
]
|
| 441 |
+
|
| 442 |
+
[[package]]
|
| 443 |
+
name = "malloc_buf"
|
| 444 |
+
version = "0.0.6"
|
| 445 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 446 |
+
checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb"
|
| 447 |
+
dependencies = [
|
| 448 |
+
"libc",
|
| 449 |
+
]
|
| 450 |
+
|
| 451 |
+
[[package]]
|
| 452 |
+
name = "matrixmultiply"
|
| 453 |
+
version = "0.3.10"
|
| 454 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 455 |
+
checksum = "a06de3016e9fae57a36fd14dba131fccf49f74b40b7fbdb472f96e361ec71a08"
|
| 456 |
+
dependencies = [
|
| 457 |
+
"autocfg",
|
| 458 |
+
"rawpointer",
|
| 459 |
+
]
|
| 460 |
+
|
| 461 |
+
[[package]]
|
| 462 |
+
name = "memchr"
|
| 463 |
+
version = "2.7.6"
|
| 464 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 465 |
+
checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273"
|
| 466 |
+
|
| 467 |
+
[[package]]
|
| 468 |
+
name = "mime"
|
| 469 |
+
version = "0.3.17"
|
| 470 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 471 |
+
checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
|
| 472 |
+
|
| 473 |
+
[[package]]
|
| 474 |
+
name = "mime_guess"
|
| 475 |
+
version = "2.0.5"
|
| 476 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 477 |
+
checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e"
|
| 478 |
+
dependencies = [
|
| 479 |
+
"mime",
|
| 480 |
+
"unicase",
|
| 481 |
+
]
|
| 482 |
+
|
| 483 |
+
[[package]]
|
| 484 |
+
name = "ndarray"
|
| 485 |
+
version = "0.16.1"
|
| 486 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 487 |
+
checksum = "882ed72dce9365842bf196bdeedf5055305f11fc8c03dee7bb0194a6cad34841"
|
| 488 |
+
dependencies = [
|
| 489 |
+
"matrixmultiply",
|
| 490 |
+
"num-complex",
|
| 491 |
+
"num-integer",
|
| 492 |
+
"num-traits",
|
| 493 |
+
"portable-atomic",
|
| 494 |
+
"portable-atomic-util",
|
| 495 |
+
"rawpointer",
|
| 496 |
+
]
|
| 497 |
+
|
| 498 |
+
[[package]]
|
| 499 |
+
name = "ndk-context"
|
| 500 |
+
version = "0.1.1"
|
| 501 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 502 |
+
checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b"
|
| 503 |
+
|
| 504 |
+
[[package]]
|
| 505 |
+
name = "num-complex"
|
| 506 |
+
version = "0.4.6"
|
| 507 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 508 |
+
checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495"
|
| 509 |
+
dependencies = [
|
| 510 |
+
"num-traits",
|
| 511 |
+
]
|
| 512 |
+
|
| 513 |
+
[[package]]
|
| 514 |
+
name = "num-integer"
|
| 515 |
+
version = "0.1.46"
|
| 516 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 517 |
+
checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f"
|
| 518 |
+
dependencies = [
|
| 519 |
+
"num-traits",
|
| 520 |
+
]
|
| 521 |
+
|
| 522 |
+
[[package]]
|
| 523 |
+
name = "num-traits"
|
| 524 |
+
version = "0.2.19"
|
| 525 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 526 |
+
checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
|
| 527 |
+
dependencies = [
|
| 528 |
+
"autocfg",
|
| 529 |
+
]
|
| 530 |
+
|
| 531 |
+
[[package]]
|
| 532 |
+
name = "objc"
|
| 533 |
+
version = "0.2.7"
|
| 534 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 535 |
+
checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1"
|
| 536 |
+
dependencies = [
|
| 537 |
+
"malloc_buf",
|
| 538 |
+
]
|
| 539 |
+
|
| 540 |
+
[[package]]
|
| 541 |
+
name = "once_cell"
|
| 542 |
+
version = "1.21.3"
|
| 543 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 544 |
+
checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
|
| 545 |
+
|
| 546 |
+
[[package]]
|
| 547 |
+
name = "percent-encoding"
|
| 548 |
+
version = "2.3.2"
|
| 549 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 550 |
+
checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220"
|
| 551 |
+
|
| 552 |
+
[[package]]
|
| 553 |
+
name = "portable-atomic"
|
| 554 |
+
version = "1.13.1"
|
| 555 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 556 |
+
checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49"
|
| 557 |
+
|
| 558 |
+
[[package]]
|
| 559 |
+
name = "portable-atomic-util"
|
| 560 |
+
version = "0.2.5"
|
| 561 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 562 |
+
checksum = "7a9db96d7fa8782dd8c15ce32ffe8680bbd1e978a43bf51a34d39483540495f5"
|
| 563 |
+
dependencies = [
|
| 564 |
+
"portable-atomic",
|
| 565 |
+
]
|
| 566 |
+
|
| 567 |
+
[[package]]
|
| 568 |
+
name = "potential_utf"
|
| 569 |
+
version = "0.1.4"
|
| 570 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 571 |
+
checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77"
|
| 572 |
+
dependencies = [
|
| 573 |
+
"zerovec",
|
| 574 |
+
]
|
| 575 |
+
|
| 576 |
+
[[package]]
|
| 577 |
+
name = "ppv-lite86"
|
| 578 |
+
version = "0.2.21"
|
| 579 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 580 |
+
checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9"
|
| 581 |
+
dependencies = [
|
| 582 |
+
"zerocopy",
|
| 583 |
+
]
|
| 584 |
+
|
| 585 |
+
[[package]]
|
| 586 |
+
name = "proc-macro2"
|
| 587 |
+
version = "1.0.106"
|
| 588 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 589 |
+
checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
|
| 590 |
+
dependencies = [
|
| 591 |
+
"unicode-ident",
|
| 592 |
+
]
|
| 593 |
+
|
| 594 |
+
[[package]]
|
| 595 |
+
name = "quote"
|
| 596 |
+
version = "1.0.44"
|
| 597 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 598 |
+
checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4"
|
| 599 |
+
dependencies = [
|
| 600 |
+
"proc-macro2",
|
| 601 |
+
]
|
| 602 |
+
|
| 603 |
+
[[package]]
|
| 604 |
+
name = "r-efi"
|
| 605 |
+
version = "5.3.0"
|
| 606 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 607 |
+
checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
|
| 608 |
+
|
| 609 |
+
[[package]]
|
| 610 |
+
name = "rand"
|
| 611 |
+
version = "0.8.5"
|
| 612 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 613 |
+
checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
|
| 614 |
+
dependencies = [
|
| 615 |
+
"libc",
|
| 616 |
+
"rand_chacha 0.3.1",
|
| 617 |
+
"rand_core 0.6.4",
|
| 618 |
+
]
|
| 619 |
+
|
| 620 |
+
[[package]]
|
| 621 |
+
name = "rand"
|
| 622 |
+
version = "0.9.2"
|
| 623 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 624 |
+
checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1"
|
| 625 |
+
dependencies = [
|
| 626 |
+
"rand_chacha 0.9.0",
|
| 627 |
+
"rand_core 0.9.5",
|
| 628 |
+
]
|
| 629 |
+
|
| 630 |
+
[[package]]
|
| 631 |
+
name = "rand_chacha"
|
| 632 |
+
version = "0.3.1"
|
| 633 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 634 |
+
checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
|
| 635 |
+
dependencies = [
|
| 636 |
+
"ppv-lite86",
|
| 637 |
+
"rand_core 0.6.4",
|
| 638 |
+
]
|
| 639 |
+
|
| 640 |
+
[[package]]
|
| 641 |
+
name = "rand_chacha"
|
| 642 |
+
version = "0.9.0"
|
| 643 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 644 |
+
checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb"
|
| 645 |
+
dependencies = [
|
| 646 |
+
"ppv-lite86",
|
| 647 |
+
"rand_core 0.9.5",
|
| 648 |
+
]
|
| 649 |
+
|
| 650 |
+
[[package]]
|
| 651 |
+
name = "rand_core"
|
| 652 |
+
version = "0.6.4"
|
| 653 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 654 |
+
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
|
| 655 |
+
dependencies = [
|
| 656 |
+
"getrandom 0.2.17",
|
| 657 |
+
]
|
| 658 |
+
|
| 659 |
+
[[package]]
|
| 660 |
+
name = "rand_core"
|
| 661 |
+
version = "0.9.5"
|
| 662 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 663 |
+
checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c"
|
| 664 |
+
dependencies = [
|
| 665 |
+
"getrandom 0.3.4",
|
| 666 |
+
]
|
| 667 |
+
|
| 668 |
+
[[package]]
|
| 669 |
+
name = "rand_pcg"
|
| 670 |
+
version = "0.9.0"
|
| 671 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 672 |
+
checksum = "b48ac3f7ffaab7fac4d2376632268aa5f89abdb55f7ebf8f4d11fffccb2320f7"
|
| 673 |
+
dependencies = [
|
| 674 |
+
"rand_core 0.9.5",
|
| 675 |
+
]
|
| 676 |
+
|
| 677 |
+
[[package]]
|
| 678 |
+
name = "raw-window-handle"
|
| 679 |
+
version = "0.5.2"
|
| 680 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 681 |
+
checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9"
|
| 682 |
+
|
| 683 |
+
[[package]]
|
| 684 |
+
name = "rawpointer"
|
| 685 |
+
version = "0.2.1"
|
| 686 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 687 |
+
checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3"
|
| 688 |
+
|
| 689 |
+
[[package]]
|
| 690 |
+
name = "rayon"
|
| 691 |
+
version = "1.11.0"
|
| 692 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 693 |
+
checksum = "368f01d005bf8fd9b1206fb6fa653e6c4a81ceb1466406b81792d87c5677a58f"
|
| 694 |
+
dependencies = [
|
| 695 |
+
"either",
|
| 696 |
+
"rayon-core",
|
| 697 |
+
]
|
| 698 |
+
|
| 699 |
+
[[package]]
|
| 700 |
+
name = "rayon-core"
|
| 701 |
+
version = "1.13.0"
|
| 702 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 703 |
+
checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91"
|
| 704 |
+
dependencies = [
|
| 705 |
+
"crossbeam-deque",
|
| 706 |
+
"crossbeam-utils",
|
| 707 |
+
]
|
| 708 |
+
|
| 709 |
+
[[package]]
|
| 710 |
+
name = "rust-embed"
|
| 711 |
+
version = "6.8.1"
|
| 712 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 713 |
+
checksum = "a36224c3276f8c4ebc8c20f158eca7ca4359c8db89991c4925132aaaf6702661"
|
| 714 |
+
dependencies = [
|
| 715 |
+
"rust-embed-impl",
|
| 716 |
+
"rust-embed-utils",
|
| 717 |
+
"walkdir",
|
| 718 |
+
]
|
| 719 |
+
|
| 720 |
+
[[package]]
|
| 721 |
+
name = "rust-embed-impl"
|
| 722 |
+
version = "6.8.1"
|
| 723 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 724 |
+
checksum = "49b94b81e5b2c284684141a2fb9e2a31be90638caf040bf9afbc5a0416afe1ac"
|
| 725 |
+
dependencies = [
|
| 726 |
+
"proc-macro2",
|
| 727 |
+
"quote",
|
| 728 |
+
"rust-embed-utils",
|
| 729 |
+
"syn",
|
| 730 |
+
"walkdir",
|
| 731 |
+
]
|
| 732 |
+
|
| 733 |
+
[[package]]
|
| 734 |
+
name = "rust-embed-utils"
|
| 735 |
+
version = "7.8.1"
|
| 736 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 737 |
+
checksum = "9d38ff6bf570dc3bb7100fce9f7b60c33fa71d80e88da3f2580df4ff2bdded74"
|
| 738 |
+
dependencies = [
|
| 739 |
+
"sha2",
|
| 740 |
+
"walkdir",
|
| 741 |
+
]
|
| 742 |
+
|
| 743 |
+
[[package]]
|
| 744 |
+
name = "rustversion"
|
| 745 |
+
version = "1.0.22"
|
| 746 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 747 |
+
checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
|
| 748 |
+
|
| 749 |
+
[[package]]
|
| 750 |
+
name = "same-file"
|
| 751 |
+
version = "1.0.6"
|
| 752 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 753 |
+
checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
|
| 754 |
+
dependencies = [
|
| 755 |
+
"winapi-util",
|
| 756 |
+
]
|
| 757 |
+
|
| 758 |
+
[[package]]
|
| 759 |
+
name = "serde"
|
| 760 |
+
version = "1.0.228"
|
| 761 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 762 |
+
checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
|
| 763 |
+
dependencies = [
|
| 764 |
+
"serde_core",
|
| 765 |
+
"serde_derive",
|
| 766 |
+
]
|
| 767 |
+
|
| 768 |
+
[[package]]
|
| 769 |
+
name = "serde-wasm-bindgen"
|
| 770 |
+
version = "0.6.5"
|
| 771 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 772 |
+
checksum = "8302e169f0eddcc139c70f139d19d6467353af16f9fce27e8c30158036a1e16b"
|
| 773 |
+
dependencies = [
|
| 774 |
+
"js-sys",
|
| 775 |
+
"serde",
|
| 776 |
+
"wasm-bindgen",
|
| 777 |
+
]
|
| 778 |
+
|
| 779 |
+
[[package]]
|
| 780 |
+
name = "serde_core"
|
| 781 |
+
version = "1.0.228"
|
| 782 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 783 |
+
checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
|
| 784 |
+
dependencies = [
|
| 785 |
+
"serde_derive",
|
| 786 |
+
]
|
| 787 |
+
|
| 788 |
+
[[package]]
|
| 789 |
+
name = "serde_derive"
|
| 790 |
+
version = "1.0.228"
|
| 791 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 792 |
+
checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
|
| 793 |
+
dependencies = [
|
| 794 |
+
"proc-macro2",
|
| 795 |
+
"quote",
|
| 796 |
+
"syn",
|
| 797 |
+
]
|
| 798 |
+
|
| 799 |
+
[[package]]
|
| 800 |
+
name = "serde_json"
|
| 801 |
+
version = "1.0.149"
|
| 802 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 803 |
+
checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86"
|
| 804 |
+
dependencies = [
|
| 805 |
+
"itoa",
|
| 806 |
+
"memchr",
|
| 807 |
+
"serde",
|
| 808 |
+
"serde_core",
|
| 809 |
+
"zmij",
|
| 810 |
+
]
|
| 811 |
+
|
| 812 |
+
[[package]]
|
| 813 |
+
name = "serde_repr"
|
| 814 |
+
version = "0.1.20"
|
| 815 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 816 |
+
checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c"
|
| 817 |
+
dependencies = [
|
| 818 |
+
"proc-macro2",
|
| 819 |
+
"quote",
|
| 820 |
+
"syn",
|
| 821 |
+
]
|
| 822 |
+
|
| 823 |
+
[[package]]
|
| 824 |
+
name = "sha2"
|
| 825 |
+
version = "0.10.9"
|
| 826 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 827 |
+
checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283"
|
| 828 |
+
dependencies = [
|
| 829 |
+
"cfg-if",
|
| 830 |
+
"cpufeatures",
|
| 831 |
+
"digest",
|
| 832 |
+
]
|
| 833 |
+
|
| 834 |
+
[[package]]
|
| 835 |
+
name = "smallvec"
|
| 836 |
+
version = "1.15.1"
|
| 837 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 838 |
+
checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03"
|
| 839 |
+
dependencies = [
|
| 840 |
+
"serde",
|
| 841 |
+
]
|
| 842 |
+
|
| 843 |
+
[[package]]
|
| 844 |
+
name = "stable_deref_trait"
|
| 845 |
+
version = "1.2.1"
|
| 846 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 847 |
+
checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596"
|
| 848 |
+
|
| 849 |
+
[[package]]
|
| 850 |
+
name = "syn"
|
| 851 |
+
version = "2.0.114"
|
| 852 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 853 |
+
checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a"
|
| 854 |
+
dependencies = [
|
| 855 |
+
"proc-macro2",
|
| 856 |
+
"quote",
|
| 857 |
+
"unicode-ident",
|
| 858 |
+
]
|
| 859 |
+
|
| 860 |
+
[[package]]
|
| 861 |
+
name = "synstructure"
|
| 862 |
+
version = "0.13.2"
|
| 863 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 864 |
+
checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2"
|
| 865 |
+
dependencies = [
|
| 866 |
+
"proc-macro2",
|
| 867 |
+
"quote",
|
| 868 |
+
"syn",
|
| 869 |
+
]
|
| 870 |
+
|
| 871 |
+
[[package]]
|
| 872 |
+
name = "thiserror"
|
| 873 |
+
version = "1.0.69"
|
| 874 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 875 |
+
checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
|
| 876 |
+
dependencies = [
|
| 877 |
+
"thiserror-impl",
|
| 878 |
+
]
|
| 879 |
+
|
| 880 |
+
[[package]]
|
| 881 |
+
name = "thiserror-impl"
|
| 882 |
+
version = "1.0.69"
|
| 883 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 884 |
+
checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
|
| 885 |
+
dependencies = [
|
| 886 |
+
"proc-macro2",
|
| 887 |
+
"quote",
|
| 888 |
+
"syn",
|
| 889 |
+
]
|
| 890 |
+
|
| 891 |
+
[[package]]
|
| 892 |
+
name = "tiny_http"
|
| 893 |
+
version = "0.12.0"
|
| 894 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 895 |
+
checksum = "389915df6413a2e74fb181895f933386023c71110878cd0825588928e64cdc82"
|
| 896 |
+
dependencies = [
|
| 897 |
+
"ascii",
|
| 898 |
+
"chunked_transfer",
|
| 899 |
+
"httpdate",
|
| 900 |
+
"log",
|
| 901 |
+
]
|
| 902 |
+
|
| 903 |
+
[[package]]
|
| 904 |
+
name = "tinystr"
|
| 905 |
+
version = "0.8.2"
|
| 906 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 907 |
+
checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869"
|
| 908 |
+
dependencies = [
|
| 909 |
+
"displaydoc",
|
| 910 |
+
"zerovec",
|
| 911 |
+
]
|
| 912 |
+
|
| 913 |
+
[[package]]
|
| 914 |
+
name = "typenum"
|
| 915 |
+
version = "1.19.0"
|
| 916 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 917 |
+
checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb"
|
| 918 |
+
|
| 919 |
+
[[package]]
|
| 920 |
+
name = "unicase"
|
| 921 |
+
version = "2.9.0"
|
| 922 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 923 |
+
checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142"
|
| 924 |
+
|
| 925 |
+
[[package]]
|
| 926 |
+
name = "unicode-ident"
|
| 927 |
+
version = "1.0.22"
|
| 928 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 929 |
+
checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5"
|
| 930 |
+
|
| 931 |
+
[[package]]
|
| 932 |
+
name = "url"
|
| 933 |
+
version = "2.5.8"
|
| 934 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 935 |
+
checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed"
|
| 936 |
+
dependencies = [
|
| 937 |
+
"form_urlencoded",
|
| 938 |
+
"idna",
|
| 939 |
+
"percent-encoding",
|
| 940 |
+
"serde",
|
| 941 |
+
]
|
| 942 |
+
|
| 943 |
+
[[package]]
|
| 944 |
+
name = "utf8_iter"
|
| 945 |
+
version = "1.0.4"
|
| 946 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 947 |
+
checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be"
|
| 948 |
+
|
| 949 |
+
[[package]]
|
| 950 |
+
name = "uuid"
|
| 951 |
+
version = "1.20.0"
|
| 952 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 953 |
+
checksum = "ee48d38b119b0cd71fe4141b30f5ba9c7c5d9f4e7a3a8b4a674e4b6ef789976f"
|
| 954 |
+
dependencies = [
|
| 955 |
+
"getrandom 0.3.4",
|
| 956 |
+
"js-sys",
|
| 957 |
+
"rand 0.9.2",
|
| 958 |
+
"wasm-bindgen",
|
| 959 |
+
]
|
| 960 |
+
|
| 961 |
+
[[package]]
|
| 962 |
+
name = "version_check"
|
| 963 |
+
version = "0.9.5"
|
| 964 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 965 |
+
checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
|
| 966 |
+
|
| 967 |
+
[[package]]
|
| 968 |
+
name = "walkdir"
|
| 969 |
+
version = "2.5.0"
|
| 970 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 971 |
+
checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b"
|
| 972 |
+
dependencies = [
|
| 973 |
+
"same-file",
|
| 974 |
+
"winapi-util",
|
| 975 |
+
]
|
| 976 |
+
|
| 977 |
+
[[package]]
|
| 978 |
+
name = "wasi"
|
| 979 |
+
version = "0.11.1+wasi-snapshot-preview1"
|
| 980 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 981 |
+
checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
|
| 982 |
+
|
| 983 |
+
[[package]]
|
| 984 |
+
name = "wasip2"
|
| 985 |
+
version = "1.0.2+wasi-0.2.9"
|
| 986 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 987 |
+
checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5"
|
| 988 |
+
dependencies = [
|
| 989 |
+
"wit-bindgen",
|
| 990 |
+
]
|
| 991 |
+
|
| 992 |
+
[[package]]
|
| 993 |
+
name = "wasm-bindgen"
|
| 994 |
+
version = "0.2.108"
|
| 995 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 996 |
+
checksum = "64024a30ec1e37399cf85a7ffefebdb72205ca1c972291c51512360d90bd8566"
|
| 997 |
+
dependencies = [
|
| 998 |
+
"cfg-if",
|
| 999 |
+
"once_cell",
|
| 1000 |
+
"rustversion",
|
| 1001 |
+
"wasm-bindgen-macro",
|
| 1002 |
+
"wasm-bindgen-shared",
|
| 1003 |
+
]
|
| 1004 |
+
|
| 1005 |
+
[[package]]
|
| 1006 |
+
name = "wasm-bindgen-macro"
|
| 1007 |
+
version = "0.2.108"
|
| 1008 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1009 |
+
checksum = "008b239d9c740232e71bd39e8ef6429d27097518b6b30bdf9086833bd5b6d608"
|
| 1010 |
+
dependencies = [
|
| 1011 |
+
"quote",
|
| 1012 |
+
"wasm-bindgen-macro-support",
|
| 1013 |
+
]
|
| 1014 |
+
|
| 1015 |
+
[[package]]
|
| 1016 |
+
name = "wasm-bindgen-macro-support"
|
| 1017 |
+
version = "0.2.108"
|
| 1018 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1019 |
+
checksum = "5256bae2d58f54820e6490f9839c49780dff84c65aeab9e772f15d5f0e913a55"
|
| 1020 |
+
dependencies = [
|
| 1021 |
+
"bumpalo",
|
| 1022 |
+
"proc-macro2",
|
| 1023 |
+
"quote",
|
| 1024 |
+
"syn",
|
| 1025 |
+
"wasm-bindgen-shared",
|
| 1026 |
+
]
|
| 1027 |
+
|
| 1028 |
+
[[package]]
|
| 1029 |
+
name = "wasm-bindgen-shared"
|
| 1030 |
+
version = "0.2.108"
|
| 1031 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1032 |
+
checksum = "1f01b580c9ac74c8d8f0c0e4afb04eeef2acf145458e52c03845ee9cd23e3d12"
|
| 1033 |
+
dependencies = [
|
| 1034 |
+
"unicode-ident",
|
| 1035 |
+
]
|
| 1036 |
+
|
| 1037 |
+
[[package]]
|
| 1038 |
+
name = "web-sys"
|
| 1039 |
+
version = "0.3.85"
|
| 1040 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1041 |
+
checksum = "312e32e551d92129218ea9a2452120f4aabc03529ef03e4d0d82fb2780608598"
|
| 1042 |
+
dependencies = [
|
| 1043 |
+
"js-sys",
|
| 1044 |
+
"wasm-bindgen",
|
| 1045 |
+
]
|
| 1046 |
+
|
| 1047 |
+
[[package]]
|
| 1048 |
+
name = "webbrowser"
|
| 1049 |
+
version = "0.8.15"
|
| 1050 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1051 |
+
checksum = "db67ae75a9405634f5882791678772c94ff5f16a66535aae186e26aa0841fc8b"
|
| 1052 |
+
dependencies = [
|
| 1053 |
+
"core-foundation",
|
| 1054 |
+
"home",
|
| 1055 |
+
"jni",
|
| 1056 |
+
"log",
|
| 1057 |
+
"ndk-context",
|
| 1058 |
+
"objc",
|
| 1059 |
+
"raw-window-handle",
|
| 1060 |
+
"url",
|
| 1061 |
+
"web-sys",
|
| 1062 |
+
]
|
| 1063 |
+
|
| 1064 |
+
[[package]]
|
| 1065 |
+
name = "winapi-util"
|
| 1066 |
+
version = "0.1.11"
|
| 1067 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1068 |
+
checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
|
| 1069 |
+
dependencies = [
|
| 1070 |
+
"windows-sys 0.61.2",
|
| 1071 |
+
]
|
| 1072 |
+
|
| 1073 |
+
[[package]]
|
| 1074 |
+
name = "windows-link"
|
| 1075 |
+
version = "0.2.1"
|
| 1076 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1077 |
+
checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
|
| 1078 |
+
|
| 1079 |
+
[[package]]
|
| 1080 |
+
name = "windows-sys"
|
| 1081 |
+
version = "0.45.0"
|
| 1082 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1083 |
+
checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0"
|
| 1084 |
+
dependencies = [
|
| 1085 |
+
"windows-targets",
|
| 1086 |
+
]
|
| 1087 |
+
|
| 1088 |
+
[[package]]
|
| 1089 |
+
name = "windows-sys"
|
| 1090 |
+
version = "0.61.2"
|
| 1091 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1092 |
+
checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
|
| 1093 |
+
dependencies = [
|
| 1094 |
+
"windows-link",
|
| 1095 |
+
]
|
| 1096 |
+
|
| 1097 |
+
[[package]]
|
| 1098 |
+
name = "windows-targets"
|
| 1099 |
+
version = "0.42.2"
|
| 1100 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1101 |
+
checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071"
|
| 1102 |
+
dependencies = [
|
| 1103 |
+
"windows_aarch64_gnullvm",
|
| 1104 |
+
"windows_aarch64_msvc",
|
| 1105 |
+
"windows_i686_gnu",
|
| 1106 |
+
"windows_i686_msvc",
|
| 1107 |
+
"windows_x86_64_gnu",
|
| 1108 |
+
"windows_x86_64_gnullvm",
|
| 1109 |
+
"windows_x86_64_msvc",
|
| 1110 |
+
]
|
| 1111 |
+
|
| 1112 |
+
[[package]]
|
| 1113 |
+
name = "windows_aarch64_gnullvm"
|
| 1114 |
+
version = "0.42.2"
|
| 1115 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1116 |
+
checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8"
|
| 1117 |
+
|
| 1118 |
+
[[package]]
|
| 1119 |
+
name = "windows_aarch64_msvc"
|
| 1120 |
+
version = "0.42.2"
|
| 1121 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1122 |
+
checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43"
|
| 1123 |
+
|
| 1124 |
+
[[package]]
|
| 1125 |
+
name = "windows_i686_gnu"
|
| 1126 |
+
version = "0.42.2"
|
| 1127 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1128 |
+
checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f"
|
| 1129 |
+
|
| 1130 |
+
[[package]]
|
| 1131 |
+
name = "windows_i686_msvc"
|
| 1132 |
+
version = "0.42.2"
|
| 1133 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1134 |
+
checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060"
|
| 1135 |
+
|
| 1136 |
+
[[package]]
|
| 1137 |
+
name = "windows_x86_64_gnu"
|
| 1138 |
+
version = "0.42.2"
|
| 1139 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1140 |
+
checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36"
|
| 1141 |
+
|
| 1142 |
+
[[package]]
|
| 1143 |
+
name = "windows_x86_64_gnullvm"
|
| 1144 |
+
version = "0.42.2"
|
| 1145 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1146 |
+
checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3"
|
| 1147 |
+
|
| 1148 |
+
[[package]]
|
| 1149 |
+
name = "windows_x86_64_msvc"
|
| 1150 |
+
version = "0.42.2"
|
| 1151 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1152 |
+
checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0"
|
| 1153 |
+
|
| 1154 |
+
[[package]]
|
| 1155 |
+
name = "wit-bindgen"
|
| 1156 |
+
version = "0.51.0"
|
| 1157 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1158 |
+
checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5"
|
| 1159 |
+
|
| 1160 |
+
[[package]]
|
| 1161 |
+
name = "writeable"
|
| 1162 |
+
version = "0.6.2"
|
| 1163 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1164 |
+
checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9"
|
| 1165 |
+
|
| 1166 |
+
[[package]]
|
| 1167 |
+
name = "yoke"
|
| 1168 |
+
version = "0.8.1"
|
| 1169 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1170 |
+
checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954"
|
| 1171 |
+
dependencies = [
|
| 1172 |
+
"stable_deref_trait",
|
| 1173 |
+
"yoke-derive",
|
| 1174 |
+
"zerofrom",
|
| 1175 |
+
]
|
| 1176 |
+
|
| 1177 |
+
[[package]]
|
| 1178 |
+
name = "yoke-derive"
|
| 1179 |
+
version = "0.8.1"
|
| 1180 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1181 |
+
checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d"
|
| 1182 |
+
dependencies = [
|
| 1183 |
+
"proc-macro2",
|
| 1184 |
+
"quote",
|
| 1185 |
+
"syn",
|
| 1186 |
+
"synstructure",
|
| 1187 |
+
]
|
| 1188 |
+
|
| 1189 |
+
[[package]]
|
| 1190 |
+
name = "zerocopy"
|
| 1191 |
+
version = "0.8.37"
|
| 1192 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1193 |
+
checksum = "7456cf00f0685ad319c5b1693f291a650eaf345e941d082fc4e03df8a03996ac"
|
| 1194 |
+
dependencies = [
|
| 1195 |
+
"zerocopy-derive",
|
| 1196 |
+
]
|
| 1197 |
+
|
| 1198 |
+
[[package]]
|
| 1199 |
+
name = "zerocopy-derive"
|
| 1200 |
+
version = "0.8.37"
|
| 1201 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1202 |
+
checksum = "1328722bbf2115db7e19d69ebcc15e795719e2d66b60827c6a69a117365e37a0"
|
| 1203 |
+
dependencies = [
|
| 1204 |
+
"proc-macro2",
|
| 1205 |
+
"quote",
|
| 1206 |
+
"syn",
|
| 1207 |
+
]
|
| 1208 |
+
|
| 1209 |
+
[[package]]
|
| 1210 |
+
name = "zerofrom"
|
| 1211 |
+
version = "0.1.6"
|
| 1212 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1213 |
+
checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5"
|
| 1214 |
+
dependencies = [
|
| 1215 |
+
"zerofrom-derive",
|
| 1216 |
+
]
|
| 1217 |
+
|
| 1218 |
+
[[package]]
|
| 1219 |
+
name = "zerofrom-derive"
|
| 1220 |
+
version = "0.1.6"
|
| 1221 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1222 |
+
checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502"
|
| 1223 |
+
dependencies = [
|
| 1224 |
+
"proc-macro2",
|
| 1225 |
+
"quote",
|
| 1226 |
+
"syn",
|
| 1227 |
+
"synstructure",
|
| 1228 |
+
]
|
| 1229 |
+
|
| 1230 |
+
[[package]]
|
| 1231 |
+
name = "zerotrie"
|
| 1232 |
+
version = "0.2.3"
|
| 1233 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1234 |
+
checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851"
|
| 1235 |
+
dependencies = [
|
| 1236 |
+
"displaydoc",
|
| 1237 |
+
"yoke",
|
| 1238 |
+
"zerofrom",
|
| 1239 |
+
]
|
| 1240 |
+
|
| 1241 |
+
[[package]]
|
| 1242 |
+
name = "zerovec"
|
| 1243 |
+
version = "0.11.5"
|
| 1244 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1245 |
+
checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002"
|
| 1246 |
+
dependencies = [
|
| 1247 |
+
"yoke",
|
| 1248 |
+
"zerofrom",
|
| 1249 |
+
"zerovec-derive",
|
| 1250 |
+
]
|
| 1251 |
+
|
| 1252 |
+
[[package]]
|
| 1253 |
+
name = "zerovec-derive"
|
| 1254 |
+
version = "0.11.2"
|
| 1255 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1256 |
+
checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3"
|
| 1257 |
+
dependencies = [
|
| 1258 |
+
"proc-macro2",
|
| 1259 |
+
"quote",
|
| 1260 |
+
"syn",
|
| 1261 |
+
]
|
| 1262 |
+
|
| 1263 |
+
[[package]]
|
| 1264 |
+
name = "zmij"
|
| 1265 |
+
version = "1.0.19"
|
| 1266 |
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 1267 |
+
checksum = "3ff05f8caa9038894637571ae6b9e29466c1f4f829d26c9b28f869a29cbe3445"
|
launcher/Cargo.toml
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[package]
|
| 2 |
+
name = "loveca_launcher"
|
| 3 |
+
version = "0.1.0"
|
| 4 |
+
edition = "2021"
|
| 5 |
+
|
| 6 |
+
[dependencies]
|
| 7 |
+
tiny_http = "0.12"
|
| 8 |
+
webbrowser = "0.8"
|
| 9 |
+
rust-embed = "6.6"
|
| 10 |
+
mime_guess = "2.0"
|
| 11 |
+
mime = "0.3"
|
| 12 |
+
serde = { version = "1.0", features = ["derive"] }
|
| 13 |
+
serde_json = "1.0"
|
| 14 |
+
rand = "0.8"
|
| 15 |
+
uuid = { version = "1.4", features = ["v4", "fast-rng", "macro-diagnostics"] }
|
| 16 |
+
engine_rust = { path = "../engine_rust_src", default-features = false, features = ["parallel"] }
|
launcher/build_errors.txt
ADDED
|
Binary file (7.41 kB). View file
|
|
|
launcher/check_results.txt
ADDED
|
Binary file (720 Bytes). View file
|
|
|
launcher/error.log
ADDED
|
Binary file (1.2 kB). View file
|
|
|
launcher/error.txt
ADDED
|
Binary file (2.25 kB). View file
|
|
|
launcher/error_ascii.txt
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
warning: unused imports: `Arc` and `Mutex`
|
| 2 |
+
--> C:\Users\trios\.gemini\antigravity\vscode\loveca-copy\engine_rust_src\src\core\mcts.rs:18:17
|
| 3 |
+
|
|
| 4 |
+
18 | use std::sync::{Arc, Mutex};
|
| 5 |
+
| ^^^ ^^^^^
|
| 6 |
+
|
|
| 7 |
+
= note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default
|
| 8 |
+
|
| 9 |
+
warning: `engine_rust` (lib) generated 1 warning (run `cargo fix --lib -p engine_rust` to apply 1 suggestion)
|
| 10 |
+
Checking loveca_launcher v0.1.0 (C:\Users\trios\.gemini\antigravity\vscode\loveca-copy\launcher)
|
| 11 |
+
error[E0425]: cannot find value `shared_state` in this scope
|
| 12 |
+
--> src\main.rs:276:61
|
| 13 |
+
|
|
| 14 |
+
276 | handle_get_test_deck(&mut request, query, &shared_state.lock().unwrap().card_db);
|
| 15 |
+
| ^^^^^^^^^^^^ not found in this scope
|
| 16 |
+
|
| 17 |
+
warning: unused import: `StatusCode`
|
| 18 |
+
--> src\main.rs:1:60
|
| 19 |
+
|
|
| 20 |
+
1 | use tiny_http::{Server, Response, Header, Request, Method, StatusCode};
|
| 21 |
+
| ^^^^^^^^^^
|
| 22 |
+
|
|
| 23 |
+
= note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default
|
| 24 |
+
|
| 25 |
+
warning: unused import: `Serialize`
|
| 26 |
+
--> src\main.rs:8:26
|
| 27 |
+
|
|
| 28 |
+
8 | use serde::{Deserialize, Serialize};
|
| 29 |
+
| ^^^^^^^^^
|
| 30 |
+
|
| 31 |
+
error[E0609]: no field `active_player` on type `GameState`
|
| 32 |
+
--> src\main.rs:229:62
|
| 33 |
+
|
|
| 34 |
+
229 | if room.mode == "pve" && room.state.active_player == 1 && !room.state.game_over {
|
| 35 |
+
| ^^^^^^^^^^^^^ unknown field
|
| 36 |
+
|
|
| 37 |
+
= note: available fields are: `players`, `current_player`, `first_player`, `phase`, `yell_cards` ... and 15 others
|
| 38 |
+
|
| 39 |
+
error[E0609]: no field `game_over` on type `GameState`
|
| 40 |
+
--> src\main.rs:229:96
|
| 41 |
+
|
|
| 42 |
+
229 | if room.mode == "pve" && room.state.active_player == 1 && !room.state.game_over {
|
| 43 |
+
| ^^^^^^^^^ unknown field
|
| 44 |
+
|
|
| 45 |
+
= note: available fields are: `players`, `current_player`, `first_player`, `phase`, `yell_cards` ... and 15 others
|
| 46 |
+
|
| 47 |
+
error[E0609]: no field `active_player` on type `GameState`
|
| 48 |
+
--> src\main.rs:236:47
|
| 49 |
+
|
|
| 50 |
+
236 | ... while room.state.active_player == 1 && !room.state.game_over && steps < 10 {
|
| 51 |
+
| ^^^^^^^^^^^^^ unknown field
|
| 52 |
+
|
|
| 53 |
+
= note: available fields are: `players`, `current_player`, `first_player`, `phase`, `yell_cards` ... and 15 others
|
| 54 |
+
|
| 55 |
+
error[E0609]: no field `game_over` on type `GameState`
|
| 56 |
+
--> src\main.rs:236:81
|
| 57 |
+
|
|
| 58 |
+
236 | ... while room.state.active_player == 1 && !room.state.game_over && steps < 10 {
|
| 59 |
+
| ^^^^^^^^^ unknown field
|
| 60 |
+
|
|
| 61 |
+
= note: available fields are: `players`, `current_player`, `first_player`, `phase`, `yell_cards` ... and 15 others
|
| 62 |
+
|
| 63 |
+
error[E0308]: mismatched types
|
| 64 |
+
--> src\main.rs:433:57
|
| 65 |
+
|
|
| 66 |
+
433 | .find(|h| h.field.as_str().eq_ignore_ascii_case(name))
|
| 67 |
+
| -------------------- ^^^^ expected `&AsciiStr`, found `&str`
|
| 68 |
+
| |
|
| 69 |
+
| arguments to this method are incorrect
|
| 70 |
+
|
|
| 71 |
+
= note: expected reference `&ascii::ascii_str::AsciiStr`
|
| 72 |
+
found reference `&str`
|
| 73 |
+
note: method defined here
|
| 74 |
+
--> C:\Users\trios\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\ascii-1.1.0\src\ascii_str.rs:267:12
|
| 75 |
+
|
|
| 76 |
+
267 | pub fn eq_ignore_ascii_case(&self, other: &Self) -> bool {
|
| 77 |
+
| ^^^^^^^^^^^^^^^^^^^^
|
| 78 |
+
|
| 79 |
+
error[E0609]: no field `cards` on type `&CardDatabase`
|
| 80 |
+
--> src\main.rs:451:27
|
| 81 |
+
|
|
| 82 |
+
451 | for (id, card) in &db.cards {
|
| 83 |
+
| ^^^^^ unknown field
|
| 84 |
+
|
|
| 85 |
+
= note: available fields are: `members`, `lives`, `members_vec`, `lives_vec`
|
| 86 |
+
|
| 87 |
+
error[E0282]: type annotations needed
|
| 88 |
+
--> src\main.rs:453:33
|
| 89 |
+
|
|
| 90 |
+
453 | if let Some(cid) = cfg.get("id") { // e.g. "PL!..."
|
| 91 |
+
| ^^^ cannot infer type
|
| 92 |
+
|
| 93 |
+
error[E0282]: type annotations needed
|
| 94 |
+
--> src\main.rs:454:38
|
| 95 |
+
|
|
| 96 |
+
454 | if let Some(code) = cid.as_str() {
|
| 97 |
+
| ^^^ cannot infer type
|
| 98 |
+
|
| 99 |
+
error[E0282]: type annotations needed
|
| 100 |
+
--> src\main.rs:455:38
|
| 101 |
+
|
|
| 102 |
+
455 | code_map.insert(code.to_string(), *id);
|
| 103 |
+
| ^^^^ cannot infer type
|
| 104 |
+
|
| 105 |
+
warning: variable does not need to be mutable
|
| 106 |
+
--> src\main.rs:121:9
|
| 107 |
+
|
|
| 108 |
+
121 | for mut request in server.incoming_requests() {
|
| 109 |
+
| ----^^^^^^^
|
| 110 |
+
| |
|
| 111 |
+
| help: remove this `mut`
|
| 112 |
+
|
|
| 113 |
+
= note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default
|
| 114 |
+
|
| 115 |
+
warning: variable does not need to be mutable
|
| 116 |
+
--> src\main.rs:400:9
|
| 117 |
+
|
|
| 118 |
+
400 | let mut clean_path = if path_str == "/" || path_str == "" {
|
| 119 |
+
| ----^^^^^^^^^^
|
| 120 |
+
| |
|
| 121 |
+
| help: remove this `mut`
|
| 122 |
+
|
| 123 |
+
error[E0507]: cannot move out of `*request` which is behind a mutable reference
|
| 124 |
+
--> src\main.rs:508:22
|
| 125 |
+
|
|
| 126 |
+
508 | let _ = request.respond(Response::from_string(json.to_string()));
|
| 127 |
+
| ^^^^^^^ move occurs because `*request` has type `tiny_http::Request`, which does not implement the `Copy` trait
|
| 128 |
+
|
| 129 |
+
error[E0507]: cannot move out of `*request` which is behind a mutable reference
|
| 130 |
+
--> src\main.rs:510:22
|
| 131 |
+
|
|
| 132 |
+
510 | let _ = request.respond(Response::from_string(json!({"success":false,"error":"Not found"}).to_string()));
|
| 133 |
+
| ^^^^^^^ move occurs because `*request` has type `tiny_http::Request`, which does not implement the `Copy` trait
|
| 134 |
+
|
| 135 |
+
error[E0507]: cannot move out of `*request` which is behind a mutable reference
|
| 136 |
+
--> src\main.rs:515:18
|
| 137 |
+
|
|
| 138 |
+
515 | let _ = request.respond(Response::from_string(json.to_string()));
|
| 139 |
+
| ^^^^^^^ move occurs because `*request` has type `tiny_http::Request`, which does not implement the `Copy` trait
|
| 140 |
+
|
| 141 |
+
warning: unused variable: `db`
|
| 142 |
+
--> src\main.rs:474:69
|
| 143 |
+
|
|
| 144 |
+
474 | fn handle_get_test_deck(request: &mut Request, query: Option<&str>, db: &CardDatabase) {
|
| 145 |
+
| ^^ help: if this is intentional, prefix it with an underscore: `_db`
|
| 146 |
+
|
|
| 147 |
+
= note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default
|
| 148 |
+
|
| 149 |
+
Some errors have detailed explanations: E0282, E0308, E0425, E0507, E0609.
|
| 150 |
+
For more information about an error, try `rustc --explain E0282`.
|
| 151 |
+
warning: `loveca_launcher` (bin "loveca_launcher") generated 5 warnings
|
| 152 |
+
error: could not compile `loveca_launcher` (bin "loveca_launcher") due to 13 previous errors; 5 warnings emitted
|
launcher/error_ascii_2.txt
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
warning: unused imports: `Arc` and `Mutex`
|
| 2 |
+
--> C:\Users\trios\.gemini\antigravity\vscode\loveca-copy\engine_rust_src\src\core\mcts.rs:18:17
|
| 3 |
+
|
|
| 4 |
+
18 | use std::sync::{Arc, Mutex};
|
| 5 |
+
| ^^^ ^^^^^
|
| 6 |
+
|
|
| 7 |
+
= note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default
|
| 8 |
+
|
| 9 |
+
warning: `engine_rust` (lib) generated 1 warning (run `cargo fix --lib -p engine_rust` to apply 1 suggestion)
|
| 10 |
+
Checking loveca_launcher v0.1.0 (C:\Users\trios\.gemini\antigravity\vscode\loveca-copy\launcher)
|
| 11 |
+
src\main.rs:16:5: error[E0432]: unresolved import `engine_rust::core::enums::Phase`: no `Phase` in `core::enums`
|
| 12 |
+
src\main.rs:1:60: warning: unused import: `StatusCode`
|
| 13 |
+
src\main.rs:8:26: warning: unused import: `Serialize`
|
| 14 |
+
src\main.rs:352:57: error[E0308]: mismatched types: expected `&AsciiStr`, found `&str`
|
| 15 |
+
src\main.rs:368:35: error[E0609]: no field `config` on type `&MemberCard`: unknown field
|
| 16 |
+
src\main.rs:369:33: error[E0282]: type annotations needed: cannot infer type
|
| 17 |
+
src\main.rs:370:38: error[E0282]: type annotations needed: cannot infer type
|
| 18 |
+
src\main.rs:371:38: error[E0282]: type annotations needed: cannot infer type
|
| 19 |
+
src\main.rs:378:35: error[E0609]: no field `config` on type `&LiveCard`: unknown field
|
| 20 |
+
src\main.rs:379:33: error[E0282]: type annotations needed: cannot infer type
|
| 21 |
+
src\main.rs:380:38: error[E0282]: type annotations needed: cannot infer type
|
| 22 |
+
src\main.rs:381:38: error[E0282]: type annotations needed: cannot infer type
|
| 23 |
+
warning: `loveca_launcher` (bin "loveca_launcher") generated 2 warnings
|
| 24 |
+
error: could not compile `loveca_launcher` (bin "loveca_launcher") due to 10 previous errors; 2 warnings emitted
|
launcher/error_ascii_3.txt
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
warning: unused imports: `Arc` and `Mutex`
|
| 2 |
+
--> C:\Users\trios\.gemini\antigravity\vscode\loveca-copy\engine_rust_src\src\core\mcts.rs:18:17
|
| 3 |
+
|
|
| 4 |
+
18 | use std::sync::{Arc, Mutex};
|
| 5 |
+
| ^^^ ^^^^^
|
| 6 |
+
|
|
| 7 |
+
= note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default
|
| 8 |
+
|
| 9 |
+
warning: `engine_rust` (lib) generated 1 warning (run `cargo fix --lib -p engine_rust` to apply 1 suggestion)
|
| 10 |
+
Checking loveca_launcher v0.1.0 (C:\Users\trios\.gemini\antigravity\vscode\loveca-copy\launcher)
|
| 11 |
+
src\main.rs:1:60: warning: unused import: `StatusCode`
|
| 12 |
+
src\main.rs:8:26: warning: unused import: `Serialize`
|
| 13 |
+
src\main.rs:221:112: error[E0599]: no variant or associated item named `GameEnd` found for enum `Phase` in the current scope: variant or associated item not found in `Phase`
|
| 14 |
+
src\main.rs:223:97: error[E0599]: no variant or associated item named `GameEnd` found for enum `Phase` in the current scope: variant or associated item not found in `Phase`
|
| 15 |
+
warning: `loveca_launcher` (bin "loveca_launcher") generated 2 warnings
|
| 16 |
+
error: could not compile `loveca_launcher` (bin "loveca_launcher") due to 2 previous errors; 2 warnings emitted
|
launcher/error_deck_fix.txt
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
warning: unused imports: `Arc` and `Mutex`
|
| 2 |
+
--> C:\Users\trios\.gemini\antigravity\vscode\loveca-copy\engine_rust_src\src\core\mcts.rs:18:17
|
| 3 |
+
|
|
| 4 |
+
18 | use std::sync::{Arc, Mutex};
|
| 5 |
+
| ^^^ ^^^^^
|
| 6 |
+
|
|
| 7 |
+
= note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default
|
| 8 |
+
|
| 9 |
+
warning: `engine_rust` (lib) generated 1 warning (run `cargo fix --lib -p engine_rust` to apply 1 suggestion)
|
| 10 |
+
Checking loveca_launcher v0.1.0 (C:\Users\trios\.gemini\antigravity\vscode\loveca-copy\launcher)
|
| 11 |
+
src\main.rs:1:60: warning: unused import: `StatusCode`
|
| 12 |
+
src\main.rs:8:26: warning: unused import: `Serialize`
|
| 13 |
+
src\main.rs:330:33: warning: unused variable: `room`: help: if this is intentional, prefix it with an underscore: `_room`
|
| 14 |
+
src\main.rs:331:29: warning: unused variable: `ids`: help: if this is intentional, prefix it with an underscore: `_ids`
|
| 15 |
+
src\main.rs:179:33: warning: value assigned to `response_json` is never read
|
| 16 |
+
src\main.rs:28:5: warning: fields `id` and `last_update` are never read
|
| 17 |
+
src\main.rs:44:5: warning: field `public` is never read
|
| 18 |
+
src\main.rs:54:5: warning: field `deck_type` is never read
|
| 19 |
+
warning: `loveca_launcher` (bin "loveca_launcher") generated 8 warnings (run `cargo fix --bin "loveca_launcher" -p loveca_launcher` to apply 4 suggestions)
|
| 20 |
+
Finished `dev` profile [unoptimized + debuginfo] target(s) in 12.76s
|
launcher/error_enrichment.txt
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
warning: unused imports: `Arc` and `Mutex`
|
| 2 |
+
--> C:\Users\trios\.gemini\antigravity\vscode\loveca-copy\engine_rust_src\src\core\mcts.rs:18:17
|
| 3 |
+
|
|
| 4 |
+
18 | use std::sync::{Arc, Mutex};
|
| 5 |
+
| ^^^ ^^^^^
|
| 6 |
+
|
|
| 7 |
+
= note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default
|
| 8 |
+
|
| 9 |
+
warning: `engine_rust` (lib) generated 1 warning (run `cargo fix --lib -p engine_rust` to apply 1 suggestion)
|
| 10 |
+
Checking loveca_launcher v0.1.0 (C:\Users\trios\.gemini\antigravity\vscode\loveca-copy\launcher)
|
| 11 |
+
src\main.rs:8:26: warning: unused import: `Serialize`
|
| 12 |
+
src\main.rs:14:78: warning: unused imports: `LiveCard` and `MemberCard`
|
| 13 |
+
src\main.rs:384:43: warning: unused variable: `body`: help: if this is intentional, prefix it with an underscore: `_body`
|
| 14 |
+
src\main.rs:187:33: warning: value assigned to `response_json` is never read
|
| 15 |
+
src\main.rs:547:43: warning: unused variable: `gs`: help: if this is intentional, prefix it with an underscore: `_gs`
|
| 16 |
+
src\main.rs:28:5: warning: field `id` is never read
|
| 17 |
+
src\main.rs:57:5: warning: field `deck_type` is never read
|
| 18 |
+
src\main.rs:83:5: warning: fields `player` and `deck` are never read
|
| 19 |
+
warning: `loveca_launcher` (bin "loveca_launcher") generated 8 warnings (run `cargo fix --bin "loveca_launcher" -p loveca_launcher` to apply 4 suggestions)
|
| 20 |
+
Finished `dev` profile [unoptimized + debuginfo] target(s) in 12.74s
|
launcher/error_enrichment_2.txt
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
warning: unused imports: `Arc` and `Mutex`
|
| 2 |
+
--> C:\Users\trios\.gemini\antigravity\vscode\loveca-copy\engine_rust_src\src\core\mcts.rs:18:17
|
| 3 |
+
|
|
| 4 |
+
18 | use std::sync::{Arc, Mutex};
|
| 5 |
+
| ^^^ ^^^^^
|
| 6 |
+
|
|
| 7 |
+
= note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default
|
| 8 |
+
|
| 9 |
+
warning: `engine_rust` (lib) generated 1 warning (run `cargo fix --lib -p engine_rust` to apply 1 suggestion)
|
| 10 |
+
Checking loveca_launcher v0.1.0 (C:\Users\trios\.gemini\antigravity\vscode\loveca-copy\launcher)
|
| 11 |
+
src\main.rs:8:26: warning: unused import: `Serialize`
|
| 12 |
+
src\main.rs:14:78: warning: unused imports: `LiveCard` and `MemberCard`
|
| 13 |
+
src\main.rs:466:46: error[E0599]: no method named `full_path` found for struct `rust_embed::Metadata` in the current scope: method not found in `rust_embed::Metadata`
|
| 14 |
+
src\main.rs:384:43: warning: unused variable: `body`: help: if this is intentional, prefix it with an underscore: `_body`
|
| 15 |
+
src\main.rs:187:33: warning: value assigned to `response_json` is never read
|
| 16 |
+
src\main.rs:563:43: warning: unused variable: `gs`: help: if this is intentional, prefix it with an underscore: `_gs`
|
| 17 |
+
warning: `loveca_launcher` (bin "loveca_launcher") generated 5 warnings
|
| 18 |
+
error: could not compile `loveca_launcher` (bin "loveca_launcher") due to 1 previous error; 5 warnings emitted
|
launcher/error_enrichment_3.txt
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
warning: unused imports: `Arc` and `Mutex`
|
| 2 |
+
--> C:\Users\trios\.gemini\antigravity\vscode\loveca-copy\engine_rust_src\src\core\mcts.rs:18:17
|
| 3 |
+
|
|
| 4 |
+
18 | use std::sync::{Arc, Mutex};
|
| 5 |
+
| ^^^ ^^^^^
|
| 6 |
+
|
|
| 7 |
+
= note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default
|
| 8 |
+
|
| 9 |
+
warning: `engine_rust` (lib) generated 1 warning (run `cargo fix --lib -p engine_rust` to apply 1 suggestion)
|
| 10 |
+
Checking loveca_launcher v0.1.0 (C:\Users\trios\.gemini\antigravity\vscode\loveca-copy\launcher)
|
| 11 |
+
src\main.rs:8:26: warning: unused import: `Serialize`
|
| 12 |
+
src\main.rs:14:78: warning: unused imports: `LiveCard` and `MemberCard`
|
| 13 |
+
src\main.rs:391:43: warning: unused variable: `body`: help: if this is intentional, prefix it with an underscore: `_body`
|
| 14 |
+
src\main.rs:194:33: warning: value assigned to `response_json` is never read
|
| 15 |
+
src\main.rs:578:43: warning: unused variable: `gs`: help: if this is intentional, prefix it with an underscore: `_gs`
|
| 16 |
+
src\main.rs:28:5: warning: field `id` is never read
|
| 17 |
+
src\main.rs:57:5: warning: field `deck_type` is never read
|
| 18 |
+
src\main.rs:83:5: warning: fields `player` and `deck` are never read
|
| 19 |
+
warning: `loveca_launcher` (bin "loveca_launcher") generated 8 warnings (run `cargo fix --bin "loveca_launcher" -p loveca_launcher` to apply 4 suggestions)
|
| 20 |
+
Finished `dev` profile [unoptimized + debuginfo] target(s) in 11.82s
|
launcher/error_final.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
warning: unused imports: `Arc` and `Mutex`
|
| 2 |
+
--> C:\Users\trios\.gemini\antigravity\vscode\loveca-copy\engine_rust_src\src\core\mcts.rs:18:17
|
| 3 |
+
|
|
| 4 |
+
18 | use std::sync::{Arc, Mutex};
|
| 5 |
+
| ^^^ ^^^^^
|
| 6 |
+
|
|
| 7 |
+
= note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default
|
| 8 |
+
|
| 9 |
+
warning: `engine_rust` (lib) generated 1 warning (run `cargo fix --lib -p engine_rust` to apply 1 suggestion)
|
| 10 |
+
Checking loveca_launcher v0.1.0 (C:\Users\trios\.gemini\antigravity\vscode\loveca-copy\launcher)
|
| 11 |
+
src\main.rs:1:60: warning: unused import: `StatusCode`
|
| 12 |
+
src\main.rs:8:26: warning: unused import: `Serialize`
|
| 13 |
+
src\main.rs:224:85: error[E0502]: cannot borrow `lock` as immutable because it is also borrowed as mutable: immutable borrow occurs here
|
| 14 |
+
src\main.rs:226:63: error[E0502]: cannot borrow `lock` as immutable because it is also borrowed as mutable: immutable borrow occurs here
|
| 15 |
+
src\main.rs:228:63: error[E0502]: cannot borrow `lock` as immutable because it is also borrowed as mutable: immutable borrow occurs here
|
| 16 |
+
src\main.rs:245:49: error[E0502]: cannot borrow `lock` as immutable because it is also borrowed as mutable: immutable borrow occurs here
|
| 17 |
+
src\main.rs:262:77: error[E0502]: cannot borrow `lock` as immutable because it is also borrowed as mutable: immutable borrow occurs here
|
| 18 |
+
src\main.rs:289:77: error[E0502]: cannot borrow `lock` as immutable because it is also borrowed as mutable: immutable borrow occurs here
|
| 19 |
+
src\main.rs:163:33: warning: value assigned to `response_json` is never read
|
| 20 |
+
warning: `loveca_launcher` (bin "loveca_launcher") generated 3 warnings
|
| 21 |
+
error: could not compile `loveca_launcher` (bin "loveca_launcher") due to 6 previous errors; 3 warnings emitted
|
launcher/error_final_2.txt
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
warning: unused imports: `Arc` and `Mutex`
|
| 2 |
+
--> C:\Users\trios\.gemini\antigravity\vscode\loveca-copy\engine_rust_src\src\core\mcts.rs:18:17
|
| 3 |
+
|
|
| 4 |
+
18 | use std::sync::{Arc, Mutex};
|
| 5 |
+
| ^^^ ^^^^^
|
| 6 |
+
|
|
| 7 |
+
= note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default
|
| 8 |
+
|
| 9 |
+
warning: `engine_rust` (lib) generated 1 warning (run `cargo fix --lib -p engine_rust` to apply 1 suggestion)
|
| 10 |
+
Checking loveca_launcher v0.1.0 (C:\Users\trios\.gemini\antigravity\vscode\loveca-copy\launcher)
|
| 11 |
+
src\main.rs:162:33: warning: value assigned to `response_json` is never read
|
| 12 |
+
src\main.rs:28:5: warning: fields `id` and `last_update` are never read
|
| 13 |
+
warning: `loveca_launcher` (bin "loveca_launcher") generated 2 warnings
|
| 14 |
+
Finished `dev` profile [unoptimized + debuginfo] target(s) in 10.56s
|
launcher/error_final_parity.txt
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
warning: unused imports: `Arc` and `Mutex`
|
| 2 |
+
--> C:\Users\trios\.gemini\antigravity\vscode\loveca-copy\engine_rust_src\src\core\mcts.rs:18:17
|
| 3 |
+
|
|
| 4 |
+
18 | use std::sync::{Arc, Mutex};
|
| 5 |
+
| ^^^ ^^^^^
|
| 6 |
+
|
|
| 7 |
+
= note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default
|
| 8 |
+
|
| 9 |
+
warning: `engine_rust` (lib) generated 1 warning (run `cargo fix --lib -p engine_rust` to apply 1 suggestion)
|
| 10 |
+
Checking loveca_launcher v0.1.0 (C:\Users\trios\.gemini\antigravity\vscode\loveca-copy\launcher)
|
| 11 |
+
src\main.rs:8:26: warning: unused import: `Serialize`
|
| 12 |
+
src\main.rs:255:48: error[E0609]: no field `turn_number` on type `GameState`: unknown field
|
| 13 |
+
warning: `loveca_launcher` (bin "loveca_launcher") generated 1 warning
|
| 14 |
+
error: could not compile `loveca_launcher` (bin "loveca_launcher") due to 1 previous error; 1 warning emitted
|
launcher/error_final_parity_2.txt
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
warning: unused imports: `Arc` and `Mutex`
|
| 2 |
+
--> C:\Users\trios\.gemini\antigravity\vscode\loveca-copy\engine_rust_src\src\core\mcts.rs:18:17
|
| 3 |
+
|
|
| 4 |
+
18 | use std::sync::{Arc, Mutex};
|
| 5 |
+
| ^^^ ^^^^^
|
| 6 |
+
|
|
| 7 |
+
= note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default
|
| 8 |
+
|
| 9 |
+
warning: `engine_rust` (lib) generated 1 warning (run `cargo fix --lib -p engine_rust` to apply 1 suggestion)
|
| 10 |
+
Checking loveca_launcher v0.1.0 (C:\Users\trios\.gemini\antigravity\vscode\loveca-copy\launcher)
|
| 11 |
+
src\main.rs:8:26: warning: unused import: `Serialize`
|
| 12 |
+
src\main.rs:375:43: warning: unused variable: `body`: help: if this is intentional, prefix it with an underscore: `_body`
|
| 13 |
+
src\main.rs:181:33: warning: value assigned to `response_json` is never read
|
| 14 |
+
src\main.rs:28:5: warning: field `id` is never read
|
| 15 |
+
src\main.rs:56:5: warning: field `deck_type` is never read
|
| 16 |
+
src\main.rs:82:5: warning: fields `player` and `deck` are never read
|
| 17 |
+
warning: `loveca_launcher` (bin "loveca_launcher") generated 6 warnings (run `cargo fix --bin "loveca_launcher" -p loveca_launcher` to apply 2 suggestions)
|
| 18 |
+
Finished `dev` profile [unoptimized + debuginfo] target(s) in 11.50s
|
launcher/error_short.log
ADDED
|
Binary file (2.1 kB). View file
|
|
|
launcher/error_utf8.txt
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
cargo : Checking loveca_launcher v0
|
| 2 |
+
.1.0 (C:\Users\trios\.gemini\antigravit
|
| 3 |
+
y\vscode\loveca-copy\launcher)
|
| 4 |
+
発生場所 行:1 文字:1
|
| 5 |
+
+ cargo check > error.txt 2>&1 ; type e
|
| 6 |
+
rror.txt
|
| 7 |
+
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
| 8 |
+
+ CategoryInfo : NotSpeci
|
| 9 |
+
fied: ( Checking lo...-copy\lau
|
| 10 |
+
ncher):String) [], RemoteException
|
| 11 |
+
+ FullyQualifiedErrorId : NativeCo
|
| 12 |
+
mmandError
|
| 13 |
+
|
| 14 |
+
error: this file contains an unclosed d
|
| 15 |
+
elimiter
|
| 16 |
+
--> src\main.rs:923:3
|
| 17 |
+
|
|
| 18 |
+
728 | fn serialize_state_rich(gs: &Game
|
| 19 |
+
State, db: &CardDatabase, edb: &Value,
|
| 20 |
+
mode: &str, viewer_idx: usize) -> Value
|
| 21 |
+
{
|
| 22 |
+
|
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
- unclosed delimiter
|
| 26 |
+
...
|
| 27 |
+
736 | if gs.current_player as usize
|
| 28 |
+
== viewer_idx {
|
| 29 |
+
|
|
| 30 |
+
- this delimiter might n
|
| 31 |
+
ot be properly closed...
|
| 32 |
+
...
|
| 33 |
+
878 | }
|
| 34 |
+
| - ...as it matches this but it ha
|
| 35 |
+
s different indentation
|
| 36 |
+
...
|
| 37 |
+
923 | }
|
| 38 |
+
| ^
|
| 39 |
+
|
| 40 |
+
error: could not compile `loveca_launch
|
| 41 |
+
er` (bin "loveca_launcher") due to 1 pr
|
| 42 |
+
evious error
|
launcher/errors.log
ADDED
|
Binary file (7.49 kB). View file
|
|
|
launcher/errors_2.log
ADDED
|
Binary file (5.04 kB). View file
|
|
|
launcher/errors_2_utf8.log
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
cargo : warning: unused imports: `Arc`
|
| 2 |
+
and `Mutex`
|
| 3 |
+
発生場所 行:1 文字:1
|
| 4 |
+
+ cargo check 2> errors_2.log ; Get-Con
|
| 5 |
+
tent errors_2.log | Out-File -En ...
|
| 6 |
+
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
| 7 |
+
+ CategoryInfo : NotSpeci
|
| 8 |
+
fied: (warning: unused...rc` and `
|
| 9 |
+
Mutex`:String) [], RemoteException
|
| 10 |
+
+ FullyQualifiedErrorId : NativeCo
|
| 11 |
+
mmandError
|
| 12 |
+
|
| 13 |
+
--> C:\Users\trios\.gemini\antigravit
|
| 14 |
+
y\vscode\loveca-copy\engine_rust_src\sr
|
| 15 |
+
c\core\mcts.rs:18:17
|
| 16 |
+
|
|
| 17 |
+
18 | use std::sync::{Arc, Mutex};
|
| 18 |
+
| ^^^ ^^^^^
|
| 19 |
+
|
|
| 20 |
+
= note: `#[warn(unused_imports)]` (p
|
| 21 |
+
art of `#[warn(unused)]`) on by default
|
| 22 |
+
|
| 23 |
+
warning: `engine_rust` (lib) generated
|
| 24 |
+
1 warning (run `cargo fix --lib -p engi
|
| 25 |
+
ne_rust` to apply 1 suggestion)
|
| 26 |
+
Checking loveca_launcher v0.1.0 (C:
|
| 27 |
+
\Users\trios\.gemini\antigravity\vscode
|
| 28 |
+
\loveca-copy\launcher)
|
| 29 |
+
error[E0425]: cannot find value `body`
|
| 30 |
+
in this scope
|
| 31 |
+
--> src\main.rs:408:92
|
| 32 |
+
|
|
| 33 |
+
404 | ... if let (Some(rid_raw), Ok(_
|
| 34 |
+
body)) = (room_id, parse_body::<AiSugge
|
| 35 |
+
stReq>(&mut request)) {
|
| 36 |
+
| -
|
| 37 |
+
---- `_body` defined here
|
| 38 |
+
...
|
| 39 |
+
408 | ... let suggestions = r
|
| 40 |
+
oom.state.get_mcts_suggestions(&state.c
|
| 41 |
+
ard_db, body.sims, SearchHorizon::GameE
|
| 42 |
+
nd, EvalMode::Normal);
|
| 43 |
+
|
|
| 44 |
+
|
| 45 |
+
^^^^
|
| 46 |
+
|
|
| 47 |
+
help: the leading underscore in `_body`
|
| 48 |
+
marks it as unused, consider renaming
|
| 49 |
+
it to `body`
|
| 50 |
+
|
|
| 51 |
+
404 - if let (Some(rid
|
| 52 |
+
_raw), Ok(_body)) = (room_id, parse_bod
|
| 53 |
+
y::<AiSuggestReq>(&mut request)) {
|
| 54 |
+
404 + if let (Some(rid
|
| 55 |
+
_raw), Ok(body)) = (room_id, parse_body
|
| 56 |
+
::<AiSuggestReq>(&mut request)) {
|
| 57 |
+
|
|
| 58 |
+
|
| 59 |
+
warning: unused import: `Serialize`
|
| 60 |
+
--> src\main.rs:8:26
|
| 61 |
+
|
|
| 62 |
+
8 | use serde::{Deserialize, Serialize}
|
| 63 |
+
;
|
| 64 |
+
| ^^^^^^^^^
|
| 65 |
+
|
|
| 66 |
+
= note: `#[warn(unused_imports)]` (pa
|
| 67 |
+
rt of `#[warn(unused)]`) on by default
|
| 68 |
+
|
| 69 |
+
warning: unused imports: `LiveCard` and
|
| 70 |
+
`MemberCard`
|
| 71 |
+
--> src\main.rs:14:78
|
| 72 |
+
|
|
| 73 |
+
14 | use engine_rust::core::models::{Ga
|
| 74 |
+
meState, CardDatabase, Phase, PlayerSta
|
| 75 |
+
te, MemberCard, LiveCard};
|
| 76 |
+
|
|
| 77 |
+
|
| 78 |
+
^^^^^^^^^^ ^^^^^^^^
|
| 79 |
+
|
| 80 |
+
For more information about this error,
|
| 81 |
+
try `rustc --explain E0425`.
|
| 82 |
+
warning: `loveca_launcher` (bin "loveca
|
| 83 |
+
_launcher") generated 2 warnings
|
| 84 |
+
error: could not compile `loveca_launch
|
| 85 |
+
er` (bin "loveca_launcher") due to 1 pr
|
| 86 |
+
evious error; 2 warnings emitted
|
launcher/errors_utf8.log
ADDED
|
@@ -0,0 +1,135 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
cargo : warning: unused imports: `Arc`
|
| 2 |
+
and `Mutex`
|
| 3 |
+
発生場所 行:1 文字:1
|
| 4 |
+
+ cargo check 2> errors.log ; Get-Conte
|
| 5 |
+
nt errors.log | Out-File -Encodi ...
|
| 6 |
+
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
|
| 7 |
+
+ CategoryInfo : NotSpeci
|
| 8 |
+
fied: (warning: unused...rc` and `
|
| 9 |
+
Mutex`:String) [], RemoteException
|
| 10 |
+
+ FullyQualifiedErrorId : NativeCo
|
| 11 |
+
mmandError
|
| 12 |
+
|
| 13 |
+
--> C:\Users\trios\.gemini\antigravit
|
| 14 |
+
y\vscode\loveca-copy\engine_rust_src\sr
|
| 15 |
+
c\core\mcts.rs:18:17
|
| 16 |
+
|
|
| 17 |
+
18 | use std::sync::{Arc, Mutex};
|
| 18 |
+
| ^^^ ^^^^^
|
| 19 |
+
|
|
| 20 |
+
= note: `#[warn(unused_imports)]` (p
|
| 21 |
+
art of `#[warn(unused)]`) on by default
|
| 22 |
+
|
| 23 |
+
warning: `engine_rust` (lib) generated
|
| 24 |
+
1 warning (run `cargo fix --lib -p engi
|
| 25 |
+
ne_rust` to apply 1 suggestion)
|
| 26 |
+
Checking loveca_launcher v0.1.0 (C:
|
| 27 |
+
\Users\trios\.gemini\antigravity\vscode
|
| 28 |
+
\loveca-copy\launcher)
|
| 29 |
+
error[E0428]: the name `get_local_ip` i
|
| 30 |
+
s defined multiple times
|
| 31 |
+
--> src\main.rs:468:1
|
| 32 |
+
|
|
| 33 |
+
153 | fn get_local_ip() -> Result<Strin
|
| 34 |
+
g, ()> {
|
| 35 |
+
| ---------------------------------
|
| 36 |
+
------ previous definition of the value
|
| 37 |
+
`get_local_ip` here
|
| 38 |
+
...
|
| 39 |
+
468 | fn get_local_ip() -> Result<Strin
|
| 40 |
+
g, ()> {
|
| 41 |
+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 42 |
+
^^^^^^ `get_local_ip` redefined here
|
| 43 |
+
|
|
| 44 |
+
= note: `get_local_ip` must be defi
|
| 45 |
+
ned only once in the value namespace of
|
| 46 |
+
this module
|
| 47 |
+
|
| 48 |
+
warning: unused import: `Serialize`
|
| 49 |
+
--> src\main.rs:8:26
|
| 50 |
+
|
|
| 51 |
+
8 | use serde::{Deserialize, Serialize}
|
| 52 |
+
;
|
| 53 |
+
| ^^^^^^^^^
|
| 54 |
+
|
|
| 55 |
+
= note: `#[warn(unused_imports)]` (pa
|
| 56 |
+
rt of `#[warn(unused)]`) on by default
|
| 57 |
+
|
| 58 |
+
warning: unused imports: `LiveCard` and
|
| 59 |
+
`MemberCard`
|
| 60 |
+
--> src\main.rs:14:78
|
| 61 |
+
|
|
| 62 |
+
14 | use engine_rust::core::models::{Ga
|
| 63 |
+
meState, CardDatabase, Phase, PlayerSta
|
| 64 |
+
te, MemberCard, LiveCard};
|
| 65 |
+
|
|
| 66 |
+
|
| 67 |
+
^^^^^^^^^^ ^^^^^^^^
|
| 68 |
+
|
| 69 |
+
error[E0609]: no field `original_text`
|
| 70 |
+
on type `&MemberCard`
|
| 71 |
+
--> src\main.rs:594:56
|
| 72 |
+
|
|
| 73 |
+
594 | "text": m.ability_tex
|
| 74 |
+
t, "original_text": m.original_text
|
| 75 |
+
|
|
| 76 |
+
^^^^^^^^^^^^^ unk
|
| 77 |
+
nown field
|
| 78 |
+
|
|
| 79 |
+
= note: available fields are: `card
|
| 80 |
+
_id`, `card_no`, `name`, `cost`, `heart
|
| 81 |
+
s` ... and 14 others
|
| 82 |
+
|
| 83 |
+
error[E0609]: no field `original_text`
|
| 84 |
+
on type `&LiveCard`
|
| 85 |
+
--> src\main.rs:600:56
|
| 86 |
+
|
|
| 87 |
+
600 | "text": l.ability_tex
|
| 88 |
+
t, "original_text": l.original_text
|
| 89 |
+
|
|
| 90 |
+
^^^^^^^^^^^^^ unk
|
| 91 |
+
nown field
|
| 92 |
+
|
|
| 93 |
+
= note: available fields are: `card
|
| 94 |
+
_id`, `card_no`, `name`, `score`, `requ
|
| 95 |
+
ired_hearts` ... and 10 others
|
| 96 |
+
|
| 97 |
+
warning: unused variable: `body`
|
| 98 |
+
--> src\main.rs:403:43
|
| 99 |
+
|
|
| 100 |
+
403 | if let (Some(rid_
|
| 101 |
+
raw), Ok(body)) = (room_id, parse_body:
|
| 102 |
+
:<SetDeckReq>(&mut request)) {
|
| 103 |
+
|
|
| 104 |
+
^^^^ help: if this is intentio
|
| 105 |
+
nal, prefix it with an underscore: `_bo
|
| 106 |
+
dy`
|
| 107 |
+
|
|
| 108 |
+
= note: `#[warn(unused_variables)]`
|
| 109 |
+
(part of `#[warn(unused)]`) on by defa
|
| 110 |
+
ult
|
| 111 |
+
|
| 112 |
+
warning: value assigned to `response_js
|
| 113 |
+
on` is never read
|
| 114 |
+
--> src\main.rs:194:33
|
| 115 |
+
|
|
| 116 |
+
194 | let mut response_json = S
|
| 117 |
+
tring::new();
|
| 118 |
+
| ^
|
| 119 |
+
^^^^^^^^^^^^
|
| 120 |
+
|
|
| 121 |
+
= help: maybe it is overwritten bef
|
| 122 |
+
ore being read?
|
| 123 |
+
= note: `#[warn(unused_assignments)
|
| 124 |
+
]` (part of `#[warn(unused)]`) on by de
|
| 125 |
+
fault
|
| 126 |
+
|
| 127 |
+
Some errors have detailed explanations:
|
| 128 |
+
E0428, E0609.
|
| 129 |
+
For more information about an error, tr
|
| 130 |
+
y `rustc --explain E0428`.
|
| 131 |
+
warning: `loveca_launcher` (bin "loveca
|
| 132 |
+
_launcher") generated 4 warnings
|
| 133 |
+
error: could not compile `loveca_launch
|
| 134 |
+
er` (bin "loveca_launcher") due to 3 pr
|
| 135 |
+
evious errors; 4 warnings emitted
|
launcher/final_errors.log
ADDED
|
Binary file (7.71 kB). View file
|
|
|
launcher/src/main.rs
ADDED
|
@@ -0,0 +1,1120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
use tiny_http::{Server, Response, Header, Request, Method, StatusCode};
|
| 2 |
+
use rust_embed::RustEmbed;
|
| 3 |
+
use std::collections::HashMap;
|
| 4 |
+
use std::sync::{Arc, Mutex};
|
| 5 |
+
use mime_guess::from_path;
|
| 6 |
+
use std::thread;
|
| 7 |
+
use std::time::Duration;
|
| 8 |
+
use serde::Deserialize;
|
| 9 |
+
use serde_json::{json, Value};
|
| 10 |
+
use rand::Rng;
|
| 11 |
+
use uuid::Uuid;
|
| 12 |
+
|
| 13 |
+
// Import engine components
|
| 14 |
+
use engine_rust::core::models::{GameState, CardDatabase, Phase, PlayerState};
|
| 15 |
+
use engine_rust::core::mcts::{SearchHorizon, EvalMode};
|
| 16 |
+
|
| 17 |
+
#[derive(RustEmbed)]
|
| 18 |
+
#[folder = "static_content/"]
|
| 19 |
+
struct Assets;
|
| 20 |
+
|
| 21 |
+
#[derive(RustEmbed)]
|
| 22 |
+
#[folder = "../ai/decks/"]
|
| 23 |
+
struct Decks;
|
| 24 |
+
|
| 25 |
+
// --- Game Server State ---
|
| 26 |
+
|
| 27 |
+
struct Room {
|
| 28 |
+
_id: String,
|
| 29 |
+
state: GameState,
|
| 30 |
+
players: HashMap<String, usize>, // Token -> Player ID (0 or 1)
|
| 31 |
+
mode: String, // "pve" or "pvp"
|
| 32 |
+
last_update: std::time::SystemTime,
|
| 33 |
+
created_at: std::time::SystemTime,
|
| 34 |
+
is_public: bool,
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
struct AppState {
|
| 38 |
+
rooms: Mutex<HashMap<String, Room>>,
|
| 39 |
+
card_db: CardDatabase,
|
| 40 |
+
energy_db: serde_json::Value,
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
// API Request Structures
|
| 44 |
+
#[derive(Deserialize)]
|
| 45 |
+
struct CreateRoomReq {
|
| 46 |
+
mode: Option<String>,
|
| 47 |
+
public: Option<bool>,
|
| 48 |
+
decks: Option<HashMap<String, DeckConfig>>, // Keys can be "0" or "1"
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
+
#[derive(Deserialize, Clone)]
|
| 52 |
+
struct DeckConfig {
|
| 53 |
+
main: Vec<String>,
|
| 54 |
+
energy: Vec<String>,
|
| 55 |
+
#[serde(default)]
|
| 56 |
+
#[serde(rename = "type")]
|
| 57 |
+
_deck_type: String,
|
| 58 |
+
}
|
| 59 |
+
|
| 60 |
+
#[derive(Deserialize)]
|
| 61 |
+
struct JoinRoomReq {
|
| 62 |
+
room_id: String,
|
| 63 |
+
}
|
| 64 |
+
|
| 65 |
+
#[derive(Deserialize)]
|
| 66 |
+
struct ActionReq {
|
| 67 |
+
action_id: i32,
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
#[derive(Deserialize)]
|
| 71 |
+
struct UploadDeckReq {
|
| 72 |
+
player: usize,
|
| 73 |
+
content: String, // Raw deck file content
|
| 74 |
+
}
|
| 75 |
+
|
| 76 |
+
#[derive(Deserialize)]
|
| 77 |
+
struct AiSuggestReq {
|
| 78 |
+
sims: usize,
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
#[derive(Deserialize)]
|
| 82 |
+
#[allow(dead_code)]
|
| 83 |
+
struct SetDeckReq {
|
| 84 |
+
player: usize,
|
| 85 |
+
deck: Vec<String>,
|
| 86 |
+
}
|
| 87 |
+
|
| 88 |
+
struct ParsedDecks {
|
| 89 |
+
members: Vec<u16>,
|
| 90 |
+
lives: Vec<u16>,
|
| 91 |
+
energy: Vec<u16>,
|
| 92 |
+
}
|
| 93 |
+
|
| 94 |
+
|
| 95 |
+
fn main() {
|
| 96 |
+
// 1. Initialize Card Database from Embedded Asset
|
| 97 |
+
println!("Loading card database...");
|
| 98 |
+
let db_file = Assets::get("data/cards_compiled.json").expect("Missing cards_compiled.json!");
|
| 99 |
+
let db_json = std::str::from_utf8(db_file.data.as_ref()).expect("Failed to read DB json");
|
| 100 |
+
let card_db = CardDatabase::from_json(db_json).expect("Failed to parse CardDatabase");
|
| 101 |
+
|
| 102 |
+
// Also load raw JSON for energy_db metadata
|
| 103 |
+
let raw_db: serde_json::Value = serde_json::from_str(db_json).unwrap_or(json!({}));
|
| 104 |
+
let energy_db = raw_db.get("energy_db").cloned().unwrap_or(json!({}));
|
| 105 |
+
|
| 106 |
+
// 2. Initialize App State
|
| 107 |
+
let app_state = Arc::new(AppState {
|
| 108 |
+
rooms: Mutex::new(HashMap::new()),
|
| 109 |
+
card_db,
|
| 110 |
+
energy_db,
|
| 111 |
+
});
|
| 112 |
+
|
| 113 |
+
// 3. Start Server
|
| 114 |
+
let env_port = std::env::var("PORT").ok().and_then(|p| p.parse().ok());
|
| 115 |
+
let ports = if let Some(p) = env_port { vec![p] } else { vec![8000, 8080, 8888, 3000, 5000] };
|
| 116 |
+
|
| 117 |
+
let mut server = None;
|
| 118 |
+
let mut port = 0;
|
| 119 |
+
|
| 120 |
+
for p in ports {
|
| 121 |
+
match Server::http(format!("0.0.0.0:{}", p)) {
|
| 122 |
+
Ok(s) => {
|
| 123 |
+
server = Some(s);
|
| 124 |
+
port = p;
|
| 125 |
+
break;
|
| 126 |
+
}
|
| 127 |
+
// If explicit port failed, don't fall back, just panic
|
| 128 |
+
Err(e) if env_port.is_some() => panic!("Failed to bind to requested PORT {}: {}", p, e),
|
| 129 |
+
Err(_) => continue,
|
| 130 |
+
}
|
| 131 |
+
}
|
| 132 |
+
|
| 133 |
+
let server = server.expect("Failed to start server. Is the port blocked?");
|
| 134 |
+
|
| 135 |
+
// Print Network Info
|
| 136 |
+
println!("--------------------------------------------------");
|
| 137 |
+
println!("Loveca Launcher (Multiplayer Host) is Running!");
|
| 138 |
+
println!("Local: http://127.0.0.1:{}", port);
|
| 139 |
+
|
| 140 |
+
// Attempt to find local IP (naively)
|
| 141 |
+
if let Ok(my_ip) = get_local_ip() {
|
| 142 |
+
println!("Network: http://{}:{}", my_ip, port);
|
| 143 |
+
} else {
|
| 144 |
+
println!("Network: http://[YOUR-IP]:{}", port);
|
| 145 |
+
}
|
| 146 |
+
println!("--------------------------------------------------");
|
| 147 |
+
|
| 148 |
+
// Auto-open browser
|
| 149 |
+
let url = format!("http://127.0.0.1:{}/index.html", port);
|
| 150 |
+
thread::spawn(move || {
|
| 151 |
+
thread::sleep(Duration::from_millis(1000));
|
| 152 |
+
let _ = webbrowser::open(&url);
|
| 153 |
+
});
|
| 154 |
+
|
| 155 |
+
let shared_state = app_state.clone();
|
| 156 |
+
|
| 157 |
+
for request in server.incoming_requests() {
|
| 158 |
+
let state_ref = shared_state.clone();
|
| 159 |
+
handle_request(request, state_ref);
|
| 160 |
+
}
|
| 161 |
+
}
|
| 162 |
+
|
| 163 |
+
// --- Request Handler ---
|
| 164 |
+
|
| 165 |
+
fn handle_request(mut request: Request, state: Arc<AppState>) {
|
| 166 |
+
let url = request.url().to_string();
|
| 167 |
+
let (path_raw, query) = match url.split_once('?') {
|
| 168 |
+
Some((p, q)) => (p, Some(q)),
|
| 169 |
+
None => (url.as_str(), None),
|
| 170 |
+
};
|
| 171 |
+
|
| 172 |
+
// Normalize path (strip trailing slash for API match simplicity)
|
| 173 |
+
let path = if path_raw.len() > 1 && path_raw.ends_with('/') {
|
| 174 |
+
&path_raw[..path_raw.len() - 1]
|
| 175 |
+
} else {
|
| 176 |
+
path_raw
|
| 177 |
+
};
|
| 178 |
+
|
| 179 |
+
// CORS Handling (Allow All for LAN simplicity)
|
| 180 |
+
if request.method() == &Method::Options {
|
| 181 |
+
let response = Response::empty(200)
|
| 182 |
+
.with_header(Header::from_bytes(&b"Access-Control-Allow-Origin"[..], &b"*"[..]).unwrap())
|
| 183 |
+
.with_header(Header::from_bytes(&b"Access-Control-Allow-Methods"[..], &b"GET, POST, OPTIONS"[..]).unwrap())
|
| 184 |
+
.with_header(Header::from_bytes(&b"Access-Control-Allow-Headers"[..], &b"Content-Type, X-Room-Id, X-Session-Token, X-Player-Idx"[..]).unwrap());
|
| 185 |
+
let _ = request.respond(response);
|
| 186 |
+
return;
|
| 187 |
+
}
|
| 188 |
+
|
| 189 |
+
// Default Headers
|
| 190 |
+
let json_header = Header::from_bytes(&b"Content-Type"[..], &b"application/json"[..]).unwrap();
|
| 191 |
+
let cors_header = Header::from_bytes(&b"Access-Control-Allow-Origin"[..], &b"*"[..]).unwrap();
|
| 192 |
+
|
| 193 |
+
// ---------------- API ROUTES ----------------
|
| 194 |
+
|
| 195 |
+
if path.starts_with("/api/") {
|
| 196 |
+
let response_json: String;
|
| 197 |
+
let mut status = 200;
|
| 198 |
+
|
| 199 |
+
match path {
|
| 200 |
+
"/api/status" => {
|
| 201 |
+
response_json = json!({ "status": "rust_server", "version": "1.0.1" }).to_string();
|
| 202 |
+
},
|
| 203 |
+
"/api/rooms/create" => {
|
| 204 |
+
if let Ok(body) = parse_body::<CreateRoomReq>(&mut request) {
|
| 205 |
+
let mut rooms = state.rooms.lock().unwrap();
|
| 206 |
+
let room_id = generate_room_code();
|
| 207 |
+
let token = Uuid::new_v4().to_string();
|
| 208 |
+
|
| 209 |
+
let mut players = HashMap::new();
|
| 210 |
+
players.insert(token.clone(), 0); // Creator is P0
|
| 211 |
+
|
| 212 |
+
let mut game_state = GameState::default();
|
| 213 |
+
|
| 214 |
+
// Initialize decks if provided
|
| 215 |
+
if let Some(decks_config) = body.decks {
|
| 216 |
+
let p0_conf = decks_config.get("0");
|
| 217 |
+
let p1_conf = decks_config.get("1");
|
| 218 |
+
|
| 219 |
+
let p0 = p0_conf.map(|c| resolve_deck(&c.main, &c.energy, &state.card_db, &state.energy_db)).unwrap_or_else(|| ParsedDecks { members: vec![1; 20], lives: vec![2; 3], energy: vec![40000; 12] });
|
| 220 |
+
let p1 = p1_conf.map(|c| resolve_deck(&c.main, &c.energy, &state.card_db, &state.energy_db)).unwrap_or_else(|| ParsedDecks { members: vec![1; 20], lives: vec![2; 3], energy: vec![40000; 12] });
|
| 221 |
+
|
| 222 |
+
game_state.initialize_game(
|
| 223 |
+
p0.members, p1.members,
|
| 224 |
+
p0.energy, p1.energy,
|
| 225 |
+
p0.lives, p1.lives
|
| 226 |
+
);
|
| 227 |
+
}
|
| 228 |
+
|
| 229 |
+
let new_room = Room {
|
| 230 |
+
_id: room_id.clone(),
|
| 231 |
+
state: game_state,
|
| 232 |
+
players,
|
| 233 |
+
mode: body.mode.unwrap_or("pve".to_string()),
|
| 234 |
+
last_update: std::time::SystemTime::now(),
|
| 235 |
+
created_at: std::time::SystemTime::now(),
|
| 236 |
+
is_public: body.public.unwrap_or(false),
|
| 237 |
+
};
|
| 238 |
+
|
| 239 |
+
rooms.insert(room_id.clone(), new_room);
|
| 240 |
+
|
| 241 |
+
response_json = json!({
|
| 242 |
+
"success": true,
|
| 243 |
+
"room_id": room_id,
|
| 244 |
+
"session": { "token": token, "player_id": 0 }
|
| 245 |
+
}).to_string();
|
| 246 |
+
} else { status = 400; response_json = json!({"error": "Bad Request or Invalid Payload"}).to_string(); }
|
| 247 |
+
},
|
| 248 |
+
"/api/rooms/list" => {
|
| 249 |
+
let rooms_lock = state.rooms.lock().unwrap();
|
| 250 |
+
let mut public_rooms = Vec::new();
|
| 251 |
+
for (rid, room) in rooms_lock.iter() {
|
| 252 |
+
if room.is_public {
|
| 253 |
+
let occupied = room.players.values().fold(0, |acc, &p| if p < 2 { acc + 1 } else { acc });
|
| 254 |
+
public_rooms.push(json!({
|
| 255 |
+
"room_id": rid,
|
| 256 |
+
"mode": room.mode,
|
| 257 |
+
"players": occupied,
|
| 258 |
+
"turn": room.state.turn,
|
| 259 |
+
"phase": format!("{:?}", room.state.phase),
|
| 260 |
+
"created_at": format!("{:?}", room.created_at) // Simple placeholder
|
| 261 |
+
}));
|
| 262 |
+
}
|
| 263 |
+
}
|
| 264 |
+
response_json = json!({ "success": true, "rooms": public_rooms }).to_string();
|
| 265 |
+
},
|
| 266 |
+
"/api/rooms/join" => {
|
| 267 |
+
if let Ok(body) = parse_body::<JoinRoomReq>(&mut request) {
|
| 268 |
+
let mut rooms = state.rooms.lock().unwrap();
|
| 269 |
+
let rid = body.room_id.to_uppercase();
|
| 270 |
+
if let Some(room) = rooms.get_mut(&rid) {
|
| 271 |
+
// Assignment logic: if P1 is free, take it.
|
| 272 |
+
let taken_pids: Vec<usize> = room.players.values().cloned().collect();
|
| 273 |
+
|
| 274 |
+
if !taken_pids.contains(&1) {
|
| 275 |
+
let token = Uuid::new_v4().to_string();
|
| 276 |
+
room.players.insert(token.clone(), 1);
|
| 277 |
+
response_json = json!({
|
| 278 |
+
"success": true,
|
| 279 |
+
"room_id": rid,
|
| 280 |
+
"session": { "token": token, "player_id": 1 }
|
| 281 |
+
}).to_string();
|
| 282 |
+
} else {
|
| 283 |
+
status = 400;
|
| 284 |
+
response_json = json!({"success": false, "error": "Room is full (P1 taken)"}).to_string();
|
| 285 |
+
}
|
| 286 |
+
} else {
|
| 287 |
+
status = 404;
|
| 288 |
+
response_json = json!({"success": false, "error": "Room not found"}).to_string();
|
| 289 |
+
}
|
| 290 |
+
} else { status = 400; response_json = json!({"error": "Bad Request"}).to_string(); }
|
| 291 |
+
},
|
| 292 |
+
"/api/state" => {
|
| 293 |
+
let room_id = get_header(&request, "X-Room-Id");
|
| 294 |
+
let viewer_idx_str = get_header(&request, "X-Player-Idx").unwrap_or("0".to_string());
|
| 295 |
+
let viewer_idx: usize = viewer_idx_str.parse().unwrap_or(0);
|
| 296 |
+
|
| 297 |
+
if let Some(rid_raw) = room_id {
|
| 298 |
+
let rid = rid_raw.to_uppercase();
|
| 299 |
+
let mut rooms = state.rooms.lock().unwrap();
|
| 300 |
+
if let Some(room) = rooms.get_mut(&rid) {
|
| 301 |
+
room.last_update = std::time::SystemTime::now();
|
| 302 |
+
// Check AI
|
| 303 |
+
if room.mode == "pve" && room.state.current_player == 1 && room.state.phase != Phase::Terminal {
|
| 304 |
+
let mut steps = 0;
|
| 305 |
+
while room.state.current_player == 1 && room.state.phase != Phase::Terminal && steps < 10 {
|
| 306 |
+
let suggestions = room.state.get_mcts_suggestions(&state.card_db, 100, SearchHorizon::GameEnd, EvalMode::Normal);
|
| 307 |
+
if let Some((action, _, _)) = suggestions.first() {
|
| 308 |
+
let _ = room.state.step(&state.card_db, *action);
|
| 309 |
+
} else {
|
| 310 |
+
let _ = room.state.step(&state.card_db, 0);
|
| 311 |
+
}
|
| 312 |
+
steps += 1;
|
| 313 |
+
}
|
| 314 |
+
}
|
| 315 |
+
|
| 316 |
+
let rich_state = serialize_state_rich(&room.state, &state.card_db, &state.energy_db, &room.mode, viewer_idx);
|
| 317 |
+
response_json = json!({ "success": true, "state": rich_state }).to_string();
|
| 318 |
+
|
| 319 |
+
} else { status = 404; response_json = json!({"error": "Room not found"}).to_string(); }
|
| 320 |
+
} else { status = 412; response_json = json!({"error": "Missing X-Room-Id"}).to_string(); }
|
| 321 |
+
},
|
| 322 |
+
"/api/action" | "/api/do_action" => {
|
| 323 |
+
let room_id = get_header(&request, "X-Room-Id");
|
| 324 |
+
let token = get_header(&request, "X-Session-Token");
|
| 325 |
+
let viewer_idx_str = get_header(&request, "X-Player-Idx");
|
| 326 |
+
|
| 327 |
+
if let (Some(rid_raw), Ok(body)) = (room_id, parse_body::<ActionReq>(&mut request)) {
|
| 328 |
+
let rid = rid_raw.to_uppercase();
|
| 329 |
+
let mut rooms = state.rooms.lock().unwrap();
|
| 330 |
+
if let Some(room) = rooms.get_mut(&rid) {
|
| 331 |
+
let viewer_idx = if let Some(idx_s) = viewer_idx_str {
|
| 332 |
+
idx_s.parse().unwrap_or(0)
|
| 333 |
+
} else if let Some(t) = token {
|
| 334 |
+
*room.players.get(&t).unwrap_or(&0)
|
| 335 |
+
} else { 0 };
|
| 336 |
+
|
| 337 |
+
room.last_update = std::time::SystemTime::now();
|
| 338 |
+
match room.state.step(&state.card_db, body.action_id) {
|
| 339 |
+
Ok(_) => {
|
| 340 |
+
let rich_state = serialize_state_rich(&room.state, &state.card_db, &state.energy_db, &room.mode, viewer_idx);
|
| 341 |
+
response_json = json!({"success": true, "state": rich_state}).to_string();
|
| 342 |
+
},
|
| 343 |
+
Err(e) => { response_json = json!({"success": false, "error": e}).to_string(); }
|
| 344 |
+
}
|
| 345 |
+
} else { status = 404; response_json = json!({"error": "Room not found"}).to_string(); }
|
| 346 |
+
} else { status = 400; response_json = json!({"error": "Bad Request or Missing Room ID"}).to_string(); }
|
| 347 |
+
},
|
| 348 |
+
"/api/rooms/reset" => {
|
| 349 |
+
let room_id = get_header(&request, "X-Room-Id");
|
| 350 |
+
if let Some(rid_raw) = room_id {
|
| 351 |
+
let rid = rid_raw.to_uppercase();
|
| 352 |
+
let mut rooms = state.rooms.lock().unwrap();
|
| 353 |
+
if let Some(room) = rooms.get_mut(&rid) {
|
| 354 |
+
room.state = GameState::default();
|
| 355 |
+
response_json = json!({"success": true, "message": "Game state reset"}).to_string();
|
| 356 |
+
} else { status = 404; response_json = json!({"error": "Room not found"}).to_string(); }
|
| 357 |
+
} else { status = 400; response_json = json!({"error": "Missing X-Room-Id"}).to_string(); }
|
| 358 |
+
},
|
| 359 |
+
"/api/get_test_deck" => {
|
| 360 |
+
handle_get_test_deck(request, query, &state.card_db);
|
| 361 |
+
return;
|
| 362 |
+
},
|
| 363 |
+
"/api/upload_deck" => {
|
| 364 |
+
let room_id = get_header(&request, "X-Room-Id");
|
| 365 |
+
if let (Some(rid_raw), Ok(body)) = (room_id, parse_body::<UploadDeckReq>(&mut request)) {
|
| 366 |
+
let rid = rid_raw.to_uppercase();
|
| 367 |
+
let mut rooms = state.rooms.lock().unwrap();
|
| 368 |
+
if let Some(room) = rooms.get_mut(&rid) {
|
| 369 |
+
let parsed = parse_deck_content(&body.content, &state.card_db, &state.energy_db);
|
| 370 |
+
|
| 371 |
+
let p_idx = body.player;
|
| 372 |
+
// In simple upload, we might just be setting ONE player's deck and defaulting the other
|
| 373 |
+
let default_p = ParsedDecks { members: vec![1; 20], lives: vec![2; 3], energy: vec![40000; 12] };
|
| 374 |
+
|
| 375 |
+
let p0 = if p_idx == 0 { &parsed } else { &default_p };
|
| 376 |
+
let p1 = if p_idx == 1 { &parsed } else { &default_p };
|
| 377 |
+
|
| 378 |
+
room.state.initialize_game(
|
| 379 |
+
p0.members.clone(), p1.members.clone(),
|
| 380 |
+
p0.energy.clone(), p1.energy.clone(),
|
| 381 |
+
p0.lives.clone(), p1.lives.clone(),
|
| 382 |
+
);
|
| 383 |
+
response_json = json!({"success": true, "message": "Deck uploaded & Game Reset"}).to_string();
|
| 384 |
+
} else { status = 404; response_json = json!({"error": "Room not found"}).to_string(); }
|
| 385 |
+
} else { status = 400; response_json = json!({"error": "Bad Request"}).to_string(); }
|
| 386 |
+
},
|
| 387 |
+
"/api/set_deck" => {
|
| 388 |
+
let room_id = get_header(&request, "X-Room-Id");
|
| 389 |
+
if let (Some(rid_raw), Ok(_body)) = (room_id, parse_body::<SetDeckReq>(&mut request)) {
|
| 390 |
+
let rid = rid_raw.to_uppercase();
|
| 391 |
+
let mut rooms = state.rooms.lock().unwrap();
|
| 392 |
+
if let Some(_room) = rooms.get_mut(&rid) {
|
| 393 |
+
response_json = json!({"success": true}).to_string();
|
| 394 |
+
} else { status = 404; response_json = json!({"error": "Room not found"}).to_string(); }
|
| 395 |
+
} else { status = 400; response_json = json!({"error": "Bad Request"}).to_string(); }
|
| 396 |
+
},
|
| 397 |
+
"/api/ai_suggest" => {
|
| 398 |
+
let room_id = get_header(&request, "X-Room-Id");
|
| 399 |
+
if let (Some(rid_raw), Ok(body)) = (room_id, parse_body::<AiSuggestReq>(&mut request)) {
|
| 400 |
+
let rid = rid_raw.to_uppercase();
|
| 401 |
+
let mut rooms = state.rooms.lock().unwrap();
|
| 402 |
+
if let Some(room) = rooms.get_mut(&rid) {
|
| 403 |
+
let suggestions = room.state.get_mcts_suggestions(&state.card_db, body.sims, SearchHorizon::GameEnd, EvalMode::Normal);
|
| 404 |
+
let json_suggs: Vec<serde_json::Value> = suggestions.iter().map(|(a, v, n)| {
|
| 405 |
+
json!({ "desc": format!("ID {}", a), "value": v, "visits": n, "action_id": a })
|
| 406 |
+
}).collect();
|
| 407 |
+
response_json = json!({ "success": true, "suggestions": json_suggs }).to_string();
|
| 408 |
+
} else { status = 404; response_json = json!({"error": "Room not found"}).to_string(); }
|
| 409 |
+
} else { status = 400; response_json = json!({"error": "Bad Request"}).to_string(); }
|
| 410 |
+
},
|
| 411 |
+
_ => { status = 404; response_json = json!({"error": "API Route Not Found in Launcher"}).to_string(); }
|
| 412 |
+
}
|
| 413 |
+
|
| 414 |
+
let response = Response::from_string(response_json)
|
| 415 |
+
.with_status_code(status)
|
| 416 |
+
.with_header(json_header)
|
| 417 |
+
.with_header(cors_header);
|
| 418 |
+
let _ = request.respond(response);
|
| 419 |
+
} else {
|
| 420 |
+
// Static File Handling
|
| 421 |
+
handle_static_file(request);
|
| 422 |
+
}
|
| 423 |
+
}
|
| 424 |
+
|
| 425 |
+
// --- Helper Functions ---
|
| 426 |
+
|
| 427 |
+
fn resolve_deck(main_codes: &[String], energy_codes: &[String], db: &CardDatabase, edb: &Value) -> ParsedDecks {
|
| 428 |
+
let mut members = Vec::new();
|
| 429 |
+
let mut lives = Vec::new();
|
| 430 |
+
let mut energy = Vec::new();
|
| 431 |
+
|
| 432 |
+
let mut code_map = HashMap::new();
|
| 433 |
+
for (id, card) in &db.members { code_map.insert(card.card_no.clone(), (*id, "member")); }
|
| 434 |
+
for (id, card) in &db.lives { code_map.insert(card.card_no.clone(), (*id, "live")); }
|
| 435 |
+
if let Some(obj) = edb.as_object() {
|
| 436 |
+
for (id_s, card) in obj {
|
| 437 |
+
if let Some(no) = card["card_no"].as_str() {
|
| 438 |
+
let id = id_s.parse::<u16>().unwrap_or(0);
|
| 439 |
+
code_map.insert(no.to_string(), (id, "energy"));
|
| 440 |
+
}
|
| 441 |
+
}
|
| 442 |
+
}
|
| 443 |
+
|
| 444 |
+
for code in main_codes {
|
| 445 |
+
if let Some(&(id, kind)) = code_map.get(code) {
|
| 446 |
+
match kind {
|
| 447 |
+
"member" => members.push(id),
|
| 448 |
+
"live" => lives.push(id),
|
| 449 |
+
_ => {}
|
| 450 |
+
}
|
| 451 |
+
} else if let Ok(id) = code.parse::<u16>() {
|
| 452 |
+
// Fallback: If it's a raw ID, determine type by range
|
| 453 |
+
// Ranges: 1-10000 (Members), 20000-29999 (Lives), 40000+ (Energy) - approximate
|
| 454 |
+
if db.members.contains_key(&id) { members.push(id); }
|
| 455 |
+
else if db.lives.contains_key(&id) { lives.push(id); }
|
| 456 |
+
}
|
| 457 |
+
}
|
| 458 |
+
for code in energy_codes {
|
| 459 |
+
if let Some(&(id, _)) = code_map.get(code) {
|
| 460 |
+
energy.push(id);
|
| 461 |
+
} else if let Ok(id) = code.parse::<u16>() {
|
| 462 |
+
// Validate it exists in energy db (keys are strings in JSON but IDs are numbers)
|
| 463 |
+
// We can just assume valid if > 30000 for now or check map values
|
| 464 |
+
energy.push(id);
|
| 465 |
+
}
|
| 466 |
+
}
|
| 467 |
+
|
| 468 |
+
// Critical: SIC needs 3 lives and some energy to function properly
|
| 469 |
+
if lives.len() < 3 {
|
| 470 |
+
// Pad with default lives (ID 2 usually exists, or find first available)
|
| 471 |
+
let def_live = *db.lives.keys().next().unwrap_or(&2);
|
| 472 |
+
lives.extend(std::iter::repeat(def_live).take(3 - lives.len()));
|
| 473 |
+
}
|
| 474 |
+
|
| 475 |
+
// Explicit Energy Default: 10 Energy cards
|
| 476 |
+
if energy.len() < 10 {
|
| 477 |
+
// Find a valid energy ID (usually 40000 corresponds to plain energy)
|
| 478 |
+
// Or scan edb for the first valid one
|
| 479 |
+
let mut def_energy = 40000;
|
| 480 |
+
if let Some(obj) = edb.as_object() {
|
| 481 |
+
if let Some(k) = obj.keys().next() { def_energy = k.parse().unwrap_or(40000); }
|
| 482 |
+
}
|
| 483 |
+
energy.extend(std::iter::repeat(def_energy).take(12 - energy.len()));
|
| 484 |
+
}
|
| 485 |
+
|
| 486 |
+
if members.is_empty() {
|
| 487 |
+
let def_mem = *db.members.keys().next().unwrap_or(&1);
|
| 488 |
+
members.extend(std::iter::repeat(def_mem).take(20));
|
| 489 |
+
}
|
| 490 |
+
|
| 491 |
+
ParsedDecks { members, lives, energy }
|
| 492 |
+
}
|
| 493 |
+
|
| 494 |
+
fn get_local_ip() -> Result<String, ()> {
|
| 495 |
+
use std::net::UdpSocket;
|
| 496 |
+
let socket = UdpSocket::bind("0.0.0.0:0").map_err(|_| ())?;
|
| 497 |
+
socket.connect("8.8.8.8:80").map_err(|_| ())?;
|
| 498 |
+
Ok(socket.local_addr().map_err(|_| ())?.ip().to_string())
|
| 499 |
+
}
|
| 500 |
+
|
| 501 |
+
fn handle_static_file(request: Request) {
|
| 502 |
+
let url = request.url().to_string();
|
| 503 |
+
let (path_str, _) = match url.split_once('?') {
|
| 504 |
+
Some((p, _)) => (p, ()),
|
| 505 |
+
None => (url.as_str(), ()),
|
| 506 |
+
};
|
| 507 |
+
|
| 508 |
+
let clean_path = if path_str == "/" || path_str == "" {
|
| 509 |
+
"index.html"
|
| 510 |
+
} else {
|
| 511 |
+
path_str.trim_start_matches('/')
|
| 512 |
+
};
|
| 513 |
+
|
| 514 |
+
let mut file = Assets::get(clean_path);
|
| 515 |
+
|
| 516 |
+
// WebP Fallback Optimization: If requesting .png or .jpg but only .webp exists
|
| 517 |
+
if file.is_none() && (clean_path.ends_with(".png") || clean_path.ends_with(".jpg")) {
|
| 518 |
+
let webp_path = format!("{}.webp", &clean_path[..clean_path.len() - 4]);
|
| 519 |
+
file = Assets::get(&webp_path);
|
| 520 |
+
}
|
| 521 |
+
|
| 522 |
+
if let Some(file_data) = file {
|
| 523 |
+
let mut mime = from_path(clean_path).first_or_octet_stream();
|
| 524 |
+
|
| 525 |
+
// Correct MIME if we fell back to webp
|
| 526 |
+
// Since we only reached here if file was Some, and we know we tried .webp if original failed
|
| 527 |
+
if (clean_path.ends_with(".png") || clean_path.ends_with(".jpg")) && file_data.metadata.last_modified().is_some() {
|
| 528 |
+
// We can't easily check the extension of the found file from Metadata in rust-embed 6
|
| 529 |
+
// but if the original failed and we have a file, it's the webp one.
|
| 530 |
+
// Actually, let's just use a more robust check in the fallback block.
|
| 531 |
+
}
|
| 532 |
+
|
| 533 |
+
// Let's refine the MIME logic slightly to be 100% sure
|
| 534 |
+
if clean_path.ends_with(".png") || clean_path.ends_with(".jpg") {
|
| 535 |
+
// Check if the original exists or if we used the webp fallback
|
| 536 |
+
if Assets::get(clean_path).is_none() {
|
| 537 |
+
mime = "image/webp".parse().unwrap();
|
| 538 |
+
}
|
| 539 |
+
}
|
| 540 |
+
|
| 541 |
+
if clean_path.ends_with(".wasm") {
|
| 542 |
+
mime = "application/wasm".parse().unwrap();
|
| 543 |
+
}
|
| 544 |
+
|
| 545 |
+
let mut response = Response::from_data(file_data.data.into_owned());
|
| 546 |
+
let header = Header::from_bytes(&b"Content-Type"[..], mime.as_ref().as_bytes()).unwrap();
|
| 547 |
+
response.add_header(header);
|
| 548 |
+
|
| 549 |
+
response.add_header(Header::from_bytes(&b"Access-Control-Allow-Origin"[..], &b"*"[..]).unwrap());
|
| 550 |
+
|
| 551 |
+
if mime.type_() == mime::IMAGE {
|
| 552 |
+
let cache = Header::from_bytes(&b"Cache-Control"[..], &b"public, max-age=31536000"[..]).unwrap();
|
| 553 |
+
response.add_header(cache);
|
| 554 |
+
}
|
| 555 |
+
|
| 556 |
+
let _ = request.respond(response);
|
| 557 |
+
} else {
|
| 558 |
+
let _ = request.respond(Response::from_string("404 Not Found").with_status_code(StatusCode(404)));
|
| 559 |
+
}
|
| 560 |
+
}
|
| 561 |
+
|
| 562 |
+
fn parse_body<T: serde::de::DeserializeOwned>(request: &mut Request) -> Result<T, ()> {
|
| 563 |
+
let mut content = String::new();
|
| 564 |
+
request.as_reader().read_to_string(&mut content).map_err(|_| ())?;
|
| 565 |
+
serde_json::from_str(&content).map_err(|_| ())
|
| 566 |
+
}
|
| 567 |
+
|
| 568 |
+
fn get_header(request: &Request, name: &str) -> Option<String> {
|
| 569 |
+
request.headers().iter()
|
| 570 |
+
.find(|h| h.field.to_string().eq_ignore_ascii_case(name))
|
| 571 |
+
.map(|h| h.value.as_str().to_string())
|
| 572 |
+
}
|
| 573 |
+
|
| 574 |
+
fn generate_room_code() -> String {
|
| 575 |
+
let mut rng = rand::thread_rng();
|
| 576 |
+
let chars: Vec<char> = "ABCDEFGHJKLMNPQRSTUVWXYZ23456789".chars().collect();
|
| 577 |
+
(0..4).map(|_| chars[rng.gen_range(0..chars.len())]).collect()
|
| 578 |
+
}
|
| 579 |
+
|
| 580 |
+
fn parse_deck_content(content: &str, db: &CardDatabase, edb: &Value) -> ParsedDecks {
|
| 581 |
+
let mut codes = Vec::new();
|
| 582 |
+
for line in content.lines() {
|
| 583 |
+
let trimmed = line.trim();
|
| 584 |
+
if trimmed.is_empty() || trimmed.starts_with('#') { continue; }
|
| 585 |
+
|
| 586 |
+
if let Some((code, count_s)) = trimmed.split_once('x') {
|
| 587 |
+
let n: usize = count_s.trim().parse().unwrap_or(1);
|
| 588 |
+
for _ in 0..n { codes.push(code.trim().to_string()); }
|
| 589 |
+
} else {
|
| 590 |
+
codes.push(trimmed.to_string());
|
| 591 |
+
}
|
| 592 |
+
}
|
| 593 |
+
resolve_deck(&codes, &[], db, edb)
|
| 594 |
+
}
|
| 595 |
+
|
| 596 |
+
// --- RICH SERIALIZATION ---
|
| 597 |
+
|
| 598 |
+
fn serialize_card(cid: i16, db: &CardDatabase, edb: &serde_json::Value, viewable: bool) -> Value {
|
| 599 |
+
if cid < 0 { return Value::Null; }
|
| 600 |
+
let id_u = (cid as u32) & 0xFFFFF;
|
| 601 |
+
let id_u16 = id_u as u16;
|
| 602 |
+
|
| 603 |
+
if !viewable {
|
| 604 |
+
return json!({ "id": cid, "img": "cards/back.png", "name": "???", "hidden": true });
|
| 605 |
+
}
|
| 606 |
+
|
| 607 |
+
if let Some(m) = db.members.get(&id_u16) {
|
| 608 |
+
return json!({
|
| 609 |
+
"id": cid, "card_no": m.card_no, "name": m.name, "type": "member",
|
| 610 |
+
"cost": m.cost, "blade": m.blades, "img": m.img_path,
|
| 611 |
+
"hearts": m.hearts, "blade_hearts": m.blade_hearts,
|
| 612 |
+
"text": m.ability_text, "original_text": ""
|
| 613 |
+
});
|
| 614 |
+
} else if let Some(l) = db.lives.get(&id_u16) {
|
| 615 |
+
return json!({
|
| 616 |
+
"id": cid, "card_no": l.card_no, "name": l.name, "type": "live",
|
| 617 |
+
"score": l.score, "img": l.img_path, "required_hearts": l.required_hearts,
|
| 618 |
+
"text": l.ability_text, "original_text": ""
|
| 619 |
+
});
|
| 620 |
+
} else if let Some(e) = edb.get(&id_u16.to_string()) {
|
| 621 |
+
return json!({
|
| 622 |
+
"id": cid, "card_no": e["card_no"], "name": e["name"], "type": "energy",
|
| 623 |
+
"img": e["img_path"], "text": e["ability_text"], "original_text": ""
|
| 624 |
+
});
|
| 625 |
+
}
|
| 626 |
+
|
| 627 |
+
json!({ "id": cid, "name": format!("Card {}", id_u), "img": "icon_blade.png" })
|
| 628 |
+
}
|
| 629 |
+
|
| 630 |
+
fn serialize_player_rich(p: &PlayerState, gs: &GameState, db: &CardDatabase, edb: &Value, p_idx: usize, viewer_idx: usize, legal_mask: &[bool]) -> Value {
|
| 631 |
+
let viewable = p_idx == viewer_idx;
|
| 632 |
+
|
| 633 |
+
let hand: Vec<Value> = p.hand.iter().enumerate().map(|(i, &cid)| {
|
| 634 |
+
let mut c = serialize_card(cid as i16, db, edb, viewable);
|
| 635 |
+
if viewable {
|
| 636 |
+
c["is_new"] = json!(p.hand_added_turn.get(i).map(|&t| t as u32 == gs.turn as u32).unwrap_or(false));
|
| 637 |
+
let mut valid_actions = Vec::new();
|
| 638 |
+
// Mapping from Python serializer
|
| 639 |
+
for area in 0..3 {
|
| 640 |
+
let aid = 1 + i * 3 + area;
|
| 641 |
+
if aid < legal_mask.len() && legal_mask[aid] { valid_actions.push(aid); }
|
| 642 |
+
}
|
| 643 |
+
for aid in [300 + i, 400 + i, 500 + i] {
|
| 644 |
+
if aid < legal_mask.len() && legal_mask[aid] { valid_actions.push(aid); }
|
| 645 |
+
}
|
| 646 |
+
c["valid_actions"] = json!(valid_actions);
|
| 647 |
+
}
|
| 648 |
+
c
|
| 649 |
+
}).collect();
|
| 650 |
+
|
| 651 |
+
let discard: Vec<Value> = p.discard.iter().map(|&cid| serialize_card(cid as i16, db, edb, true)).collect();
|
| 652 |
+
let success: Vec<Value> = p.success_lives.iter().map(|&cid| serialize_card(cid as i16, db, edb, true)).collect();
|
| 653 |
+
|
| 654 |
+
let mut energy = Vec::new();
|
| 655 |
+
for (i, &cid) in p.energy_zone.iter().enumerate() {
|
| 656 |
+
energy.push(json!({
|
| 657 |
+
"id": i,
|
| 658 |
+
"tapped": p.tapped_energy[i],
|
| 659 |
+
"card": serialize_card(cid as i16, db, edb, false) // Energy cards are usually hidden
|
| 660 |
+
}));
|
| 661 |
+
}
|
| 662 |
+
|
| 663 |
+
let mut stage = Vec::new();
|
| 664 |
+
for i in 0..3 {
|
| 665 |
+
let cid = p.stage[i];
|
| 666 |
+
if cid >= 0 {
|
| 667 |
+
let mut c = serialize_card(cid, db, edb, true);
|
| 668 |
+
c["tapped"] = json!(p.tapped_members[i]);
|
| 669 |
+
c["energy"] = json!(p.stage_energy_count[i]);
|
| 670 |
+
|
| 671 |
+
// Effective Stats
|
| 672 |
+
let eff_blade = gs.get_effective_blades(p_idx, i, db);
|
| 673 |
+
let eff_hearts = gs.get_effective_hearts(p_idx, i, db);
|
| 674 |
+
c["blade"] = json!(eff_blade);
|
| 675 |
+
c["hearts"] = json!(eff_hearts);
|
| 676 |
+
|
| 677 |
+
// Modifiers for UI
|
| 678 |
+
let mut modifiers = Vec::new();
|
| 679 |
+
if let Some(m) = db.members.get(&((cid as u32 & 0xFFFF) as u16)) {
|
| 680 |
+
if eff_blade > m.blades as u32 {
|
| 681 |
+
modifiers.push(json!({"type": "blade", "value": eff_blade - m.blades as u32, "label": format!("Attack +{}", eff_blade - m.blades as u32)}));
|
| 682 |
+
}
|
| 683 |
+
}
|
| 684 |
+
c["modifiers"] = json!(modifiers);
|
| 685 |
+
|
| 686 |
+
// Valid actions for stage highlighting
|
| 687 |
+
let mut valid_actions = Vec::new();
|
| 688 |
+
for ab_idx in 0..10 {
|
| 689 |
+
let aid = 200 + i * 10 + ab_idx;
|
| 690 |
+
if aid < legal_mask.len() && legal_mask[aid] { valid_actions.push(aid); }
|
| 691 |
+
}
|
| 692 |
+
let sel_stage = 560 + i;
|
| 693 |
+
if sel_stage < legal_mask.len() && legal_mask[sel_stage] { valid_actions.push(sel_stage); }
|
| 694 |
+
c["valid_actions"] = json!(valid_actions);
|
| 695 |
+
|
| 696 |
+
stage.push(c);
|
| 697 |
+
} else {
|
| 698 |
+
stage.push(Value::Null);
|
| 699 |
+
}
|
| 700 |
+
}
|
| 701 |
+
|
| 702 |
+
let total_hearts = gs.get_total_hearts(p_idx, db);
|
| 703 |
+
let mut temp_hearts = total_hearts.clone();
|
| 704 |
+
|
| 705 |
+
let mut lives = Vec::new();
|
| 706 |
+
for i in 0..3 {
|
| 707 |
+
let cid = p.live_zone[i];
|
| 708 |
+
if cid >= 0 {
|
| 709 |
+
let mut c = serialize_card(cid, db, edb, p.live_zone_revealed[i] || viewable);
|
| 710 |
+
|
| 711 |
+
// Fulfillment Logic for Live Guide
|
| 712 |
+
if let Some(l) = db.lives.get(&((cid as u32 & 0xFFFF) as u16)) {
|
| 713 |
+
let mut filled = [0u32; 7];
|
| 714 |
+
let mut cleared = true;
|
| 715 |
+
for color_idx in 0..6 {
|
| 716 |
+
let take = temp_hearts[color_idx].min(l.required_hearts[color_idx] as u32);
|
| 717 |
+
filled[color_idx] = take;
|
| 718 |
+
temp_hearts[color_idx] -= take;
|
| 719 |
+
if filled[color_idx] < l.required_hearts[color_idx] as u32 { cleared = false; }
|
| 720 |
+
}
|
| 721 |
+
// Any
|
| 722 |
+
let any_need = l.required_hearts[6] as u32;
|
| 723 |
+
let rem_total: u32 = temp_hearts.iter().sum();
|
| 724 |
+
filled[6] = rem_total.min(any_need);
|
| 725 |
+
if filled[6] < any_need { cleared = false; }
|
| 726 |
+
|
| 727 |
+
c["filled_hearts"] = json!(filled);
|
| 728 |
+
c["is_cleared"] = json!(cleared);
|
| 729 |
+
}
|
| 730 |
+
|
| 731 |
+
lives.push(c);
|
| 732 |
+
} else {
|
| 733 |
+
lives.push(Value::Null);
|
| 734 |
+
}
|
| 735 |
+
}
|
| 736 |
+
|
| 737 |
+
json!({
|
| 738 |
+
"player_id": p.player_id,
|
| 739 |
+
"score": p.score,
|
| 740 |
+
"is_active": gs.current_player as usize == p_idx,
|
| 741 |
+
"hand": hand,
|
| 742 |
+
"hand_count": hand.len(),
|
| 743 |
+
"deck_count": p.deck.len(),
|
| 744 |
+
"discard": discard,
|
| 745 |
+
"discard_count": discard.len(),
|
| 746 |
+
"energy": energy,
|
| 747 |
+
"energy_count": energy.len(),
|
| 748 |
+
"energy_deck_count": p.energy_deck.len(),
|
| 749 |
+
"energy_untapped": p.tapped_energy.iter().filter(|&&t| !t).count(),
|
| 750 |
+
"stage": stage,
|
| 751 |
+
"live_zone": lives,
|
| 752 |
+
"success_lives": success,
|
| 753 |
+
"total_hearts": total_hearts,
|
| 754 |
+
"total_blades": gs.get_total_blades(p_idx, db),
|
| 755 |
+
"mulligan_selection": (0..hand.len()).filter(|&i| (p.mulligan_selection >> i) & 1 == 1).collect::<Vec<_>>(),
|
| 756 |
+
"looked_cards": p.looked_cards.iter().map(|&cid| serialize_card(cid as i16, db, edb, true)).collect::<Vec<_>>(),
|
| 757 |
+
})
|
| 758 |
+
}
|
| 759 |
+
|
| 760 |
+
fn serialize_state_rich(gs: &GameState, db: &CardDatabase, edb: &Value, mode: &str, viewer_idx: usize) -> Value {
|
| 761 |
+
let mut legal_mask = vec![false; 3000];
|
| 762 |
+
gs.get_legal_actions_into(db, &mut legal_mask);
|
| 763 |
+
|
| 764 |
+
let p0 = serialize_player_rich(&gs.players[0], gs, db, edb, 0, viewer_idx, &legal_mask);
|
| 765 |
+
let p1 = serialize_player_rich(&gs.players[1], gs, db, edb, 1, viewer_idx, &legal_mask);
|
| 766 |
+
|
| 767 |
+
let mut enriched_actions = Vec::new();
|
| 768 |
+
let mut pending_choice = Value::Null;
|
| 769 |
+
|
| 770 |
+
if gs.current_player as usize == viewer_idx {
|
| 771 |
+
// --- Pending Choice Inference ---
|
| 772 |
+
if gs.phase as u8 == 10 { // Phase::Response
|
| 773 |
+
let mut p_type = "SELECT_FROM_LIST";
|
| 774 |
+
let mut p_desc = "選択してください";
|
| 775 |
+
|
| 776 |
+
let has_color = legal_mask.iter().enumerate().any(|(i, &v)| v && (i >= 580 && i <= 585));
|
| 777 |
+
let has_mode = legal_mask.iter().enumerate().any(|(i, &v)| v && (i >= 570 && i <= 579));
|
| 778 |
+
let has_stage = legal_mask.iter().enumerate().any(|(i, &v)| v && (i >= 560 && i <= 562));
|
| 779 |
+
|
| 780 |
+
if has_color { p_type = "COLOR_SELECT"; p_desc = "色を選択してください"; }
|
| 781 |
+
else if has_mode { p_type = "SELECT_MODE"; p_desc = "モードを選択してください"; }
|
| 782 |
+
else if has_stage { p_type = "SELECT_STAGE"; p_desc = "メンバーを選択してください"; }
|
| 783 |
+
|
| 784 |
+
let mut source_member = "Game".to_string();
|
| 785 |
+
let mut source_img = "icon_blade.png".to_string();
|
| 786 |
+
if gs.pending_card_id >= 0 {
|
| 787 |
+
let c = serialize_card(gs.pending_card_id, db, edb, true);
|
| 788 |
+
source_member = c["name"].as_str().unwrap_or("Unknown").to_string();
|
| 789 |
+
source_img = c["img"].as_str().unwrap_or("icon_blade.png").to_string();
|
| 790 |
+
}
|
| 791 |
+
|
| 792 |
+
pending_choice = json!({
|
| 793 |
+
"type": p_type,
|
| 794 |
+
"description": p_desc,
|
| 795 |
+
"source_member": source_member,
|
| 796 |
+
"source_img": source_img,
|
| 797 |
+
"min": 1, "max": 1, "can_skip": legal_mask[0]
|
| 798 |
+
});
|
| 799 |
+
} else if gs.phase == Phase::LiveResult {
|
| 800 |
+
pending_choice = json!({
|
| 801 |
+
"type": "SELECT_SUCCESS_LIVE",
|
| 802 |
+
"description": "獲得するライブカードを1枚選んでください",
|
| 803 |
+
"source_member": "Live Success",
|
| 804 |
+
"source_img": "icon_blade.png",
|
| 805 |
+
"min": 1, "max": 1, "can_skip": false
|
| 806 |
+
});
|
| 807 |
+
}
|
| 808 |
+
|
| 809 |
+
// --- Action Enrichment ---
|
| 810 |
+
let curr_p = &gs.players[gs.current_player as usize];
|
| 811 |
+
for (i, &v) in legal_mask.iter().enumerate() {
|
| 812 |
+
if v {
|
| 813 |
+
let mut meta = json!({ "id": i, "name": format!("Action {}", i), "desc": format!("Action {}", i) });
|
| 814 |
+
|
| 815 |
+
if i == 0 {
|
| 816 |
+
let mut name = "【パス】何もしない";
|
| 817 |
+
let phase_val = gs.phase as i8;
|
| 818 |
+
if phase_val == 4 { name = "【終了】メインフェイズを終了する"; } // Main
|
| 819 |
+
else if phase_val == 5 { name = "【確認】ライブカードをセットして続行"; } // LiveSet
|
| 820 |
+
else if phase_val == 8 { name = "【進む】次へ進む"; } // LiveResult
|
| 821 |
+
else if phase_val == -1 || phase_val == 0 { name = "【確認】マリガンを実行"; } // Mulligan
|
| 822 |
+
else if !pending_choice.is_null() {
|
| 823 |
+
let source = pending_choice["source_member"].as_str().unwrap_or("アビリティ");
|
| 824 |
+
meta = json!({ "id": 0, "type": "PASS", "name": format!("【スキップ】{}の効果を使用しない", source), "desc": "Skip Optional Effect" });
|
| 825 |
+
enriched_actions.push(meta);
|
| 826 |
+
continue;
|
| 827 |
+
}
|
| 828 |
+
meta = json!({ "id": 0, "type": "PASS", "name": name, "desc": "Confirm/Pass" });
|
| 829 |
+
|
| 830 |
+
} else if 580 <= i && i <= 585 {
|
| 831 |
+
let colors = ["赤", "青", "緑", "黄", "紫", "ピンク"];
|
| 832 |
+
meta = json!({ "id": i, "type": "COLOR_SELECT", "index": i - 580, "name": format!("【色選択】 {}", colors[i-580]) });
|
| 833 |
+
|
| 834 |
+
} else if 500 <= i && i <= 509 {
|
| 835 |
+
let idx = i - 500;
|
| 836 |
+
if let Some(&cid) = curr_p.hand.get(idx) {
|
| 837 |
+
let c = serialize_card(cid as i16, db, edb, true);
|
| 838 |
+
let mut desc = "選択";
|
| 839 |
+
if !pending_choice.is_null() {
|
| 840 |
+
let p_type = pending_choice["type"].as_str().unwrap_or("");
|
| 841 |
+
if p_type == "RECOVER_MEMBER" { desc = "回収"; }
|
| 842 |
+
else if p_type == "DISCARD" { desc = "捨てる"; }
|
| 843 |
+
}
|
| 844 |
+
meta = json!({ "id": i, "type": "SELECT_HAND", "hand_idx": idx, "name": format!("【手札選択】 {}を{}", c["name"], desc), "img": c["img"] });
|
| 845 |
+
}
|
| 846 |
+
|
| 847 |
+
} else if i >= 1 && i <= 180 {
|
| 848 |
+
let hand_idx = (i - 1) / 3;
|
| 849 |
+
let area_idx = (i - 1) % 3;
|
| 850 |
+
if let Some(&cid) = curr_p.hand.get(hand_idx) {
|
| 851 |
+
let c = serialize_card(cid as i16, db, edb, true);
|
| 852 |
+
let cost = gs.get_member_cost(gs.current_player as usize, cid as i32, area_idx as i32, db);
|
| 853 |
+
|
| 854 |
+
// Check for OnPlay [登場]
|
| 855 |
+
let mut suffix = "";
|
| 856 |
+
// Note: Checking abilities requires iterating db.members, which is fine here.
|
| 857 |
+
if let Some(_m) = db.members.get(&(cid as u16)) {
|
| 858 |
+
// Simplify: Just check raw text or ability list if accessible.
|
| 859 |
+
// For now, we assume if it has logic it might be OnPlay.
|
| 860 |
+
// Accurate check: iterate m.abilities for TriggerType::OnPlay (1) -> Not exposed easily in JSON db without parsing.
|
| 861 |
+
// Fallback: Check if text contains [On Play] or [登場]
|
| 862 |
+
if c["text"].as_str().unwrap_or("").contains("【登場時】") { suffix = " [登場]"; }
|
| 863 |
+
}
|
| 864 |
+
|
| 865 |
+
let areas = ["左", "センター", "右"];
|
| 866 |
+
meta = json!({
|
| 867 |
+
"id": i, "type": "PLAY", "hand_idx": hand_idx, "area_idx": area_idx,
|
| 868 |
+
"name": format!("【{}に置く】 {}{} (コスト {})", areas[area_idx], c["name"], suffix, cost),
|
| 869 |
+
"img": c["img"], "cost": cost, "text": c["text"]
|
| 870 |
+
});
|
| 871 |
+
}
|
| 872 |
+
} else if i >= 200 && i <= 299 {
|
| 873 |
+
let slot_idx = (i - 200) / 10;
|
| 874 |
+
let ab_idx = (i - 200) % 10;
|
| 875 |
+
let areas = ["左", "センター", "右"];
|
| 876 |
+
let area_name = if slot_idx < 3 { areas[slot_idx] } else { "Unknown" };
|
| 877 |
+
|
| 878 |
+
if let Some(cid) = curr_p.stage.get(slot_idx).cloned() {
|
| 879 |
+
if cid >= 0 {
|
| 880 |
+
let c = serialize_card(cid, db, edb, true);
|
| 881 |
+
meta = json!({
|
| 882 |
+
"id": i, "type": "ABILITY", "location": "stage", "area_idx": slot_idx, "source_card_id": cid, "ability_idx": ab_idx,
|
| 883 |
+
"name": format!("【起動】{}: アビリティ ({})", c["name"], area_name), "img": c["img"], "text": c["text"]
|
| 884 |
+
});
|
| 885 |
+
}
|
| 886 |
+
}
|
| 887 |
+
} else if i >= 2000 && i <= 2999 {
|
| 888 |
+
let adj = i - 2000;
|
| 889 |
+
let d_idx = adj / 10;
|
| 890 |
+
let ab_idx = adj % 10;
|
| 891 |
+
if let Some(&cid) = curr_p.discard.get(d_idx) {
|
| 892 |
+
let c = serialize_card(cid as i16, db, edb, true);
|
| 893 |
+
meta = json!({
|
| 894 |
+
"id": i, "type": "ABILITY", "location": "discard", "discard_idx": d_idx, "ability_idx": ab_idx,
|
| 895 |
+
"name": format!("【控え召喚】 {}: 効果", c["name"]), "img": c["img"], "text": c["text"]
|
| 896 |
+
});
|
| 897 |
+
}
|
| 898 |
+
} else if i >= 300 && i <= 499 {
|
| 899 |
+
// Mulligan 300-359, LiveSet 400-459. Hand Select 500-509 is handled above.
|
| 900 |
+
let (h_idx, a_type) = if i < 360 { (i - 300, "MULLIGAN") } else { (i - 400, "LIVE_SET") };
|
| 901 |
+
if let Some(&cid) = curr_p.hand.get(h_idx) {
|
| 902 |
+
let c = serialize_card(cid as i16, db, edb, true);
|
| 903 |
+
let prefix = if a_type == "MULLIGAN" { "【マリガン】" } else { "【ライブセット】" };
|
| 904 |
+
meta = json!({ "id": i, "type": a_type, "hand_idx": h_idx, "name": format!("{} {}を選択", prefix, c["name"]), "img": c["img"], "text": c["text"] });
|
| 905 |
+
}
|
| 906 |
+
} else if i >= 560 && i <= 562 {
|
| 907 |
+
let area_idx = i - 560;
|
| 908 |
+
let areas = ["左", "センター", "右"];
|
| 909 |
+
let cid = curr_p.stage[area_idx];
|
| 910 |
+
let name = if cid >= 0 { db.members.get(&(cid as u16)).map(|m| m.name.as_str()).unwrap_or("メンバー") } else { "空エリア" };
|
| 911 |
+
|
| 912 |
+
let mut desc = "選択";
|
| 913 |
+
if !pending_choice.is_null() {
|
| 914 |
+
let p_type = pending_choice["type"].as_str().unwrap_or("");
|
| 915 |
+
if p_type == "MOVE_MEMBER" { desc = "移動元"; }
|
| 916 |
+
else if p_type == "TAP_MEMBER" { desc = "ウェイト"; }
|
| 917 |
+
else if p_type == "PLAY_MEMBER_FROM_HAND" || p_type == "PLAY_MEMBER_FROM_DISCARD" { desc = "に置く"; }
|
| 918 |
+
}
|
| 919 |
+
|
| 920 |
+
meta = json!({ "id": i, "type": "SELECT_STAGE", "area_idx": area_idx, "name": format!("【ステージ選択】 {}: {}を{}", areas[area_idx], name, desc) });
|
| 921 |
+
} else if i >= 570 && i <= 579 {
|
| 922 |
+
let mut mode_label = format!("モード {}", i - 570 + 1);
|
| 923 |
+
if !pending_choice.is_null() {
|
| 924 |
+
if let Some(opts) = pending_choice["params"]["options"].as_array() {
|
| 925 |
+
if let Some(val) = opts.get(i - 570) {
|
| 926 |
+
mode_label = val.as_str().unwrap_or(&mode_label).to_string();
|
| 927 |
+
}
|
| 928 |
+
}
|
| 929 |
+
}
|
| 930 |
+
meta = json!({ "id": i, "type": "SELECT_MODE", "index": i - 570, "name": format!("【モード選択】 {}", mode_label) });
|
| 931 |
+
|
| 932 |
+
} else if i >= 590 && i <= 599 {
|
| 933 |
+
meta = json!({ "id": i, "type": "ABILITY_ORDER", "index": i - 590, "name": format!("【能力解決】 ({})", i - 590 + 1) });
|
| 934 |
+
|
| 935 |
+
} else if i >= 600 && i <= 602 {
|
| 936 |
+
let target_p = &gs.players[1 - gs.current_player as usize];
|
| 937 |
+
let cid = target_p.stage[i - 600];
|
| 938 |
+
let areas = ["左", "センター", "右"];
|
| 939 |
+
if cid >= 0 {
|
| 940 |
+
let c = serialize_card(cid, db, edb, true);
|
| 941 |
+
meta = json!({ "id": i, "type": "TARGET_OPPONENT", "index": i - 600, "name": format!("【ターゲット】 相手のステージ ({}: {})", areas[i-600], c["name"]), "img": c["img"] });
|
| 942 |
+
} else {
|
| 943 |
+
meta = json!({ "id": i, "type": "TARGET_OPPONENT", "index": i - 600, "name": format!("【ターゲット】 相手のステージ ({}: 空エリア)", areas[i-600]) });
|
| 944 |
+
}
|
| 945 |
+
} else if i >= 820 && i <= 822 {
|
| 946 |
+
let area_idx = i - 820;
|
| 947 |
+
let cid = curr_p.live_zone[area_idx];
|
| 948 |
+
let name = if cid >= 0 { db.lives.get(&(cid as u16)).map(|l| l.name.as_str()).unwrap_or("Live") } else { "None" };
|
| 949 |
+
let areas = ["左", "センター", "右"];
|
| 950 |
+
meta = json!({ "id": i, "type": "SELECT_LIVE", "area_idx": area_idx, "name": format!("【ライブ選択】 {}: {}", areas[area_idx], name) });
|
| 951 |
+
} else if i >= 1000 && i <= 1999 {
|
| 952 |
+
let adj = i - 1000;
|
| 953 |
+
let h_idx = adj / 100;
|
| 954 |
+
let s_idx = (adj % 100) / 10;
|
| 955 |
+
let c_idx = adj % 10;
|
| 956 |
+
|
| 957 |
+
let mut choice_label = format!("選択 {}", c_idx + 1);
|
| 958 |
+
// Resolve label from pending choice params (Order Deck, Color, Mode, List)
|
| 959 |
+
if !pending_choice.is_null() {
|
| 960 |
+
let p_type = pending_choice["type"].as_str().unwrap_or("");
|
| 961 |
+
let params = &pending_choice["params"];
|
| 962 |
+
|
| 963 |
+
if p_type == "ORDER_DECK" {
|
| 964 |
+
if let Some(cards_v) = params["cards"].as_array() {
|
| 965 |
+
if let Some(cid_val) = cards_v.get(c_idx) {
|
| 966 |
+
let cid = cid_val.as_i64().unwrap_or(-1) as i16;
|
| 967 |
+
let c = serialize_card(cid, db, edb, true);
|
| 968 |
+
choice_label = format!("{}をトップへ", c["name"]);
|
| 969 |
+
} else {
|
| 970 |
+
choice_label = "【確定】".to_string();
|
| 971 |
+
}
|
| 972 |
+
}
|
| 973 |
+
} else if p_type == "COLOR_SELECT" {
|
| 974 |
+
let colors = ["赤", "青", "緑", "黄", "紫", "ピンク"];
|
| 975 |
+
if c_idx < 6 { choice_label = format!("{}を選択", colors[c_idx]); }
|
| 976 |
+
} else if p_type == "SELECT_MODE" {
|
| 977 |
+
if let Some(opts) = params["options"].as_array() {
|
| 978 |
+
if let Some(val) = opts.get(c_idx) { choice_label = val.as_str().unwrap_or(&choice_label).to_string(); }
|
| 979 |
+
}
|
| 980 |
+
} else if p_type == "SELECT_FROM_LIST" {
|
| 981 |
+
if let Some(cards_v) = params["cards"].as_array() {
|
| 982 |
+
if let Some(cid_val) = cards_v.get(c_idx) {
|
| 983 |
+
let cid = cid_val.as_i64().unwrap_or(-1) as i16;
|
| 984 |
+
let c = serialize_card(cid, db, edb, true);
|
| 985 |
+
choice_label = format!("{}を選択", c["name"]);
|
| 986 |
+
}
|
| 987 |
+
}
|
| 988 |
+
}
|
| 989 |
+
}
|
| 990 |
+
|
| 991 |
+
if let Some(&cid) = curr_p.hand.get(h_idx) {
|
| 992 |
+
let c = serialize_card(cid as i16, db, edb, true);
|
| 993 |
+
let cost = gs.get_member_cost(gs.current_player as usize, cid as i32, s_idx as i32, db);
|
| 994 |
+
meta = json!({
|
| 995 |
+
"id": i, "type": "PLAY", "hand_idx": h_idx, "area_idx": s_idx, "choice_idx": c_idx,
|
| 996 |
+
"name": format!("【登場選択】 {} ({})", c["name"], choice_label),
|
| 997 |
+
"img": c["img"], "cost": cost, "text": c["text"]
|
| 998 |
+
});
|
| 999 |
+
}
|
| 1000 |
+
} else if i >= 550 && i <= 849 {
|
| 1001 |
+
let adj = i - 550;
|
| 1002 |
+
let s_idx = adj / 100;
|
| 1003 |
+
// let ab_idx = (adj % 100) / 10; // Unused in display logic generally
|
| 1004 |
+
let c_idx = adj % 10;
|
| 1005 |
+
|
| 1006 |
+
let areas = ["左", "中", "右"];
|
| 1007 |
+
let area_name = if s_idx < 3 { areas[s_idx] } else { "Slot" };
|
| 1008 |
+
|
| 1009 |
+
let mut card_name = "メンバー".to_string();
|
| 1010 |
+
if let Some(cid) = curr_p.stage.get(s_idx).cloned() {
|
| 1011 |
+
if cid >= 0 {
|
| 1012 |
+
if let Some(m) = db.members.get(&(cid as u16)) { card_name = m.name.clone(); }
|
| 1013 |
+
}
|
| 1014 |
+
}
|
| 1015 |
+
|
| 1016 |
+
let mut choice_label = format!("選択 {}", c_idx);
|
| 1017 |
+
if !pending_choice.is_null() {
|
| 1018 |
+
let p_type = pending_choice["type"].as_str().unwrap_or("");
|
| 1019 |
+
let params = &pending_choice["params"];
|
| 1020 |
+
|
| 1021 |
+
if p_type == "ORDER_DECK" {
|
| 1022 |
+
if let Some(cards_v) = params["cards"].as_array() {
|
| 1023 |
+
if let Some(cid_val) = cards_v.get(c_idx) {
|
| 1024 |
+
let cid = cid_val.as_i64().unwrap_or(-1) as i16;
|
| 1025 |
+
let c = serialize_card(cid, db, edb,true);
|
| 1026 |
+
choice_label = format!("トップへ: {}", c["name"]);
|
| 1027 |
+
} else { choice_label = "【確定】".to_string(); }
|
| 1028 |
+
}
|
| 1029 |
+
} else if p_type == "COLOR_SELECT" {
|
| 1030 |
+
let colors = ["赤", "青", "緑", "���", "紫", "ピンク"];
|
| 1031 |
+
if c_idx < 6 { choice_label = format!("色: {}", colors[c_idx]); }
|
| 1032 |
+
} else if p_type == "SELECT_MODE" {
|
| 1033 |
+
if let Some(opts) = params["options"].as_array() {
|
| 1034 |
+
if let Some(val) = opts.get(c_idx) { choice_label = val.as_str().unwrap_or(&choice_label).to_string(); }
|
| 1035 |
+
}
|
| 1036 |
+
} else if p_type == "SELECT_FROM_LIST" {
|
| 1037 |
+
if let Some(cards_v) = params["cards"].as_array() {
|
| 1038 |
+
if let Some(cid_val) = cards_v.get(c_idx) {
|
| 1039 |
+
let cid = cid_val.as_i64().unwrap_or(-1) as i16;
|
| 1040 |
+
let c = serialize_card(cid,db,edb,true);
|
| 1041 |
+
choice_label = format!("選択: {}", c["name"]);
|
| 1042 |
+
}
|
| 1043 |
+
}
|
| 1044 |
+
}
|
| 1045 |
+
}
|
| 1046 |
+
|
| 1047 |
+
meta = json!({ "id": i, "type": "CHOICE", "area_idx": s_idx, "choice_idx": c_idx,
|
| 1048 |
+
"name": format!("[{}] {} ({})", card_name, choice_label, area_name) });
|
| 1049 |
+
|
| 1050 |
+
} else if i >= 900 && i <= 902 {
|
| 1051 |
+
let area_idx = i - 900;
|
| 1052 |
+
let cid = curr_p.live_zone[area_idx];
|
| 1053 |
+
let areas = ["左", "センター", "右"];
|
| 1054 |
+
if cid >= 0 {
|
| 1055 |
+
let c = serialize_card(cid, db, edb, curr_p.live_zone_revealed[area_idx] || viewer_idx == gs.current_player as usize);
|
| 1056 |
+
meta = json!({ "id": i, "type": "PERFORMANCE", "area_idx": area_idx, "name": format!("【パフォーマンス】 {}: {}", areas[area_idx], c["name"]), "img": c["img"] });
|
| 1057 |
+
}
|
| 1058 |
+
}
|
| 1059 |
+
enriched_actions.push(meta);
|
| 1060 |
+
}
|
| 1061 |
+
}
|
| 1062 |
+
}
|
| 1063 |
+
|
| 1064 |
+
json!({
|
| 1065 |
+
"mode": mode,
|
| 1066 |
+
"active_player": gs.current_player,
|
| 1067 |
+
"current_player": gs.current_player,
|
| 1068 |
+
"phase": gs.phase as i8,
|
| 1069 |
+
"turn": gs.turn,
|
| 1070 |
+
"players": [p0, p1],
|
| 1071 |
+
"legal_actions": enriched_actions,
|
| 1072 |
+
"pending_choice": pending_choice
|
| 1073 |
+
})
|
| 1074 |
+
}
|
| 1075 |
+
|
| 1076 |
+
// Legacy handler for test deck list
|
| 1077 |
+
fn handle_get_test_deck(request: Request, query: Option<&str>, _db: &CardDatabase) {
|
| 1078 |
+
let mut available = Vec::new();
|
| 1079 |
+
for file in Decks::iter() {
|
| 1080 |
+
if file.ends_with(".txt") && !file.starts_with("verify") {
|
| 1081 |
+
available.push(file.replace(".txt", ""));
|
| 1082 |
+
}
|
| 1083 |
+
}
|
| 1084 |
+
|
| 1085 |
+
let mut deck_name = String::new();
|
| 1086 |
+
if let Some(q) = query {
|
| 1087 |
+
for pair in q.split('&') {
|
| 1088 |
+
if let Some((k, v)) = pair.split_once('=') {
|
| 1089 |
+
if k == "deck" { deck_name = v.to_string(); }
|
| 1090 |
+
}
|
| 1091 |
+
}
|
| 1092 |
+
}
|
| 1093 |
+
|
| 1094 |
+
if !deck_name.is_empty() {
|
| 1095 |
+
let f_name = format!("{}.txt", deck_name);
|
| 1096 |
+
if let Some(f) = Decks::get(&f_name) {
|
| 1097 |
+
let s = std::str::from_utf8(f.data.as_ref()).unwrap_or("");
|
| 1098 |
+
let mut codes = Vec::new();
|
| 1099 |
+
for line in s.lines() {
|
| 1100 |
+
if let Some((c, _)) = line.split_once('x') { codes.push(c.trim().to_string()); }
|
| 1101 |
+
}
|
| 1102 |
+
let main_codes: Vec<String> = codes.iter().filter(|c| !c.contains("ENERGY")).cloned().collect();
|
| 1103 |
+
// Don't send invalid codes. Let resolve_deck fill defaults.
|
| 1104 |
+
let energy_codes: Vec<String> = Vec::new();
|
| 1105 |
+
|
| 1106 |
+
let json = json!({
|
| 1107 |
+
"success": true,
|
| 1108 |
+
"main_deck": main_codes,
|
| 1109 |
+
"energy_deck": energy_codes,
|
| 1110 |
+
"available_decks": available
|
| 1111 |
+
});
|
| 1112 |
+
let _ = request.respond(Response::from_string(json.to_string()));
|
| 1113 |
+
} else {
|
| 1114 |
+
let _ = request.respond(Response::from_string(json!({"success":false,"error":"Not found", "available_decks": available}).to_string()));
|
| 1115 |
+
}
|
| 1116 |
+
} else {
|
| 1117 |
+
let json = json!({ "available_decks": available, "success": true });
|
| 1118 |
+
let _ = request.respond(Response::from_string(json.to_string()));
|
| 1119 |
+
}
|
| 1120 |
+
}
|