commit ee8be291774760e2efdda26c4a4e2ec5ac05a1ce Author: Xevion Date: Thu Oct 9 22:56:26 2025 -0500 Update source files diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 0000000..9bd17ea --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,11 @@ +[target.wasm32-unknown-unknown] +rustflags = ['--cfg', 'getrandom_backend="wasm_js"', '--cfg=web_sys_unstable_apis'] + +# for Linux +[target.x86_64-unknown-linux-gnu] +linker = "clang" +rustflags = ["-C", "link-arg=-fuse-ld=lld"] + +# for Windows +# [target.x86_64-pc-windows-msvc] +# linker = "rust-lld.exe" diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml new file mode 100644 index 0000000..d7a3c31 --- /dev/null +++ b/.github/workflows/builds.yml @@ -0,0 +1,187 @@ +name: Builds +on: + - push +env: + CARGO_TERM_COLOR: always + RUST_VERSION: "stable" +jobs: + desktop: + name: Desktop (${{ matrix.target.os }} / ${{ matrix.target.arch }}) + runs-on: ${{ matrix.target.runner }} + strategy: + fail-fast: false + matrix: + target: + - os: linux + arch: x86_64 + runner: ubuntu-22.04 + rust_target: x86_64-unknown-linux-gnu + - os: macos + arch: x86_64 + runner: macos-15-intel + rust_target: x86_64-apple-darwin + - os: macos + arch: aarch64 + runner: macos-latest + rust_target: aarch64-apple-darwin + - os: windows + arch: x86_64 + runner: windows-latest + rust_target: x86_64-pc-windows-msvc + - os: windows + arch: aarch64 + runner: windows-latest + rust_target: aarch64-pc-windows-msvc + steps: + - uses: actions/checkout@v5 + - name: Setup Rust + uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ env.RUST_VERSION }} + components: rustfmt, clippy + targets: ${{ matrix.target.rust_target }} + - name: Rust cache + uses: Swatinem/rust-cache@v2 + with: + key: ${{ matrix.target.rust_target }}-${{ hashFiles('**/Cargo.lock') }} + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + version: 10 + - name: Setup Node + uses: actions/setup-node@v5 + with: + node-version: 20 + cache: pnpm + cache-dependency-path: frontend/pnpm-lock.yaml + - name: Install frontend dependencies + run: pnpm install --frozen-lockfile --prefer-offline + working-directory: frontend + - name: Cache Tauri CLI (macOS only) + if: matrix.target.os == 'macos' + id: cache-tauri-cli + uses: actions/cache@v4 + with: + path: ~/.cargo/bin/cargo-tauri + key: ${{ runner.os }}-${{ runner.arch }}-tauri-cli-2 + - name: Install cargo-binstall + if: matrix.target.os != 'macos' + uses: taiki-e/install-action@cargo-binstall + - name: Install Tauri CLI (via binstall) + if: matrix.target.os != 'macos' + run: cargo binstall tauri-cli --version '^2' --no-confirm + - name: Install Tauri CLI (from source on macOS) + if: matrix.target.os == 'macos' && steps.cache-tauri-cli.outputs.cache-hit != 'true' + run: cargo install tauri-cli --version '^2' --locked + env: + CARGO_PROFILE_RELEASE_LTO: false + - name: Cache apt packages + if: matrix.target.os == 'linux' + uses: actions/cache@v4 + with: + path: | + /var/cache/apt/archives/*.deb + key: ${{ matrix.target.runner }}-apt-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ matrix.target.runner }}-apt- + - name: Install Linux dependencies + if: matrix.target.os == 'linux' + run: | + sudo apt-get update -qq && sudo apt-get install -y --no-install-recommends \ + build-essential \ + libglib2.0-dev \ + libwebkit2gtk-4.1-dev \ + libayatana-appindicator3-dev \ + librsvg2-dev \ + patchelf + - name: Build desktop app + run: cargo tauri build --target ${{ matrix.target.rust_target }} + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: iron-borders-${{ matrix.target.os }}-${{ matrix.target.arch }} + path: | + target/${{ matrix.target.rust_target }}/release/*.exe + target/${{ matrix.target.rust_target }}/release/bundle/appimage/*.AppImage + target/${{ matrix.target.rust_target }}/release/bundle/deb/*.deb + target/${{ matrix.target.rust_target }}/release/bundle/rpm/*.rpm + target/${{ matrix.target.rust_target }}/release/bundle/macos/*.app + target/${{ matrix.target.rust_target }}/release/bundle/dmg/*.dmg + target/${{ matrix.target.rust_target }}/release/bundle/msi/*.msi + target/${{ matrix.target.rust_target }}/release/bundle/nsis/*.exe + if-no-files-found: ignore + browser: + name: Browser (WASM) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + - name: Install Rust + uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ env.RUST_VERSION }} + targets: x86_64-unknown-linux-gnu, wasm32-unknown-unknown + - uses: Swatinem/rust-cache@v2 + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + version: 10 + - name: Setup Node + uses: actions/setup-node@v5 + with: + node-version: 20 + cache: pnpm + cache-dependency-path: frontend/pnpm-lock.yaml + - name: Install frontend dependencies + run: pnpm install --frozen-lockfile --prefer-offline + working-directory: frontend + - name: Install wasm-bindgen-cli + uses: taiki-e/install-action@v2 + with: + tool: wasm-bindgen-cli@0.2.104 + - name: Install wasm-opt + uses: taiki-e/install-action@v2 + with: + tool: wasm-opt@0.116.1 + - name: Build WASM release + run: | + cargo build -p borders-wasm --profile wasm-release --target wasm32-unknown-unknown + wasm-bindgen --out-dir pkg --out-name borders --target web target/wasm32-unknown-unknown/wasm-release/borders_wasm.wasm + wasm-opt -Oz --enable-bulk-memory --enable-threads --all-features pkg/borders_bg.wasm -o pkg/borders_bg.wasm + mkdir -p frontend/pkg + cp -r pkg/* frontend/pkg/ + - name: Build frontend (root-based) + run: pnpm run build:browser + working-directory: frontend + - name: Upload browser artifacts + uses: actions/upload-artifact@v4 + with: + name: iron-borders-browser + path: frontend/dist/browser/**/* + if-no-files-found: error + - name: Build frontend (GitHub Pages) + run: pnpm run build:browser + working-directory: frontend + env: + GITHUB_PAGES: true + deploy-cloudflare: + name: Deploy to Cloudflare Pages + needs: browser + runs-on: ubuntu-latest + if: github.event_name == 'push' + steps: + - name: Download browser artifact + uses: actions/download-artifact@v4 + with: + name: iron-borders-browser + path: dist + - name: Deploy to Cloudflare Pages + id: deploy + uses: cloudflare/wrangler-action@v3 + with: + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} + accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + command: pages deploy dist --project-name=borders + - name: Print deployment URL + env: + DEPLOYMENT_URL: ${{ steps.deploy.outputs.deployment-url }} + run: echo "Deployed to $DEPLOYMENT_URL" diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml new file mode 100644 index 0000000..4a98da5 --- /dev/null +++ b/.github/workflows/quality.yml @@ -0,0 +1,84 @@ +name: Quality +on: + - push +env: + CARGO_TERM_COLOR: always + RUST_VERSION: "stable" +jobs: + rust-quality: + name: Rust Quality + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + - name: Install Rust + uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ env.RUST_VERSION }} + targets: x86_64-unknown-linux-gnu, wasm32-unknown-unknown + - uses: Swatinem/rust-cache@v2 + - name: Cache apt packages + uses: actions/cache@v4 + with: + path: | + /var/cache/apt/archives/*.deb + key: ubuntu-latest-apt-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ubuntu-latest-apt- + - name: Install Linux dependencies + run: | + sudo apt-get update -qq && sudo apt-get install -y --no-install-recommends \ + build-essential \ + libglib2.0-dev \ + libwebkit2gtk-4.1-dev \ + libayatana-appindicator3-dev \ + librsvg2-dev \ + patchelf + - name: Install just + uses: taiki-e/install-action@just + - name: Install cargo-machete + uses: taiki-e/install-action@cargo-machete + - name: Run Rust checks + run: just --shell bash --shell-arg -c check + - name: Install cargo-audit + uses: taiki-e/install-action@cargo-audit + - name: Run security audit + run: cargo audit + frontend-quality: + name: Frontend Quality + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + version: 10 + - name: Setup Node + uses: actions/setup-node@v5 + with: + node-version: 20 + cache: pnpm + cache-dependency-path: frontend/pnpm-lock.yaml + - name: Install Rust + uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ env.RUST_VERSION }} + targets: x86_64-unknown-linux-gnu, wasm32-unknown-unknown + - uses: Swatinem/rust-cache@v2 + - name: Install wasm-bindgen-cli + uses: taiki-e/install-action@v2 + with: + tool: wasm-bindgen-cli@0.2.104 + - name: Install frontend dependencies + run: pnpm install --frozen-lockfile + working-directory: frontend + - name: Install just + uses: taiki-e/install-action@just + - name: Build WASM for frontend checks + run: | + cargo build -p borders-wasm --profile wasm-dev --target wasm32-unknown-unknown + wasm-bindgen --out-dir pkg --out-name borders --target web target/wasm32-unknown-unknown/wasm-dev/borders_wasm.wasm + mkdir -p frontend/pkg + cp -r pkg/* frontend/pkg/ + - name: Run frontend TypeScript checks + run: pnpm run build:browser + working-directory: frontend diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4546699 --- /dev/null +++ b/.gitignore @@ -0,0 +1,32 @@ +target/ +pkg/ +*.pem +/*.io/ + +# Build-copied shader files +frontend/public/assets/ + +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..98ebc36 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,7462 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "addr2line" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5d307320b3181d6d7954e663bd7c774a838b8220fe0593c86d9fb09f498b4b" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "aligned-vec" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc890384c8602f339876ded803c97ad529f3842aba97f6392b3dba0dd171769b" +dependencies = [ + "equator", +] + +[[package]] +name = "alloc-no-stdlib" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" + +[[package]] +name = "alloc-stdlib" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" +dependencies = [ + "alloc-no-stdlib", +] + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "anyhow" +version = "1.0.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" + +[[package]] +name = "arbitrary" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1" + +[[package]] +name = "arg_enum_proc_macro" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "arrayvec" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" + +[[package]] +name = "assert_type_match" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f548ad2c4031f2902e3edc1f29c29e835829437de49562d8eb5dc5584d3a1043" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "async-broadcast" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "435a87a52755b8f27fcf321ac4f04b2802e337c8c4872923137471ec39c37532" +dependencies = [ + "event-listener", + "event-listener-strategy", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-channel" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "924ed96dd52d1b75e9c1a3e6275715fd320f5f9439fb5a4a11fa51f4221158d2" +dependencies = [ + "concurrent-queue", + "event-listener-strategy", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-executor" +version = "1.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "497c00e0fd83a72a79a39fcbd8e3e2f055d6f6c7e025f3b3d91f4f8e76527fb8" +dependencies = [ + "async-task", + "concurrent-queue", + "fastrand", + "futures-lite", + "pin-project-lite", + "slab", +] + +[[package]] +name = "async-io" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "456b8a8feb6f42d237746d4b3e9a178494627745c3c56c6ea55d92ba50d026fc" +dependencies = [ + "autocfg", + "cfg-if", + "concurrent-queue", + "futures-io", + "futures-lite", + "parking", + "polling", + "rustix", + "slab", + "windows-sys 0.61.2", +] + +[[package]] +name = "async-lock" +version = "3.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fd03604047cee9b6ce9de9f70c6cd540a0520c813cbd49bae61f33ab80ed1dc" +dependencies = [ + "event-listener", + "event-listener-strategy", + "pin-project-lite", +] + +[[package]] +name = "async-process" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc50921ec0055cdd8a16de48773bfeec5c972598674347252c0399676be7da75" +dependencies = [ + "async-channel", + "async-io", + "async-lock", + "async-signal", + "async-task", + "blocking", + "cfg-if", + "event-listener", + "futures-lite", + "rustix", +] + +[[package]] +name = "async-recursion" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "async-signal" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43c070bbf59cd3570b6b2dd54cd772527c7c3620fce8be898406dd3ed6adc64c" +dependencies = [ + "async-io", + "async-lock", + "atomic-waker", + "cfg-if", + "futures-core", + "futures-io", + "rustix", + "signal-hook-registry", + "slab", + "windows-sys 0.61.2", +] + +[[package]] +name = "async-task" +version = "4.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" +dependencies = [ + "portable-atomic", +] + +[[package]] +name = "async-trait" +version = "0.1.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "atk" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "241b621213072e993be4f6f3a9e4b45f65b7e6faad43001be957184b7bb1824b" +dependencies = [ + "atk-sys", + "glib", + "libc", +] + +[[package]] +name = "atk-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5e48b684b0ca77d2bbadeef17424c2ea3c897d44d566a1617e7e8f30614d086" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" +dependencies = [ + "portable-atomic", +] + +[[package]] +name = "autocfg" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" + +[[package]] +name = "av1-grain" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f3efb2ca85bc610acfa917b5aaa36f3fcbebed5b3182d7f877b02531c4b80c8" +dependencies = [ + "anyhow", + "arrayvec", + "log", + "nom", + "num-rational", + "v_frame", +] + +[[package]] +name = "avif-serialize" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47c8fbc0f831f4519fe8b810b6a7a91410ec83031b8233f730a0480029f6a23f" +dependencies = [ + "arrayvec", +] + +[[package]] +name = "aws-lc-rs" +version = "1.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "879b6c89592deb404ba4dc0ae6b58ffd1795c78991cbb5b8bc441c48a070440d" +dependencies = [ + "aws-lc-sys", + "zeroize", +] + +[[package]] +name = "aws-lc-sys" +version = "0.32.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2b715a6010afb9e457ca2b7c9d2b9c344baa8baed7b38dc476034c171b32575" +dependencies = [ + "bindgen", + "cc", + "cmake", + "dunce", + "fs_extra", + "libloading 0.8.8", +] + +[[package]] +name = "backtrace" +version = "0.3.76" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb531853791a215d7c62a30daf0dde835f381ab5de4589cfe7c649d2cbe92bd6" +dependencies = [ + "addr2line", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", + "windows-link 0.2.1", +] + +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "bevy_ecs" +version = "0.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69d929d32190cfcde6efd2df493601c4dbc18a691fd9775a544c951c3c112e1a" +dependencies = [ + "arrayvec", + "bevy_ecs_macros", + "bevy_platform", + "bevy_ptr", + "bevy_reflect", + "bevy_tasks", + "bevy_utils", + "bitflags 2.9.4", + "bumpalo", + "concurrent-queue", + "derive_more 2.0.1", + "fixedbitset", + "indexmap 2.11.4", + "log", + "nonmax", + "serde", + "slotmap", + "smallvec", + "thiserror 2.0.17", + "variadics_please", +] + +[[package]] +name = "bevy_ecs_macros" +version = "0.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eeddfb80a2e000663e87be9229c26b4da92bddbc06c8776bc0d1f4a7f679079" +dependencies = [ + "bevy_macro_utils", + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "bevy_macro_utils" +version = "0.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17dbc3f8948da58b3c17767d20fd3cd35fe4721ed19a9a3204a6f1d6c9951bdd" +dependencies = [ + "parking_lot", + "proc-macro2", + "quote", + "syn 2.0.106", + "toml_edit 0.23.6", +] + +[[package]] +name = "bevy_platform" +version = "0.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10cf8cda162688c95250e74cffaa1c3a04597f105d4ca35554106f107308ea57" +dependencies = [ + "critical-section", + "foldhash", + "futures-channel", + "hashbrown 0.16.0", + "js-sys", + "portable-atomic", + "portable-atomic-util", + "serde", + "spin 0.10.0", + "wasm-bindgen", + "wasm-bindgen-futures", +] + +[[package]] +name = "bevy_ptr" +version = "0.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28ab4074e7b781bab84e9b0a41ede245d673d1f75646ce0db27643aedcfb3a85" + +[[package]] +name = "bevy_reflect" +version = "0.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "333df3f5947b7e62728eb5c0b51d679716b16c7c5283118fed4563f13230954e" +dependencies = [ + "assert_type_match", + "bevy_platform", + "bevy_ptr", + "bevy_reflect_derive", + "bevy_utils", + "derive_more 2.0.1", + "disqualified", + "downcast-rs", + "erased-serde", + "foldhash", + "glam", + "serde", + "smallvec", + "smol_str", + "thiserror 2.0.17", + "uuid", + "variadics_please", + "wgpu-types", +] + +[[package]] +name = "bevy_reflect_derive" +version = "0.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0205dce9c5a4d8d041b263bcfd96e9d9d6f3d49416e12db347ab5778b3071fe1" +dependencies = [ + "bevy_macro_utils", + "indexmap 2.11.4", + "proc-macro2", + "quote", + "syn 2.0.106", + "uuid", +] + +[[package]] +name = "bevy_tasks" +version = "0.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18839182775f30d26f0f84d9de85d25361bb593c99517a80b64ede6cbaf41adc" +dependencies = [ + "async-channel", + "async-task", + "atomic-waker", + "bevy_platform", + "crossbeam-queue", + "derive_more 2.0.1", + "futures-lite", + "heapless", + "pin-project", +] + +[[package]] +name = "bevy_utils" +version = "0.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "080254083c74d5f6eb0649d7cd6181bda277e8fe3c509ec68990a5d56ec23f24" +dependencies = [ + "bevy_platform", + "disqualified", + "thread_local", +] + +[[package]] +name = "bincode" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36eaf5d7b090263e8150820482d5d93cd964a81e4019913c972f4edcc6edb740" +dependencies = [ + "bincode_derive", + "serde", + "unty", +] + +[[package]] +name = "bincode_derive" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf95709a440f45e986983918d0e8a1f30a9b1df04918fc828670606804ac3c09" +dependencies = [ + "virtue", +] + +[[package]] +name = "bindgen" +version = "0.72.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895" +dependencies = [ + "bitflags 2.9.4", + "cexpr", + "clang-sys", + "itertools 0.13.0", + "log", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "syn 2.0.106", +] + +[[package]] +name = "bit_field" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e4b40c7323adcfc0a41c4b88143ed58346ff65a288fc144329c5c45e05d70c6" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2261d10cca569e4643e526d8dc2e62e433cc8aba21ab764233731f8d369bf394" +dependencies = [ + "serde", +] + +[[package]] +name = "bitstream-io" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6099cdc01846bc367c4e7dd630dc5966dccf36b652fae7a74e17b640411a91b2" + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block2" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f" +dependencies = [ + "objc2 0.5.2", +] + +[[package]] +name = "block2" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdeb9d870516001442e364c5220d3574d2da8dc765554b4a617230d33fa58ef5" +dependencies = [ + "objc2 0.6.3", +] + +[[package]] +name = "blocking" +version = "1.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e83f8d02be6967315521be875afa792a316e28d57b5a2d401897e2a7921b7f21" +dependencies = [ + "async-channel", + "async-task", + "futures-io", + "futures-lite", + "piper", +] + +[[package]] +name = "borders-core" +version = "0.5.4" +dependencies = [ + "anyhow", + "async-trait", + "bevy_ecs", + "bincode", + "directories", + "flume", + "futures-lite", + "glam", + "gloo-timers", + "hex", + "hmac", + "image", + "js-sys", + "machineid-rs", + "once_cell", + "pem", + "rand 0.9.2", + "reqwest", + "ring", + "rustls-pemfile", + "serde", + "serde_bytes", + "serde_json", + "sha2", + "tokio", + "tracing", + "url", + "uuid", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "web-time", + "web-transport", + "winreg 0.52.0", +] + +[[package]] +name = "borders-desktop" +version = "0.5.4" +dependencies = [ + "bevy_ecs", + "borders-core", + "serde", + "serde_json", + "tauri", + "tauri-build", + "tauri-plugin-opener", + "tauri-plugin-process", + "tokio", + "tracing", + "tracing-subscriber", + "tracing-tracy", + "tracy-client", +] + +[[package]] +name = "borders-server" +version = "0.5.4" +dependencies = [ + "anyhow", + "borders-core", + "flume", + "tokio", + "tracing", + "tracing-log", + "tracing-subscriber", +] + +[[package]] +name = "borders-wasm" +version = "0.5.4" +dependencies = [ + "bevy_ecs", + "borders-core", + "console_error_panic_hook", + "getrandom 0.3.3", + "gloo-timers", + "js-sys", + "lazy_static", + "serde", + "serde-wasm-bindgen", + "serde_json", + "tracing", + "tracing-subscriber", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-tracing", + "web-time", +] + +[[package]] +name = "brotli" +version = "8.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bd8b9603c7aa97359dbd97ecf258968c95f3adddd6db2f7e7a5bef101c84560" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", + "brotli-decompressor", +] + +[[package]] +name = "brotli-decompressor" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "874bb8112abecc98cbd6d81ea4fa7e94fb9449648c93cc89aa40c81c24d7de03" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", +] + +[[package]] +name = "built" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56ed6191a7e78c36abdb16ab65341eefd73d64d303fffccdbb00d51e4205967b" + +[[package]] +name = "bumpalo" +version = "3.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" + +[[package]] +name = "bytemuck" +version = "1.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fbdf580320f38b612e485521afda1ee26d10cc9884efaaa750d383e13e3c5f4" +dependencies = [ + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9abbd1bc6865053c427f7198e6af43bfdedc55ab791faed4fbd361d789575ff" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "byteorder-lite" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" + +[[package]] +name = "bytes" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" +dependencies = [ + "serde", +] + +[[package]] +name = "cairo-rs" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ca26ef0159422fb77631dc9d17b102f253b876fe1586b03b803e63a309b4ee2" +dependencies = [ + "bitflags 2.9.4", + "cairo-sys-rs", + "glib", + "libc", + "once_cell", + "thiserror 1.0.69", +] + +[[package]] +name = "cairo-sys-rs" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "685c9fa8e590b8b3d678873528d83411db17242a73fccaed827770ea0fedda51" +dependencies = [ + "glib-sys", + "libc", + "system-deps", +] + +[[package]] +name = "camino" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "276a59bf2b2c967788139340c9f0c5b12d7fd6630315c15c217e559de85d2609" +dependencies = [ + "serde_core", +] + +[[package]] +name = "cargo-platform" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd5eb614ed4c27c5d706420e4320fbe3216ab31fa1c33cd8246ac36dae4479ba" +dependencies = [ + "camino", + "cargo-platform", + "semver", + "serde", + "serde_json", + "thiserror 2.0.17", +] + +[[package]] +name = "cargo_toml" +version = "0.22.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "374b7c592d9c00c1f4972ea58390ac6b18cbb6ab79011f3bdc90a0b82ca06b77" +dependencies = [ + "serde", + "toml 0.9.7", +] + +[[package]] +name = "cc" +version = "1.2.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d05d92f4b1fd76aad469d46cdd858ca761576082cd37df81416691e50199fb" +dependencies = [ + "find-msvc-tools", + "jobserver", + "libc", + "shlex", +] + +[[package]] +name = "cesu8" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" + +[[package]] +name = "cexpr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom", +] + +[[package]] +name = "cfb" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d38f2da7a0a2c4ccf0065be06397cc26a81f4e528be095826eee9d4adbb8c60f" +dependencies = [ + "byteorder", + "fnv", + "uuid", +] + +[[package]] +name = "cfg-expr" +version = "0.15.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02" +dependencies = [ + "smallvec", + "target-lexicon", +] + +[[package]] +name = "cfg-if" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fd1289c04a9ea8cb22300a459a72a385d7c73d3259e2ed7dcb2af674838cfa9" + +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + +[[package]] +name = "chrono" +version = "0.4.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "145052bdd345b87320e369255277e3fb5152762ad123a901ef5c262dd38fe8d2" +dependencies = [ + "iana-time-zone", + "num-traits", + "serde", + "windows-link 0.2.1", +] + +[[package]] +name = "clang-sys" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" +dependencies = [ + "glob", + "libc", + "libloading 0.8.8", +] + +[[package]] +name = "cmake" +version = "0.1.54" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7caa3f9de89ddbe2c607f4101924c5abec803763ae9534e4f4d7d8f84aa81f0" +dependencies = [ + "cc", +] + +[[package]] +name = "color_quant" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" + +[[package]] +name = "combine" +version = "4.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" +dependencies = [ + "bytes", + "memchr", +] + +[[package]] +name = "concurrent-queue" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +dependencies = [ + "crossbeam-utils", + "portable-atomic", +] + +[[package]] +name = "console_error_panic_hook" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" +dependencies = [ + "cfg-if", + "wasm-bindgen", +] + +[[package]] +name = "convert_case" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" + +[[package]] +name = "cookie" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ddef33a339a91ea89fb53151bd0a4689cfce27055c291dfa69945475d22c747" +dependencies = [ + "time", + "version_check", +] + +[[package]] +name = "core-foundation" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "core-graphics" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa95a34622365fa5bbf40b20b75dba8dfa8c94c734aea8ac9a5ca38af14316f1" +dependencies = [ + "bitflags 2.9.4", + "core-foundation", + "core-graphics-types", + "foreign-types", + "libc", +] + +[[package]] +name = "core-graphics-types" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb" +dependencies = [ + "bitflags 2.9.4", + "core-foundation", + "libc", +] + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "crc32fast" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "critical-section" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b" + +[[package]] +name = "crossbeam-channel" +version = "0.5.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-queue" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f58bbc28f91df819d0aa2a2c00cd19754769c2fad90579b3592b1c9ba7a3115" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" + +[[package]] +name = "crunchy" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "cssparser" +version = "0.29.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f93d03419cb5950ccfd3daf3ff1c7a36ace64609a1a8746d493df1ca0afde0fa" +dependencies = [ + "cssparser-macros", + "dtoa-short", + "itoa", + "matches", + "phf 0.10.1", + "proc-macro2", + "quote", + "smallvec", + "syn 1.0.109", +] + +[[package]] +name = "cssparser-macros" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" +dependencies = [ + "quote", + "syn 2.0.106", +] + +[[package]] +name = "ctor" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a2785755761f3ddc1492979ce1e48d2c00d09311c39e4466429188f3dd6501" +dependencies = [ + "quote", + "syn 2.0.106", +] + +[[package]] +name = "darling" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cdf337090841a411e2a7f3deb9187445851f91b309c0c0a29e05f74a00a48c0" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1247195ecd7e3c85f83c8d2a366e4210d588e802133e1e355180a9870b517ea4" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.106", +] + +[[package]] +name = "darling_macro" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "deranged" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a41953f86f8a05768a6cda24def994fd2f424b04ec5c719cf89989779f199071" +dependencies = [ + "powerfmt", + "serde_core", +] + +[[package]] +name = "derive_more" +version = "0.99.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6edb4b64a43d977b8e99788fe3a04d483834fba1215a7e02caa415b626497f7f" +dependencies = [ + "convert_case", + "proc-macro2", + "quote", + "rustc_version", + "syn 2.0.106", +] + +[[package]] +name = "derive_more" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "093242cf7570c207c83073cf82f79706fe7b8317e98620a47d5be7c3d8497678" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda628edc44c4bb645fbe0f758797143e4e07926f7ebf4e9bdfbd3d2ce621df3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", + "unicode-xid", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", + "subtle", +] + +[[package]] +name = "directories" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a49173b84e034382284f27f1af4dcbbd231ffa358c0fe316541a7337f376a35" +dependencies = [ + "dirs-sys 0.4.1", +] + +[[package]] +name = "dirs" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e" +dependencies = [ + "dirs-sys 0.5.0", +] + +[[package]] +name = "dirs-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" +dependencies = [ + "libc", + "option-ext", + "redox_users 0.4.6", + "windows-sys 0.48.0", +] + +[[package]] +name = "dirs-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" +dependencies = [ + "libc", + "option-ext", + "redox_users 0.5.2", + "windows-sys 0.61.2", +] + +[[package]] +name = "dispatch" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" + +[[package]] +name = "dispatch2" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89a09f22a6c6069a18470eb92d2298acf25463f14256d24778e1230d789a2aec" +dependencies = [ + "bitflags 2.9.4", + "objc2 0.6.3", +] + +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "disqualified" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9c272297e804878a2a4b707cfcfc6d2328b5bb936944613b4fdf2b9269afdfd" + +[[package]] +name = "dlopen2" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b54f373ccf864bf587a89e880fb7610f8d73f3045f13580948ccbcaff26febff" +dependencies = [ + "dlopen2_derive", + "libc", + "once_cell", + "winapi", +] + +[[package]] +name = "dlopen2_derive" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "788160fb30de9cdd857af31c6a2675904b16ece8fc2737b2c7127ba368c9d0f4" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "downcast-rs" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "117240f60069e65410b3ae1bb213295bd828f707b5bec6596a1afc8793ce0cbc" + +[[package]] +name = "dpi" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8b14ccef22fc6f5a8f4d7d768562a182c04ce9a3b3157b91390b52ddfdf1a76" +dependencies = [ + "serde", +] + +[[package]] +name = "dtoa" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6add3b8cff394282be81f3fc1a0605db594ed69890078ca6e2cab1c408bcf04" + +[[package]] +name = "dtoa-short" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd1511a7b6a56299bd043a9c167a6d2bfb37bf84a6dfceaba651168adfb43c87" +dependencies = [ + "dtoa", +] + +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + +[[package]] +name = "dyn-clone" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" + +[[package]] +name = "either" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" + +[[package]] +name = "embed-resource" +version = "3.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55a075fc573c64510038d7ee9abc7990635863992f83ebc52c8b433b8411a02e" +dependencies = [ + "cc", + "memchr", + "rustc_version", + "toml 0.9.7", + "vswhom", + "winreg 0.55.0", +] + +[[package]] +name = "embed_plist" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ef6b89e5b37196644d8796de5268852ff179b44e96276cf4290264843743bb7" + +[[package]] +name = "endi" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3d8a32ae18130a3c84dd492d4215c3d913c3b07c6b63c2eb3eb7ff1101ab7bf" + +[[package]] +name = "enumflags2" +version = "0.7.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1027f7680c853e056ebcec683615fb6fbbc07dbaa13b4d5d9442b146ded4ecef" +dependencies = [ + "enumflags2_derive", + "serde", +] + +[[package]] +name = "enumflags2_derive" +version = "0.7.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67c78a4d8fdf9953a5c9d458f9efe940fd97a0cab0941c075a813ac594733827" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "equator" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4711b213838dfee0117e3be6ac926007d7f433d7bbe33595975d4190cb07e6fc" +dependencies = [ + "equator-macro", +] + +[[package]] +name = "equator-macro" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44f23cf4b44bfce11a86ace86f8a73ffdec849c9fd00a386a53d278bd9e81fb3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "erased-serde" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "259d404d09818dec19332e31d94558aeb442fea04c817006456c24b5460bbd4b" +dependencies = [ + "serde", + "serde_core", + "typeid", +] + +[[package]] +name = "errno" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "event-listener" +version = "5.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13b66accf52311f30a0db42147dadea9850cb48cd070028831ae5f5d4b856ab" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93" +dependencies = [ + "event-listener", + "pin-project-lite", +] + +[[package]] +name = "exr" +version = "1.73.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f83197f59927b46c04a183a619b7c29df34e63e63c7869320862268c0ef687e0" +dependencies = [ + "bit_field", + "half", + "lebe", + "miniz_oxide", + "rayon-core", + "smallvec", + "zune-inflate", +] + +[[package]] +name = "fastbloom" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18c1ddb9231d8554c2d6bdf4cfaabf0c59251658c68b6c95cd52dd0c513a912a" +dependencies = [ + "getrandom 0.3.3", + "libm", + "rand 0.9.2", + "siphasher 1.0.1", +] + +[[package]] +name = "fastrand" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" + +[[package]] +name = "fax" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f05de7d48f37cd6730705cbca900770cab77a89f413d23e100ad7fad7795a0ab" +dependencies = [ + "fax_derive", +] + +[[package]] +name = "fax_derive" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0aca10fb742cb43f9e7bb8467c91aa9bcb8e3ffbc6a6f7389bb93ffc920577d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "fdeflate" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c" +dependencies = [ + "simd-adler32", +] + +[[package]] +name = "field-offset" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f" +dependencies = [ + "memoffset", + "rustc_version", +] + +[[package]] +name = "find-msvc-tools" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0399f9d26e5191ce32c498bebd31e7a3ceabc2745f0ac54af3f335126c3f24b3" + +[[package]] +name = "fixedbitset" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" + +[[package]] +name = "flate2" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc5a4e564e38c699f2880d3fda590bedc2e69f3f84cd48b457bd892ce61d0aa9" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + +[[package]] +name = "flume" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da0e4dd2a88388a1f4ccc7c9ce104604dab68d9f408dc34cd45823d5a9069095" +dependencies = [ + "futures-core", + "futures-sink", + "nanorand", + "spin 0.9.8", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foldhash" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" + +[[package]] +name = "foreign-types" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" +dependencies = [ + "foreign-types-macros", + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-macros" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "foreign-types-shared" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" + +[[package]] +name = "form_urlencoded" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "fs_extra" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" + +[[package]] +name = "futf" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df420e2e84819663797d1ec6544b13c5be84629e7bb00dc960d6917db2987843" +dependencies = [ + "mac", + "new_debug_unreachable", +] + +[[package]] +name = "futures" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-executor" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" + +[[package]] +name = "futures-lite" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f78e10609fe0e0b3f4157ffab1876319b5b0db102a2c60dc4626306dc46b44ad" +dependencies = [ + "fastrand", + "futures-core", + "futures-io", + "parking", + "pin-project-lite", +] + +[[package]] +name = "futures-macro" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "futures-sink" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" + +[[package]] +name = "futures-task" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" + +[[package]] +name = "futures-util" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "fxhash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" +dependencies = [ + "byteorder", +] + +[[package]] +name = "gdk" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9f245958c627ac99d8e529166f9823fb3b838d1d41fd2b297af3075093c2691" +dependencies = [ + "cairo-rs", + "gdk-pixbuf", + "gdk-sys", + "gio", + "glib", + "libc", + "pango", +] + +[[package]] +name = "gdk-pixbuf" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50e1f5f1b0bfb830d6ccc8066d18db35c487b1b2b1e8589b5dfe9f07e8defaec" +dependencies = [ + "gdk-pixbuf-sys", + "gio", + "glib", + "libc", + "once_cell", +] + +[[package]] +name = "gdk-pixbuf-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9839ea644ed9c97a34d129ad56d38a25e6756f99f3a88e15cd39c20629caf7" +dependencies = [ + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "gdk-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c2d13f38594ac1e66619e188c6d5a1adb98d11b2fcf7894fc416ad76aa2f3f7" +dependencies = [ + "cairo-sys-rs", + "gdk-pixbuf-sys", + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "pango-sys", + "pkg-config", + "system-deps", +] + +[[package]] +name = "gdkwayland-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "140071d506d223f7572b9f09b5e155afbd77428cd5cc7af8f2694c41d98dfe69" +dependencies = [ + "gdk-sys", + "glib-sys", + "gobject-sys", + "libc", + "pkg-config", + "system-deps", +] + +[[package]] +name = "gdkx11" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3caa00e14351bebbc8183b3c36690327eb77c49abc2268dd4bd36b856db3fbfe" +dependencies = [ + "gdk", + "gdkx11-sys", + "gio", + "glib", + "libc", + "x11", +] + +[[package]] +name = "gdkx11-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e2e7445fe01ac26f11601db260dd8608fe172514eb63b3b5e261ea6b0f4428d" +dependencies = [ + "gdk-sys", + "glib-sys", + "libc", + "system-deps", + "x11", +] + +[[package]] +name = "generator" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "605183a538e3e2a9c1038635cc5c2d194e2ee8fd0d1b66b8349fad7dbacce5a2" +dependencies = [ + "cc", + "cfg-if", + "libc", + "log", + "rustversion", + "windows 0.61.3", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi 0.11.1+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "r-efi", + "wasi 0.14.7+wasi-0.2.4", + "wasm-bindgen", +] + +[[package]] +name = "gif" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ae047235e33e2829703574b54fdec96bfbad892062d97fed2f76022287de61b" +dependencies = [ + "color_quant", + "weezl", +] + +[[package]] +name = "gimli" +version = "0.32.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7" + +[[package]] +name = "gio" +version = "0.18.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4fc8f532f87b79cbc51a79748f16a6828fb784be93145a322fa14d06d354c73" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-util", + "gio-sys", + "glib", + "libc", + "once_cell", + "pin-project-lite", + "smallvec", + "thiserror 1.0.69", +] + +[[package]] +name = "gio-sys" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37566df850baf5e4cb0dfb78af2e4b9898d817ed9263d1090a2df958c64737d2" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", + "winapi", +] + +[[package]] +name = "glam" +version = "0.30.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e12d847aeb25f41be4c0ec9587d624e9cd631bc007a8fd7ce3f5851e064c6460" +dependencies = [ + "serde_core", +] + +[[package]] +name = "glib" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "233daaf6e83ae6a12a52055f568f9d7cf4671dabb78ff9560ab6da230ce00ee5" +dependencies = [ + "bitflags 2.9.4", + "futures-channel", + "futures-core", + "futures-executor", + "futures-task", + "futures-util", + "gio-sys", + "glib-macros", + "glib-sys", + "gobject-sys", + "libc", + "memchr", + "once_cell", + "smallvec", + "thiserror 1.0.69", +] + +[[package]] +name = "glib-macros" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bb0228f477c0900c880fd78c8759b95c7636dbd7842707f49e132378aa2acdc" +dependencies = [ + "heck 0.4.1", + "proc-macro-crate 2.0.0", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "glib-sys" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "063ce2eb6a8d0ea93d2bf8ba1957e78dbab6be1c2220dd3daca57d5a9d869898" +dependencies = [ + "libc", + "system-deps", +] + +[[package]] +name = "glob" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" + +[[package]] +name = "gloo-timers" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbb143cf96099802033e0d4f4963b19fd2e0b728bcf076cd9cf7f6634f092994" +dependencies = [ + "futures-channel", + "futures-core", + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "gobject-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0850127b514d1c4a4654ead6dedadb18198999985908e6ffe4436f53c785ce44" +dependencies = [ + "glib-sys", + "libc", + "system-deps", +] + +[[package]] +name = "gtk" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd56fb197bfc42bd5d2751f4f017d44ff59fbb58140c6b49f9b3b2bdab08506a" +dependencies = [ + "atk", + "cairo-rs", + "field-offset", + "futures-channel", + "gdk", + "gdk-pixbuf", + "gio", + "glib", + "gtk-sys", + "gtk3-macros", + "libc", + "pango", + "pkg-config", +] + +[[package]] +name = "gtk-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f29a1c21c59553eb7dd40e918be54dccd60c52b049b75119d5d96ce6b624414" +dependencies = [ + "atk-sys", + "cairo-sys-rs", + "gdk-pixbuf-sys", + "gdk-sys", + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "pango-sys", + "system-deps", +] + +[[package]] +name = "gtk3-macros" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52ff3c5b21f14f0736fed6dcfc0bfb4225ebf5725f3c0209edeec181e4d73e9d" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "half" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e54c115d4f30f52c67202f079c5f9d8b49db4691f460fdb0b4c2e838261b2ba5" +dependencies = [ + "cfg-if", + "crunchy", + "zerocopy", +] + +[[package]] +name = "hash32" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47d60b12902ba28e2730cd37e95b8c9223af2808df9e902d4df49588d1470606" +dependencies = [ + "byteorder", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d" +dependencies = [ + "equivalent", + "serde", +] + +[[package]] +name = "heapless" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bfb9eb618601c89945a70e254898da93b13be0388091d42117462b265bb3fad" +dependencies = [ + "hash32", + "portable-atomic", + "stable_deref_trait", +] + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest", +] + +[[package]] +name = "html5ever" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b7410cae13cbc75623c98ac4cbfd1f0bedddf3227afc24f370cf0f50a44a11c" +dependencies = [ + "log", + "mac", + "markup5ever", + "match_token", +] + +[[package]] +name = "http" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "hyper" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb3aa54a13a0dfe7fbe3a59e0c76093041720fdc77b110cc0fc260fafb4dc51e" +dependencies = [ + "atomic-waker", + "bytes", + "futures-channel", + "futures-core", + "http", + "http-body", + "httparse", + "itoa", + "pin-project-lite", + "pin-utils", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" +dependencies = [ + "http", + "hyper", + "hyper-util", + "rustls", + "rustls-pki-types", + "tokio", + "tokio-rustls", + "tower-service", + "webpki-roots", +] + +[[package]] +name = "hyper-util" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c6995591a8f1380fcb4ba966a252a4b29188d51d2b89e3a252f5305be65aea8" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "http", + "http-body", + "hyper", + "ipnet", + "libc", + "percent-encoding", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33e57f83510bb73707521ebaffa789ec8caf86f9657cad665b092b581d40e9fb" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "log", + "wasm-bindgen", + "windows-core 0.62.2", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "ico" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc50b891e4acf8fe0e71ef88ec43ad82ee07b3810ad09de10f1d01f072ed4b98" +dependencies = [ + "byteorder", + "png 0.17.16", +] + +[[package]] +name = "icu_collections" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "200072f5d0e3614556f94a9930d5dc3e0662a652823904c3a75dc3b0af7fee47" +dependencies = [ + "displaydoc", + "potential_utf", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cde2700ccaed3872079a65fb1a78f6c0a36c91570f28755dda67bc8f7d9f00a" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "436880e8e18df4d7bbc06d58432329d6458cc84531f7ac5f024e93deadb37979" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00210d6893afc98edb752b664b8890f0ef174c8adbb8d0be9710fa66fbbf72d3" + +[[package]] +name = "icu_properties" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "016c619c1eeb94efb86809b015c58f479963de65bdb6253345c1a1276f22e32b" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "potential_utf", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "298459143998310acd25ffe6810ed544932242d3f07083eee1084d83a71bd632" + +[[package]] +name = "icu_provider" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03c80da27b5f4187909049ee2d72f276f0d9f99a42c306bd0131ecfe04d8e5af" +dependencies = [ + "displaydoc", + "icu_locale_core", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "image" +version = "0.25.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "529feb3e6769d234375c4cf1ee2ce713682b8e76538cb13f9fc23e1400a591e7" +dependencies = [ + "bytemuck", + "byteorder-lite", + "color_quant", + "exr", + "gif", + "image-webp", + "moxcms", + "num-traits", + "png 0.18.0", + "qoi", + "ravif", + "rayon", + "rgb", + "tiff", + "zune-core", + "zune-jpeg", +] + +[[package]] +name = "image-webp" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "525e9ff3e1a4be2fbea1fdf0e98686a6d98b4d8f937e1bf7402245af1909e8c3" +dependencies = [ + "byteorder-lite", + "quick-error", +] + +[[package]] +name = "imgref" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7c5cedc30da3a610cac6b4ba17597bdf7152cf974e8aab3afb3d54455e371c8" + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", + "serde", +] + +[[package]] +name = "indexmap" +version = "2.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b0f83760fb341a774ed326568e19f5a863af4a952def8c39f9ab92fd95b88e5" +dependencies = [ + "equivalent", + "hashbrown 0.16.0", + "serde", + "serde_core", +] + +[[package]] +name = "infer" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a588916bfdfd92e71cacef98a63d9b1f0d74d6599980d11894290e7ddefffcf7" +dependencies = [ + "cfb", +] + +[[package]] +name = "interpolate_name" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "io-uring" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "046fa2d4d00aea763528b4950358d0ead425372445dc8ff86312b3c69ff7727b" +dependencies = [ + "bitflags 2.9.4", + "cfg-if", + "libc", +] + +[[package]] +name = "ipnet" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" + +[[package]] +name = "iri-string" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbc5ebe9c3a1a7a5127f920a418f7585e9e758e911d0466ed004f393b0e380b2" +dependencies = [ + "memchr", + "serde", +] + +[[package]] +name = "is-docker" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "928bae27f42bc99b60d9ac7334e3a21d10ad8f1835a4e12ec3ec0464765ed1b3" +dependencies = [ + "once_cell", +] + +[[package]] +name = "is-wsl" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "173609498df190136aa7dea1a91db051746d339e18476eed5ca40521f02d7aa5" +dependencies = [ + "is-docker", + "once_cell", +] + +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" + +[[package]] +name = "javascriptcore-rs" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca5671e9ffce8ffba57afc24070e906da7fc4b1ba66f2cabebf61bf2ea257fcc" +dependencies = [ + "bitflags 1.3.2", + "glib", + "javascriptcore-rs-sys", +] + +[[package]] +name = "javascriptcore-rs-sys" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af1be78d14ffa4b75b66df31840478fef72b51f8c2465d4ca7c194da9f7a5124" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "jni" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" +dependencies = [ + "cesu8", + "cfg-if", + "combine", + "jni-sys", + "log", + "thiserror 1.0.69", + "walkdir", + "windows-sys 0.45.0", +] + +[[package]] +name = "jni-sys" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" + +[[package]] +name = "jobserver" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" +dependencies = [ + "getrandom 0.3.3", + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.81" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec48937a97411dcb524a265206ccd4c90bb711fca92b2792c407f268825b9305" +dependencies = [ + "once_cell", + "wasm-bindgen", +] + +[[package]] +name = "json-patch" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "863726d7afb6bc2590eeff7135d923545e5e964f004c2ccf8716c25e70a86f08" +dependencies = [ + "jsonptr", + "serde", + "serde_json", + "thiserror 1.0.69", +] + +[[package]] +name = "jsonptr" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dea2b27dd239b2556ed7a25ba842fe47fd602e7fc7433c2a8d6106d4d9edd70" +dependencies = [ + "serde", + "serde_json", +] + +[[package]] +name = "keyboard-types" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b750dcadc39a09dbadd74e118f6dd6598df77fa01df0cfcdc52c28dece74528a" +dependencies = [ + "bitflags 2.9.4", + "serde", + "unicode-segmentation", +] + +[[package]] +name = "kuchikiki" +version = "0.8.8-speedreader" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02cb977175687f33fa4afa0c95c112b987ea1443e5a51c8f8ff27dc618270cc2" +dependencies = [ + "cssparser", + "html5ever", + "indexmap 2.11.4", + "selectors", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[package]] +name = "lebe" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a79a3332a6609480d7d0c9eab957bca6b455b91bb84e66d19f5ff66294b85b8" + +[[package]] +name = "libappindicator" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03589b9607c868cc7ae54c0b2a22c8dc03dd41692d48f2d7df73615c6a95dc0a" +dependencies = [ + "glib", + "gtk", + "gtk-sys", + "libappindicator-sys", + "log", +] + +[[package]] +name = "libappindicator-sys" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e9ec52138abedcc58dc17a7c6c0c00a2bdb4f3427c7f63fa97fd0d859155caf" +dependencies = [ + "gtk-sys", + "libloading 0.7.4", + "once_cell", +] + +[[package]] +name = "libc" +version = "0.2.177" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976" + +[[package]] +name = "libfuzzer-sys" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5037190e1f70cbeef565bd267599242926f724d3b8a9f510fd7e0b540cfa4404" +dependencies = [ + "arbitrary", + "cc", +] + +[[package]] +name = "libloading" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +dependencies = [ + "cfg-if", + "winapi", +] + +[[package]] +name = "libloading" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667" +dependencies = [ + "cfg-if", + "windows-targets 0.53.5", +] + +[[package]] +name = "libm" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" + +[[package]] +name = "libredox" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "416f7e718bdb06000964960ffa43b4335ad4012ae8b99060261aa4a8088d5ccb" +dependencies = [ + "bitflags 2.9.4", + "libc", + "redox_syscall", +] + +[[package]] +name = "linux-raw-sys" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" + +[[package]] +name = "litemap" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" + +[[package]] +name = "lock_api" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" + +[[package]] +name = "loom" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "419e0dc8046cb947daa77eb95ae174acfbddb7673b4151f56d1eed8e93fbfaca" +dependencies = [ + "cfg-if", + "generator", + "scoped-tls", + "tracing", + "tracing-subscriber", +] + +[[package]] +name = "loop9" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fae87c125b03c1d2c0150c90365d7d6bcc53fb73a9acaef207d2d065860f062" +dependencies = [ + "imgref", +] + +[[package]] +name = "lru-slab" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" + +[[package]] +name = "mac" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" + +[[package]] +name = "machineid-rs" +version = "1.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35ceb4d434d69d7199abc3036541ba6ef86767a4356e3077d5a3419f85b70b14" +dependencies = [ + "hex", + "hmac", + "md-5", + "serde", + "serde_json", + "sha-1", + "sha2", + "sysinfo", + "uuid", + "whoami", + "winreg 0.11.0", + "wmi", +] + +[[package]] +name = "markup5ever" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7a7213d12e1864c0f002f52c2923d4556935a43dec5e71355c2760e0f6e7a18" +dependencies = [ + "log", + "phf 0.11.3", + "phf_codegen 0.11.3", + "string_cache", + "string_cache_codegen", + "tendril", +] + +[[package]] +name = "match_token" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88a9689d8d44bf9964484516275f5cd4c9b59457a6940c1d5d0ecbb94510a36b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "matchers" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9" +dependencies = [ + "regex-automata", +] + +[[package]] +name = "matches" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" + +[[package]] +name = "maybe-rayon" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ea1f30cedd69f0a2954655f7188c6a834246d2bcf1e315e2ac40c4b24dc9519" +dependencies = [ + "cfg-if", + "rayon", +] + +[[package]] +name = "md-5" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" +dependencies = [ + "cfg-if", + "digest", +] + +[[package]] +name = "memchr" +version = "2.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" + +[[package]] +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg", +] + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +dependencies = [ + "adler2", + "simd-adler32", +] + +[[package]] +name = "mio" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" +dependencies = [ + "libc", + "wasi 0.11.1+wasi-snapshot-preview1", + "windows-sys 0.59.0", +] + +[[package]] +name = "moxcms" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cc7d85f3d741164e8972ad355e26ac6e51b20fcae5f911c7da8f2d8bbbb3f33" +dependencies = [ + "num-traits", + "pxfm", +] + +[[package]] +name = "muda" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01c1738382f66ed56b3b9c8119e794a2e23148ac8ea214eda86622d4cb9d415a" +dependencies = [ + "crossbeam-channel", + "dpi", + "gtk", + "keyboard-types", + "objc2 0.6.3", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation 0.3.2", + "once_cell", + "png 0.17.16", + "serde", + "thiserror 2.0.17", + "windows-sys 0.60.2", +] + +[[package]] +name = "nanorand" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3" +dependencies = [ + "getrandom 0.2.16", +] + +[[package]] +name = "ndk" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" +dependencies = [ + "bitflags 2.9.4", + "jni-sys", + "log", + "ndk-sys", + "num_enum", + "raw-window-handle", + "thiserror 1.0.69", +] + +[[package]] +name = "ndk-context" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" + +[[package]] +name = "ndk-sys" +version = "0.6.0+11769913" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" +dependencies = [ + "jni-sys", +] + +[[package]] +name = "new_debug_unreachable" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" + +[[package]] +name = "nix" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" +dependencies = [ + "bitflags 2.9.4", + "cfg-if", + "cfg_aliases", + "libc", + "memoffset", +] + +[[package]] +name = "nodrop" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "nonmax" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "610a5acd306ec67f907abe5567859a3c693fb9886eb1f012ab8f2a47bef3db51" + +[[package]] +name = "noop_proc_macro" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8" + +[[package]] +name = "ntapi" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8a3895c6391c39d7fe7ebc444a87eb2991b2a0bc718fdabd071eec617fc68e4" +dependencies = [ + "winapi", +] + +[[package]] +name = "nu-ansi-term" +version = "0.50.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4a28e057d01f97e61255210fcff094d74ed0466038633e95017f5beb68e4399" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "num-bigint" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "num-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" +dependencies = [ + "num-bigint", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_enum" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a973b4e44ce6cad84ce69d797acf9a044532e4184c4f267913d1b546a0727b7a" +dependencies = [ + "num_enum_derive", + "rustversion", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77e878c846a8abae00dd069496dbe8751b16ac1c3d6bd2a7283a938e8228f90d" +dependencies = [ + "proc-macro-crate 3.4.0", + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "objc-sys" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310" + +[[package]] +name = "objc2" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46a785d4eeff09c14c487497c162e92766fbb3e4059a71840cecc03d9a50b804" +dependencies = [ + "objc-sys", + "objc2-encode", +] + +[[package]] +name = "objc2" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7c2599ce0ec54857b29ce62166b0ed9b4f6f1a70ccc9a71165b6154caca8c05" +dependencies = [ + "objc2-encode", + "objc2-exception-helper", +] + +[[package]] +name = "objc2-app-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d49e936b501e5c5bf01fda3a9452ff86dc3ea98ad5f283e1455153142d97518c" +dependencies = [ + "bitflags 2.9.4", + "block2 0.6.2", + "libc", + "objc2 0.6.3", + "objc2-cloud-kit", + "objc2-core-data", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-core-image", + "objc2-core-text", + "objc2-core-video", + "objc2-foundation 0.3.2", + "objc2-quartz-core 0.3.2", +] + +[[package]] +name = "objc2-cloud-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ad74d880bb43877038da939b7427bba67e9dd42004a18b809ba7d87cee241c" +dependencies = [ + "bitflags 2.9.4", + "objc2 0.6.3", + "objc2-foundation 0.3.2", +] + +[[package]] +name = "objc2-core-data" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b402a653efbb5e82ce4df10683b6b28027616a2715e90009947d50b8dd298fa" +dependencies = [ + "bitflags 2.9.4", + "objc2 0.6.3", + "objc2-foundation 0.3.2", +] + +[[package]] +name = "objc2-core-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" +dependencies = [ + "bitflags 2.9.4", + "dispatch2", + "objc2 0.6.3", +] + +[[package]] +name = "objc2-core-graphics" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807" +dependencies = [ + "bitflags 2.9.4", + "dispatch2", + "objc2 0.6.3", + "objc2-core-foundation", + "objc2-io-surface", +] + +[[package]] +name = "objc2-core-image" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5d563b38d2b97209f8e861173de434bd0214cf020e3423a52624cd1d989f006" +dependencies = [ + "objc2 0.6.3", + "objc2-foundation 0.3.2", +] + +[[package]] +name = "objc2-core-text" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cde0dfb48d25d2b4862161a4d5fcc0e3c24367869ad306b0c9ec0073bfed92d" +dependencies = [ + "bitflags 2.9.4", + "objc2 0.6.3", + "objc2-core-foundation", + "objc2-core-graphics", +] + +[[package]] +name = "objc2-core-video" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d425caf1df73233f29fd8a5c3e5edbc30d2d4307870f802d18f00d83dc5141a6" +dependencies = [ + "bitflags 2.9.4", + "objc2 0.6.3", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-io-surface", +] + +[[package]] +name = "objc2-encode" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" + +[[package]] +name = "objc2-exception-helper" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7a1c5fbb72d7735b076bb47b578523aedc40f3c439bea6dfd595c089d79d98a" +dependencies = [ + "cc", +] + +[[package]] +name = "objc2-foundation" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" +dependencies = [ + "bitflags 2.9.4", + "block2 0.5.1", + "libc", + "objc2 0.5.2", +] + +[[package]] +name = "objc2-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" +dependencies = [ + "bitflags 2.9.4", + "block2 0.6.2", + "libc", + "objc2 0.6.3", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-io-surface" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180788110936d59bab6bd83b6060ffdfffb3b922ba1396b312ae795e1de9d81d" +dependencies = [ + "bitflags 2.9.4", + "objc2 0.6.3", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-javascript-core" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a1e6550c4caed348956ce3370c9ffeca70bb1dbed4fa96112e7c6170e074586" +dependencies = [ + "objc2 0.6.3", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-metal" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" +dependencies = [ + "bitflags 2.9.4", + "block2 0.5.1", + "objc2 0.5.2", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-quartz-core" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" +dependencies = [ + "bitflags 2.9.4", + "block2 0.5.1", + "objc2 0.5.2", + "objc2-foundation 0.2.2", + "objc2-metal", +] + +[[package]] +name = "objc2-quartz-core" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96c1358452b371bf9f104e21ec536d37a650eb10f7ee379fff67d2e08d537f1f" +dependencies = [ + "bitflags 2.9.4", + "objc2 0.6.3", + "objc2-foundation 0.3.2", +] + +[[package]] +name = "objc2-security" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "709fe137109bd1e8b5a99390f77a7d8b2961dafc1a1c5db8f2e60329ad6d895a" +dependencies = [ + "bitflags 2.9.4", + "objc2 0.6.3", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-ui-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d87d638e33c06f577498cbcc50491496a3ed4246998a7fbba7ccb98b1e7eab22" +dependencies = [ + "bitflags 2.9.4", + "objc2 0.6.3", + "objc2-core-foundation", + "objc2-foundation 0.3.2", +] + +[[package]] +name = "objc2-web-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2e5aaab980c433cf470df9d7af96a7b46a9d892d521a2cbbb2f8a4c16751e7f" +dependencies = [ + "bitflags 2.9.4", + "block2 0.6.2", + "objc2 0.6.3", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation 0.3.2", + "objc2-javascript-core", + "objc2-security", +] + +[[package]] +name = "object" +version = "0.37.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" + +[[package]] +name = "open" +version = "5.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2483562e62ea94312f3576a7aca397306df7990b8d89033e18766744377ef95" +dependencies = [ + "dunce", + "is-wsl", + "libc", + "pathdiff", +] + +[[package]] +name = "openssl-probe" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" + +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + +[[package]] +name = "ordered-stream" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aa2b01e1d916879f73a53d01d1d6cee68adbb31d6d9177a8cfce093cced1d50" +dependencies = [ + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "pango" +version = "0.18.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ca27ec1eb0457ab26f3036ea52229edbdb74dee1edd29063f5b9b010e7ebee4" +dependencies = [ + "gio", + "glib", + "libc", + "once_cell", + "pango-sys", +] + +[[package]] +name = "pango-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "436737e391a843e5933d6d9aa102cb126d501e815b83601365a948a518555dc5" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "parking" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" + +[[package]] +name = "parking_lot" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-link 0.2.1", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "pathdiff" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3" + +[[package]] +name = "pem" +version = "3.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38af38e8470ac9dee3ce1bae1af9c1671fffc44ddfd8bd1d0a3445bf349a8ef3" +dependencies = [ + "base64 0.22.1", + "serde", +] + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "phf" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3dfb61232e34fcb633f43d12c58f83c1df82962dcdfa565a4e866ffc17dafe12" +dependencies = [ + "phf_shared 0.8.0", +] + +[[package]] +name = "phf" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259" +dependencies = [ + "phf_macros 0.10.0", + "phf_shared 0.10.0", + "proc-macro-hack", +] + +[[package]] +name = "phf" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" +dependencies = [ + "phf_macros 0.11.3", + "phf_shared 0.11.3", +] + +[[package]] +name = "phf_codegen" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbffee61585b0411840d3ece935cce9cb6321f01c45477d30066498cd5e1a815" +dependencies = [ + "phf_generator 0.8.0", + "phf_shared 0.8.0", +] + +[[package]] +name = "phf_codegen" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aef8048c789fa5e851558d709946d6d79a8ff88c0440c587967f8e94bfb1216a" +dependencies = [ + "phf_generator 0.11.3", + "phf_shared 0.11.3", +] + +[[package]] +name = "phf_generator" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17367f0cc86f2d25802b2c26ee58a7b23faeccf78a396094c13dced0d0182526" +dependencies = [ + "phf_shared 0.8.0", + "rand 0.7.3", +] + +[[package]] +name = "phf_generator" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6" +dependencies = [ + "phf_shared 0.10.0", + "rand 0.8.5", +] + +[[package]] +name = "phf_generator" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" +dependencies = [ + "phf_shared 0.11.3", + "rand 0.8.5", +] + +[[package]] +name = "phf_macros" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58fdf3184dd560f160dd73922bea2d5cd6e8f064bf4b13110abd81b03697b4e0" +dependencies = [ + "phf_generator 0.10.0", + "phf_shared 0.10.0", + "proc-macro-hack", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "phf_macros" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216" +dependencies = [ + "phf_generator 0.11.3", + "phf_shared 0.11.3", + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "phf_shared" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c00cf8b9eafe68dde5e9eaa2cef8ee84a9336a47d566ec55ca16589633b65af7" +dependencies = [ + "siphasher 0.3.11", +] + +[[package]] +name = "phf_shared" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" +dependencies = [ + "siphasher 0.3.11", +] + +[[package]] +name = "phf_shared" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" +dependencies = [ + "siphasher 1.0.1", +] + +[[package]] +name = "pin-project" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "piper" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" +dependencies = [ + "atomic-waker", + "fastrand", + "futures-io", +] + +[[package]] +name = "pkg-config" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" + +[[package]] +name = "plist" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "740ebea15c5d1428f910cd1a5f52cebf8d25006245ed8ade92702f4943d91e07" +dependencies = [ + "base64 0.22.1", + "indexmap 2.11.4", + "quick-xml", + "serde", + "time", +] + +[[package]] +name = "png" +version = "0.17.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82151a2fc869e011c153adc57cf2789ccb8d9906ce52c0b39a6b5697749d7526" +dependencies = [ + "bitflags 1.3.2", + "crc32fast", + "fdeflate", + "flate2", + "miniz_oxide", +] + +[[package]] +name = "png" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97baced388464909d42d89643fe4361939af9b7ce7a31ee32a168f832a70f2a0" +dependencies = [ + "bitflags 2.9.4", + "crc32fast", + "fdeflate", + "flate2", + "miniz_oxide", +] + +[[package]] +name = "polling" +version = "3.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0e4f59085d47d8241c88ead0f274e8a0cb551f3625263c05eb8dd897c34218" +dependencies = [ + "cfg-if", + "concurrent-queue", + "hermit-abi", + "pin-project-lite", + "rustix", + "windows-sys 0.61.2", +] + +[[package]] +name = "portable-atomic" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483" + +[[package]] +name = "portable-atomic-util" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507" +dependencies = [ + "portable-atomic", +] + +[[package]] +name = "potential_utf" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84df19adbe5b5a0782edcab45899906947ab039ccf4573713735ee7de1e6b08a" +dependencies = [ + "zerovec", +] + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "precomputed-hash" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" + +[[package]] +name = "prettyplease" +version = "0.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" +dependencies = [ + "proc-macro2", + "syn 2.0.106", +] + +[[package]] +name = "proc-macro-crate" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +dependencies = [ + "once_cell", + "toml_edit 0.19.15", +] + +[[package]] +name = "proc-macro-crate" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" +dependencies = [ + "toml_edit 0.20.7", +] + +[[package]] +name = "proc-macro-crate" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "219cb19e96be00ab2e37d6e299658a0cfa83e52429179969b0f0121b4ac46983" +dependencies = [ + "toml_edit 0.23.6", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn 1.0.109", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro-hack" +version = "0.5.20+deprecated" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" + +[[package]] +name = "proc-macro2" +version = "1.0.101" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "profiling" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3eb8486b569e12e2c32ad3e204dbaba5e4b5b216e9367044f25f1dba42341773" +dependencies = [ + "profiling-procmacros", +] + +[[package]] +name = "profiling-procmacros" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52717f9a02b6965224f95ca2a81e2e0c5c43baacd28ca057577988930b6c3d5b" +dependencies = [ + "quote", + "syn 2.0.106", +] + +[[package]] +name = "pxfm" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3cbdf373972bf78df4d3b518d07003938e2c7d1fb5891e55f9cb6df57009d84" +dependencies = [ + "num-traits", +] + +[[package]] +name = "qoi" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f6d64c71eb498fe9eae14ce4ec935c555749aef511cca85b5568910d6e48001" +dependencies = [ + "bytemuck", +] + +[[package]] +name = "quick-error" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" + +[[package]] +name = "quick-xml" +version = "0.38.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42a232e7487fc2ef313d96dde7948e7a3c05101870d8985e4fd8d26aedd27b89" +dependencies = [ + "memchr", +] + +[[package]] +name = "quinn" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e20a958963c291dc322d98411f541009df2ced7b5a4f2bd52337638cfccf20" +dependencies = [ + "bytes", + "cfg_aliases", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls", + "socket2", + "thiserror 2.0.17", + "tokio", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-proto" +version = "0.11.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1906b49b0c3bc04b5fe5d86a77925ae6524a19b816ae38ce1e426255f1d8a31" +dependencies = [ + "aws-lc-rs", + "bytes", + "fastbloom", + "getrandom 0.3.3", + "lru-slab", + "rand 0.9.2", + "ring", + "rustc-hash", + "rustls", + "rustls-pki-types", + "rustls-platform-verifier", + "slab", + "thiserror 2.0.17", + "tinyvec", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-udp" +version = "0.5.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "addec6a0dcad8a8d96a771f815f0eaf55f9d1805756410b39f5fa81332574cbd" +dependencies = [ + "cfg_aliases", + "libc", + "once_cell", + "socket2", + "tracing", + "windows-sys 0.60.2", +] + +[[package]] +name = "quote" +version = "1.0.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce25767e7b499d1b604768e7cde645d14cc8584231ea6b295e9c9eb22c02e1d1" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc", + "rand_pcg", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.3", +] + +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.3", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.16", +] + +[[package]] +name = "rand_core" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" +dependencies = [ + "getrandom 0.3.3", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "rand_pcg" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "rav1e" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd87ce80a7665b1cce111f8a16c1f3929f6547ce91ade6addf4ec86a8dda5ce9" +dependencies = [ + "arbitrary", + "arg_enum_proc_macro", + "arrayvec", + "av1-grain", + "bitstream-io", + "built", + "cfg-if", + "interpolate_name", + "itertools 0.12.1", + "libc", + "libfuzzer-sys", + "log", + "maybe-rayon", + "new_debug_unreachable", + "noop_proc_macro", + "num-derive", + "num-traits", + "once_cell", + "paste", + "profiling", + "rand 0.8.5", + "rand_chacha 0.3.1", + "simd_helpers", + "system-deps", + "thiserror 1.0.69", + "v_frame", + "wasm-bindgen", +] + +[[package]] +name = "ravif" +version = "0.11.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5825c26fddd16ab9f515930d49028a630efec172e903483c94796cfe31893e6b" +dependencies = [ + "avif-serialize", + "imgref", + "loop9", + "quick-error", + "rav1e", + "rayon", + "rgb", +] + +[[package]] +name = "raw-window-handle" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" + +[[package]] +name = "rayon" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "368f01d005bf8fd9b1206fb6fa653e6c4a81ceb1466406b81792d87c5677a58f" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "redox_syscall" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags 2.9.4", +] + +[[package]] +name = "redox_users" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" +dependencies = [ + "getrandom 0.2.16", + "libredox", + "thiserror 1.0.69", +] + +[[package]] +name = "redox_users" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac" +dependencies = [ + "getrandom 0.2.16", + "libredox", + "thiserror 2.0.17", +] + +[[package]] +name = "ref-cast" +version = "1.0.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f354300ae66f76f1c85c5f84693f0ce81d747e2c3f21a45fef496d89c960bf7d" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "regex" +version = "1.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b5288124840bee7b386bc413c487869b360b2b4ec421ea56425128692f2a82c" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "833eb9ce86d40ef33cb1306d8accf7bc8ec2bfea4355cbdebb3df68b40925cad" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caf4aa5b0f434c91fe5c7f1ecb6a5ece2130b02ad2a590589dda5146df959001" + +[[package]] +name = "reqwest" +version = "0.12.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d429f34c8092b2d42c7c93cec323bb4adeb7c67698f70839adec842ec10c7ceb" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-rustls", + "hyper-util", + "js-sys", + "log", + "percent-encoding", + "pin-project-lite", + "quinn", + "rustls", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tokio-rustls", + "tokio-util", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams", + "web-sys", + "webpki-roots", +] + +[[package]] +name = "rgb" +version = "0.8.52" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c6a884d2998352bb4daf0183589aec883f16a6da1f4dde84d8e2e9a5409a1ce" + +[[package]] +name = "ring" +version = "0.17.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.16", + "libc", + "untrusted", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" + +[[package]] +name = "rustc-hash" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e" +dependencies = [ + "bitflags 2.9.4", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustls" +version = "0.23.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd3c25631629d034ce7cd9940adc9d45762d46de2b0f57193c4443b92c6d4d40" +dependencies = [ + "aws-lc-rs", + "log", + "once_cell", + "ring", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-native-certs" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fcff2dd52b58a8d98a70243663a0d234c4e2b79235637849d15913394a247d3" +dependencies = [ + "openssl-probe", + "rustls-pki-types", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-pemfile" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "rustls-pki-types" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "229a4a4c221013e7e1f1a043678c5cc39fe5171437c88fb47151a21e6f5b5c79" +dependencies = [ + "web-time", + "zeroize", +] + +[[package]] +name = "rustls-platform-verifier" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be59af91596cac372a6942530653ad0c3a246cdd491aaa9dcaee47f88d67d5a0" +dependencies = [ + "core-foundation", + "core-foundation-sys", + "jni", + "log", + "once_cell", + "rustls", + "rustls-native-certs", + "rustls-platform-verifier-android", + "rustls-webpki", + "security-framework", + "security-framework-sys", + "webpki-root-certs", + "windows-sys 0.59.0", +] + +[[package]] +name = "rustls-platform-verifier-android" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" + +[[package]] +name = "rustls-webpki" +version = "0.103.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e10b3f4191e8a80e6b43eebabfac91e5dcecebb27a71f04e820c47ec41d314bf" +dependencies = [ + "aws-lc-rs", + "ring", + "rustls-pki-types", + "untrusted", +] + +[[package]] +name = "rustversion" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" + +[[package]] +name = "ryu" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "schannel" +version = "0.1.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "891d81b926048e76efe18581bf793546b4c0eaf8448d72be8de2bbee5fd166e1" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "schemars" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fbf2ae1b8bc8e02df939598064d22402220cd5bbcca1c76f7d6a310974d5615" +dependencies = [ + "dyn-clone", + "indexmap 1.9.3", + "schemars_derive", + "serde", + "serde_json", + "url", + "uuid", +] + +[[package]] +name = "schemars" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd191f9397d57d581cddd31014772520aa448f65ef991055d7f61582c65165f" +dependencies = [ + "dyn-clone", + "ref-cast", + "serde", + "serde_json", +] + +[[package]] +name = "schemars" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82d20c4491bc164fa2f6c5d44565947a52ad80b9505d8e36f8d54c27c739fcd0" +dependencies = [ + "dyn-clone", + "ref-cast", + "serde", + "serde_json", +] + +[[package]] +name = "schemars_derive" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32e265784ad618884abaea0600a9adf15393368d840e0222d101a072f3f7534d" +dependencies = [ + "proc-macro2", + "quote", + "serde_derive_internals", + "syn 2.0.106", +] + +[[package]] +name = "scoped-tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "security-framework" +version = "3.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3297343eaf830f66ede390ea39da1d462b6b0c1b000f420d0a83f898bbbe6ef" +dependencies = [ + "bitflags 2.9.4", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc1f0cbffaac4852523ce30d8bd3c5cdc873501d96ff467ca09b6767bb8cd5c0" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "selectors" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c37578180969d00692904465fb7f6b3d50b9a2b952b87c23d0e2e5cb5013416" +dependencies = [ + "bitflags 1.3.2", + "cssparser", + "derive_more 0.99.20", + "fxhash", + "log", + "phf 0.8.0", + "phf_codegen 0.8.0", + "precomputed-hash", + "servo_arc", + "smallvec", +] + +[[package]] +name = "semver" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" +dependencies = [ + "serde", + "serde_core", +] + +[[package]] +name = "serde" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde-untagged" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9faf48a4a2d2693be24c6289dbe26552776eb7737074e6722891fadbe6c5058" +dependencies = [ + "erased-serde", + "serde", + "serde_core", + "typeid", +] + +[[package]] +name = "serde-wasm-bindgen" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8302e169f0eddcc139c70f139d19d6467353af16f9fce27e8c30158036a1e16b" +dependencies = [ + "js-sys", + "serde", + "wasm-bindgen", +] + +[[package]] +name = "serde_bytes" +version = "0.11.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5d440709e79d88e51ac01c4b72fc6cb7314017bb7da9eeff678aa94c10e3ea8" +dependencies = [ + "serde", + "serde_core", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "serde_derive_internals" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "serde_json" +version = "1.0.145" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" +dependencies = [ + "itoa", + "memchr", + "ryu", + "serde", + "serde_core", +] + +[[package]] +name = "serde_repr" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "serde_spanned" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_spanned" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5417783452c2be558477e104686f7de5dae53dba813c28435e0e70f82d9b04ee" +dependencies = [ + "serde_core", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_with" +version = "3.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6093cd8c01b25262b84927e0f7151692158fab02d961e04c979d3903eba7ecc5" +dependencies = [ + "base64 0.22.1", + "chrono", + "hex", + "indexmap 1.9.3", + "indexmap 2.11.4", + "schemars 0.9.0", + "schemars 1.0.4", + "serde_core", + "serde_json", + "serde_with_macros", + "time", +] + +[[package]] +name = "serde_with_macros" +version = "3.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7e6c180db0816026a61afa1cff5344fb7ebded7e4d3062772179f2501481c27" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "serialize-to-javascript" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04f3666a07a197cdb77cdf306c32be9b7f598d7060d50cfd4d5aa04bfd92f6c5" +dependencies = [ + "serde", + "serde_json", + "serialize-to-javascript-impl", +] + +[[package]] +name = "serialize-to-javascript-impl" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "772ee033c0916d670af7860b6e1ef7d658a4629a6d0b4c8c3e67f09b3765b75d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "servo_arc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52aa42f8fdf0fed91e5ce7f23d8138441002fa31dca008acf47e6fd4721f741" +dependencies = [ + "nodrop", + "stable_deref_trait", +] + +[[package]] +name = "sha-1" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5058ada175748e33390e40e872bd0fe59a19f265d0158daa551c5a88a76009c" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "signal-hook-registry" +version = "1.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2a4719bff48cee6b39d12c020eeb490953ad2443b7055bd0b21fca26bd8c28b" +dependencies = [ + "libc", +] + +[[package]] +name = "simd-adler32" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" + +[[package]] +name = "simd_helpers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95890f873bec569a0362c235787f3aca6e1e887302ba4840839bcc6459c42da6" +dependencies = [ + "quote", +] + +[[package]] +name = "siphasher" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" + +[[package]] +name = "siphasher" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" + +[[package]] +name = "slab" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" + +[[package]] +name = "slotmap" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbff4acf519f630b3a3ddcfaea6c06b42174d9a44bc70c620e9ed1649d58b82a" +dependencies = [ + "version_check", +] + +[[package]] +name = "smallvec" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" + +[[package]] +name = "smol_str" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd538fb6910ac1099850255cf94a94df6551fbdd602454387d0adb2d1ca6dead" +dependencies = [ + "serde", +] + +[[package]] +name = "socket2" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + +[[package]] +name = "softbuffer" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18051cdd562e792cad055119e0cdb2cfc137e44e3987532e0f9659a77931bb08" +dependencies = [ + "bytemuck", + "cfg_aliases", + "core-graphics", + "foreign-types", + "js-sys", + "log", + "objc2 0.5.2", + "objc2-foundation 0.2.2", + "objc2-quartz-core 0.2.2", + "raw-window-handle", + "redox_syscall", + "wasm-bindgen", + "web-sys", + "windows-sys 0.59.0", +] + +[[package]] +name = "soup3" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "471f924a40f31251afc77450e781cb26d55c0b650842efafc9c6cbd2f7cc4f9f" +dependencies = [ + "futures-channel", + "gio", + "glib", + "libc", + "soup3-sys", +] + +[[package]] +name = "soup3-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ebe8950a680a12f24f15ebe1bf70db7af98ad242d9db43596ad3108aab86c27" +dependencies = [ + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +dependencies = [ + "lock_api", +] + +[[package]] +name = "spin" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5fe4ccb98d9c292d56fec89a5e07da7fc4cf0dc11e156b41793132775d3e591" +dependencies = [ + "portable-atomic", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "string_cache" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf776ba3fa74f83bf4b63c3dcbbf82173db2632ed8452cb2d891d33f459de70f" +dependencies = [ + "new_debug_unreachable", + "parking_lot", + "phf_shared 0.11.3", + "precomputed-hash", + "serde", +] + +[[package]] +name = "string_cache_codegen" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c711928715f1fe0fe509c53b43e993a9a557babc2d0a3567d0a3006f1ac931a0" +dependencies = [ + "phf_generator 0.11.3", + "phf_shared 0.11.3", + "proc-macro2", + "quote", +] + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "swift-rs" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4057c98e2e852d51fdcfca832aac7b571f6b351ad159f9eda5db1655f8d0c4d7" +dependencies = [ + "base64 0.21.7", + "serde", + "serde_json", +] + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] + +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "sysinfo" +version = "0.29.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd727fc423c2060f6c92d9534cef765c65a6ed3f428a03d7def74a8c4348e666" +dependencies = [ + "cfg-if", + "core-foundation-sys", + "libc", + "ntapi", + "once_cell", + "rayon", + "winapi", +] + +[[package]] +name = "system-deps" +version = "6.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349" +dependencies = [ + "cfg-expr", + "heck 0.5.0", + "pkg-config", + "toml 0.8.23", + "version-compare", +] + +[[package]] +name = "tao" +version = "0.34.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "959469667dbcea91e5485fc48ba7dd6023face91bb0f1a14681a70f99847c3f7" +dependencies = [ + "bitflags 2.9.4", + "block2 0.6.2", + "core-foundation", + "core-graphics", + "crossbeam-channel", + "dispatch", + "dlopen2", + "dpi", + "gdkwayland-sys", + "gdkx11-sys", + "gtk", + "jni", + "lazy_static", + "libc", + "log", + "ndk", + "ndk-context", + "ndk-sys", + "objc2 0.6.3", + "objc2-app-kit", + "objc2-foundation 0.3.2", + "once_cell", + "parking_lot", + "raw-window-handle", + "scopeguard", + "tao-macros", + "unicode-segmentation", + "url", + "windows 0.61.3", + "windows-core 0.61.2", + "windows-version", + "x11-dl", +] + +[[package]] +name = "tao-macros" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4e16beb8b2ac17db28eab8bca40e62dbfbb34c0fcdc6d9826b11b7b5d047dfd" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "target-lexicon" +version = "0.12.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" + +[[package]] +name = "tauri" +version = "2.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4d1d3b3dc4c101ac989fd7db77e045cc6d91a25349cd410455cb5c57d510c1c" +dependencies = [ + "anyhow", + "bytes", + "cookie", + "dirs", + "dunce", + "embed_plist", + "getrandom 0.3.3", + "glob", + "gtk", + "heck 0.5.0", + "http", + "jni", + "libc", + "log", + "mime", + "muda", + "objc2 0.6.3", + "objc2-app-kit", + "objc2-foundation 0.3.2", + "objc2-ui-kit", + "objc2-web-kit", + "percent-encoding", + "plist", + "raw-window-handle", + "reqwest", + "serde", + "serde_json", + "serde_repr", + "serialize-to-javascript", + "swift-rs", + "tauri-build", + "tauri-macros", + "tauri-runtime", + "tauri-runtime-wry", + "tauri-utils", + "thiserror 2.0.17", + "tokio", + "tray-icon", + "url", + "urlpattern", + "webkit2gtk", + "webview2-com", + "window-vibrancy", + "windows 0.61.3", +] + +[[package]] +name = "tauri-build" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c432ccc9ff661803dab74c6cd78de11026a578a9307610bbc39d3c55be7943f" +dependencies = [ + "anyhow", + "cargo_toml", + "dirs", + "glob", + "heck 0.5.0", + "json-patch", + "schemars 0.8.22", + "semver", + "serde", + "serde_json", + "tauri-utils", + "tauri-winres", + "toml 0.9.7", + "walkdir", +] + +[[package]] +name = "tauri-codegen" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ab3a62cf2e6253936a8b267c2e95839674e7439f104fa96ad0025e149d54d8a" +dependencies = [ + "base64 0.22.1", + "brotli", + "ico", + "json-patch", + "plist", + "png 0.17.16", + "proc-macro2", + "quote", + "semver", + "serde", + "serde_json", + "sha2", + "syn 2.0.106", + "tauri-utils", + "thiserror 2.0.17", + "time", + "url", + "uuid", + "walkdir", +] + +[[package]] +name = "tauri-macros" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4368ea8094e7045217edb690f493b55b30caf9f3e61f79b4c24b6db91f07995e" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.106", + "tauri-codegen", + "tauri-utils", +] + +[[package]] +name = "tauri-plugin" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9946a3cede302eac0c6eb6c6070ac47b1768e326092d32efbb91f21ed58d978f" +dependencies = [ + "anyhow", + "glob", + "plist", + "schemars 0.8.22", + "serde", + "serde_json", + "tauri-utils", + "toml 0.9.7", + "walkdir", +] + +[[package]] +name = "tauri-plugin-opener" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "786156aa8e89e03d271fbd3fe642207da8e65f3c961baa9e2930f332bf80a1f5" +dependencies = [ + "dunce", + "glob", + "objc2-app-kit", + "objc2-foundation 0.3.2", + "open", + "schemars 0.8.22", + "serde", + "serde_json", + "tauri", + "tauri-plugin", + "thiserror 2.0.17", + "url", + "windows 0.61.3", + "zbus", +] + +[[package]] +name = "tauri-plugin-process" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7461c622a5ea00eb9cd9f7a08dbd3bf79484499fd5c21aa2964677f64ca651ab" +dependencies = [ + "tauri", + "tauri-plugin", +] + +[[package]] +name = "tauri-runtime" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4cfc9ad45b487d3fded5a4731a567872a4812e9552e3964161b08edabf93846" +dependencies = [ + "cookie", + "dpi", + "gtk", + "http", + "jni", + "objc2 0.6.3", + "objc2-ui-kit", + "objc2-web-kit", + "raw-window-handle", + "serde", + "serde_json", + "tauri-utils", + "thiserror 2.0.17", + "url", + "webkit2gtk", + "webview2-com", + "windows 0.61.3", +] + +[[package]] +name = "tauri-runtime-wry" +version = "2.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1fe9d48bd122ff002064e88cfcd7027090d789c4302714e68fcccba0f4b7807" +dependencies = [ + "gtk", + "http", + "jni", + "log", + "objc2 0.6.3", + "objc2-app-kit", + "objc2-foundation 0.3.2", + "once_cell", + "percent-encoding", + "raw-window-handle", + "softbuffer", + "tao", + "tauri-runtime", + "tauri-utils", + "url", + "webkit2gtk", + "webview2-com", + "windows 0.61.3", + "wry", +] + +[[package]] +name = "tauri-utils" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41a3852fdf9a4f8fbeaa63dc3e9a85284dd6ef7200751f0bd66ceee30c93f212" +dependencies = [ + "anyhow", + "brotli", + "cargo_metadata", + "ctor", + "dunce", + "glob", + "html5ever", + "http", + "infer", + "json-patch", + "kuchikiki", + "log", + "memchr", + "phf 0.11.3", + "proc-macro2", + "quote", + "regex", + "schemars 0.8.22", + "semver", + "serde", + "serde-untagged", + "serde_json", + "serde_with", + "swift-rs", + "thiserror 2.0.17", + "toml 0.9.7", + "url", + "urlpattern", + "uuid", + "walkdir", +] + +[[package]] +name = "tauri-winres" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd21509dd1fa9bd355dc29894a6ff10635880732396aa38c0066c1e6c1ab8074" +dependencies = [ + "embed-resource", + "toml 0.9.7", +] + +[[package]] +name = "tempfile" +version = "3.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d31c77bdf42a745371d260a26ca7163f1e0924b64afa0b688e61b5a9fa02f16" +dependencies = [ + "fastrand", + "getrandom 0.3.3", + "once_cell", + "rustix", + "windows-sys 0.61.2", +] + +[[package]] +name = "tendril" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d24a120c5fc464a3458240ee02c299ebcb9d67b5249c8848b09d639dca8d7bb0" +dependencies = [ + "futf", + "mac", + "utf-8", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8" +dependencies = [ + "thiserror-impl 2.0.17", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "thread_local" +version = "1.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "tiff" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af9605de7fee8d9551863fd692cce7637f548dbd9db9180fcc07ccc6d26c336f" +dependencies = [ + "fax", + "flate2", + "half", + "quick-error", + "weezl", + "zune-jpeg", +] + +[[package]] +name = "time" +version = "0.3.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e7d9e3bb61134e77bde20dd4825b97c010155709965fedf0f49bb138e52a9d" +dependencies = [ + "deranged", + "itoa", + "num-conv", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40868e7c1d2f0b8d73e4a8c7f0ff63af4f6d19be117e90bd73eb1d62cf831c6b" + +[[package]] +name = "time-macros" +version = "0.2.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30cfb0125f12d9c277f35663a0a33f8c30190f4e4574868a330595412d34ebf3" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tinystr" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d4f6d1145dcb577acf783d4e601bc1d76a13337bb54e6233add580b07344c8b" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tinyvec" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa5fdc3bce6191a1dbc8c02d5c8bffcf557bafa17c124c5264a458f1b0613fa" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.47.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038" +dependencies = [ + "backtrace", + "bytes", + "io-uring", + "libc", + "mio", + "pin-project-lite", + "slab", + "socket2", + "tokio-macros", + "windows-sys 0.59.0", +] + +[[package]] +name = "tokio-macros" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "tokio-rustls" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" +dependencies = [ + "rustls", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14307c986784f72ef81c89db7d9e28d6ac26d16213b109ea501696195e6e3ce5" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "toml" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" +dependencies = [ + "serde", + "serde_spanned 0.6.9", + "toml_datetime 0.6.11", + "toml_edit 0.22.27", +] + +[[package]] +name = "toml" +version = "0.9.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00e5e5d9bf2475ac9d4f0d9edab68cc573dc2fd644b0dba36b0c30a92dd9eaa0" +dependencies = [ + "indexmap 2.11.4", + "serde_core", + "serde_spanned 1.0.2", + "toml_datetime 0.7.2", + "toml_parser", + "toml_writer", + "winnow 0.7.13", +] + +[[package]] +name = "toml_datetime" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_datetime" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32f1085dec27c2b6632b04c80b3bb1b4300d6495d1e129693bdda7d91e72eec1" +dependencies = [ + "serde_core", +] + +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap 2.11.4", + "toml_datetime 0.6.11", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.20.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" +dependencies = [ + "indexmap 2.11.4", + "toml_datetime 0.6.11", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.22.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" +dependencies = [ + "indexmap 2.11.4", + "serde", + "serde_spanned 0.6.9", + "toml_datetime 0.6.11", + "winnow 0.7.13", +] + +[[package]] +name = "toml_edit" +version = "0.23.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3effe7c0e86fdff4f69cdd2ccc1b96f933e24811c5441d44904e8683e27184b" +dependencies = [ + "indexmap 2.11.4", + "toml_datetime 0.7.2", + "toml_parser", + "winnow 0.7.13", +] + +[[package]] +name = "toml_parser" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cf893c33be71572e0e9aa6dd15e6677937abd686b066eac3f8cd3531688a627" +dependencies = [ + "winnow 0.7.13", +] + +[[package]] +name = "toml_writer" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d163a63c116ce562a22cda521fcc4d79152e7aba014456fb5eb442f6d6a10109" + +[[package]] +name = "tower" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-http" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2" +dependencies = [ + "bitflags 2.9.4", + "bytes", + "futures-util", + "http", + "http-body", + "iri-string", + "pin-project-lite", + "tower", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +dependencies = [ + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "tracing-core" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2054a14f5307d601f88daf0553e1cbf472acc4f2c51afab632431cdcd72124d5" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex-automata", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", +] + +[[package]] +name = "tracing-tracy" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eaa1852afa96e0fe9e44caa53dc0bd2d9d05e0f2611ce09f97f8677af56e4ba" +dependencies = [ + "tracing-core", + "tracing-subscriber", + "tracy-client", +] + +[[package]] +name = "tracy-client" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef54005d3d760186fd662dad4b7bb27ecd5531cdef54d1573ebd3f20a9205ed7" +dependencies = [ + "loom", + "once_cell", + "tracy-client-sys", +] + +[[package]] +name = "tracy-client-sys" +version = "0.26.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "319c70195101a93f56db4c74733e272d720768e13471f400c78406a326b172b0" +dependencies = [ + "cc", + "windows-targets 0.52.6", +] + +[[package]] +name = "tray-icon" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0d92153331e7d02ec09137538996a7786fe679c629c279e82a6be762b7e6fe2" +dependencies = [ + "crossbeam-channel", + "dirs", + "libappindicator", + "muda", + "objc2 0.6.3", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-foundation 0.3.2", + "once_cell", + "png 0.17.16", + "serde", + "thiserror 2.0.17", + "windows-sys 0.59.0", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "typeid" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c" + +[[package]] +name = "typenum" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" + +[[package]] +name = "uds_windows" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89daebc3e6fd160ac4aa9fc8b3bf71e1f74fbf92367ae71fb83a037e8bf164b9" +dependencies = [ + "memoffset", + "tempfile", + "winapi", +] + +[[package]] +name = "unic-char-property" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8c57a407d9b6fa02b4795eb81c5b6652060a15a7903ea981f3d723e6c0be221" +dependencies = [ + "unic-char-range", +] + +[[package]] +name = "unic-char-range" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0398022d5f700414f6b899e10b8348231abf9173fa93144cbc1a43b9793c1fbc" + +[[package]] +name = "unic-common" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80d7ff825a6a654ee85a63e80f92f054f904f21e7d12da4e22f9834a4aaa35bc" + +[[package]] +name = "unic-ucd-ident" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e230a37c0381caa9219d67cf063aa3a375ffed5bf541a452db16e744bdab6987" +dependencies = [ + "unic-char-property", + "unic-char-range", + "unic-ucd-version", +] + +[[package]] +name = "unic-ucd-version" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96bd2f2237fe450fcd0a1d2f5f4e91711124f7857ba2e964247776ebeeb7b0c4" +dependencies = [ + "unic-common", +] + +[[package]] +name = "unicode-ident" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f63a545481291138910575129486daeaf8ac54aee4387fe7906919f7830c7d9d" + +[[package]] +name = "unicode-segmentation" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "unty" +version = "0.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d49784317cd0d1ee7ec5c716dd598ec5b4483ea832a2dced265471cc0f690ae" + +[[package]] +name = "url" +version = "2.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08bc136a29a3d1758e07a9cca267be308aeebf5cfd5a10f3f67ab2097683ef5b" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", +] + +[[package]] +name = "urlpattern" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70acd30e3aa1450bc2eece896ce2ad0d178e9c079493819301573dae3c37ba6d" +dependencies = [ + "regex", + "serde", + "unic-ucd-ident", + "url", +] + +[[package]] +name = "utf-8" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "uuid" +version = "1.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f87b8aa10b915a06587d0dec516c282ff295b475d94abf425d62b57710070a2" +dependencies = [ + "getrandom 0.3.3", + "js-sys", + "serde", + "wasm-bindgen", +] + +[[package]] +name = "v_frame" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "666b7727c8875d6ab5db9533418d7c764233ac9c0cff1d469aec8fa127597be2" +dependencies = [ + "aligned-vec", + "num-traits", + "wasm-bindgen", +] + +[[package]] +name = "valuable" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" + +[[package]] +name = "variadics_please" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41b6d82be61465f97d42bd1d15bf20f3b0a3a0905018f38f9d6f6962055b0b5c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "version-compare" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "852e951cb7832cb45cb1169900d19760cfa39b82bc0ea9c0e5a14ae88411c98b" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "virtue" +version = "0.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "051eb1abcf10076295e815102942cc58f9d5e3b4560e46e53c21e8ff6f3af7b1" + +[[package]] +name = "vswhom" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be979b7f07507105799e854203b470ff7c78a1639e330a58f183b5fea574608b" +dependencies = [ + "libc", + "vswhom-sys", +] + +[[package]] +name = "vswhom-sys" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb067e4cbd1ff067d1df46c9194b5de0e98efd2810bbc95c5d5e5f25a3231150" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasi" +version = "0.14.7+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "883478de20367e224c0090af9cf5f9fa85bed63a95c1abf3afc5c083ebc06e8c" +dependencies = [ + "wasip2", +] + +[[package]] +name = "wasip2" +version = "1.0.1+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasite" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" + +[[package]] +name = "wasm-bindgen" +version = "0.2.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1da10c01ae9f1ae40cbfac0bac3b1e724b320abfcf52229f80b547c0d250e2d" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "671c9a5a66f49d8a47345ab942e2cb93c7d1d0339065d4f8139c486121b43b19" +dependencies = [ + "bumpalo", + "log", + "proc-macro2", + "quote", + "syn 2.0.106", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.54" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e038d41e478cc73bae0ff9b36c60cff1c98b8f38f8d7e8061e79ee63608ac5c" +dependencies = [ + "cfg-if", + "js-sys", + "once_cell", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ca60477e4c59f5f2986c50191cd972e3a50d8a95603bc9434501cf156a9a119" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f07d2f20d4da7b26400c9f4a0511e6e0345b040694e8a75bd41d578fa4421d7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bad67dc8b2a1a6e5448428adec4c3e84c43e561d8c9ee8a9e5aabeb193ec41d1" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "wasm-streams" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "wasm-tracing" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11ab253baf6d3772bbdb37a0966b67d37ab80657ccd1a084b4d7b3de3232375d" +dependencies = [ + "tracing", + "tracing-log", + "tracing-subscriber", + "wasm-bindgen", +] + +[[package]] +name = "web-streams" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15c4d5dbf19463c4b65e974303d453cc11991873c7a4a4953214f791d73303a2" +dependencies = [ + "thiserror 2.0.17", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "web-sys" +version = "0.3.81" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9367c417a924a74cae129e6a2ae3b47fabb1f8995595ab474029da749a8be120" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-transport" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03efb036f13785e3cbb9285e9fb94872a0887a9f4e7efeb02647cc12f5e55eea" +dependencies = [ + "bytes", + "thiserror 2.0.17", + "url", + "web-transport-quinn", + "web-transport-wasm", +] + +[[package]] +name = "web-transport-proto" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb650c577c46254d16041c7fe0dc9901d9a42df3f46e77e9d05d1b3c17294b19" +dependencies = [ + "bytes", + "http", + "thiserror 2.0.17", + "url", +] + +[[package]] +name = "web-transport-quinn" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccba8a1ab2aae70119c9ada57e4a2324ebe1820a18814ca47a818f01dcd00f46" +dependencies = [ + "bytes", + "futures", + "http", + "log", + "quinn", + "rustls", + "rustls-native-certs", + "thiserror 2.0.17", + "tokio", + "url", + "web-transport-proto", + "web-transport-trait", +] + +[[package]] +name = "web-transport-trait" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4850148841799c83f033f4dddccb219f1f097aff6db1bda5b0d3be69fefb32bd" +dependencies = [ + "bytes", +] + +[[package]] +name = "web-transport-wasm" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44b2af1bed400caa442d75217bb7ece5e1ec853daf60affd5d2448c0a2063662" +dependencies = [ + "bytes", + "js-sys", + "thiserror 2.0.17", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-streams", + "web-sys", +] + +[[package]] +name = "webkit2gtk" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76b1bc1e54c581da1e9f179d0b38512ba358fb1af2d634a1affe42e37172361a" +dependencies = [ + "bitflags 1.3.2", + "cairo-rs", + "gdk", + "gdk-sys", + "gio", + "gio-sys", + "glib", + "glib-sys", + "gobject-sys", + "gtk", + "gtk-sys", + "javascriptcore-rs", + "libc", + "once_cell", + "soup3", + "webkit2gtk-sys", +] + +[[package]] +name = "webkit2gtk-sys" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62daa38afc514d1f8f12b8693d30d5993ff77ced33ce30cd04deebc267a6d57c" +dependencies = [ + "bitflags 1.3.2", + "cairo-sys-rs", + "gdk-sys", + "gio-sys", + "glib-sys", + "gobject-sys", + "gtk-sys", + "javascriptcore-rs-sys", + "libc", + "pkg-config", + "soup3-sys", + "system-deps", +] + +[[package]] +name = "webpki-root-certs" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05d651ec480de84b762e7be71e6efa7461699c19d9e2c272c8d93455f567786e" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "webpki-roots" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e8983c3ab33d6fb807cfcdad2491c4ea8cbc8ed839181c7dfd9c67c83e261b2" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "webview2-com" +version = "0.38.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4ba622a989277ef3886dd5afb3e280e3dd6d974b766118950a08f8f678ad6a4" +dependencies = [ + "webview2-com-macros", + "webview2-com-sys", + "windows 0.61.3", + "windows-core 0.61.2", + "windows-implement 0.60.2", + "windows-interface 0.59.3", +] + +[[package]] +name = "webview2-com-macros" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d228f15bba3b9d56dde8bddbee66fa24545bd17b48d5128ccf4a8742b18e431" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "webview2-com-sys" +version = "0.38.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36695906a1b53a3bf5c4289621efedac12b73eeb0b89e7e1a89b517302d5d75c" +dependencies = [ + "thiserror 2.0.17", + "windows 0.61.3", + "windows-core 0.61.2", +] + +[[package]] +name = "weezl" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a751b3277700db47d3e574514de2eced5e54dc8a5436a3bf7a0b248b2cee16f3" + +[[package]] +name = "wgpu-types" +version = "26.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eca7a8d8af57c18f57d393601a1fb159ace8b2328f1b6b5f80893f7d672c9ae2" +dependencies = [ + "bitflags 2.9.4", + "bytemuck", + "js-sys", + "log", + "serde", + "thiserror 2.0.17", + "web-sys", +] + +[[package]] +name = "whoami" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d4a4db5077702ca3015d3d02d74974948aba2ad9e12ab7df718ee64ccd7e97d" +dependencies = [ + "libredox", + "wasite", + "web-sys", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "window-vibrancy" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9bec5a31f3f9362f2258fd0e9c9dd61a9ca432e7306cc78c444258f0dce9a9c" +dependencies = [ + "objc2 0.6.3", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation 0.3.2", + "raw-window-handle", + "windows-sys 0.59.0", + "windows-version", +] + +[[package]] +name = "windows" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +dependencies = [ + "windows-implement 0.48.0", + "windows-interface 0.48.0", + "windows-targets 0.48.5", +] + +[[package]] +name = "windows" +version = "0.61.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893" +dependencies = [ + "windows-collections", + "windows-core 0.61.2", + "windows-future", + "windows-link 0.1.3", + "windows-numerics", +] + +[[package]] +name = "windows-collections" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8" +dependencies = [ + "windows-core 0.61.2", +] + +[[package]] +name = "windows-core" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" +dependencies = [ + "windows-implement 0.60.2", + "windows-interface 0.59.3", + "windows-link 0.1.3", + "windows-result 0.3.4", + "windows-strings 0.4.2", +] + +[[package]] +name = "windows-core" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" +dependencies = [ + "windows-implement 0.60.2", + "windows-interface 0.59.3", + "windows-link 0.2.1", + "windows-result 0.4.1", + "windows-strings 0.5.1", +] + +[[package]] +name = "windows-future" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e" +dependencies = [ + "windows-core 0.61.2", + "windows-link 0.1.3", + "windows-threading", +] + +[[package]] +name = "windows-implement" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e2ee588991b9e7e6c8338edf3333fbe4da35dc72092643958ebb43f0ab2c49c" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "windows-implement" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "windows-interface" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6fb8df20c9bcaa8ad6ab513f7b40104840c8867d5751126e4df3b08388d0cc7" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "windows-interface" +version = "0.59.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "windows-link" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-numerics" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1" +dependencies = [ + "windows-core 0.61.2", + "windows-link 0.1.3", +] + +[[package]] +name = "windows-result" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" +dependencies = [ + "windows-link 0.1.3", +] + +[[package]] +name = "windows-result" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" +dependencies = [ + "windows-link 0.2.1", +] + +[[package]] +name = "windows-strings" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" +dependencies = [ + "windows-link 0.1.3", +] + +[[package]] +name = "windows-strings" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" +dependencies = [ + "windows-link 0.2.1", +] + +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.5", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link 0.2.1", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.53.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" +dependencies = [ + "windows-link 0.2.1", + "windows_aarch64_gnullvm 0.53.1", + "windows_aarch64_msvc 0.53.1", + "windows_i686_gnu 0.53.1", + "windows_i686_gnullvm 0.53.1", + "windows_i686_msvc 0.53.1", + "windows_x86_64_gnu 0.53.1", + "windows_x86_64_gnullvm 0.53.1", + "windows_x86_64_msvc 0.53.1", +] + +[[package]] +name = "windows-threading" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b66463ad2e0ea3bbf808b7f1d371311c80e115c0b71d60efc142cafbcfb057a6" +dependencies = [ + "windows-link 0.1.3", +] + +[[package]] +name = "windows-version" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4060a1da109b9d0326b7262c8e12c84df67cc0dbc9e33cf49e01ccc2eb63631" +dependencies = [ + "windows-link 0.2.1", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" + +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_i686_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" + +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] + +[[package]] +name = "winnow" +version = "0.7.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf" +dependencies = [ + "memchr", +] + +[[package]] +name = "winreg" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a1a57ff50e9b408431e8f97d5456f2807f8eb2a2cd79b06068fc87f8ecf189" +dependencies = [ + "cfg-if", + "winapi", +] + +[[package]] +name = "winreg" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "winreg" +version = "0.55.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb5a765337c50e9ec252c2069be9bf91c7df47afb103b642ba3a53bf8101be97" +dependencies = [ + "cfg-if", + "windows-sys 0.59.0", +] + +[[package]] +name = "wit-bindgen" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" + +[[package]] +name = "wmi" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daffb44abb7d2e87a1233aa17fdbde0d55b890b32a23a1f908895b87fa6f1a00" +dependencies = [ + "chrono", + "futures", + "log", + "serde", + "thiserror 1.0.69", + "windows 0.48.0", +] + +[[package]] +name = "writeable" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb" + +[[package]] +name = "wry" +version = "0.53.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d78ec082b80fa088569a970d043bb3050abaabf4454101d44514ee8d9a8c9f6" +dependencies = [ + "base64 0.22.1", + "block2 0.6.2", + "cookie", + "crossbeam-channel", + "dirs", + "dpi", + "dunce", + "gdkx11", + "gtk", + "html5ever", + "http", + "javascriptcore-rs", + "jni", + "kuchikiki", + "libc", + "ndk", + "objc2 0.6.3", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation 0.3.2", + "objc2-ui-kit", + "objc2-web-kit", + "once_cell", + "percent-encoding", + "raw-window-handle", + "sha2", + "soup3", + "tao-macros", + "thiserror 2.0.17", + "url", + "webkit2gtk", + "webkit2gtk-sys", + "webview2-com", + "windows 0.61.3", + "windows-core 0.61.2", + "windows-version", + "x11-dl", +] + +[[package]] +name = "x11" +version = "2.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "502da5464ccd04011667b11c435cb992822c2c0dbde1770c988480d312a0db2e" +dependencies = [ + "libc", + "pkg-config", +] + +[[package]] +name = "x11-dl" +version = "2.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f" +dependencies = [ + "libc", + "once_cell", + "pkg-config", +] + +[[package]] +name = "yoke" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f41bb01b8226ef4bfd589436a297c53d118f65921786300e427be8d487695cc" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", + "synstructure", +] + +[[package]] +name = "zbus" +version = "5.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d07e46d035fb8e375b2ce63ba4e4ff90a7f73cf2ffb0138b29e1158d2eaadf7" +dependencies = [ + "async-broadcast", + "async-executor", + "async-io", + "async-lock", + "async-process", + "async-recursion", + "async-task", + "async-trait", + "blocking", + "enumflags2", + "event-listener", + "futures-core", + "futures-lite", + "hex", + "nix", + "ordered-stream", + "serde", + "serde_repr", + "tracing", + "uds_windows", + "windows-sys 0.60.2", + "winnow 0.7.13", + "zbus_macros", + "zbus_names", + "zvariant", +] + +[[package]] +name = "zbus_macros" +version = "5.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57e797a9c847ed3ccc5b6254e8bcce056494b375b511b3d6edcec0aeb4defaca" +dependencies = [ + "proc-macro-crate 3.4.0", + "proc-macro2", + "quote", + "syn 2.0.106", + "zbus_names", + "zvariant", + "zvariant_utils", +] + +[[package]] +name = "zbus_names" +version = "4.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7be68e64bf6ce8db94f63e72f0c7eb9a60d733f7e0499e628dfab0f84d6bcb97" +dependencies = [ + "serde", + "static_assertions", + "winnow 0.7.13", + "zvariant", +] + +[[package]] +name = "zerocopy" +version = "0.8.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0894878a5fa3edfd6da3f88c4805f4c8558e2b996227a3d864f47fe11e38282c" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88d2b8d9c68ad2b9e4340d7832716a4d21a22a1154777ad56ea55c51a9cf3831" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "zerofrom" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" + +[[package]] +name = "zerotrie" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36f0bbd478583f79edad978b407914f61b2972f5af6fa089686016be8f9af595" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7aa2bd55086f1ab526693ecbe444205da57e25f4489879da80635a46d90e73b" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "zune-core" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f423a2c17029964870cfaabb1f13dfab7d092a62a29a89264f4d36990ca414a" + +[[package]] +name = "zune-inflate" +version = "0.2.54" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ab332fe2f6680068f3582b16a24f90ad7096d5d39b974d1c0aff0125116f02" +dependencies = [ + "simd-adler32", +] + +[[package]] +name = "zune-jpeg" +version = "0.4.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29ce2c8a9384ad323cf564b67da86e21d3cfdff87908bc1223ed5c99bc792713" +dependencies = [ + "zune-core", +] + +[[package]] +name = "zvariant" +version = "5.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "999dd3be73c52b1fccd109a4a81e4fcd20fab1d3599c8121b38d04e1419498db" +dependencies = [ + "endi", + "enumflags2", + "serde", + "winnow 0.7.13", + "zvariant_derive", + "zvariant_utils", +] + +[[package]] +name = "zvariant_derive" +version = "5.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6643fd0b26a46d226bd90d3f07c1b5321fe9bb7f04673cb37ac6d6883885b68e" +dependencies = [ + "proc-macro-crate 3.4.0", + "proc-macro2", + "quote", + "syn 2.0.106", + "zvariant_utils", +] + +[[package]] +name = "zvariant_utils" +version = "3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6949d142f89f6916deca2232cf26a8afacf2b9fdc35ce766105e104478be599" +dependencies = [ + "proc-macro2", + "quote", + "serde", + "syn 2.0.106", + "winnow 0.7.13", +] diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..336f103 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,47 @@ +[workspace] +members = [ + "crates/borders-core", + "crates/borders-desktop", + "crates/borders-wasm", + "crates/borders-server", +] +resolver = "2" + +[workspace.package] +authors = ["Xevion"] +edition = "2024" +version = "0.5.4" + +# Enable a small amount of optimization in the dev profile. +[profile.dev] +opt-level = 1 + +# Enable a large amount of optimization in the dev profile for dependencies. +[profile.dev.package."*"] +opt-level = 3 + +# Enable more optimization in the release profile at the cost of compile time. +[profile.release] +# Compile the entire crate as one unit. +# Slows compile times, marginal improvements. +codegen-units = 1 +# Do a second optimization pass over the entire program, including dependencies. +# Slows compile times, marginal improvements. +lto = "thin" + +# Development profile for WASM builds (faster compile times) +[profile.wasm-dev] +inherits = "dev" +opt-level = 1 +panic = "abort" + +# Size optimization profile for WASM builds +[profile.wasm-release] +inherits = "release" +incremental = false +debug = false +opt-level = "s" # Optimize for size +lto = true # Link-time optimization +codegen-units = 1 # Single codegen unit for better optimization +panic = "abort" # Smaller panic implementation +strip = true # Remove debug symbols diff --git a/Justfile b/Justfile new file mode 100644 index 0000000..8506fc5 --- /dev/null +++ b/Justfile @@ -0,0 +1,74 @@ +set shell := ["powershell"] + +default: + just --list + +check: + @echo "Running clippy (native)..." + @cargo clippy --all-targets --all-features --workspace -- -D warnings + @echo "Running cargo check (native)..." + @cargo check --all-targets --all-features --workspace + @echo "Running clippy (wasm32-unknown-unknown)..." + @cargo clippy --target wasm32-unknown-unknown --all-features -p borders-wasm -- -D warnings + @echo "Running cargo check (wasm32-unknown-unknown)..." + @cargo check --target wasm32-unknown-unknown --all-features -p borders-wasm + @echo "Running cargo machete..." + @cargo machete --with-metadata + @echo "All checks passed" + +check-ts: + @just _wasm-build wasm-dev + @echo "Running frontend checks..." + @pnpm run -C frontend check + +fix: + @echo "Running cargo fix..." + cargo fix --all-targets --all-features --workspace --allow-dirty + +wasm-dev: wasm-dev-build + pnpm -C frontend dev:browser --port 1421 + +# Build WASM with the specified profile (wasm-dev or wasm-release) +_wasm-build profile: + @$profile = "{{ profile }}"; \ + $wasmFile = "target/wasm32-unknown-unknown/$profile/borders_wasm.wasm"; \ + $pkgJs = "pkg/borders.js"; \ + $pkgWasm = "pkg/borders_bg.wasm"; \ + $frontendPkgJs = "frontend/pkg/borders.js"; \ + $frontendPkgWasm = "frontend/pkg/borders_bg.wasm"; \ + $beforeTime = if (Test-Path $wasmFile) { (Get-Item $wasmFile).LastWriteTime } else { $null }; \ + cargo build -p borders-wasm --profile $profile --target wasm32-unknown-unknown; \ + if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }; \ + $afterTime = if (Test-Path $wasmFile) { (Get-Item $wasmFile).LastWriteTime } else { $null }; \ + $wasRebuilt = ($beforeTime -eq $null) -or ($afterTime -ne $beforeTime); \ + $pkgExists = (Test-Path $pkgJs) -and (Test-Path $pkgWasm); \ + $frontendPkgExists = (Test-Path $frontendPkgJs) -and (Test-Path $frontendPkgWasm); \ + $isRelease = $profile -eq "wasm-release"; \ + if ($wasRebuilt -or -not $pkgExists -or ($isRelease -and -not $frontendPkgExists)) { \ + Write-Host "Running wasm-bindgen..."; \ + wasm-bindgen --out-dir pkg --out-name borders --target web $wasmFile; \ + if ($isRelease) { \ + Write-Host "Running wasm-opt..."; \ + wasm-opt -Oz --enable-bulk-memory --enable-threads --all-features pkg/borders_bg.wasm -o pkg/borders_bg.wasm; \ + }; \ + } else { \ + Write-Host "WASM not rebuilt, skipping wasm-bindgen"; \ + } \ + New-Item -ItemType Directory -Force -Path 'frontend/pkg' | Out-Null; \ + Copy-Item -Recurse -Force 'pkg/*' 'frontend/pkg/'; \ + if ($isRelease) { \ + Write-Host "Running frontend build..."; \ + pnpm -C frontend build:browser; \ + }; \ + +# Development WASM build, unoptimized +wasm-dev-build: + @just _wasm-build wasm-dev + +# Release WASM build, optimized +wasm-release-build: + @just _wasm-build wasm-release + +wasm-release: wasm-release-build + @echo "Visit http://localhost:8080 to play" + caddy file-server --listen :8080 --root frontend/dist/browser --browse \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..f948eca --- /dev/null +++ b/LICENSE @@ -0,0 +1,13 @@ +Copyright © 2025 Ryan Walters. All Rights Reserved. + +This software and associated documentation files (the "Software") are proprietary +and confidential. Unauthorized copying, modification, distribution, or use of this +Software, via any medium, is strictly prohibited without the express written +permission of the copyright holder. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/crates/borders-core/Cargo.toml b/crates/borders-core/Cargo.toml new file mode 100644 index 0000000..99aa868 --- /dev/null +++ b/crates/borders-core/Cargo.toml @@ -0,0 +1,82 @@ +[package] +name = "borders-core" +version.workspace = true +edition.workspace = true +authors.workspace = true + +[package.metadata.cargo-machete] +ignored = ["serde_bytes"] + +[features] +default = ["ui"] +ui = [] + +[dependencies] +anyhow = "1.0" +async-trait = "0.1" +bevy_ecs = { version = "0.17", default-features = false, features = ["std"] } +bincode = { version = "2.0.1", features = ["serde"] } +flume = "0.11" +futures-lite = "2.6.1" +glam = "0.30" +hex = "0.4" +hmac = "0.12" +image = "0.25" +once_cell = "1.20" +rand = "0.9" +serde = { version = "1.0", features = ["derive", "rc"] } +serde_bytes = "0.11" +serde_json = "1.0" +sha2 = "0.10" +tracing = "0.1" +url = "2.5.0" +web-transport = "0.9" + +# Target-specific dependencies to keep WASM builds compatible +[target.'cfg(not(target_arch = "wasm32"))'.dependencies] +tokio = { version = "1", features = [ + "rt-multi-thread", + "macros", + "time", + "io-util", + "sync", +] } +reqwest = { version = "0.12", default-features = false, features = [ + "json", + "rustls-tls", +] } +uuid = { version = "1.11", features = ["v4", "serde"] } +machineid-rs = "1.2" +directories = "5.0" +rustls-pemfile = "2.2.0" +ring = "0.17.14" +pem = "3.0.5" + +[target.'cfg(windows)'.dependencies] +winreg = "0.52" + +[target.'cfg(target_arch = "wasm32")'.dependencies] +tokio = { version = "1", features = ["rt", "macros", "time", "io-util"] } +reqwest = { version = "0.12", default-features = false, features = ["json"] } +uuid = { version = "1.11", features = ["v4", "serde", "js"] } +js-sys = "0.3" +wasm-bindgen = "0.2" +wasm-bindgen-futures = "0.4" +gloo-timers = { version = "0.3", features = ["futures"] } +web-sys = { version = "0.3", features = [ + "Window", + "Storage", + "DedicatedWorkerGlobalScope", + "DomStringList", + "Event", + "EventTarget", + "IdbDatabase", + "IdbFactory", + "IdbObjectStore", + "IdbOpenDbRequest", + "IdbRequest", + "IdbTransaction", + "IdbTransactionMode", + "IdbVersionChangeEvent", +] } +web-time = "1.1" diff --git a/crates/borders-core/assets/maps/World.json b/crates/borders-core/assets/maps/World.json new file mode 100644 index 0000000..d4ff1ee --- /dev/null +++ b/crates/borders-core/assets/maps/World.json @@ -0,0 +1,76 @@ +{ + "tiles": [ + { + "color": "#000000", + "name": "Water", + "colorBase": "water", + "colorVariant": 4, + "conquerable": false, + "navigable": true + }, + { + "color": "#222222", + "name": "Water", + "colorBase": "water", + "colorVariant": 6, + "conquerable": false, + "navigable": true + }, + { + "color": "#555555", + "name": "Water", + "colorBase": "water", + "colorVariant": 12, + "conquerable": false, + "navigable": true + }, + { + "color": "#777777", + "name": "Water", + "colorBase": "water", + "colorVariant": 14, + "conquerable": false, + "navigable": true + }, + { + "color": "#999999", + "name": "Land", + "colorBase": "mountain", + "colorVariant": 5, + "conquerable": true, + "navigable": false, + "expansionCost": 80, + "expansionTime": 80 + }, + { + "color": "#BBBBBB", + "name": "Land", + "colorBase": "mountain", + "colorVariant": 9, + "conquerable": true, + "navigable": false, + "expansionCost": 70, + "expansionTime": 70 + }, + { + "color": "#DDDDDD", + "name": "Land", + "colorBase": "grass", + "colorVariant": 9, + "conquerable": true, + "navigable": false, + "expansionCost": 60, + "expansionTime": 60 + }, + { + "color": "#FFFFFF", + "name": "Land", + "colorBase": "grass", + "colorVariant": 6, + "conquerable": true, + "navigable": false, + "expansionCost": 50, + "expansionTime": 50 + } + ] +} diff --git a/crates/borders-core/assets/maps/World.png b/crates/borders-core/assets/maps/World.png new file mode 100644 index 0000000..cbaa74c Binary files /dev/null and b/crates/borders-core/assets/maps/World.png differ diff --git a/crates/borders-core/src/app.rs b/crates/borders-core/src/app.rs new file mode 100644 index 0000000..64e50a4 --- /dev/null +++ b/crates/borders-core/src/app.rs @@ -0,0 +1,140 @@ +//! Minimal ECS app wrapper to replace Bevy's App + +use bevy_ecs::message::{Message, Messages}; +use bevy_ecs::prelude::*; +use bevy_ecs::schedule::{IntoScheduleConfigs, ScheduleLabel, Schedules}; +use bevy_ecs::system::ScheduleSystem; +use std::fmt::Debug; + +#[derive(Debug, Hash, PartialEq, Eq, Clone, ScheduleLabel)] +pub struct Startup; + +#[derive(Debug, Hash, PartialEq, Eq, Clone, ScheduleLabel)] +pub struct Update; + +#[derive(Debug, Hash, PartialEq, Eq, Clone, ScheduleLabel)] +pub struct Last; + +#[derive(Debug, Hash, PartialEq, Eq, Clone, ScheduleLabel)] +pub struct Fixed; + +pub struct App { + world: World, +} + +impl App { + pub fn new() -> Self { + let mut world = World::new(); + + // Initialize schedules + let mut schedules = Schedules::new(); + schedules.insert(Schedule::new(Startup)); + schedules.insert(Schedule::new(Update)); + schedules.insert(Schedule::new(Last)); + schedules.insert(Schedule::new(Fixed)); + + world.insert_resource(schedules); + + Self { world } + } + + pub fn world(&self) -> &World { + &self.world + } + + pub fn world_mut(&mut self) -> &mut World { + &mut self.world + } + + pub fn insert_resource(&mut self, resource: R) -> &mut Self { + self.world.insert_resource(resource); + self + } + + pub fn init_resource(&mut self) -> &mut Self { + self.world.init_resource::(); + self + } + + pub fn insert_non_send_resource(&mut self, resource: R) -> &mut Self { + self.world.insert_non_send_resource(resource); + self + } + + pub fn add_message(&mut self) -> &mut Self { + if !self.world.contains_resource::>() { + self.world.init_resource::>(); + + // Add system to update this message type each frame + self.add_systems(Last, |mut messages: ResMut>| { + messages.update(); + }); + } + self + } + + pub fn add_systems(&mut self, schedule: impl ScheduleLabel, systems: impl IntoScheduleConfigs) -> &mut Self { + let mut schedules = self.world.resource_mut::(); + if let Some(schedule_inst) = schedules.get_mut(schedule) { + schedule_inst.add_systems(systems); + } + self + } + + pub fn update(&mut self) { + // Remove schedules temporarily to avoid resource_scope conflicts + let mut schedules = self.world.remove_resource::().unwrap(); + + // Run Update schedule + if let Some(schedule) = schedules.get_mut(Update) { + schedule.run(&mut self.world); + } + + // Run Last schedule (includes event updates) + if let Some(schedule) = schedules.get_mut(Last) { + schedule.run(&mut self.world); + } + + // Re-insert schedules + self.world.insert_resource(schedules); + } + + pub fn run_startup(&mut self) { + // Remove schedules temporarily to avoid resource_scope conflicts + let mut schedules = self.world.remove_resource::().unwrap(); + + // Run Startup schedule + if let Some(schedule) = schedules.get_mut(Startup) { + schedule.run(&mut self.world); + } + + // Re-insert schedules + self.world.insert_resource(schedules); + } + + pub fn finish(&mut self) { + // Finalize schedules + let mut schedules = self.world.remove_resource::().unwrap(); + + for (_, schedule) in schedules.iter_mut() { + schedule.graph_mut().initialize(&mut self.world); + } + + self.world.insert_resource(schedules); + } + + pub fn cleanup(&mut self) { + // Any cleanup needed before running + } +} + +impl Default for App { + fn default() -> Self { + Self::new() + } +} + +/// Plugin trait for modular setup +pub trait Plugin { + fn build(&self, app: &mut App); +} diff --git a/crates/borders-core/src/constants.rs b/crates/borders-core/src/constants.rs new file mode 100644 index 0000000..0cba1b0 --- /dev/null +++ b/crates/borders-core/src/constants.rs @@ -0,0 +1,8 @@ +/// Game tick interval in milliseconds (10 TPS = 100ms per turn) +pub const TICK_INTERVAL: u64 = 100; + +/// Income is processed every 10 ticks (1 second at 10 TPS) +pub const INCOME_TICK_INTERVAL: u64 = 10; + +/// Number of bot players +pub const BOT_COUNT: usize = 100; diff --git a/crates/borders-core/src/game/action.rs b/crates/borders-core/src/game/action.rs new file mode 100644 index 0000000..4524097 --- /dev/null +++ b/crates/borders-core/src/game/action.rs @@ -0,0 +1,33 @@ +//! Game action system +//! +//! This module defines the core action types that can be performed in the game. +//! Actions represent discrete game events that can be initiated by both human players +//! and AI bots. They are processed deterministically during turn execution. + +use serde::{Deserialize, Serialize}; + +/// Core game action type +/// +/// This enum represents all possible actions that can be performed in the game. +/// Unlike `Intent`, which is a network-layer wrapper, `GameAction` is the actual +/// game-level operation. +/// +/// Actions can originate from: +/// - Human players (via input systems → intents → network) +/// - AI bots (calculated deterministically during turn execution) +/// +/// All actions are processed in a deterministic order during `GameInstance::execute_turn()`. +#[derive(Debug, Clone, Serialize, Deserialize, bincode::Encode, bincode::Decode)] +pub enum GameAction { + /// Spawn a player's initial territory at a specific tile + /// + /// TODO: Remove this, it should be handled by a Turn0 special configuration AND the Intent::SetSpawn + Spawn { player_id: u16, tile_index: u32 }, + /// Attack a target tile with a percentage of the player's total troops + Attack { player_id: u16, target_tile: u32, troops_ratio: f32 }, + // Future action types: + // BuildStructure { player_id: u16, tile_index: u32, structure_type: StructureType }, + // LaunchNuke { player_id: u16, target_tile: u32 }, + // RequestAlliance { player_id: u16, target_player: u16 }, + // DeclareWar { player_id: u16, target_player: u16 }, +} diff --git a/crates/borders-core/src/game/attack.rs b/crates/borders-core/src/game/attack.rs new file mode 100644 index 0000000..695971f --- /dev/null +++ b/crates/borders-core/src/game/attack.rs @@ -0,0 +1,347 @@ +use rand::Rng; +use std::collections::HashSet; + +use crate::game::{TileOwnership, border_manager::BorderManager, player::Player, territory_manager::TerritoryManager}; + +/// Maximum attack schedule slots (circular buffer size) +pub const MAX_ATTACK_SCHEDULE: usize = 135; + +/// Configuration for creating an AttackExecutor +pub struct AttackConfig<'a> { + pub player: &'a Player, + pub target: Option<&'a Player>, + pub troops: f32, + pub target_tile: usize, + pub border_tiles: Option<&'a HashSet>, + pub territory_manager: &'a TerritoryManager, + pub border_manager: &'a BorderManager, + pub tile_expansion_times: &'a [u8], + pub width: u32, + pub turn_number: u64, +} + +/// Attack executor that manages the conquest of tiles +pub struct AttackExecutor { + pub player_id: usize, + pub target_id: Option, + troops: f32, + tile_queue: Vec>, // Vec of (tile, delay) pairs + queue_slot: f32, + scheduled_tiles: usize, + speed_factor: f32, + start_turn: u64, + target_region_center: usize, // The initially clicked tile (region center) +} + +impl AttackExecutor { + /// Create a new attack executor + pub fn new(config: AttackConfig) -> Self { + let player_id = config.player.id; + let target_id = config.target.map(|t| t.id); + + let mut executor = Self { player_id, target_id, troops: config.troops, tile_queue: vec![Vec::new(); MAX_ATTACK_SCHEDULE], queue_slot: 0.0, scheduled_tiles: 0, speed_factor: 1.0, start_turn: config.turn_number, target_region_center: config.target_tile }; + + executor.speed_factor = executor.calculate_speed_factor(config.player, config.target); + executor.order_tiles(config.border_tiles, config.territory_manager, config.border_manager, config.tile_expansion_times, config.width); + + executor + } + + /// Modify the amount of troops in the attack + pub fn modify_troops(&mut self, amount: f32) { + self.troops += amount; + } + + /// Oppose an attack (counter-attack) + /// Returns true if the attack continues, false if it was defeated + pub fn oppose(&mut self, troop_count: f32) -> bool { + if self.troops > troop_count { + self.troops -= troop_count; + true + } else { + false + } + } + + /// Get the amount of troops in the attack + pub fn get_troops(&self) -> f32 { + self.troops.max(0.0).floor() + } + + /// Get the turn this attack started + pub fn get_start_turn(&self) -> u64 { + self.start_turn + } + + /// Tick the attack executor + /// Returns true if the attack continues, false if it's finished + pub fn tick(&mut self, players: &mut [Player], territory_manager: &mut TerritoryManager, border_manager: &mut BorderManager, tile_expansion_times: &[u8], tile_expansion_costs: &[u8], width: u32) -> bool { + let _ = tracing::debug_span!("attack_tick"); + let _span = tracing::trace_span!("attack_tick", player_id = self.player_id).entered(); + let attack_cost = self.calculate_attack_cost(players); + let defense_cost = ((1.0 + attack_cost) / 1.7).ceil(); + self.speed_factor = self.calculate_speed_factor(&players[self.player_id], self.target_id.map(|id| &players[id])); + + let slot_index = (self.queue_slot as usize) % MAX_ATTACK_SCHEDULE; + let mut conquered = 0; + + // Collect tiles to process first to avoid borrow conflicts + let mut tiles_to_process = Vec::new(); + while self.troops >= attack_cost && !self.tile_queue[slot_index].is_empty() { + let _ = tracing::trace_span!("dequeue_tile"); + if let Some((tile, delay)) = self.tile_queue[slot_index].pop() { + tiles_to_process.push((tile, delay)); + } else { + break; + } + } + + // Process the collected tiles + for (tile, delay) in tiles_to_process { + let _ = tracing::trace_span!("process_tile"); + self.queue_slot = delay; + self.scheduled_tiles = self.scheduled_tiles.saturating_sub(1); + + // Check if tile is still valid target + let tile_valid = if let Some(target_id) = self.target_id { territory_manager.is_owner(tile, target_id) } else { !territory_manager.has_owner(tile) && !territory_manager.is_water(tile) }; + if !tile_valid { + continue; + } + + // Check if tile borders player territory + if !AttackExecutor::check_borders_tile(tile, self.player_id, territory_manager, width) { + continue; + } + + // Check if we still have enough troops + if self.troops < attack_cost { + break; + } + + // Conquer the tile + let _ = tracing::trace_span!("conquer"); + let previous_owner = territory_manager.conquer(tile, self.player_id); + + // Update borders + let _ = tracing::trace_span!("apply_transition"); + let tiles_changed = std::iter::once(tile).collect::>(); + border_manager.transition_tiles(&tiles_changed, self.player_id, self.target_id, territory_manager); + + // Update player territory sizes + // Convert u16 back to TileOwnership to use type-safe methods + let previous_ownership = TileOwnership::from_u16(previous_owner); + if let Some(nation_id) = previous_ownership.nation_id() { + players[nation_id as usize].remove_tile(tile); + } + players[self.player_id].add_tile(tile); + + // Schedule neighbors akin to handle_player_tile_add for immediate follow-up + let queue_slot = self.queue_slot; + let speed_factor = self.speed_factor; + let mut rng = rand::rng(); + let mut neighbors_to_schedule: Vec<(usize, f32)> = Vec::new(); + self.on_neighbors(tile, width, territory_manager, |neighbor| { + let neighbor_is_target = if let Some(target_id) = self.target_id { territory_manager.is_owner(neighbor, target_id) } else { !territory_manager.has_owner(neighbor) && !territory_manager.is_water(neighbor) }; + if neighbor_is_target { + let random_factor: f32 = rng.random_range(0.0..1.0); + let delay = queue_slot + tile_expansion_times[tile] as f32 * (0.025 + random_factor * 0.06) * speed_factor; + neighbors_to_schedule.push((neighbor, delay)); + } + }); + for (neighbor, delay) in neighbors_to_schedule { + let slot_index = (delay.floor() as usize) % MAX_ATTACK_SCHEDULE; + self.tile_queue[slot_index].push((neighbor, delay)); + self.scheduled_tiles += 1; + } + + self.troops -= attack_cost + tile_expansion_costs[tile] as f32 / 50.0; + conquered += 1; + } + + // Apply defense cost to target + if let Some(target_id) = self.target_id { + players[target_id].remove_troops(conquered as f32 * defense_cost); + } + + // Check if attack should continue + if self.scheduled_tiles == 0 || self.troops < attack_cost { + return false; + } + + self.queue_slot = (self.queue_slot + 1.0).floor(); + true + } + + /// Handle the addition of a tile to the player's territory + pub fn handle_player_tile_add(&mut self, tile: usize, territory_manager: &TerritoryManager, tile_expansion_times: &[u8], width: u32) { + let queue_slot = self.queue_slot; + let speed_factor = self.speed_factor; + let mut neighbors_to_schedule = Vec::new(); + + self.on_neighbors(tile, width, territory_manager, |neighbor| { + let neighbor_is_target = if let Some(target_id) = self.target_id { territory_manager.is_owner(neighbor, target_id) } else { !territory_manager.has_owner(neighbor) && !territory_manager.is_water(neighbor) }; + if neighbor_is_target { + let mut rng = rand::rng(); + let random_factor: f32 = rng.random_range(0.0..1.0); + let delay = queue_slot + tile_expansion_times[tile] as f32 * (0.025 + random_factor * 0.06) * speed_factor; + + neighbors_to_schedule.push((neighbor, delay)); + } + }); + + for (neighbor, delay) in neighbors_to_schedule { + let slot_index = (delay.floor() as usize) % MAX_ATTACK_SCHEDULE; + self.tile_queue[slot_index].push((neighbor, delay)); + self.scheduled_tiles += 1; + } + } + + /// Handle the addition of a tile to the target's territory + pub fn handle_target_tile_add(&mut self, tile: usize, territory_manager: &TerritoryManager, tile_expansion_times: &[u8], width: u32) { + if AttackExecutor::check_borders_tile(tile, self.player_id, territory_manager, width) { + let mut rng = rand::rng(); + let random_factor: f32 = rng.random_range(0.0..1.0); + let delay = self.queue_slot + tile_expansion_times[tile] as f32 * (0.025 + random_factor * 0.06) * self.speed_factor; + + let slot_index = (delay.floor() as usize) % MAX_ATTACK_SCHEDULE; + self.tile_queue[slot_index].push((tile, delay)); + self.scheduled_tiles += 1; + } + } + + /// Check if this attack is targeting a specific tile or its region + /// Uses distance from the initial target_region_center to determine if it's the same region + pub fn is_targeting_region(&self, tile: usize, width: u32, _height: u32) -> bool { + // Calculate distance from the attack's target region center + let center_x = (self.target_region_center % width as usize) as i32; + let center_y = (self.target_region_center / width as usize) as i32; + let tile_x = (tile % width as usize) as i32; + let tile_y = (tile / width as usize) as i32; + + let dx = (center_x - tile_x).abs(); + let dy = (center_y - tile_y).abs(); + + // Consider it the same region if within 8 tiles Manhattan distance + // This gives a reasonable region size while preventing overlap + dx + dy <= 8 + } + + /// Build the initial tile queue from border tiles + fn order_tiles(&mut self, border_tiles: Option<&HashSet>, territory_manager: &TerritoryManager, border_manager: &BorderManager, tile_expansion_times: &[u8], width: u32) { + let mut result = Vec::new(); + let mut amount_cache = vec![0u8; territory_manager.len()]; + + let borders = border_tiles.unwrap_or_else(|| border_manager.get_border_tiles(self.player_id)); + + for &tile in borders { + let x = tile as u32 % width; + let y = tile as u32 / width; + + // Helper to check if a tile matches our target + let is_target_tile = |t: usize| { + if let Some(target_id) = self.target_id { territory_manager.is_owner(t, target_id) } else { !territory_manager.has_owner(t) && !territory_manager.is_water(t) } + }; + + // Check all neighbors + if x > 0 && is_target_tile(tile - 1) { + if amount_cache[tile - 1] == 0 { + result.push(tile - 1); + } + amount_cache[tile - 1] += 1; + } + if x < width - 1 && is_target_tile(tile + 1) { + if amount_cache[tile + 1] == 0 { + result.push(tile + 1); + } + amount_cache[tile + 1] += 1; + } + if y > 0 && is_target_tile(tile - width as usize) { + if amount_cache[tile - width as usize] == 0 { + result.push(tile - width as usize); + } + amount_cache[tile - width as usize] += 1; + } + if y < (territory_manager.len() as u32 / width) - 1 && is_target_tile(tile + width as usize) { + if amount_cache[tile + width as usize] == 0 { + result.push(tile + width as usize); + } + amount_cache[tile + width as usize] += 1; + } + } + + let mut rng = rand::rng(); + for tile in result { + let random_factor: f32 = rng.random_range(0.0..1.0); + let delay = tile_expansion_times[tile] as f32 * (0.08 - 0.02 * amount_cache[tile] as f32 + random_factor * 0.06) * self.speed_factor; + + let slot_index = (delay.floor() as usize) % MAX_ATTACK_SCHEDULE; + self.tile_queue[slot_index].push((tile, delay)); + self.scheduled_tiles += 1; + } + } + + /// Calculate the speed factor of the attack + fn calculate_speed_factor(&self, player: &Player, target: Option<&Player>) -> f32 { + if let Some(target) = target { + let ratio = (player.get_territory_size() as f32 * player.get_troops()) / (target.get_territory_size().max(1) as f32) / (target.get_troops().max(1.0)); + + 2.0 / (0.325 + (1.0 + ratio.min(50.0)).ln()) + } else { + 1.0 + } + } + + /// Calculate the cost of attacking + fn calculate_attack_cost(&self, players: &[Player]) -> f32 { + if let Some(target_id) = self.target_id { + let target = &players[target_id]; + ((target.get_troops() / target.get_territory_size().max(1) as f32) * 2.0).floor() + } else { + 0.0 + } + } + + /// Check if a tile borders the player's territory + fn check_borders_tile(tile: usize, player_id: usize, territory_manager: &TerritoryManager, width: u32) -> bool { + let x = tile as u32 % width; + let y = tile as u32 / width; + let height = territory_manager.len() as u32 / width; + + if x > 0 && territory_manager.is_owner(tile - 1, player_id) { + return true; + } + if x < width - 1 && territory_manager.is_owner(tile + 1, player_id) { + return true; + } + if y > 0 && territory_manager.is_owner(tile - width as usize, player_id) { + return true; + } + if y < height - 1 && territory_manager.is_owner(tile + width as usize, player_id) { + return true; + } + false + } + + /// Call closure on all neighbors + fn on_neighbors(&self, tile: usize, width: u32, territory_manager: &TerritoryManager, mut closure: F) + where + F: FnMut(usize), + { + let x = tile as u32 % width; + let y = tile as u32 / width; + let height = territory_manager.len() as u32 / width; + + if x > 0 { + closure(tile - 1); + } + if x < width - 1 { + closure(tile + 1); + } + if y > 0 { + closure(tile - width as usize); + } + if y < height - 1 { + closure(tile + width as usize); + } + } +} diff --git a/crates/borders-core/src/game/attack_handler.rs b/crates/borders-core/src/game/attack_handler.rs new file mode 100644 index 0000000..be51432 --- /dev/null +++ b/crates/borders-core/src/game/attack_handler.rs @@ -0,0 +1,284 @@ +use std::collections::HashSet; + +use crate::game::{ + attack::{AttackConfig, AttackExecutor}, + border_manager::BorderManager, + player::Player, + territory_manager::TerritoryManager, + tilemap::TileMap, +}; + +/// Manages all active attacks +pub struct AttackActionHandler { + attacks: Vec, + player_index: Vec>>, // [attacker][target] -> list of attack indices + unclaimed_index: Vec>, // [attacker] -> attack index for unclaimed + player_attack_list: Vec>, // [player] -> list of attack indices where player is attacker + target_attack_list: Vec>, // [player] -> list of attack indices where player is target + unclaimed_attack_list: Vec, // List of attack indices for unclaimed territory + tile_expansion_times: TileMap, + tile_expansion_costs: TileMap, +} + +impl Default for AttackActionHandler { + fn default() -> Self { + Self::new() + } +} + +impl AttackActionHandler { + pub fn new() -> Self { + Self { attacks: Vec::new(), player_index: Vec::new(), unclaimed_index: Vec::new(), player_attack_list: Vec::new(), target_attack_list: Vec::new(), unclaimed_attack_list: Vec::new(), tile_expansion_times: TileMap::with_default(0, 0, 0), tile_expansion_costs: TileMap::with_default(0, 0, 0) } + } + + /// Initialize the attack handler + pub fn init(&mut self, max_players: usize, tile_expansion_times: Vec, tile_expansion_costs: Vec, width: u32, height: u32) { + self.attacks.clear(); + self.player_index = vec![vec![Vec::new(); max_players]; max_players]; + self.unclaimed_index = vec![None; max_players]; + self.player_attack_list = vec![Vec::new(); max_players]; + self.target_attack_list = vec![Vec::new(); max_players]; + self.unclaimed_attack_list.clear(); + self.tile_expansion_times = TileMap::from_vec(width, height, tile_expansion_times); + self.tile_expansion_costs = TileMap::from_vec(width, height, tile_expansion_costs); + } + + /// Find an attack from a player to a target that is targeting a specific tile region + fn find_attack_for_tile(&self, player_id: usize, target_id: usize, target_tile: usize) -> Option { + self.player_index[player_id][target_id].iter().find(|&&attack_idx| self.attacks[attack_idx].is_targeting_region(target_tile, self.tile_expansion_times.width(), self.tile_expansion_times.height())).copied() + } + + /// Filter border tiles to only include those adjacent to the target region + fn filter_border_tiles_near(&self, border_tiles: &HashSet, _target_tile: usize, target_owner: u16, territory_manager: &TerritoryManager) -> HashSet { + let mut filtered = HashSet::new(); + + for &tile in border_tiles { + // Check if any neighbor of this border tile is owned by the target + let mut is_adjacent = false; + territory_manager.on_neighbor_indices(tile, |neighbor| { + if territory_manager.get_owner(neighbor) == target_owner { + is_adjacent = true; + } + }); + + if is_adjacent { + filtered.insert(tile); + } + } + + // If we didn't find any adjacent border tiles, return all border tiles as fallback + if filtered.is_empty() { border_tiles.clone() } else { filtered } + } + + /// Schedule an attack on unclaimed territory + #[allow(clippy::too_many_arguments)] + pub fn attack_unclaimed(&mut self, player: &Player, troops: f32, target_tile: usize, border_tiles: Option<&HashSet>, territory_manager: &TerritoryManager, border_manager: &BorderManager, turn_number: u64) { + // Check if there's already an attack on unclaimed territory + if let Some(attack_idx) = self.unclaimed_index[player.id] { + self.attacks[attack_idx].modify_troops(troops); + return; + } + + // Create new attack + self.add_unclaimed(player, troops, target_tile, border_tiles, territory_manager, border_manager, turn_number); + } + + /// Schedule an attack on a player + #[allow(clippy::too_many_arguments)] + pub fn attack_player(&mut self, player: &Player, target: &Player, target_tile: usize, mut troops: f32, border_tiles: Option<&HashSet>, territory_manager: &TerritoryManager, border_manager: &BorderManager, turn_number: u64) { + // Check if there's already an attack on this target region + if let Some(attack_idx) = self.find_attack_for_tile(player.id, target.id, target_tile) { + self.attacks[attack_idx].modify_troops(troops); + return; + } + + // Check for counter-attacks (opposite direction) - prevent mutual attacks between players + // Oppose against ALL active attacks from target->player + while !self.player_index[target.id][player.id].is_empty() { + let opposite_idx = self.player_index[target.id][player.id][0]; + + if self.attacks[opposite_idx].oppose(troops) { + // Counter-attack absorbed the new attack + return; + } + + // Counter-attack was defeated, deduct its troops from the new attack + troops -= self.attacks[opposite_idx].get_troops(); + + // Remove the defeated counter-attack + self.remove_attack(opposite_idx); + + // Continue to the next counter-attack if any remain + } + + // Filter border tiles to only those near the target region + let border_tiles_set = border_tiles.cloned().unwrap_or_else(|| border_manager.get_border_tiles(player.id).clone()); + let filtered_borders = self.filter_border_tiles_near(&border_tiles_set, target_tile, target.id as u16, territory_manager); + + // Create new attack + self.add_attack(player, target, troops, target_tile, Some(&filtered_borders), territory_manager, border_manager, turn_number); + } + + /// Tick all active attacks + pub fn tick(&mut self, players: &mut [Player], territory_manager: &mut TerritoryManager, border_manager: &mut BorderManager) { + let _ = tracing::debug_span!("attacks_tick"); + let _span = tracing::trace_span!("attacks_tick", attack_count = self.attacks.len()).entered(); + let mut i = 0; + while i < self.attacks.len() { + let _ = tracing::trace_span!("tick_attack"); + let should_continue = self.attacks[i].tick(players, territory_manager, border_manager, self.tile_expansion_times.as_slice(), self.tile_expansion_costs.as_slice(), self.tile_expansion_times.width()); + + if !should_continue { + // Return remaining troops to player + let player_id = self.attacks[i].player_id; + let remaining_troops = self.attacks[i].get_troops(); + tracing::trace!(player_id, remaining_troops, "Attack completed"); + players[player_id].add_troops(remaining_troops); + + // Remove attack + self.remove_attack(i); + } else { + i += 1; + } + } + } + + /// Handle a tile being added to a player + pub fn handle_territory_add(&mut self, tile: usize, player_id: usize, territory_manager: &TerritoryManager) { + // Notify all attacks where this player is the attacker + for &attack_idx in &self.player_attack_list[player_id] { + self.attacks[attack_idx].handle_player_tile_add(tile, territory_manager, self.tile_expansion_times.as_slice(), self.tile_expansion_times.width()); + } + + // Notify all attacks where this player is the target + for &attack_idx in &self.target_attack_list[player_id] { + self.attacks[attack_idx].handle_target_tile_add(tile, territory_manager, self.tile_expansion_times.as_slice(), self.tile_expansion_times.width()); + } + } + + /// Add an attack on unclaimed territory + #[allow(clippy::too_many_arguments)] + fn add_unclaimed(&mut self, player: &Player, troops: f32, target_tile: usize, border_tiles: Option<&HashSet>, territory_manager: &TerritoryManager, border_manager: &BorderManager, turn_number: u64) { + let attack = AttackExecutor::new(AttackConfig { player, target: None, troops, target_tile, border_tiles, territory_manager, border_manager, tile_expansion_times: self.tile_expansion_times.as_slice(), width: self.tile_expansion_times.width(), turn_number }); + + let attack_idx = self.attacks.len(); + self.attacks.push(attack); + self.unclaimed_index[player.id] = Some(attack_idx); + self.player_attack_list[player.id].push(attack_idx); + self.unclaimed_attack_list.push(attack_idx); + } + + /// Add an attack on a player + #[allow(clippy::too_many_arguments)] + fn add_attack(&mut self, player: &Player, target: &Player, troops: f32, target_tile: usize, border_tiles: Option<&HashSet>, territory_manager: &TerritoryManager, border_manager: &BorderManager, turn_number: u64) { + let attack = AttackExecutor::new(AttackConfig { player, target: Some(target), troops, target_tile, border_tiles, territory_manager, border_manager, tile_expansion_times: self.tile_expansion_times.as_slice(), width: self.tile_expansion_times.width(), turn_number }); + + let attack_idx = self.attacks.len(); + self.attacks.push(attack); + self.player_index[player.id][target.id].push(attack_idx); + self.player_attack_list[player.id].push(attack_idx); + self.target_attack_list[target.id].push(attack_idx); + } + + /// Get all attacks involving a specific player (as attacker or target) + /// Returns a list of (attacker_id, target_id, troops, start_turn, is_outgoing) + pub fn get_attacks_for_player(&self, player_id: usize) -> Vec<(usize, Option, f32, u64, bool)> { + let mut attacks = Vec::new(); + + // Add outgoing attacks (player is attacker) + for &attack_idx in &self.player_attack_list[player_id] { + let attack = &self.attacks[attack_idx]; + attacks.push(( + attack.player_id, + attack.target_id, + attack.get_troops(), + attack.get_start_turn(), + true, // outgoing + )); + } + + // Add incoming attacks (player is target) + for &attack_idx in &self.target_attack_list[player_id] { + let attack = &self.attacks[attack_idx]; + attacks.push(( + attack.player_id, + attack.target_id, + attack.get_troops(), + attack.get_start_turn(), + false, // incoming + )); + } + + // Sort by start_turn descending (most recent first) + attacks.sort_by(|a, b| b.3.cmp(&a.3)); + attacks + } + + /// Remove an attack + fn remove_attack(&mut self, attack_idx: usize) { + let attack = &self.attacks[attack_idx]; + let player_id = attack.player_id; + let target_id = attack.target_id; + + // Remove from player attack list + if let Some(pos) = self.player_attack_list[player_id].iter().position(|&x| x == attack_idx) { + self.player_attack_list[player_id].remove(pos); + } + + if let Some(target_id) = target_id { + // Remove from target attack list + if let Some(pos) = self.target_attack_list[target_id].iter().position(|&x| x == attack_idx) { + self.target_attack_list[target_id].remove(pos); + } + // Remove from player index + if let Some(pos) = self.player_index[player_id][target_id].iter().position(|&x| x == attack_idx) { + self.player_index[player_id][target_id].remove(pos); + } + } else { + // Remove from unclaimed attack list + if let Some(pos) = self.unclaimed_attack_list.iter().position(|&x| x == attack_idx) { + self.unclaimed_attack_list.remove(pos); + } + // Remove from unclaimed index + self.unclaimed_index[player_id] = None; + } + + // Remove attack from attacks list + self.attacks.remove(attack_idx); + + // Update all indices greater than attack_idx + for player_attacks in &mut self.player_attack_list { + for attack in player_attacks { + if *attack > attack_idx { + *attack -= 1; + } + } + } + for target_attacks in &mut self.target_attack_list { + for attack in target_attacks { + if *attack > attack_idx { + *attack -= 1; + } + } + } + for attack in &mut self.unclaimed_attack_list { + if *attack > attack_idx { + *attack -= 1; + } + } + for player_row in &mut self.player_index { + for target_attacks in player_row { + for i in target_attacks { + if *i > attack_idx { + *i -= 1; + } + } + } + } + for i in self.unclaimed_index.iter_mut().flatten() { + if *i > attack_idx { + *i -= 1; + } + } + } +} diff --git a/crates/borders-core/src/game/border_manager.rs b/crates/borders-core/src/game/border_manager.rs new file mode 100644 index 0000000..d6f720a --- /dev/null +++ b/crates/borders-core/src/game/border_manager.rs @@ -0,0 +1,127 @@ +use std::collections::HashSet; + +use crate::game::territory_manager::TerritoryManager; +use crate::game::tilemap::TileMap; + +/// Result of a border transition +#[derive(Debug)] +pub struct BorderTransitionResult { + /// Tiles that changed to attacker territory (interior, grade 4) + pub territory: Vec, + /// Tiles that changed to attacker border (grade < 4) + pub attacker: Vec, + /// Tiles that changed to defender border + pub defender: Vec, +} + +/// Manages border tiles for all players +pub struct BorderManager { + tile_grades: TileMap, + border_tiles: Vec>, +} + +impl Default for BorderManager { + fn default() -> Self { + Self::new() + } +} + +impl BorderManager { + pub fn new() -> Self { + Self { tile_grades: TileMap::with_default(0, 0, 0), border_tiles: Vec::new() } + } + + /// Resets the border manager + /// Should only be called when a new game is started + pub fn reset(&mut self, width: u32, height: u32, player_count: usize) { + self.tile_grades = TileMap::with_default(width, height, 0); + self.border_tiles = vec![HashSet::new(); player_count]; + } + + /// Checks for updated borders when claiming tiles + pub fn transition_tiles(&mut self, tiles: &HashSet, attacker: usize, defender: Option, territory_manager: &TerritoryManager) -> BorderTransitionResult { + let _ = tracing::debug_span!("border_transition"); + let _span = tracing::trace_span!("border_transition", tile_count = tiles.len()).entered(); + let mut result = BorderTransitionResult { territory: Vec::new(), attacker: Vec::new(), defender: Vec::new() }; + + // Collect all neighbor updates first + let mut neighbor_updates = Vec::new(); + + for &tile in tiles { + let _ = tracing::trace_span!("border_neighbors"); + let mut grade = 0; + let mut neighbors_to_check = Vec::new(); + + // Get all neighbors using TileMap + let pos = self.tile_grades.index_to_pos(tile); + for neighbor_pos in self.tile_grades.neighbors(pos) { + neighbors_to_check.push(self.tile_grades.pos_to_index(neighbor_pos)); + } + + // Process neighbors + for neighbor in neighbors_to_check { + let owner = territory_manager.get_owner(neighbor); + + if let Some(defender_id) = defender + && owner == defender_id as u16 + { + neighbor_updates.push((neighbor, defender_id, true)); // Mark for defender border + } + + if owner == attacker as u16 { + grade += 1; + if !tiles.contains(&neighbor) { + neighbor_updates.push((neighbor, attacker, false)); // Mark for attacker interior check + } + } + } + + self.tile_grades[tile] = grade; + } + + // Apply updates + for (neighbor, player_id, is_defender) in neighbor_updates { + let _ = tracing::trace_span!("apply_neighbor"); + if is_defender { + self.tile_grades[neighbor] = self.tile_grades[neighbor].saturating_sub(1); + if self.tile_grades[neighbor] == 3 { + self.border_tiles[player_id].insert(neighbor); + result.defender.push(neighbor); + } + } else { + self.tile_grades[neighbor] += 1; + if self.tile_grades[neighbor] == 4 { + self.border_tiles[player_id].remove(&neighbor); + result.territory.push(neighbor); + } + } + } + + // Update borders for the tiles themselves + for &tile in tiles { + let _ = tracing::trace_span!("apply_self"); + if let Some(defender_id) = defender { + self.border_tiles[defender_id].remove(&tile); + } + + let grade = self.tile_grades[tile]; + if grade < 4 { + self.border_tiles[attacker].insert(tile); + result.attacker.push(tile); + } else { + result.territory.push(tile); + } + } + + if tiles.len() > 50 { + tracing::trace!(tile_count = tiles.len(), "Large border transition"); + } + + result + } + + /// Gets the border tiles of a player + pub fn get_border_tiles(&self, player: usize) -> &HashSet { + &self.border_tiles[player] + } +} diff --git a/crates/borders-core/src/game/bot.rs b/crates/borders-core/src/game/bot.rs new file mode 100644 index 0000000..4233a9c --- /dev/null +++ b/crates/borders-core/src/game/bot.rs @@ -0,0 +1,346 @@ +use rand::rngs::StdRng; +use rand::{Rng, SeedableRng}; + +use crate::game::action::GameAction; +use crate::game::border_manager::BorderManager; +use crate::game::player::Player; +use crate::game::territory_manager::TerritoryManager; + +/// Simple bot AI +pub struct BotPlayer { + last_action_tick: u64, + action_cooldown: u64, +} + +impl Default for BotPlayer { + fn default() -> Self { + Self::new() + } +} + +impl BotPlayer { + pub fn new() -> Self { + let mut rng = rand::rng(); + Self { + last_action_tick: 0, + action_cooldown: rng.random_range(0..10), // 0-1 seconds + } + } + + /// Tick the bot AI - now deterministic based on turn number and RNG seed + pub fn tick(&mut self, turn_number: u64, player: &Player, territory_manager: &TerritoryManager, border_manager: &BorderManager, rng_seed: u64) -> Option { + // Only act every few ticks + if turn_number < self.last_action_tick + self.action_cooldown { + return None; + } + + self.last_action_tick = turn_number; + + // Deterministic RNG based on turn number, player ID, and global seed + let seed = rng_seed.wrapping_add(turn_number).wrapping_add(player.id as u64); + let mut rng = StdRng::seed_from_u64(seed); + self.action_cooldown = rng.random_range(3..15); + + // Decide action: expand into wilderness or attack a neighbor + let action_type: f32 = rng.random(); + + let action = if action_type < 0.6 { + // Expand into wilderness (60% chance) + self.expand_wilderness(player, territory_manager, border_manager, &mut rng) + } else { + // Attack a neighbor (40% chance) + self.attack_neighbor(player, territory_manager, border_manager, &mut rng) + }; + + let _span = tracing::debug_span!("bot_tick", player_id = player.id, has_action = action.is_some()).entered(); + action + } + + /// Expand into unclaimed territory + fn expand_wilderness(&self, player: &Player, territory_manager: &TerritoryManager, border_manager: &BorderManager, rng: &mut StdRng) -> Option { + let border_tiles = border_manager.get_border_tiles(player.id); + + // Find a valid, unclaimed neighbor tile to attack + for &tile in border_tiles { + let x = tile as u32 % territory_manager.width(); + let y = tile as u32 / territory_manager.width(); + + let neighbors = [(x > 0).then_some(tile - 1), (x < territory_manager.width() - 1).then_some(tile + 1), (y > 0).then_some(tile - territory_manager.width() as usize), (y < territory_manager.height() - 1).then_some(tile + territory_manager.width() as usize)]; + + for neighbor in neighbors.iter().flatten() { + if !territory_manager.has_owner(*neighbor) && !territory_manager.is_water(*neighbor) { + // Found unclaimed land + let troop_percentage: f32 = rng.random_range(0.1..0.3); + return Some(GameAction::Attack { player_id: player.id as u16, target_tile: *neighbor as u32, troops_ratio: troop_percentage }); + } + } + } + + tracing::trace!(player_id = player.id, "No wilderness target found"); + None + } + + /// Attack a neighboring player + fn attack_neighbor(&self, player: &Player, territory_manager: &TerritoryManager, border_manager: &BorderManager, rng: &mut StdRng) -> Option { + // Find neighboring players + let mut neighbors = std::collections::HashSet::new(); + let border_tiles = border_manager.get_border_tiles(player.id); + + for &tile in border_tiles { + let x = tile as u32 % territory_manager.width(); + let y = tile as u32 / territory_manager.width(); + + // Check all neighbors + if x > 0 { + let neighbor = tile - 1; + let ownership = territory_manager.get_ownership(neighbor); + if let Some(nation_id) = ownership.nation_id() + && nation_id != player.id as u16 + { + neighbors.insert(nation_id as usize); + } + } + if x < territory_manager.width() - 1 { + let neighbor = tile + 1; + let ownership = territory_manager.get_ownership(neighbor); + if let Some(nation_id) = ownership.nation_id() + && nation_id != player.id as u16 + { + neighbors.insert(nation_id as usize); + } + } + if y > 0 { + let neighbor = tile - territory_manager.width() as usize; + let ownership = territory_manager.get_ownership(neighbor); + if let Some(nation_id) = ownership.nation_id() + && nation_id != player.id as u16 + { + neighbors.insert(nation_id as usize); + } + } + if y < territory_manager.height() - 1 { + let neighbor = tile + territory_manager.width() as usize; + let ownership = territory_manager.get_ownership(neighbor); + if let Some(nation_id) = ownership.nation_id() + && nation_id != player.id as u16 + { + neighbors.insert(nation_id as usize); + } + } + } + + if neighbors.is_empty() { + return None; + } + + // Pick a random neighbor to attack + let neighbor_vec: Vec<_> = neighbors.into_iter().collect(); + let target_id = neighbor_vec[rng.random_range(0..neighbor_vec.len())]; + + // To attack a player, we need to pick a specific tile. + // Let's find a border tile of the target player that is adjacent to us. + let target_border = border_manager.get_border_tiles(target_id); + for &target_tile in target_border { + let x = target_tile as u32 % territory_manager.width(); + let y = target_tile as u32 / territory_manager.width(); + let neighbor_indices = [(x > 0).then_some(target_tile - 1), (x < territory_manager.width() - 1).then_some(target_tile + 1), (y > 0).then_some(target_tile - territory_manager.width() as usize), (y < territory_manager.height() - 1).then_some(target_tile + territory_manager.width() as usize)]; + + for &neighbor_idx in neighbor_indices.iter().flatten() { + if territory_manager.get_owner(neighbor_idx) == player.id as u16 { + // This is a valid attack target + let troop_percentage: f32 = rng.random_range(0.2..0.5); + return Some(GameAction::Attack { player_id: player.id as u16, target_tile: target_tile as u32, troops_ratio: troop_percentage }); + } + } + } + + None + } +} + +/// Minimum distance (in tiles) between any two spawn points +/// This ensures players and bots don't spawn too close together +const MIN_SPAWN_DISTANCE: f32 = 70.0; + +/// Calculate Euclidean distance between two tiles +fn calculate_tile_distance(tile1: usize, tile2: usize, map_width: u32) -> f32 { + let x1 = (tile1 as u32 % map_width) as f32; + let y1 = (tile1 as u32 / map_width) as f32; + let x2 = (tile2 as u32 % map_width) as f32; + let y2 = (tile2 as u32 / map_width) as f32; + + let dx = x1 - x2; + let dy = y1 - y2; + (dx * dx + dy * dy).sqrt() +} + +/// Manager for bot AI state and decision-making +/// +/// BotManager is part of GameInstance and handles all bot decision-making +/// in a deterministic way. Unlike the old Bevy-based bot system, this is +/// part of the core game state and executes during turn processing. +pub struct BotManager { + bots: Vec, + bot_player_ids: Vec, +} + +impl BotManager { + /// Create a new BotManager with the specified number of bots + pub fn new(bot_count: usize, human_player_count: usize) -> Self { + let bots = (0..bot_count).map(|_| BotPlayer::new()).collect(); + + // Bot player IDs start after human players + // Human player is ID 0, so first bot is ID 1 + let first_bot_id = human_player_count; + let bot_player_ids = (first_bot_id..(first_bot_id + bot_count)).collect(); + + Self { bots, bot_player_ids } + } + + /// Get the number of bots + pub fn bot_count(&self) -> usize { + self.bots.len() + } + + /// Get bot player IDs + pub fn bot_player_ids(&self) -> &[usize] { + &self.bot_player_ids + } + + /// Calculate initial bot spawn positions (first pass) + /// + /// Places bots at random valid locations, ensuring they are sufficiently + /// spaced from each other. This is deterministic based on rng_seed. + /// + /// Returns Vec<(player_id, tile_index)> for each bot + pub fn calculate_initial_spawns(&self, territory_manager: &TerritoryManager, rng_seed: u64) -> Vec<(usize, usize)> { + let mut spawn_positions = Vec::new(); + let width = territory_manager.width(); + let height = territory_manager.height(); + let map_size = (width * height) as usize; + + for (bot_index, &player_id) in self.bot_player_ids.iter().enumerate() { + // Deterministic RNG for spawn location + let seed = rng_seed.wrapping_add(player_id as u64).wrapping_add(bot_index as u64); + let mut rng = StdRng::seed_from_u64(seed); + + // Try to find a valid spawn location + for _ in 0..1000 { + let tile = rng.random_range(0..map_size); + + // Check if tile is unclaimed land + if territory_manager.has_owner(tile) || territory_manager.is_water(tile) { + continue; + } + + // Check distance from all previous spawns + let mut too_close = false; + for &(_, existing_tile) in &spawn_positions { + if calculate_tile_distance(tile, existing_tile, width) < MIN_SPAWN_DISTANCE { + too_close = true; + break; + } + } + + if !too_close { + spawn_positions.push((player_id, tile)); + break; + } + } + } + + spawn_positions + } + + /// Recalculate bot spawns considering player positions (second pass) + /// + /// For any bot that is too close to a player spawn, find a new position. + /// This maintains determinism while ensuring proper spawn spacing. + /// + /// Arguments: + /// - `initial_bot_spawns`: Bot positions from first pass + /// - `player_spawns`: Human player spawn positions + /// - `territory_manager`: For checking valid tiles + /// - `rng_seed`: For deterministic relocation + /// + /// Returns updated Vec<(player_id, tile_index)> with relocated bots + pub fn recalculate_spawns_with_players(&self, initial_bot_spawns: Vec<(usize, usize)>, player_spawns: &[(usize, usize)], territory_manager: &TerritoryManager, rng_seed: u64) -> Vec<(usize, usize)> { + let width = territory_manager.width(); + let map_size = (width * territory_manager.height()) as usize; + + // Identify bots that need relocation + let mut bots_to_relocate = Vec::new(); + let mut final_spawns = Vec::new(); + + for (player_id, tile) in initial_bot_spawns { + let mut needs_relocation = false; + + // Check distance from all player spawns + for &(_, player_tile) in player_spawns { + if calculate_tile_distance(tile, player_tile, width) < MIN_SPAWN_DISTANCE { + needs_relocation = true; + break; + } + } + + if needs_relocation { + bots_to_relocate.push(player_id); + } else { + final_spawns.push((player_id, tile)); + } + } + + // Relocate bots that are too close to players + for &player_id in &bots_to_relocate { + let seed = rng_seed.wrapping_add(player_id as u64).wrapping_add(0xDEADBEEF); + let mut rng = StdRng::seed_from_u64(seed); + + // Find new location away from all existing spawns (players + already-placed bots) + for _ in 0..1000 { + let tile = rng.random_range(0..map_size); + + // Check if tile is unclaimed land + if territory_manager.has_owner(tile) || territory_manager.is_water(tile) { + continue; + } + + // Check distance from all player spawns + let mut too_close = false; + for &(_, existing_tile) in player_spawns { + if calculate_tile_distance(tile, existing_tile, width) < MIN_SPAWN_DISTANCE { + too_close = true; + break; + } + } + + // Check distance from all finalized bot spawns + if !too_close { + for &(_, existing_tile) in &final_spawns { + if calculate_tile_distance(tile, existing_tile, width) < MIN_SPAWN_DISTANCE { + too_close = true; + break; + } + } + } + + if !too_close { + final_spawns.push((player_id, tile)); + break; + } + } + } + + final_spawns + } + + /// Calculate action for a specific bot + /// + /// This is deterministic - same inputs = same output + pub fn calculate_action(&mut self, bot_index: usize, turn_number: u64, player: &Player, territory_manager: &TerritoryManager, border_manager: &BorderManager, rng_seed: u64) -> Option { + if bot_index >= self.bots.len() { + return None; + } + + self.bots[bot_index].tick(turn_number, player, territory_manager, border_manager, rng_seed) + } +} diff --git a/crates/borders-core/src/game/game_instance.rs b/crates/borders-core/src/game/game_instance.rs new file mode 100644 index 0000000..2bb1cb8 --- /dev/null +++ b/crates/borders-core/src/game/game_instance.rs @@ -0,0 +1,186 @@ +use crate::game::action::GameAction; +use crate::game::attack_handler::AttackActionHandler; +use crate::game::border_manager::BorderManager; +use crate::game::bot::BotManager; +use crate::game::player_manager::PlayerManager; +use crate::game::territory_manager::TerritoryManager; +use crate::networking::{Intent, Turn}; +use bevy_ecs::prelude::*; +use std::collections::HashSet; + +/// Game state resource - DETERMINISTIC, SHARED across ALL clients +/// +/// **Important: This is GLOBAL/SHARED state that must be identical on all clients!** +/// +/// This resource contains the authoritative game state that: +/// - Is identical across all clients (server, players, spectators) +/// - Processes turns deterministically (same input → same output) +/// - Is used for hash validation and network synchronization +/// - Continues running even when individual players are eliminated +/// +/// What belongs here: +/// - Territory ownership, player stats, attacks, resources +/// - Turn number, RNG seed (for determinism) +/// - Any state that affects gameplay or must be validated +/// +/// What does NOT belong here: +/// - Client-specific UI state (use LocalPlayerContext) +/// - Individual player outcomes like Victory/Defeat (use LocalPlayerContext) +/// - Rendering preferences, camera position, etc. (use local resources) +/// +/// The game never "stops" based on a single player's outcome - it continues +/// until a global end condition is met (e.g., all players eliminated, turn limit). +#[derive(Resource)] +pub struct GameInstance { + pub player_manager: PlayerManager, + pub territory_manager: TerritoryManager, + pub attack_handler: AttackActionHandler, + pub border_manager: BorderManager, + pub bot_manager: BotManager, + pub turn_number: u64, + /// RNG seed for deterministic random number generation + /// All deterministic RNG should use: hash(turn_number + rng_seed + context) + pub rng_seed: u64, +} + +impl GameInstance { + pub fn new(player_manager: PlayerManager, territory_manager: TerritoryManager, attack_handler: AttackActionHandler, border_manager: BorderManager, bot_manager: BotManager, rng_seed: u64) -> Self { + Self { player_manager, territory_manager, attack_handler, border_manager, bot_manager, turn_number: 0, rng_seed } + } + + pub fn execute_turn(&mut self, turn: &Turn) { + let _span = tracing::trace_span!("execute_turn", turn_number = self.turn_number, intent_count = turn.intents.len()).entered(); + + // PHASE 1: Process bot actions (deterministic, based on turn N-1 state) + let bot_player_ids = self.bot_manager.bot_player_ids().to_vec(); + for (bot_index, &player_id) in bot_player_ids.iter().enumerate() { + if let Some(player) = self.player_manager.get_player(player_id) { + if !player.is_alive() { + continue; + } + + if let Some(action) = self.bot_manager.calculate_action(bot_index, self.turn_number, player, &self.territory_manager, &self.border_manager, self.rng_seed) { + tracing::trace!(bot_index, player_id, "Bot action executed"); + self.apply_action(action); + } + } + } + + // PHASE 2: Process player intents (from network) + for intent in &turn.intents { + match intent { + Intent::Action(action) => { + self.apply_action(action.clone()); + } + Intent::SetSpawn { .. } => { + // SetSpawn intents should not appear in Turn messages + // They are only valid during spawn phase and handled separately + // If we see one here, it's likely a bug or late arrival - ignore it + } + } + } + + // PHASE 3: Tick game systems (income, attacks, etc.) + if self.turn_number.is_multiple_of(10) { + // income every 10 turns (1 second) + self.player_manager.process_income(); + } + + self.attack_handler.tick(self.player_manager.get_players_mut(), &mut self.territory_manager, &mut self.border_manager); + + self.turn_number += 1; + } + + /// Apply a game action (used by both bots and player intents) + pub fn apply_action(&mut self, action: GameAction) { + match action { + GameAction::Spawn { player_id, tile_index } => { + self.handle_spawn(player_id, tile_index); + } + GameAction::Attack { player_id, target_tile, troops_ratio } => { + self.handle_attack(player_id, target_tile, troops_ratio); + } + } + } + + pub fn handle_spawn(&mut self, player_id: u16, tile_index: u32) { + let player_id = player_id as usize; + let width = self.territory_manager.width(); + let height = self.territory_manager.height(); + let tile = tile_index as usize; + + if self.territory_manager.has_owner(tile) || self.territory_manager.is_water(tile) { + tracing::debug!(player_id, tile, "Spawn on occupied/water tile ignored"); + return; + } + + let spawn_x = tile as u32 % width; + let spawn_y = tile as u32 / width; + + let mut changed: HashSet = HashSet::new(); + for dy in -2..=2 { + for dx in -2..=2 { + let x = (spawn_x as i32 + dx).clamp(0, width as i32 - 1) as u32; + let y = (spawn_y as i32 + dy).clamp(0, height as i32 - 1) as u32; + let idx = (x + y * width) as usize; + if !self.territory_manager.has_owner(idx) && !self.territory_manager.is_water(idx) { + self.territory_manager.conquer(idx, player_id); + changed.insert(idx); + } + } + } + + if !changed.is_empty() { + self.border_manager.transition_tiles(&changed, player_id, None, &self.territory_manager); + // Update player stats + if let Some(player) = self.player_manager.get_player_mut(player_id) { + for &t in &changed { + player.add_tile(t); + } + } + // Notify attack scheduling that territory changed + for &t in &changed { + self.attack_handler.handle_territory_add(t, player_id, &self.territory_manager); + } + } + } + + pub fn handle_attack(&mut self, player_id: u16, target_tile: u32, troops_ratio: f32) { + let player_id = player_id as usize; + let target_tile = target_tile as usize; + + let target_owner = self.territory_manager.get_owner(target_tile); + + if target_owner as usize == player_id { + tracing::debug!(player_id, target_tile, "Attack on own tile ignored"); + return; // Can't attack self + } + + let troops = if let Some(player) = self.player_manager.get_player(player_id) { + player.get_troops() * troops_ratio + } else { + return; + }; + + // Deduct troops from the player's pool when creating the attack + if let Some(player) = self.player_manager.get_player_mut(player_id) { + player.remove_troops(troops); + } else { + return; + } + + use crate::game::TileOwnership; + if TileOwnership::from_u16(target_owner).is_unclaimed() { + if let Some(player) = self.player_manager.get_player(player_id) { + let p = player.clone(); + self.attack_handler.attack_unclaimed(&p, troops, target_tile, Some(self.border_manager.get_border_tiles(player_id)), &self.territory_manager, &self.border_manager, self.turn_number); + } + } else if let Some(target) = self.player_manager.get_player(target_owner as usize) + && let Some(player) = self.player_manager.get_player(player_id) + { + let p = player.clone(); + let t = target.clone(); + self.attack_handler.attack_player(&p, &t, target_tile, troops, Some(self.border_manager.get_border_tiles(player_id)), &self.territory_manager, &self.border_manager, self.turn_number); + } + } +} diff --git a/crates/borders-core/src/game/input_handlers.rs b/crates/borders-core/src/game/input_handlers.rs new file mode 100644 index 0000000..90baeb1 --- /dev/null +++ b/crates/borders-core/src/game/input_handlers.rs @@ -0,0 +1,205 @@ +//! Platform-agnostic input handling systems +//! +//! These systems use InputState instead of Bevy's input queries, +//! making them work across both WASM and desktop platforms with +//! Pixi.js rendering. + +use bevy_ecs::prelude::*; +use tracing::{debug, info, trace}; + +use crate::game::{GameAction, LocalPlayerContext, SpawnManager, TileOwnership}; +use crate::networking::{GameView, Intent, IntentEvent}; +use crate::ui::input::{InputState, KeyCode, MouseButton}; +use crate::ui::protocol::CameraCommand; + +/// Resource tracking whether spawn phase is active +#[derive(Resource, Default)] +pub struct SpawnPhase { + pub active: bool, +} + +/// Resource for attack control settings +#[derive(Resource)] +pub struct AttackControls { + pub attack_ratio: f32, +} + +impl Default for AttackControls { + fn default() -> Self { + Self { attack_ratio: 0.5 } + } +} + +/// Handle placing the human spawn by clicking on valid land +#[allow(clippy::too_many_arguments)] +pub fn handle_spawn_click_system(input_state: NonSend>>, spawn_phase: Res, game_view: Option>, local_context: Option>, mut spawn_manager: Option>, mut spawn_timeout: Option>, mut intent_writer: MessageWriter, game_instance: Option>) { + if !spawn_phase.active { + return; + } + + let Ok(input) = input_state.lock() else { + return; + }; + + if !input.mouse_just_released(MouseButton::Left) { + return; + } + + let _span = tracing::trace_span!("spawn_click").entered(); + + // Frontend handles camera interaction filtering, but double-check here + if input.had_camera_interaction() { + trace!("Spawn click ignored - camera interaction detected"); + return; + } + + let Some(game_view) = game_view else { + debug!("Spawn click ignored - GameView not ready"); + return; + }; + + let Some(local_context) = local_context else { + debug!("Spawn click ignored - LocalPlayerContext not ready"); + return; + }; + + // Can't spawn if not allowed to send intents + if !local_context.can_send_intents { + debug!("Spawn click ignored - cannot send intents"); + return; + } + + // Get tile from InputState (set by frontend) + let Some(tile_coord) = input.cursor_tile() else { + debug!("Spawn click ignored - cursor not over valid tile"); + return; + }; + + let tile = tile_coord.to_index(game_view.width); + + let tile_ownership = TileOwnership::from_u16(game_view.get_owner(tile)); + if tile_ownership.is_owned() || tile_ownership.is_water() { + debug!("Spawn click on tile {} ignored - occupied or water", tile); + return; + } + + // Player has chosen a spawn location - send to server + info!("Player {} setting spawn at tile {}", local_context.my_player_id, tile); + + // Check if this is the first spawn (timer not started yet) + let is_first_spawn = if let Some(ref spawn_mgr) = spawn_manager { spawn_mgr.get_player_spawns().is_empty() } else { true }; + + // Send SetSpawn intent to server (not Action - this won't be in game history) + // Server will validate, track, and eventually send Turn(0) when timeout expires + intent_writer.write(IntentEvent(Intent::SetSpawn { player_id: local_context.my_player_id as u16, tile_index: tile as u32 })); + + // Start spawn timeout on first spawn (spawn_phase plugin will emit countdown updates) + if is_first_spawn && let Some(ref mut timeout) = spawn_timeout { + timeout.start(); + info!("Spawn timeout started ({:.1}s)", timeout.duration_secs); + } + + // Update local spawn manager for preview/bot recalculation + // Note: This only updates the spawn manager, not the game instance + // The actual game state is updated when Turn(0) is processed + if let Some(ref mut spawn_mgr) = spawn_manager + && let Some(ref game_inst) = game_instance + { + // Update spawn manager (triggers bot spawn recalculation) + spawn_mgr.update_player_spawn(local_context.my_player_id, tile, &game_inst.bot_manager, &game_inst.territory_manager); + + info!("Spawn manager updated with player {} spawn at tile {}", local_context.my_player_id, tile); + info!("Total spawns in manager: {}", spawn_mgr.get_all_spawns().len()); + } +} + +/// Center the camera on the client's spawn (hotkey C) +pub fn handle_center_camera_system(input_state: NonSend>>, game_view: Option>, local_context: Option>, mut camera_commands: MessageWriter) { + let Ok(input) = input_state.lock() else { + return; + }; + + if !input.key_just_pressed(KeyCode::KeyC) { + return; + } + + let Some(game_view) = game_view else { + return; // GameView not ready yet + }; + + let Some(local_context) = local_context else { + return; // LocalPlayerContext not ready yet + }; + + // Find any owned tile to center on + if let Some(tile) = game_view.find_tile_owned_by(local_context.my_player_id as u16) { + camera_commands.write(CameraCommand::CenterOnTile { tile_index: tile as u32, animate: true }); + } +} + +/// After spawn, clicking tiles triggers expansion/attack based on ownership +pub fn handle_attack_click_system(input_state: NonSend>>, spawn_phase: Res, game_view: Option>, local_context: Option>, attack_controls: Res, mut intent_writer: MessageWriter) { + if spawn_phase.active { + return; + } + + let Ok(input) = input_state.lock() else { + return; + }; + + if !input.mouse_just_released(MouseButton::Left) { + return; + } + + // Frontend handles camera interaction filtering + if input.had_camera_interaction() { + return; + } + + let _span = tracing::trace_span!("attack_click").entered(); + + let Some(game_view) = game_view else { + return; // GameView not ready yet + }; + + let Some(local_context) = local_context else { + return; // LocalPlayerContext not ready yet + }; + + // Can't attack if not allowed to send intents (defeated/spectating) + if !local_context.can_send_intents { + return; + } + + // Get tile from InputState (set by frontend) + let Some(tile_coord) = input.cursor_tile() else { + return; + }; + + let tile = tile_coord.to_index(game_view.width); + let owner = game_view.get_owner(tile); + + if owner != local_context.my_player_id as u16 { + intent_writer.write(IntentEvent(Intent::Action(GameAction::Attack { player_id: local_context.my_player_id as u16, target_tile: tile as u32, troops_ratio: attack_controls.attack_ratio }))); + } +} + +/// Adjust attack ratio with keys 1/2 +pub fn handle_attack_ratio_keys_system(input_state: NonSend>>, mut controls: ResMut) { + let Ok(input) = input_state.lock() else { + return; + }; + + let mut changed = false; + if input.key_just_pressed(KeyCode::Digit1) { + controls.attack_ratio = (controls.attack_ratio - 0.1).max(0.1); + changed = true; + } + if input.key_just_pressed(KeyCode::Digit2) { + controls.attack_ratio = (controls.attack_ratio + 0.1).min(1.0); + changed = true; + } + if changed { + debug!("Attack ratio changed to {:.1}", controls.attack_ratio); + } +} diff --git a/crates/borders-core/src/game/lifecycle.rs b/crates/borders-core/src/game/lifecycle.rs new file mode 100644 index 0000000..b4a086c --- /dev/null +++ b/crates/borders-core/src/game/lifecycle.rs @@ -0,0 +1,164 @@ +use bevy_ecs::prelude::*; +use rand::rngs::StdRng; +use rand::{Rng, SeedableRng}; +use tracing::{debug, info}; + +use crate::constants::BOT_COUNT; +use crate::game::{AttackActionHandler, BorderManager, BotManager, GameInstance, HSLColor, LocalPlayerContext, Player, PlayerManager, SpawnManager, SpawnPhase, SpawnTimeout, TerritoryManager}; +use crate::networking::{GameView, LocalTurnServerHandle, PlayerView, TurnReceiver}; +use flume::Receiver; + +/// Parameters needed to initialize a new game +pub struct GameInitParams { + pub map_width: u32, + pub map_height: u32, + pub conquerable_tiles: Vec, + pub tile_expansion_times: Vec, + pub tile_expansion_costs: Vec, + pub client_player_id: usize, + pub intent_rx: Receiver, +} + +/// Initialize all game resources when starting a new game +/// This should be called by the StartGame command handler +pub fn initialize_game_resources(commands: &mut Commands, params: GameInitParams) { + info!("Initializing game resources (map: {}x{}, player: {})", params.map_width, params.map_height, params.client_player_id); + + // Initialize territory manager + let mut territory_manager = TerritoryManager::new(params.map_width, params.map_height); + territory_manager.reset(params.map_width, params.map_height, ¶ms.conquerable_tiles); + debug!("Territory manager initialized with {} tiles", params.conquerable_tiles.len()); + + // Initialize border manager + let mut border_manager = BorderManager::new(); + border_manager.reset(params.map_width, params.map_height, 1 + BOT_COUNT); + + // Initialize attack handler + let mut attack_handler = AttackActionHandler::new(); + attack_handler.init(1 + BOT_COUNT, params.tile_expansion_times, params.tile_expansion_costs, params.map_width, params.map_height); + + // Initialize bot manager (1 human player + BOT_COUNT bots) + let bot_manager = BotManager::new(BOT_COUNT, 1); + debug!("BotManager initialized with {} bots", BOT_COUNT); + + // Use a fixed seed for deterministic bot behavior and color generation + // In multiplayer, this should come from the server + let rng_seed = 0xDEADBEEF; + + // Create RNG for deterministic color generation + let mut rng = StdRng::seed_from_u64(rng_seed); + + // Create players: 1 human + BOT_COUNT bots + // Player IDs start at 0 (human), then 1, 2, 3... for bots + let mut players = Vec::new(); + + // Generate random hue offset for color spread + let hue_offset = rng.random_range(0.0..360.0); + + // All players (including human) get deterministically generated colors + for i in 0..=BOT_COUNT { + let is_human = i == 0; + let id = i as f32; + + // Use golden angle distribution with random offset for visually distinct colors + let hue = (id * 137.5 + hue_offset) % 360.0; + let saturation = rng.random_range(0.75..=0.95); + let lightness = rng.random_range(0.35..=0.65); + let color = HSLColor::new(hue, saturation, lightness); + + if is_human { + players.push(Player::new(i, "Player".to_string(), color)); + } else { + players.push(Player::new(i, format!("Bot {}", i), color)); + } + } + + // Initialize player manager + // Human player is always ID 0 + let mut player_manager = PlayerManager::new(); + let human_player_id = 0; + player_manager.init(players, human_player_id); + debug!("Player manager initialized with {} players (human: {}, bots: {})", 1 + BOT_COUNT, human_player_id, BOT_COUNT); + + // Create game instance (bots won't be spawned until player chooses spawn) + let game_instance = GameInstance::new(player_manager, territory_manager, attack_handler, border_manager, bot_manager, rng_seed); + + // Calculate initial bot spawn positions (first pass) + // These will be shown to the player, but not applied to game state yet + let initial_bot_spawns = game_instance.bot_manager.calculate_initial_spawns(&game_instance.territory_manager, rng_seed); + + debug!("Calculated {} initial bot spawn positions", initial_bot_spawns.len()); + + // Create SpawnManager to track spawn positions during spawn phase + let spawn_manager = SpawnManager::new(initial_bot_spawns.clone(), rng_seed, params.map_width, params.map_height); + commands.insert_resource(spawn_manager); + + // Initialize GameView with initial game state + // Calculate total land tiles once for caching (performance optimization) + use std::sync::Arc; + + let total_land_tiles = game_instance.territory_manager.as_slice().iter().filter(|ownership| !ownership.is_water()).count() as u32; + + let game_view = GameView { + width: params.map_width, + height: params.map_height, + territories: Arc::from(game_instance.territory_manager.to_u16_vec().as_slice()), + turn_number: 0, + total_land_tiles, + changed_tiles: Vec::new(), // Empty on initialization + players: game_instance.player_manager.get_players().iter().map(|p| PlayerView { id: p.id as u16, color: p.color.to_rgba(), name: p.name.clone(), tile_count: p.get_territory_size() as u32, troops: p.get_troops() as u32, is_alive: p.is_alive() }).collect(), + }; + + commands.insert_resource(game_instance); + commands.insert_resource(game_view); + debug!("GameInstance and GameView resources created"); + + // Initialize local player context + commands.insert_resource(LocalPlayerContext::new(0)); // Human player is ID 0 + debug!("LocalPlayerContext created for player 0 (human)"); + + // Initialize spawn timeout (5 seconds for local mode) + commands.insert_resource(SpawnTimeout::new(5.0)); + debug!("SpawnTimeout initialized (5.0 seconds)"); + + // Initialize turn generation resources + let (turn_tx, turn_rx) = flume::unbounded(); + let server_handle = LocalTurnServerHandle { paused: std::sync::Arc::new(std::sync::atomic::AtomicBool::new(true)), running: std::sync::Arc::new(std::sync::atomic::AtomicBool::new(true)) }; + commands.insert_resource(server_handle); + commands.insert_resource(TurnReceiver { turn_rx }); + commands.insert_resource(crate::networking::TurnGenerator { turn_number: 0, accumulated_time: 0.0, turn_tx, spawn_config: std::collections::HashMap::new(), spawn_timeout_accumulated: None, game_started: false }); + + debug!("Turn generator initialized (paused until player spawn)"); + + // Activate spawn phase (SpawnPhasePlugin will emit initial SpawnPhaseUpdate) + commands.insert_resource(SpawnPhase { active: true }); + debug!("Spawn phase activated"); + + info!("Game resources initialized successfully - ready to start"); +} + +/// Clean up all game resources when quitting a game +/// This should be called by the QuitGame command handler +pub fn cleanup_game_resources(world: &mut World) { + info!("Cleaning up game resources..."); + + // Stop local turn server if running + if let Some(server_handle) = world.get_resource::() { + server_handle.stop(); + world.remove_resource::(); + } + + // Remove all game-specific resources + world.remove_resource::(); + world.remove_resource::(); + world.remove_resource::(); + world.remove_resource::(); + world.remove_resource::(); + world.remove_resource::(); + world.remove_resource::(); + world.remove_resource::(); + + // Note: SpawnPhase is a permanent resource (init_resource), not removed on quit + + info!("Game resources cleaned up successfully"); +} diff --git a/crates/borders-core/src/game/local_context.rs b/crates/borders-core/src/game/local_context.rs new file mode 100644 index 0000000..61280f8 --- /dev/null +++ b/crates/borders-core/src/game/local_context.rs @@ -0,0 +1,71 @@ +use bevy_ecs::prelude::*; +use serde::{Deserialize, Serialize}; + +/// Represents the outcome for a specific player (local, not shared) +#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] +pub enum PlayerOutcome { + /// Player has won the game + Victory, + /// Player has been eliminated/defeated + Defeat, +} + +/// Local player context - CLIENT-SPECIFIC state, NOT part of deterministic game state +/// +/// **Important: This is LOCAL context, not shared/deterministic state!** +/// +/// This resource contains information specific to THIS client's perspective: +/// - Which player ID this client controls +/// - Whether this player won/lost (irrelevant to other clients) +/// - Whether this client can send commands or is spectating +/// +/// This state is NOT synchronized across clients and is NOT part of +/// GameInstance/GameView which must be identical on all clients for determinism. +/// +/// In multiplayer: +/// - Each client has their own LocalPlayerContext with different player IDs +/// - One client may have `my_outcome = Victory` while others have `Defeat` +/// - A spectator would have `can_send_intents = false` +/// - The shared game state (GameInstance) continues running regardless +#[derive(Resource)] +pub struct LocalPlayerContext { + /// The player ID for this client + pub my_player_id: usize, + + /// The outcome for this specific player (if determined) + /// None = still playing, Some(Victory/Defeat) = game ended for this player + pub my_outcome: Option, + + /// Whether this client can send intents (false when defeated or spectating) + pub can_send_intents: bool, +} + +impl LocalPlayerContext { + /// Create a new local player context for the given player ID + pub fn new(player_id: usize) -> Self { + Self { my_player_id: player_id, my_outcome: None, can_send_intents: true } + } + + /// Mark the local player as defeated + pub fn mark_defeated(&mut self) { + self.my_outcome = Some(PlayerOutcome::Defeat); + self.can_send_intents = false; + } + + /// Mark the local player as victorious + pub fn mark_victorious(&mut self) { + self.my_outcome = Some(PlayerOutcome::Victory); + // Player can still send intents after victory (to continue playing if desired) + // Or set to false if you want to prevent further actions + } + + /// Check if the local player is still actively playing + pub fn is_playing(&self) -> bool { + self.my_outcome.is_none() && self.can_send_intents + } + + /// Check if the local player is spectating (defeated but watching) + pub fn is_spectating(&self) -> bool { + !self.can_send_intents + } +} diff --git a/crates/borders-core/src/game/mod.rs b/crates/borders-core/src/game/mod.rs new file mode 100644 index 0000000..9e5e486 --- /dev/null +++ b/crates/borders-core/src/game/mod.rs @@ -0,0 +1,41 @@ +pub mod action; +pub mod attack; +pub mod attack_handler; +pub mod border_manager; +pub mod bot; +pub mod game_instance; +pub mod input_handlers; +pub mod lifecycle; +pub mod local_context; +pub mod outcome; +pub mod player; +pub mod player_manager; +pub mod spawn_manager; +pub mod spawn_timeout; +pub mod terrain; +pub mod territory; +pub mod territory_manager; +pub mod tile_ownership; +pub mod tilemap; +pub mod tilemap_changes; + +pub use action::*; +pub use attack::*; +pub use attack_handler::*; +pub use border_manager::*; +pub use bot::*; +pub use game_instance::*; +pub use input_handlers::*; +pub use lifecycle::*; +pub use local_context::*; +pub use outcome::*; +pub use player::*; +pub use player_manager::*; +pub use spawn_manager::*; +pub use spawn_timeout::*; +pub use terrain::*; +pub use territory::*; +pub use territory_manager::*; +pub use tile_ownership::*; +pub use tilemap::*; +pub use tilemap_changes::*; diff --git a/crates/borders-core/src/game/outcome.rs b/crates/borders-core/src/game/outcome.rs new file mode 100644 index 0000000..2fb864c --- /dev/null +++ b/crates/borders-core/src/game/outcome.rs @@ -0,0 +1,82 @@ +use crate::game::local_context::LocalPlayerContext; +use crate::game::territory_manager::OWNER_WATER; +use crate::networking::GameView; +use crate::ui::protocol::{BackendMessage, GameOutcome}; +use bevy_ecs::prelude::*; +use tracing::info; + +/// System that checks if the local player has won or lost +/// This is a NON-BLOCKING check - the game continues running regardless +pub fn check_local_player_outcome(mut local_context: ResMut, game_view: Res, mut backend_messages: MessageWriter) { + // Don't check if outcome already determined + if local_context.my_outcome.is_some() { + return; + } + + // Don't check outcome until player has spawned + // Skip only if player has 0 tiles AND is_alive (hasn't spawned yet) + // If player has 0 tiles AND !is_alive, that's a real defeat + let my_player_id = local_context.my_player_id as u16; + let Some(my_player) = game_view.get_player(my_player_id) else { + return; + }; + + if my_player.tile_count == 0 && my_player.is_alive { + // Player hasn't spawned yet - skip outcome check + return; + } + + // Check defeat condition: I've been eliminated (0 tiles) + if !my_player.is_alive { + info!("Local player defeated - eliminated (0 tiles)"); + local_context.mark_defeated(); + backend_messages.write(BackendMessage::GameEnded { outcome: GameOutcome::Defeat }); + return; + } + + // Calculate total claimable tiles for victory condition checks + let total_claimable_tiles = game_view.territories.iter().filter(|&&owner| owner != OWNER_WATER).count(); + + const WIN_THRESHOLD: f32 = 0.80; + + if total_claimable_tiles > 0 { + let my_tiles = my_player.tile_count as usize; + let my_occupation = my_tiles as f32 / total_claimable_tiles as f32; + + // Check if I've won by occupation + if my_occupation >= WIN_THRESHOLD { + info!("Local player victorious - reached {:.1}% occupation ({}/{} claimable tiles, threshold: {:.0}%)", my_occupation * 100.0, my_tiles, total_claimable_tiles, WIN_THRESHOLD * 100.0); + local_context.mark_victorious(); + backend_messages.write(BackendMessage::GameEnded { outcome: GameOutcome::Victory }); + return; + } + + // Check if any opponent has won by occupation (which means I lost) + for player in &game_view.players { + if player.id != my_player_id && player.is_alive { + let opponent_tiles = player.tile_count as usize; + let opponent_occupation = opponent_tiles as f32 / total_claimable_tiles as f32; + + if opponent_occupation >= WIN_THRESHOLD { + info!("Local player defeated - {} reached {:.1}% occupation ({}/{} claimable tiles, threshold: {:.0}%)", player.name, opponent_occupation * 100.0, opponent_tiles, total_claimable_tiles, WIN_THRESHOLD * 100.0); + local_context.mark_defeated(); + backend_messages.write(BackendMessage::GameEnded { outcome: GameOutcome::Defeat }); + return; + } + } + } + } + + // Check victory by eliminating all opponents + let all_opponents_dead = game_view + .players + .iter() + .filter(|p| p.id != my_player_id) // Exclude me + .all(|p| !p.is_alive); + + if all_opponents_dead && my_player.is_alive { + info!("Local player victorious - all opponents eliminated"); + local_context.mark_victorious(); + backend_messages.write(BackendMessage::GameEnded { outcome: GameOutcome::Victory }); + } +} diff --git a/crates/borders-core/src/game/player.rs b/crates/borders-core/src/game/player.rs new file mode 100644 index 0000000..9023c68 --- /dev/null +++ b/crates/borders-core/src/game/player.rs @@ -0,0 +1,132 @@ +/// HSL Color representation +#[derive(Debug, Clone, Copy)] +pub struct HSLColor { + pub h: f32, // Hue: 0-360 + pub s: f32, // Saturation: 0-1 + pub l: f32, // Lightness: 0-1 +} + +impl HSLColor { + pub fn new(h: f32, s: f32, l: f32) -> Self { + Self { h, s, l } + } + + pub fn to_rgba(&self) -> [f32; 4] { + let c = (1.0 - (2.0 * self.l - 1.0).abs()) * self.s; + let h_prime = self.h / 60.0; + let x = c * (1.0 - ((h_prime % 2.0) - 1.0).abs()); + + let (r1, g1, b1) = if h_prime < 1.0 { + (c, x, 0.0) + } else if h_prime < 2.0 { + (x, c, 0.0) + } else if h_prime < 3.0 { + (0.0, c, x) + } else if h_prime < 4.0 { + (0.0, x, c) + } else if h_prime < 5.0 { + (x, 0.0, c) + } else { + (c, 0.0, x) + }; + + let m = self.l - c / 2.0; + [r1 + m, g1 + m, b1 + m, 1.0] + } + + pub fn from_rgb(r: u8, g: u8, b: u8) -> Self { + let r = r as f32 / 255.0; + let g = g as f32 / 255.0; + let b = b as f32 / 255.0; + + let max = r.max(g).max(b); + let min = r.min(g).min(b); + let delta = max - min; + + let l = (max + min) / 2.0; + + if delta == 0.0 { + return Self { h: 0.0, s: 0.0, l }; + } + + let s = if l < 0.5 { delta / (max + min) } else { delta / (2.0 - max - min) }; + + let h = if max == r { + 60.0 * (((g - b) / delta) % 6.0) + } else if max == g { + 60.0 * (((b - r) / delta) + 2.0) + } else { + 60.0 * (((r - g) / delta) + 4.0) + }; + + let h = if h < 0.0 { h + 360.0 } else { h }; + + Self { h, s, l } + } +} + +/// Player in the game +#[derive(Debug, Clone)] +pub struct Player { + pub id: usize, + pub name: String, + pub color: HSLColor, + troops: f32, + territory_size: usize, + alive: bool, +} + +impl Player { + pub fn new(id: usize, name: String, color: HSLColor) -> Self { + Self { id, name, color, troops: 1000.0, territory_size: 0, alive: true } + } + + /// Add a tile to the player's territory + /// WARNING: Call this AFTER updating the territory manager + pub fn add_tile(&mut self, _tile: usize) { + self.territory_size += 1; + } + + /// Remove a tile from the player's territory + /// WARNING: Call this AFTER updating the territory manager + pub fn remove_tile(&mut self, _tile: usize) { + self.territory_size = self.territory_size.saturating_sub(1); + if self.territory_size == 0 { + self.alive = false; + } + } + + /// Process one tick worth of income + pub fn income(&mut self) { + let base_income = (self.territory_size / 10) as f32; + let troop_factor = (3.0 / 5.0_f32).powf(1.0 - (self.troops + 1.0).ln() / std::f32::consts::LN_2); + let income = 1.0_f32.max(base_income + troop_factor.floor()); + self.add_troops(income); + } + + /// Get the amount of troops the player has + pub fn get_troops(&self) -> f32 { + self.troops + } + + /// Add troops to the player + /// Troops will be capped at 100 times the territory size + pub fn add_troops(&mut self, amount: f32) { + self.troops = (self.troops + amount).min((self.territory_size * 100) as f32); + } + + /// Remove troops from the player + pub fn remove_troops(&mut self, amount: f32) { + self.troops = (self.troops - amount).max(0.0); + } + + /// Get the size of the player's territory (in tiles) + pub fn get_territory_size(&self) -> usize { + self.territory_size + } + + /// Check if the player is alive + pub fn is_alive(&self) -> bool { + self.alive + } +} diff --git a/crates/borders-core/src/game/player_manager.rs b/crates/borders-core/src/game/player_manager.rs new file mode 100644 index 0000000..97d8b2e --- /dev/null +++ b/crates/borders-core/src/game/player_manager.rs @@ -0,0 +1,82 @@ +use crate::game::player::Player; + +/// Manages all players in the game +pub struct PlayerManager { + players: Vec, + pub client_player_id: usize, + human_count: usize, +} + +impl Default for PlayerManager { + fn default() -> Self { + Self::new() + } +} + +impl PlayerManager { + pub fn new() -> Self { + Self { players: Vec::new(), client_player_id: 0, human_count: 0 } + } + + /// Initialize the player manager + pub fn init(&mut self, players: Vec, client_player_id: usize) { + self.players = players; + self.client_player_id = client_player_id; + self.human_count = 1; // For now, only one human player + } + + /// Register a new player + pub fn register_player(&mut self, player: Player) { + self.players.push(player); + } + + /// Get a player by ID + pub fn get_player(&self, id: usize) -> Option<&Player> { + self.players.get(id) + } + + /// Get a mutable player by ID + pub fn get_player_mut(&mut self, id: usize) -> Option<&mut Player> { + self.players.get_mut(id) + } + + /// Get all players + pub fn get_players(&self) -> &[Player] { + &self.players + } + + /// Get all players mutably + pub fn get_players_mut(&mut self) -> &mut [Player] { + &mut self.players + } + + /// Check if a player is a bot + pub fn is_bot(&self, player_id: usize) -> bool { + player_id >= self.human_count + } + + /// Validate a player ID + pub fn validate_player(&self, player_id: usize) -> bool { + self.players.get(player_id).is_some_and(|p| p.is_alive()) + } + + /// Process income for all players + pub fn process_income(&mut self) { + let _ = tracing::debug_span!("process_income"); + for player in &mut self.players { + if player.is_alive() { + player.income(); + } + } + } + + /// Get the number of players + pub fn player_count(&self) -> usize { + self.players.len() + } + + /// Get the client player + pub fn get_client_player(&self) -> Option<&Player> { + self.get_player(self.client_player_id) + } +} diff --git a/crates/borders-core/src/game/spawn_manager.rs b/crates/borders-core/src/game/spawn_manager.rs new file mode 100644 index 0000000..1f35eba --- /dev/null +++ b/crates/borders-core/src/game/spawn_manager.rs @@ -0,0 +1,67 @@ +use bevy_ecs::prelude::*; + +/// Manages spawn positions during the pre-game spawn phase +/// +/// This resource tracks bot and player spawn positions before the game starts ticking. +/// It allows for dynamic recalculation of bot positions when players change their spawn +/// location, implementing the two-pass spawn system described in the README. +#[derive(Resource)] +pub struct SpawnManager { + /// Initial bot spawn positions from first pass (player_id, tile_index) + pub initial_bot_spawns: Vec<(usize, usize)>, + + /// Current bot spawn positions after recalculation (player_id, tile_index) + /// These are updated whenever a player chooses/changes their spawn + pub current_bot_spawns: Vec<(usize, usize)>, + + /// Player spawn positions (player_id, tile_index) + /// Tracks human player spawn selections + pub player_spawns: Vec<(usize, usize)>, + + /// RNG seed for deterministic spawn calculations + pub rng_seed: u64, + + /// Map dimensions for distance calculations + pub map_width: u32, + pub map_height: u32, +} + +impl SpawnManager { + /// Create a new SpawnManager with initial bot spawns + pub fn new(initial_bot_spawns: Vec<(usize, usize)>, rng_seed: u64, map_width: u32, map_height: u32) -> Self { + Self { current_bot_spawns: initial_bot_spawns.clone(), initial_bot_spawns, player_spawns: Vec::new(), rng_seed, map_width, map_height } + } + + /// Update a player's spawn position and recalculate bot spawns if necessary + /// + /// This triggers the second pass of the two-pass spawn system, relocating + /// any bots that are too close to the new player position. + pub fn update_player_spawn(&mut self, player_id: usize, tile_index: usize, bot_manager: &crate::game::BotManager, territory_manager: &crate::game::TerritoryManager) { + // Update or add player spawn + if let Some(entry) = self.player_spawns.iter_mut().find(|(pid, _)| *pid == player_id) { + entry.1 = tile_index; + } else { + self.player_spawns.push((player_id, tile_index)); + } + + // Recalculate bot spawns with updated player positions + self.current_bot_spawns = bot_manager.recalculate_spawns_with_players(self.initial_bot_spawns.clone(), &self.player_spawns, territory_manager, self.rng_seed); + } + + /// Get all current spawn positions (players + bots) + pub fn get_all_spawns(&self) -> Vec<(usize, usize)> { + let mut all_spawns = self.player_spawns.clone(); + all_spawns.extend(self.current_bot_spawns.iter().copied()); + all_spawns + } + + /// Get only bot spawn positions + pub fn get_bot_spawns(&self) -> &[(usize, usize)] { + &self.current_bot_spawns + } + + /// Get only player spawn positions + pub fn get_player_spawns(&self) -> &[(usize, usize)] { + &self.player_spawns + } +} diff --git a/crates/borders-core/src/game/spawn_timeout.rs b/crates/borders-core/src/game/spawn_timeout.rs new file mode 100644 index 0000000..fd49e19 --- /dev/null +++ b/crates/borders-core/src/game/spawn_timeout.rs @@ -0,0 +1,74 @@ +use bevy_ecs::prelude::*; + +/// Tracks spawn phase timeout state on the client side +/// +/// This resource is used to: +/// - Show countdown timer in UI +/// - Know when spawn phase is active +/// - Calculate remaining time for display +#[derive(Resource)] +pub struct SpawnTimeout { + /// Whether spawn phase is currently active + pub active: bool, + + /// Accumulated time since start (seconds) + pub elapsed_secs: f32, + + /// Total timeout duration in seconds + pub duration_secs: f32, + + /// Remaining time in seconds (updated each frame) + pub remaining_secs: f32, +} + +impl Default for SpawnTimeout { + fn default() -> Self { + Self { + active: false, + elapsed_secs: 0.0, + duration_secs: 5.0, // Local mode: 5 seconds + remaining_secs: 5.0, + } + } +} + +impl SpawnTimeout { + /// Create a new spawn timeout with specified duration + pub fn new(duration_secs: f32) -> Self { + Self { active: false, elapsed_secs: 0.0, duration_secs, remaining_secs: duration_secs } + } + + /// Start the timeout countdown + pub fn start(&mut self) { + if self.elapsed_secs == 0.0 { + self.active = true; + self.elapsed_secs = 0.0; + self.remaining_secs = self.duration_secs; + } + } + + /// Update remaining time (call each frame with delta time) + pub fn update(&mut self, delta_secs: f32) { + if !self.active { + return; + } + + self.elapsed_secs += delta_secs; + self.remaining_secs = (self.duration_secs - self.elapsed_secs).max(0.0); + + if self.remaining_secs <= 0.0 { + self.active = false; + } + } + + /// Stop the timeout + pub fn stop(&mut self) { + self.active = false; + self.elapsed_secs = 0.0; + } + + /// Check if timeout has expired + pub fn has_expired(&self) -> bool { + !self.active && self.remaining_secs <= 0.0 + } +} diff --git a/crates/borders-core/src/game/terrain.rs b/crates/borders-core/src/game/terrain.rs new file mode 100644 index 0000000..45abe1b --- /dev/null +++ b/crates/borders-core/src/game/terrain.rs @@ -0,0 +1,270 @@ +use bevy_ecs::prelude::Resource; +use glam::UVec2; +use image::GenericImageView; +use serde::{Deserialize, Serialize}; +use std::fs; +use tracing::{debug, info}; + +use crate::game::territory::get_idx; +use crate::game::tilemap::TileMap; + +/// Calculate terrain color using pastel theme formulas +fn calculate_theme_color(color_base: &str, color_variant: u8) -> [u8; 3] { + let i = color_variant as i32; + + match color_base { + "grass" => { + // rgb(238 - 2 * i, 238 - 2 * i, 190 - i) + [(238 - 2 * i).clamp(0, 255) as u8, (238 - 2 * i).clamp(0, 255) as u8, (190 - i).clamp(0, 255) as u8] + } + "mountain" => { + // rgb(250 - 2 * i, 250 - 2 * i, 220 - i) + [(250 - 2 * i).clamp(0, 255) as u8, (250 - 2 * i).clamp(0, 255) as u8, (220 - i).clamp(0, 255) as u8] + } + "water" => { + // rgb(172 - 2 * i, 225 - 2 * i, 249 - 3 * i) + [(172 - 2 * i).clamp(0, 255) as u8, (225 - 2 * i).clamp(0, 255) as u8, (249 - 3 * i).clamp(0, 255) as u8] + } + _ => { + // Default fallback color (gray) + [128, 128, 128] + } + } +} + +/// Helper structs for loading World.json format +#[derive(Deserialize)] +struct WorldMapJson { + tiles: Vec, +} + +#[derive(Deserialize)] +struct WorldTileDef { + color: String, + name: String, + #[serde(default, rename = "colorBase")] + color_base: Option, + #[serde(default, rename = "colorVariant")] + color_variant: Option, + conquerable: bool, + navigable: bool, + #[serde(default, rename = "expansionCost")] + expansion_cost: Option, + #[serde(default, rename = "expansionTime")] + expansion_time: Option, +} + +/// Parse hex color string (#RRGGBB) to RGB bytes +fn parse_hex_rgb(s: &str) -> Option<[u8; 3]> { + let s = s.trim_start_matches('#'); + if s.len() != 6 { + return None; + } + let r = u8::from_str_radix(&s[0..2], 16).ok()?; + let g = u8::from_str_radix(&s[2..4], 16).ok()?; + let b = u8::from_str_radix(&s[4..6], 16).ok()?; + Some([r, g, b]) +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct TileType { + pub name: String, + pub color_base: String, + pub color_variant: u8, + pub conquerable: bool, + pub navigable: bool, + pub expansion_time: u8, + pub expansion_cost: u8, +} + +/// Map manifest structure +#[derive(Debug, Clone, Deserialize, Serialize)] +pub struct MapManifest { + pub map: MapMetadata, + pub name: String, + pub nations: Vec, +} + +/// Map size metadata +#[derive(Debug, Clone, Deserialize, Serialize)] +pub struct MapMetadata { + pub width: usize, + pub height: usize, + pub num_land_tiles: usize, +} + +/// Nation spawn point +#[derive(Debug, Clone, Deserialize, Serialize)] +pub struct NationSpawn { + pub coordinates: [usize; 2], + pub flag: String, + pub name: String, + pub strength: u32, +} + +/// Loaded map data +#[derive(Debug, Clone, Resource)] +pub struct TerrainData { + pub _manifest: MapManifest, + /// Legacy terrain data (for backward compatibility) + pub terrain_data: TileMap, + /// Tile type indices (new format) + pub tiles: Vec, + /// Tile type definitions + pub tile_types: Vec, +} + +impl TerrainData { + /// Load the World map from embedded assets + pub fn load_world_map() -> Result> { + const MAP_JSON: &[u8] = include_bytes!("../../assets/maps/World.json"); + const MAP_PNG: &[u8] = include_bytes!("../../assets/maps/World.png"); + + // Parse JSON tile definitions + let map_json: WorldMapJson = serde_json::from_slice(MAP_JSON)?; + + // Load PNG image + let png = image::load_from_memory(MAP_PNG)?; + let (width, height) = png.dimensions(); + + info!("Loading World map: {}x{}", width, height); + + // Build color-to-index lookup table + let color_to_index: Vec<([u8; 3], usize)> = map_json.tiles.iter().enumerate().filter_map(|(idx, t)| parse_hex_rgb(&t.color).map(|rgb| (rgb, idx))).collect(); + + let mut tiles = vec![0u8; (width * height) as usize]; + let mut terrain_data_raw = vec![0u8; (width * height) as usize]; + + // Match each pixel to nearest tile type by color + for y in 0..height { + for x in 0..width { + let pixel = png.get_pixel(x, y).0; + let rgb = [pixel[0], pixel[1], pixel[2]]; + + // Find nearest tile by RGB distance + let (tile_idx, _) = color_to_index + .iter() + .map(|(c, idx)| { + let dr = rgb[0] as i32 - c[0] as i32; + let dg = rgb[1] as i32 - c[1] as i32; + let db = rgb[2] as i32 - c[2] as i32; + let dist = (dr * dr + dg * dg + db * db) as u32; + (idx, dist) + }) + .min_by_key(|(_, d)| *d) + .unwrap(); + + let i = (y * width + x) as usize; + tiles[i] = *tile_idx as u8; + + // Set bit 7 if conquerable (land) + if map_json.tiles[*tile_idx].conquerable { + terrain_data_raw[i] |= 0x80; + } + // Lower 5 bits for terrain magnitude (unused for World map) + } + } + + // Convert to TileType format + let tile_types = map_json.tiles.into_iter().map(|t| TileType { name: t.name, color_base: t.color_base.unwrap_or_default(), color_variant: t.color_variant.unwrap_or(0) as u8, conquerable: t.conquerable, navigable: t.navigable, expansion_cost: t.expansion_cost.unwrap_or(50) as u8, expansion_time: t.expansion_time.unwrap_or(50) as u8 }).collect(); + + let num_land_tiles = terrain_data_raw.iter().filter(|&&b| b & 0x80 != 0).count(); + + info!("World map loaded: {} land tiles", num_land_tiles); + + Ok(Self { _manifest: MapManifest { name: "World".to_string(), map: MapMetadata { width: width as usize, height: height as usize, num_land_tiles }, nations: vec![] }, terrain_data: TileMap::from_vec(width, height, terrain_data_raw), tiles, tile_types }) + } + + /// Load a map from the resources directory + pub fn load(map_name: &str) -> Result> { + let base_path = format!("resources/maps/{}", map_name); + + // Load manifest + let manifest_path = format!("{}/manifest.json", base_path); + let manifest_json = fs::read_to_string(&manifest_path)?; + let manifest: MapManifest = serde_json::from_str(&manifest_json)?; + + // Load binary map data + let map_path = format!("{}/map.bin", base_path); + let terrain_data_raw = fs::read(&map_path)?; + + let width = manifest.map.width as u32; + let height = manifest.map.height as u32; + + // Verify data size + if terrain_data_raw.len() != (width * height) as usize { + return Err(format!("Map data size mismatch: expected {} bytes, got {}", width * height, terrain_data_raw.len()).into()); + } + + info!("Loaded map '{}' ({}x{})", manifest.name, width, height); + debug!("Land tiles: {}/{}", manifest.map.num_land_tiles, width * height); + + // Create default tile types for legacy format + let tile_types = vec![TileType { name: "water".to_string(), color_base: "water".to_string(), color_variant: 0, conquerable: false, navigable: true, expansion_time: 255, expansion_cost: 255 }, TileType { name: "land".to_string(), color_base: "grass".to_string(), color_variant: 0, conquerable: true, navigable: false, expansion_time: 50, expansion_cost: 50 }]; + + // Convert legacy format to tile indices + let tiles: Vec = terrain_data_raw.iter().map(|&byte| if byte & 0x80 != 0 { 1 } else { 0 }).collect(); + + // Create TileMap from terrain data + let terrain_data = TileMap::from_vec(width, height, terrain_data_raw); + + Ok(Self { _manifest: manifest, terrain_data, tiles, tile_types }) + } + + /// Get the size of the map + pub fn size(&self) -> UVec2 { + UVec2::new(self.terrain_data.width(), self.terrain_data.height()) + } + + pub fn get_value>(&self, pos: T) -> u8 { + self.terrain_data[get_idx(pos, self.terrain_data.width())] + } + + /// Check if a tile is land (bit 7 set) + pub fn is_land>(&self, pos: T) -> bool { + self.get_value(pos) & 0x80 != 0 + } + + /// Get terrain magnitude (bits 0-4) + pub fn terrain_magnitude>(&self, pos: T) -> u8 { + self.get_value(pos) & 0b00011111 + } + + /// Get tile type at position + pub fn get_tile_type>(&self, pos: T) -> &TileType { + let idx = get_idx(pos, self.terrain_data.width()); + &self.tile_types[self.tiles[idx] as usize] + } + + /// Check if a tile is conquerable + pub fn is_conquerable>(&self, pos: T) -> bool { + self.get_tile_type(pos).conquerable + } + + /// Check if a tile is navigable (water) + pub fn is_navigable>(&self, pos: T) -> bool { + self.get_tile_type(pos).navigable + } + + /// Get expansion time for a tile + pub fn get_expansion_time>(&self, pos: T) -> u8 { + self.get_tile_type(pos).expansion_time + } + + /// Get expansion cost for a tile + pub fn get_expansion_cost>(&self, pos: T) -> u8 { + self.get_tile_type(pos).expansion_cost + } + + /// Get tile type IDs for rendering (each position maps to a tile type) + pub fn get_tile_ids(&self) -> &[u8] { + &self.tiles + } + + /// Get terrain palette colors from tile types (for rendering) + /// Returns a vec where index = tile type ID, value = RGB color + /// Colors are calculated using theme formulas based on colorBase and colorVariant + pub fn get_terrain_palette_colors(&self) -> Vec<[u8; 3]> { + self.tile_types.iter().map(|tile_type| calculate_theme_color(&tile_type.color_base, tile_type.color_variant)).collect() + } +} diff --git a/crates/borders-core/src/game/territory.rs b/crates/borders-core/src/game/territory.rs new file mode 100644 index 0000000..c72e136 --- /dev/null +++ b/crates/borders-core/src/game/territory.rs @@ -0,0 +1,21 @@ +use glam::{IVec2, UVec2}; + +/// Convert 2D coordinates to a flat array index +pub fn get_idx>(pos: T, width: u32) -> usize { + let pos = pos.into(); + pos.x as usize + pos.y as usize * width as usize +} + +const CARDINAL_DIRECTIONS: [IVec2; 4] = [IVec2::new(0, 1), IVec2::new(1, 0), IVec2::new(0, -1), IVec2::new(-1, 0)]; + +/// Returns an iterator over the valid cardinal neighbors of a tile. +/// +/// Requires the width and height of the map to be passed in to ensure the neighbor is within bounds. +pub fn get_neighbors(pos: UVec2, width: u32, height: u32) -> impl Iterator { + let in_bounds = move |neighbor: IVec2| (0..width).contains(&(neighbor.x as u32)) && (0..height).contains(&(neighbor.y as u32)); + + CARDINAL_DIRECTIONS.into_iter().filter_map(move |dir| { + let neighbor = pos.as_ivec2().saturating_add(dir); + in_bounds(neighbor).then_some(neighbor.as_uvec2()) + }) +} diff --git a/crates/borders-core/src/game/territory_manager.rs b/crates/borders-core/src/game/territory_manager.rs new file mode 100644 index 0000000..a5ee0a5 --- /dev/null +++ b/crates/borders-core/src/game/territory_manager.rs @@ -0,0 +1,184 @@ +use crate::game::tile_ownership::{ENCODED_WATER, TileOwnership}; +use crate::game::tilemap::TileMap; +use crate::game::tilemap_changes::ChangeBuffer; + +/// Deprecated: Use TileOwnership::Water instead +/// Kept for backward compatibility during migration +pub const OWNER_WATER: u16 = ENCODED_WATER; + +/// Manages territory ownership for all tiles +pub struct TerritoryManager { + tile_owners: TileMap, + changes: ChangeBuffer, + /// Cached u16 representation for efficient serialization to frontend + u16_cache: Vec, + cache_dirty: bool, +} + +impl TerritoryManager { + /// Creates a new territory manager + pub fn new(width: u32, height: u32) -> Self { + let size = (width * height) as usize; + Self { tile_owners: TileMap::with_default(width, height, TileOwnership::Unclaimed), changes: ChangeBuffer::with_capacity((width * height / 100) as usize), u16_cache: vec![0; size], cache_dirty: true } + } + + /// Resets the territory manager + /// Should only be called when a new game is started + pub fn reset(&mut self, width: u32, height: u32, conquerable_tiles: &[bool]) { + self.tile_owners = TileMap::with_default(width, height, TileOwnership::Unclaimed); + self.changes.clear(); + + for (i, &conquerable) in conquerable_tiles.iter().enumerate() { + if !conquerable { + self.tile_owners[i] = TileOwnership::Water; + } + } + + let size = (width * height) as usize; + self.u16_cache.resize(size, 0); + self.cache_dirty = true; + } + + /// Checks if a tile is a border tile of the territory of its owner + /// A tile is a border tile if it is adjacent to a tile that is not owned by the same player + pub fn is_border(&self, tile: usize) -> bool { + let pos = self.tile_owners.index_to_pos(tile); + let owner = self.tile_owners[tile]; + + // Border if on map edge + if pos.x == 0 || pos.x == self.tile_owners.width() - 1 || pos.y == 0 || pos.y == self.tile_owners.height() - 1 { + return true; + } + + // Border if any neighbor has different owner + for neighbor_pos in self.tile_owners.neighbors(pos) { + if self.tile_owners[neighbor_pos] != owner { + return true; + } + } + + false + } + + /// Checks if a tile has an owner + pub fn has_owner(&self, tile: usize) -> bool { + self.tile_owners[tile].is_owned() + } + + /// Checks if a tile is owned by a specific player + pub fn is_owner(&self, tile: usize, owner: usize) -> bool { + self.tile_owners[tile].is_owned_by(owner as u16) + } + + /// Gets the owner of a tile as u16 (for compatibility) + /// Returns the encoded u16 value (nation_id, or ENCODED_UNCLAIMED/ENCODED_WATER) + pub fn get_owner(&self, tile: usize) -> u16 { + self.tile_owners[tile].to_u16() + } + + /// Gets the ownership enum for a tile + pub fn get_ownership(&self, tile: usize) -> TileOwnership { + self.tile_owners[tile] + } + + /// Checks if a tile is water + pub fn is_water(&self, tile: usize) -> bool { + self.tile_owners[tile].is_water() + } + + /// Conquers a tile for a player + /// If the tile is already owned by a player, that player will lose the tile + /// Only records a change if the owner actually changed + pub fn conquer(&mut self, tile: usize, owner: usize) -> u16 { + let previous_owner = self.tile_owners[tile]; + let new_ownership = TileOwnership::Owned(owner as u16); + + // Only update and track change if the owner actually changed + if previous_owner != new_ownership { + self.tile_owners[tile] = new_ownership; + self.changes.push(tile); + self.cache_dirty = true; + } + + previous_owner.to_u16() + } + + /// Clears a tile (removes ownership) + pub fn clear(&mut self, tile: usize) -> Option { + let ownership = self.tile_owners[tile]; + if ownership.is_owned() { + self.tile_owners[tile] = TileOwnership::Unclaimed; + self.changes.push(tile); + self.cache_dirty = true; + ownership.nation_id() + } else { + None + } + } + + /// Get width of the map + pub fn width(&self) -> u32 { + self.tile_owners.width() + } + + /// Get height of the map + pub fn height(&self) -> u32 { + self.tile_owners.height() + } + + /// Returns a reference to the underlying tile ownership data as a slice of enums + pub fn as_slice(&self) -> &[TileOwnership] { + self.tile_owners.as_slice() + } + + /// Returns the tile ownership data as u16 values for frontend serialization + /// This is cached and only recomputed when ownership changes + pub fn as_u16_slice(&mut self) -> &[u16] { + if self.cache_dirty { + for (i, ownership) in self.tile_owners.as_slice().iter().enumerate() { + self.u16_cache[i] = ownership.to_u16(); + } + self.cache_dirty = false; + } + &self.u16_cache + } + + /// Converts tile ownership to a Vec for serialization (immutable) + /// Use this when you need a Vec for creating Arc<[u16]> + pub fn to_u16_vec(&self) -> Vec { + self.tile_owners.as_slice().iter().map(|ownership| ownership.to_u16()).collect() + } + + /// Returns the number of tiles in the map + pub fn len(&self) -> usize { + self.tile_owners.len() + } + + /// Returns true if the map has no tiles + pub fn is_empty(&self) -> bool { + self.tile_owners.len() == 0 + } + + /// Drains all changed tile indices, returning an iterator and clearing the change buffer + pub fn drain_changes(&mut self) -> impl Iterator + '_ { + self.changes.drain() + } + + /// Returns true if any territory changes have been recorded since last drain + pub fn has_changes(&self) -> bool { + self.changes.has_changes() + } + + /// Clears all tracked changes without returning them + pub fn clear_changes(&mut self) { + self.changes.clear() + } + + /// Calls a closure for each neighbor using tile indices + pub fn on_neighbor_indices(&self, index: usize, closure: F) + where + F: FnMut(usize), + { + self.tile_owners.on_neighbor_indices(index, closure) + } +} diff --git a/crates/borders-core/src/game/tile_ownership.rs b/crates/borders-core/src/game/tile_ownership.rs new file mode 100644 index 0000000..d216410 --- /dev/null +++ b/crates/borders-core/src/game/tile_ownership.rs @@ -0,0 +1,159 @@ +//! Tile ownership representation +//! +//! This module defines how tiles are owned and what their terrain type is. +//! It separates the concept of "who owns this tile" from "what type of terrain is this". +//! +//! ## Encoding +//! +//! For frontend serialization, TileOwnership is encoded as a u16: +//! - 0-65533: Nation IDs (supports 400+ nations) +//! - 65534: Unclaimed land +//! - 65535: Water (unconquerable terrain) + +use serde::{Deserialize, Serialize}; + +/// Encoded value for unclaimed land in u16 representation +pub const ENCODED_UNCLAIMED: u16 = 65534; + +/// Encoded value for water in u16 representation +/// Kept at 65535 for backward compatibility with OWNER_WATER +pub const ENCODED_WATER: u16 = 65535; + +/// Represents the ownership/state of a single tile +/// +/// This enum clearly separates nation ownership from terrain type, +/// allowing nation ID 0 to be valid without confusion with wilderness. +#[derive(Debug, Copy, Clone, Eq, PartialEq, Serialize, Deserialize, Default)] +pub enum TileOwnership { + /// Owned by a nation (0-65533, supporting 65,534 possible nations) + Owned(u16), + /// Unclaimed but conquerable land + #[default] + Unclaimed, + /// Water (unconquerable terrain) + Water, +} + +impl TileOwnership { + /// Convert to u16 for frontend serialization + pub fn to_u16(self) -> u16 { + match self { + TileOwnership::Owned(nation_id) => nation_id, + TileOwnership::Unclaimed => ENCODED_UNCLAIMED, + TileOwnership::Water => ENCODED_WATER, + } + } + + /// Convert from u16 (frontend serialization format) + pub fn from_u16(value: u16) -> Self { + match value { + ENCODED_WATER => TileOwnership::Water, + ENCODED_UNCLAIMED => TileOwnership::Unclaimed, + nation_id => TileOwnership::Owned(nation_id), + } + } + + /// Check if this tile is owned by any nation + pub fn is_owned(self) -> bool { + matches!(self, TileOwnership::Owned(_)) + } + + /// Check if this tile is unclaimed land + pub fn is_unclaimed(self) -> bool { + matches!(self, TileOwnership::Unclaimed) + } + + /// Check if this tile is water + pub fn is_water(self) -> bool { + matches!(self, TileOwnership::Water) + } + + /// Get the nation ID if this tile is owned, otherwise None + pub fn nation_id(self) -> Option { + match self { + TileOwnership::Owned(id) => Some(id), + _ => None, + } + } + + /// Check if this tile is owned by a specific nation + pub fn is_owned_by(self, nation_id: u16) -> bool { + matches!(self, TileOwnership::Owned(id) if id == nation_id) + } +} + +impl From for TileOwnership { + fn from(value: u16) -> Self { + Self::from_u16(value) + } +} + +impl From for u16 { + fn from(ownership: TileOwnership) -> Self { + ownership.to_u16() + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_encoding_nation_ids() { + for nation_id in [0, 1, 100, 1000, 65533] { + let ownership = TileOwnership::Owned(nation_id); + let encoded = ownership.to_u16(); + assert_eq!(encoded, nation_id); + assert_eq!(TileOwnership::from_u16(encoded), ownership); + } + } + + #[test] + fn test_encoding_unclaimed() { + let ownership = TileOwnership::Unclaimed; + let encoded = ownership.to_u16(); + assert_eq!(encoded, ENCODED_UNCLAIMED); + assert_eq!(TileOwnership::from_u16(encoded), ownership); + } + + #[test] + fn test_encoding_water() { + let ownership = TileOwnership::Water; + let encoded = ownership.to_u16(); + assert_eq!(encoded, ENCODED_WATER); + assert_eq!(TileOwnership::from_u16(encoded), ownership); + } + + #[test] + fn test_is_owned() { + assert!(TileOwnership::Owned(0).is_owned()); + assert!(TileOwnership::Owned(100).is_owned()); + assert!(!TileOwnership::Unclaimed.is_owned()); + assert!(!TileOwnership::Water.is_owned()); + } + + #[test] + fn test_is_owned_by() { + assert!(TileOwnership::Owned(5).is_owned_by(5)); + assert!(!TileOwnership::Owned(5).is_owned_by(6)); + assert!(!TileOwnership::Unclaimed.is_owned_by(5)); + assert!(!TileOwnership::Water.is_owned_by(5)); + } + + #[test] + fn test_nation_id() { + assert_eq!(TileOwnership::Owned(42).nation_id(), Some(42)); + assert_eq!(TileOwnership::Unclaimed.nation_id(), None); + assert_eq!(TileOwnership::Water.nation_id(), None); + } + + #[test] + fn test_nation_zero_is_valid() { + let ownership = TileOwnership::Owned(0); + assert!(ownership.is_owned()); + assert!(ownership.is_owned_by(0)); + assert_eq!(ownership.nation_id(), Some(0)); + assert_ne!(ownership, TileOwnership::Unclaimed); + assert_ne!(ownership, TileOwnership::Water); + } +} diff --git a/crates/borders-core/src/game/tilemap.rs b/crates/borders-core/src/game/tilemap.rs new file mode 100644 index 0000000..2a767bc --- /dev/null +++ b/crates/borders-core/src/game/tilemap.rs @@ -0,0 +1,441 @@ +use glam::UVec2; +use std::ops::{Index, IndexMut}; + +/// A 2D grid-based map structure optimized for tile-based games. +/// +/// Provides efficient access to tiles using 2D coordinates (UVec2) while maintaining +/// cache-friendly contiguous memory layout. Supports generic tile types that implement Copy. +/// +/// # Type Parameters +/// * `T` - The tile value type. Must implement `Copy` for efficient access. +/// +/// # Examples +/// ``` +/// use glam::UVec2; +/// use borders_core::game::TileMap; +/// +/// let mut map = TileMap::::new(10, 10); +/// map[UVec2::new(5, 5)] = 42; +/// assert_eq!(map[UVec2::new(5, 5)], 42); +/// ``` +#[derive(Clone, Debug)] +pub struct TileMap { + tiles: Box<[T]>, + width: u32, + height: u32, +} + +impl TileMap { + /// Creates a new TileMap with the specified dimensions and default value. + /// + /// # Arguments + /// * `width` - The width of the map in tiles + /// * `height` - The height of the map in tiles + /// * `default` - The default value to initialize all tiles with + pub fn with_default(width: u32, height: u32, default: T) -> Self { + let capacity = (width * height) as usize; + let tiles = vec![default; capacity].into_boxed_slice(); + Self { tiles, width, height } + } + + /// Creates a TileMap from an existing vector of tile data. + /// + /// # Arguments + /// * `width` - The width of the map in tiles + /// * `height` - The height of the map in tiles + /// * `data` - Vector containing tile data in row-major order + /// + /// # Panics + /// Panics if `data.len() != width * height` + pub fn from_vec(width: u32, height: u32, data: Vec) -> Self { + assert_eq!(data.len(), (width * height) as usize, "Data length must match width * height"); + Self { tiles: data.into_boxed_slice(), width, height } + } + + /// Converts the position to a flat array index. + /// + /// # Safety + /// Debug builds will assert that the position is in bounds. + /// Release builds skip the check for performance. + #[inline] + pub fn pos_to_index(&self, pos: UVec2) -> usize { + debug_assert!(pos.x < self.width && pos.y < self.height); + (pos.y * self.width + pos.x) as usize + } + + /// Converts a flat array index to a 2D position. + #[inline] + pub fn index_to_pos(&self, index: usize) -> UVec2 { + debug_assert!(index < self.tiles.len()); + UVec2::new((index as u32) % self.width, (index as u32) / self.width) + } + + /// Checks if a position is within the map bounds. + #[inline] + pub fn in_bounds(&self, pos: UVec2) -> bool { + pos.x < self.width && pos.y < self.height + } + + /// Gets the tile value at the specified position. + /// + /// Returns `None` if the position is out of bounds. + pub fn get(&self, pos: UVec2) -> Option { + if self.in_bounds(pos) { Some(self.tiles[self.pos_to_index(pos)]) } else { None } + } + + /// Sets the tile value at the specified position. + /// + /// Returns `true` if the position was in bounds and the value was set, + /// `false` otherwise. + pub fn set(&mut self, pos: UVec2, tile: T) -> bool { + if self.in_bounds(pos) { + let idx = self.pos_to_index(pos); + self.tiles[idx] = tile; + true + } else { + false + } + } + + /// Returns the width of the map. + #[inline] + pub fn width(&self) -> u32 { + self.width + } + + /// Returns the height of the map. + #[inline] + pub fn height(&self) -> u32 { + self.height + } + + /// Returns the total number of tiles in the map. + #[inline] + pub fn len(&self) -> usize { + self.tiles.len() + } + + /// Returns `true` if the map contains no tiles. + #[inline] + pub fn is_empty(&self) -> bool { + self.tiles.is_empty() + } + + /// Returns an iterator over all valid cardinal neighbors of a position. + /// + /// Yields positions for up, down, left, and right neighbors that are within bounds. + pub fn neighbors(&self, pos: UVec2) -> impl Iterator + '_ { + const CARDINAL_DIRECTIONS: [(i32, i32); 4] = [(0, 1), (1, 0), (0, -1), (-1, 0)]; + + let pos_i32 = (pos.x as i32, pos.y as i32); + let width = self.width; + let height = self.height; + + CARDINAL_DIRECTIONS.iter().filter_map(move |(dx, dy)| { + let nx = pos_i32.0 + dx; + let ny = pos_i32.1 + dy; + if nx >= 0 && ny >= 0 && nx < width as i32 && ny < height as i32 { Some(UVec2::new(nx as u32, ny as u32)) } else { None } + }) + } + + /// Calls a closure for each valid cardinal neighbor of a position. + /// + /// This is more efficient than using the `neighbors()` iterator when you don't + /// need to collect the neighbors. + pub fn on_neighbors(&self, pos: UVec2, mut closure: F) + where + F: FnMut(UVec2), + { + if pos.x > 0 { + closure(UVec2::new(pos.x - 1, pos.y)); + } + if pos.x < self.width - 1 { + closure(UVec2::new(pos.x + 1, pos.y)); + } + if pos.y > 0 { + closure(UVec2::new(pos.x, pos.y - 1)); + } + if pos.y < self.height - 1 { + closure(UVec2::new(pos.x, pos.y + 1)); + } + } + + /// Calls a closure for each neighbor using tile indices instead of positions. + /// + /// This is useful when working with systems that still use raw indices. + pub fn on_neighbor_indices(&self, index: usize, mut closure: F) + where + F: FnMut(usize), + { + let width = self.width as usize; + let height = self.height as usize; + let x = index % width; + let y = index / width; + + if x > 0 { + closure(index - 1); + } + if x < width - 1 { + closure(index + 1); + } + if y > 0 { + closure(index - width); + } + if y < height - 1 { + closure(index + width); + } + } + + /// Returns an iterator over all positions and their tile values. + pub fn iter(&self) -> impl Iterator + '_ { + (0..self.height).flat_map(move |y| { + (0..self.width).map(move |x| { + let pos = UVec2::new(x, y); + (pos, self[pos]) + }) + }) + } + + /// Returns an iterator over just the tile values. + pub fn iter_values(&self) -> impl Iterator + '_ { + self.tiles.iter().copied() + } + + /// Returns an iterator over all positions in the map. + pub fn positions(&self) -> impl Iterator + '_ { + (0..self.height).flat_map(move |y| (0..self.width).map(move |x| UVec2::new(x, y))) + } + + /// Returns an iterator over tile indices, positions, and values. + pub fn enumerate(&self) -> impl Iterator + '_ { + self.tiles.iter().enumerate().map(move |(idx, &value)| { + let pos = self.index_to_pos(idx); + (idx, pos, value) + }) + } + + /// Returns a reference to the underlying tile data as a slice. + pub fn as_slice(&self) -> &[T] { + &self.tiles + } + + /// Returns a mutable reference to the underlying tile data as a slice. + pub fn as_mut_slice(&mut self) -> &mut [T] { + &mut self.tiles + } +} + +impl TileMap { + /// Creates a new TileMap with the specified dimensions, using T::default() for initialization. + pub fn new(width: u32, height: u32) -> Self { + Self::with_default(width, height, T::default()) + } +} + +impl Index for TileMap { + type Output = T; + + #[inline] + fn index(&self, pos: UVec2) -> &Self::Output { + &self.tiles[self.pos_to_index(pos)] + } +} + +impl IndexMut for TileMap { + #[inline] + fn index_mut(&mut self, pos: UVec2) -> &mut Self::Output { + let idx = self.pos_to_index(pos); + &mut self.tiles[idx] + } +} + +impl Index for TileMap { + type Output = T; + + #[inline] + fn index(&self, index: usize) -> &Self::Output { + &self.tiles[index] + } +} + +impl IndexMut for TileMap { + #[inline] + fn index_mut(&mut self, index: usize) -> &mut Self::Output { + &mut self.tiles[index] + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_new_with_default() { + let map = TileMap::::with_default(10, 10, 42); + assert_eq!(map.width(), 10); + assert_eq!(map.height(), 10); + assert_eq!(map[UVec2::new(0, 0)], 42); + assert_eq!(map[UVec2::new(9, 9)], 42); + } + + #[test] + fn test_from_vec() { + let data = vec![1u8, 2, 3, 4]; + let map = TileMap::from_vec(2, 2, data); + assert_eq!(map[UVec2::new(0, 0)], 1); + assert_eq!(map[UVec2::new(1, 0)], 2); + assert_eq!(map[UVec2::new(0, 1)], 3); + assert_eq!(map[UVec2::new(1, 1)], 4); + } + + #[test] + fn test_pos_to_index() { + let map = TileMap::::with_default(10, 10, 0); + assert_eq!(map.pos_to_index(UVec2::new(0, 0)), 0); + assert_eq!(map.pos_to_index(UVec2::new(5, 0)), 5); + assert_eq!(map.pos_to_index(UVec2::new(0, 1)), 10); + assert_eq!(map.pos_to_index(UVec2::new(3, 2)), 23); + } + + #[test] + fn test_index_to_pos() { + let map = TileMap::::with_default(10, 10, 0); + assert_eq!(map.index_to_pos(0), UVec2::new(0, 0)); + assert_eq!(map.index_to_pos(5), UVec2::new(5, 0)); + assert_eq!(map.index_to_pos(10), UVec2::new(0, 1)); + assert_eq!(map.index_to_pos(23), UVec2::new(3, 2)); + } + + #[test] + fn test_in_bounds() { + let map = TileMap::::with_default(10, 10, 0); + assert!(map.in_bounds(UVec2::new(0, 0))); + assert!(map.in_bounds(UVec2::new(9, 9))); + assert!(!map.in_bounds(UVec2::new(10, 0))); + assert!(!map.in_bounds(UVec2::new(0, 10))); + } + + #[test] + fn test_get_set() { + let mut map = TileMap::::with_default(10, 10, 0); + assert_eq!(map.get(UVec2::new(5, 5)), Some(0)); + + assert!(map.set(UVec2::new(5, 5), 42)); + assert_eq!(map.get(UVec2::new(5, 5)), Some(42)); + + assert!(!map.set(UVec2::new(10, 10), 99)); + assert_eq!(map.get(UVec2::new(10, 10)), None); + } + + #[test] + fn test_index_operators() { + let mut map = TileMap::::with_default(10, 10, 0); + map[UVec2::new(5, 5)] = 42; + assert_eq!(map[UVec2::new(5, 5)], 42); + } + + #[test] + fn test_index_by_usize() { + let mut map = TileMap::::with_default(10, 10, 0); + map[23] = 42; + assert_eq!(map[23], 42); + assert_eq!(map[UVec2::new(3, 2)], 42); + } + + #[test] + fn test_neighbors_center() { + let map = TileMap::::with_default(10, 10, 0); + let neighbors: Vec<_> = map.neighbors(UVec2::new(5, 5)).collect(); + assert_eq!(neighbors.len(), 4); + assert!(neighbors.contains(&UVec2::new(5, 6))); + assert!(neighbors.contains(&UVec2::new(6, 5))); + assert!(neighbors.contains(&UVec2::new(5, 4))); + assert!(neighbors.contains(&UVec2::new(4, 5))); + } + + #[test] + fn test_neighbors_corner() { + let map = TileMap::::with_default(10, 10, 0); + let neighbors: Vec<_> = map.neighbors(UVec2::new(0, 0)).collect(); + assert_eq!(neighbors.len(), 2); + assert!(neighbors.contains(&UVec2::new(1, 0))); + assert!(neighbors.contains(&UVec2::new(0, 1))); + } + + #[test] + fn test_neighbors_edge() { + let map = TileMap::::with_default(10, 10, 0); + let neighbors: Vec<_> = map.neighbors(UVec2::new(0, 5)).collect(); + assert_eq!(neighbors.len(), 3); + assert!(neighbors.contains(&UVec2::new(0, 6))); + assert!(neighbors.contains(&UVec2::new(1, 5))); + assert!(neighbors.contains(&UVec2::new(0, 4))); + } + + #[test] + fn test_on_neighbors() { + let map = TileMap::::with_default(10, 10, 0); + let mut count = 0; + map.on_neighbors(UVec2::new(5, 5), |_| count += 1); + assert_eq!(count, 4); + } + + #[test] + fn test_on_neighbor_indices() { + let map = TileMap::::with_default(10, 10, 0); + let center_idx = map.pos_to_index(UVec2::new(5, 5)); + let mut count = 0; + map.on_neighbor_indices(center_idx, |_| count += 1); + assert_eq!(count, 4); + } + + #[test] + fn test_iter() { + let map = TileMap::::with_default(2, 2, 0); + let positions: Vec<_> = map.iter().map(|(pos, _)| pos).collect(); + assert_eq!(positions.len(), 4); + assert!(positions.contains(&UVec2::new(0, 0))); + assert!(positions.contains(&UVec2::new(1, 1))); + } + + #[test] + fn test_iter_values() { + let map = TileMap::::with_default(2, 2, 42); + let values: Vec<_> = map.iter_values().collect(); + assert_eq!(values, vec![42, 42, 42, 42]); + } + + #[test] + fn test_positions() { + let map = TileMap::::with_default(2, 2, 0); + let positions: Vec<_> = map.positions().collect(); + assert_eq!(positions.len(), 4); + assert_eq!(positions[0], UVec2::new(0, 0)); + assert_eq!(positions[3], UVec2::new(1, 1)); + } + + #[test] + fn test_enumerate() { + let mut map = TileMap::::with_default(2, 2, 0); + map[UVec2::new(1, 1)] = 42; + let entries: Vec<_> = map.enumerate().collect(); + assert_eq!(entries.len(), 4); + assert_eq!(entries[3], (3, UVec2::new(1, 1), 42)); + } + + #[test] + fn test_generic_u16() { + let mut map = TileMap::::with_default(5, 5, 0); + assert_eq!(map[UVec2::new(0, 0)], 0); + map[UVec2::new(2, 2)] = 65535; + assert_eq!(map[UVec2::new(2, 2)], 65535); + } + + #[test] + fn test_generic_f32() { + let mut map = TileMap::::with_default(5, 5, 1.5); + assert_eq!(map[UVec2::new(0, 0)], 1.5); + map[UVec2::new(2, 2)] = 2.7; + assert_eq!(map[UVec2::new(2, 2)], 2.7); + } +} diff --git a/crates/borders-core/src/game/tilemap_changes.rs b/crates/borders-core/src/game/tilemap_changes.rs new file mode 100644 index 0000000..9077840 --- /dev/null +++ b/crates/borders-core/src/game/tilemap_changes.rs @@ -0,0 +1,171 @@ +/// Lightweight change tracking buffer for tile mutations. +/// +/// Stores only the indices of changed tiles, avoiding allocations in the hot path +/// by reusing Vec capacity across frames. This enables efficient delta updates +/// for GPU rendering and network synchronization. +/// +/// # Design +/// - Records tile index changes as they occur +/// - Reuses Vec capacity to avoid allocations +/// - O(1) push, O(changes) iteration +/// - Optional: can be cleared/ignored when tracking not needed +/// +/// # Example +/// ``` +/// use borders_core::game::ChangeBuffer; +/// +/// let mut changes = ChangeBuffer::new(); +/// changes.push(10); +/// changes.push(25); +/// assert_eq!(changes.len(), 2); +/// +/// let indices: Vec<_> = changes.drain().collect(); +/// assert_eq!(indices, vec![10, 25]); +/// assert_eq!(changes.len(), 0); +/// ``` +#[derive(Debug, Clone)] +pub struct ChangeBuffer { + changed_indices: Vec, +} + +impl ChangeBuffer { + /// Creates a new empty ChangeBuffer. + pub fn new() -> Self { + Self { changed_indices: Vec::new() } + } + + /// Creates a new ChangeBuffer with pre-allocated capacity. + /// + /// Use this when you know the approximate number of changes to avoid reallocations. + pub fn with_capacity(capacity: usize) -> Self { + Self { changed_indices: Vec::with_capacity(capacity) } + } + + /// Records a tile index as changed. + /// + /// Does not check for duplicates - the same index can be pushed multiple times. + /// Consumers should handle deduplication if needed. + #[inline] + pub fn push(&mut self, index: usize) { + self.changed_indices.push(index); + } + + /// Drains all changed indices, returning an iterator and clearing the buffer. + /// + /// The buffer retains its capacity for reuse. + pub fn drain(&mut self) -> impl Iterator + '_ { + self.changed_indices.drain(..) + } + + /// Clears all tracked changes without returning them. + /// + /// The buffer retains its capacity for reuse. + pub fn clear(&mut self) { + self.changed_indices.clear(); + } + + /// Returns true if any changes have been recorded. + #[inline] + pub fn has_changes(&self) -> bool { + !self.changed_indices.is_empty() + } + + /// Returns the number of changes recorded. + /// + /// Note: This may include duplicate indices if the same tile was changed multiple times. + #[inline] + pub fn len(&self) -> usize { + self.changed_indices.len() + } + + /// Returns true if no changes have been recorded. + #[inline] + pub fn is_empty(&self) -> bool { + self.changed_indices.is_empty() + } + + /// Returns the current capacity of the internal buffer. + #[inline] + pub fn capacity(&self) -> usize { + self.changed_indices.capacity() + } +} + +impl Default for ChangeBuffer { + fn default() -> Self { + Self::new() + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_new() { + let buffer = ChangeBuffer::new(); + assert!(buffer.is_empty()); + assert_eq!(buffer.len(), 0); + } + + #[test] + fn test_with_capacity() { + let buffer = ChangeBuffer::with_capacity(100); + assert_eq!(buffer.capacity(), 100); + assert!(buffer.is_empty()); + } + + #[test] + fn test_push_and_drain() { + let mut buffer = ChangeBuffer::new(); + buffer.push(10); + buffer.push(25); + buffer.push(42); + + assert_eq!(buffer.len(), 3); + assert!(buffer.has_changes()); + + let changes: Vec<_> = buffer.drain().collect(); + assert_eq!(changes, vec![10, 25, 42]); + assert!(buffer.is_empty()); + } + + #[test] + fn test_clear() { + let mut buffer = ChangeBuffer::new(); + buffer.push(1); + buffer.push(2); + buffer.push(3); + + assert_eq!(buffer.len(), 3); + buffer.clear(); + assert_eq!(buffer.len(), 0); + assert!(buffer.is_empty()); + } + + #[test] + fn test_duplicate_indices() { + let mut buffer = ChangeBuffer::new(); + buffer.push(10); + buffer.push(10); + buffer.push(10); + + assert_eq!(buffer.len(), 3); // Does not deduplicate + let changes: Vec<_> = buffer.drain().collect(); + assert_eq!(changes, vec![10, 10, 10]); + } + + #[test] + fn test_capacity_retained_after_drain() { + let mut buffer = ChangeBuffer::with_capacity(100); + buffer.push(1); + buffer.push(2); + + let initial_capacity = buffer.capacity(); + let _: Vec<_> = buffer.drain().collect(); + + // Capacity should be retained after drain + assert!(buffer.capacity() >= initial_capacity); + assert!(buffer.is_empty()); + } +} diff --git a/crates/borders-core/src/lib.rs b/crates/borders-core/src/lib.rs new file mode 100644 index 0000000..ea1fdd2 --- /dev/null +++ b/crates/borders-core/src/lib.rs @@ -0,0 +1,16 @@ +pub mod app; +pub mod constants; +pub mod game; +pub mod networking; +pub mod plugin; +pub mod telemetry; +pub mod time; +#[cfg(feature = "ui")] +pub mod ui; + +pub use constants::*; +pub use game::*; +pub use networking::*; +pub use plugin::*; +#[cfg(feature = "ui")] +pub use ui::{LastAttacksDigest, LastLeaderboardDigest, NationHighlightState, input}; diff --git a/crates/borders-core/src/networking/client.rs b/crates/borders-core/src/networking/client.rs new file mode 100644 index 0000000..8127dd2 --- /dev/null +++ b/crates/borders-core/src/networking/client.rs @@ -0,0 +1,103 @@ +use crate::networking::{GameView, Intent, IntentEvent, ProcessTurnEvent, protocol::NetMessage}; +use bevy_ecs::prelude::*; +use flume::{Receiver, Sender}; +use tracing::{debug, error, info, warn}; + +#[derive(Resource)] +pub struct ClientConnection { + pub intent_tx: Sender, + pub game_view_rx: Receiver, +} + +#[derive(Resource)] +pub struct RemoteClientConnection { + pub intent_tx: Sender, + pub net_message_rx: Receiver, + pub player_id: Option, +} + +pub fn receive_game_view_system(client: Res, mut game_view: ResMut) { + while let Ok(new_view) = client.game_view_rx.try_recv() { + *game_view = new_view; + } +} + +pub fn send_intent_system(mut intent_events: MessageReader, client: Res) { + for event in intent_events.read() { + debug!("Sending intent to local server: {:?}", event.0); + if let Err(e) = client.intent_tx.try_send(event.0.clone()) { + error!("Failed to send intent: {:?}", e); + } + } +} + +/// System for remote clients to handle NetMessage protocol +pub fn receive_net_message_system(remote_client: Res, mut process_turn_writer: MessageWriter, mut spawn_config_writer: MessageWriter) { + let mut message_count = 0; + while let Ok(message) = remote_client.net_message_rx.try_recv() { + message_count += 1; + match message { + NetMessage::ServerConfig { player_id } => { + info!("Received server config: player_id={}", player_id); + // Store player_id in the resource (would need to make it mutable) + } + NetMessage::Turn { turn, intents } => { + info!("Received turn {} with {} intents", turn, intents.len()); + // Convert to ProcessTurnEvent + let turn_event = ProcessTurnEvent(crate::networking::Turn { turn_number: turn, intents }); + process_turn_writer.write(turn_event); + } + NetMessage::Intent(_) => { + warn!("Received Intent message on client side"); + } + NetMessage::SpawnConfiguration { spawns } => { + info!("Received spawn configuration with {} spawns", spawns.len()); + spawn_config_writer.write(crate::networking::SpawnConfigEvent(spawns)); + } + } + } + + if message_count > 0 { + let _span = tracing::debug_span!("receive_net_messages", message_count).entered(); + } +} + +/// System for remote clients to send intents as NetMessage +pub fn send_net_intent_system(mut intent_events: MessageReader, remote_client: Res) { + let mut intent_count = 0; + for event in intent_events.read() { + intent_count += 1; + let net_message = NetMessage::Intent(event.0.clone()); + if let Err(e) = remote_client.intent_tx.try_send(net_message) { + error!("Failed to send net intent: {:?}", e); + } + } + + if intent_count > 0 { + let _span = tracing::debug_span!("send_net_intents", intent_count).entered(); + } +} + +/// System to handle spawn configuration updates from server +/// Updates local SpawnManager with remote player spawn positions +pub fn handle_spawn_config_system(mut spawn_config_events: MessageReader, mut spawn_manager: Option>, game_instance: Option>) { + for event in spawn_config_events.read() { + let Some(ref mut spawn_mgr) = spawn_manager else { + continue; + }; + let Some(ref game_inst) = game_instance else { + continue; + }; + + // Update player spawns from server + spawn_mgr.player_spawns.clear(); + for (&player_id, &tile_index) in &event.0 { + spawn_mgr.player_spawns.push((player_id as usize, tile_index as usize)); + } + + // Recalculate bot spawns based on updated player positions + spawn_mgr.current_bot_spawns = game_inst.bot_manager.recalculate_spawns_with_players(spawn_mgr.initial_bot_spawns.clone(), &spawn_mgr.player_spawns, &game_inst.territory_manager, spawn_mgr.rng_seed); + + info!("Updated spawn manager with {} player spawns from server", spawn_mgr.player_spawns.len()); + } +} diff --git a/crates/borders-core/src/networking/coordinator.rs b/crates/borders-core/src/networking/coordinator.rs new file mode 100644 index 0000000..0ecdf69 --- /dev/null +++ b/crates/borders-core/src/networking/coordinator.rs @@ -0,0 +1,189 @@ +use crate::time::Time; +use bevy_ecs::prelude::*; +use tracing::{debug, info, trace, warn}; + +use crate::constants::TICK_INTERVAL; +use crate::networking::{Intent, ProcessTurnEvent, Turn}; +use flume::{Receiver, Sender}; +use std::collections::HashMap; +use std::sync::{ + Arc, + atomic::{AtomicBool, Ordering}, +}; + +#[derive(Resource)] +pub struct IntentReceiver { + pub intent_rx: Receiver, +} + +#[derive(Resource)] +pub struct TurnReceiver { + pub turn_rx: Receiver, +} + +/// Local turn server control handle +#[derive(Resource, Clone)] +pub struct LocalTurnServerHandle { + pub paused: Arc, + pub running: Arc, +} + +impl LocalTurnServerHandle { + pub fn pause(&self) { + self.paused.store(true, Ordering::SeqCst); + } + + pub fn resume(&self) { + self.paused.store(false, Ordering::SeqCst); + } + + pub fn stop(&self) { + self.running.store(false, Ordering::SeqCst); + } + + pub fn is_paused(&self) -> bool { + self.paused.load(Ordering::SeqCst) + } + + pub fn is_running(&self) -> bool { + self.running.load(Ordering::SeqCst) + } +} + +/// Spawn timeout duration for local games (milliseconds) +const SPAWN_TIMEOUT_MS: u64 = 2000; + +/// Resource to track turn generation state +#[derive(Resource)] +pub struct TurnGenerator { + pub turn_number: u64, + pub accumulated_time: f64, // milliseconds + pub turn_tx: Sender, + // Spawn phase tracking + pub spawn_config: HashMap, + pub spawn_timeout_accumulated: Option, // milliseconds since first spawn + pub game_started: bool, +} + +/// System to generate turns using Bevy's Update loop +pub fn generate_turns_system(mut generator: ResMut, server_handle: Res, intent_receiver: Res, mut spawn_manager: Option>, game_instance: Option>, time: Res