diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..a6a3818 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,61 @@ +name: CI + +on: + push: + branches: ["**"] + pull_request: + +env: + CARGO_TERM_COLOR: always + CARGO_INCREMENTAL: 0 + +jobs: + test: + name: Test (${{ matrix.os }}) + strategy: + fail-fast: false + matrix: + os: [ubuntu-22.04, macos-14, windows-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + with: + components: rustfmt, clippy + - uses: Swatinem/rust-cache@v2 + with: + workspaces: rust + - name: Format + working-directory: rust + run: cargo fmt --check + - name: Clippy + working-directory: rust + run: cargo clippy --all-targets -- -D warnings + - name: Test + working-directory: rust + run: cargo test --all-targets + + # Catch desktop build breakage on every push, not just at release time. + desktop-check: + name: Desktop check (${{ matrix.os }}) + strategy: + fail-fast: false + matrix: + os: [ubuntu-22.04, macos-14, windows-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - name: Install Linux build dependencies + if: startsWith(matrix.os, 'ubuntu') + run: | + sudo apt-get update + sudo apt-get install -y \ + libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev \ + patchelf libgtk-3-dev pkg-config build-essential + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + with: + workspaces: desktop + - name: Check + working-directory: desktop + run: cargo check --all-targets diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..8640a6a --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,250 @@ +name: Release + +# Publishes the server binaries and the desktop bundles for every platform. +# Trigger with a tag (`git tag v0.1.0 && git push --tags`) or run manually. +on: + push: + tags: + - "v*" + workflow_dispatch: + inputs: + tag: + description: "Tag to publish (e.g. v0.1.0)" + required: true + +permissions: + contents: write + +env: + CARGO_TERM_COLOR: always + CARGO_INCREMENTAL: 0 + +jobs: + # --------------------------------------------------------------------------- + # Gate the release on a green test suite before anything is built. + # --------------------------------------------------------------------------- + test: + name: Test + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + with: + workspaces: rust + - name: Run tests + working-directory: rust + run: cargo test --all-targets + + create-release: + name: Create draft release + needs: test + runs-on: ubuntu-22.04 + outputs: + release_id: ${{ steps.draft.outputs.result }} + version: ${{ steps.version.outputs.version }} + steps: + - uses: actions/checkout@v4 + - id: version + run: echo "version=${{ github.event.inputs.tag || github.ref_name }}" >> "$GITHUB_OUTPUT" + - id: draft + uses: actions/github-script@v7 + with: + script: | + const version = '${{ steps.version.outputs.version }}'; + const { data } = await github.rest.repos.createRelease({ + owner: context.repo.owner, + repo: context.repo.repo, + tag_name: version, + name: `SplatLab ${version}`, + body: [ + '## SplatLab ' + version, + '', + 'Self-hosted control plane for video-to-3D Gaussian reconstruction.', + '', + '### Desktop app', + '| Platform | Download |', + '| --- | --- |', + '| Windows x86_64 | `.msi` / `.exe` (NSIS) |', + '| macOS Apple Silicon | `_aarch64.dmg` |', + '| macOS Intel | `_x64.dmg` |', + '| Linux x86_64 | `.deb` / `.rpm` / `.AppImage` |', + '| Linux arm64 | `.deb` / `.rpm` |', + '', + '### Server', + 'Standalone `splatlab` binaries are attached for each platform.', + 'The SPA is embedded, so the binary is entirely self-contained.', + ].join('\n'), + draft: true, + prerelease: false, + }); + return data.id; + result-encoding: string + + # --------------------------------------------------------------------------- + # Desktop bundles. Tauri emits deb + rpm + AppImage on Linux, msi + nsis on + # Windows, and a dmg per architecture on macOS. + # --------------------------------------------------------------------------- + desktop: + name: Desktop (${{ matrix.label }}) + needs: create-release + strategy: + fail-fast: false + matrix: + include: + - label: linux-x86_64 + os: ubuntu-22.04 + target: x86_64-unknown-linux-gnu + args: "" + - label: linux-aarch64 + os: ubuntu-22.04-arm + target: aarch64-unknown-linux-gnu + args: "" + - label: macos-aarch64 + os: macos-14 + target: aarch64-apple-darwin + args: "--target aarch64-apple-darwin" + - label: macos-x86_64 + os: macos-13 + target: x86_64-apple-darwin + args: "--target x86_64-apple-darwin" + - label: windows-x86_64 + os: windows-latest + target: x86_64-pc-windows-msvc + args: "" + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + + - name: Install Linux build dependencies + if: startsWith(matrix.os, 'ubuntu') + run: | + sudo apt-get update + sudo apt-get install -y \ + libwebkit2gtk-4.1-dev \ + libappindicator3-dev \ + librsvg2-dev \ + patchelf \ + libssl-dev \ + build-essential \ + curl wget file \ + libgtk-3-dev \ + pkg-config \ + rpm + + - uses: dtolnay/rust-toolchain@stable + with: + targets: ${{ matrix.target }} + + - uses: Swatinem/rust-cache@v2 + with: + workspaces: desktop + key: ${{ matrix.target }} + + - name: Build and upload desktop bundle + uses: tauri-apps/tauri-action@v0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # Signing is optional; the workflow still succeeds without secrets set. + APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} + APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} + APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }} + APPLE_ID: ${{ secrets.APPLE_ID }} + APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} + APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} + with: + releaseId: ${{ needs.create-release.outputs.release_id }} + projectPath: desktop + args: ${{ matrix.args }} + + # --------------------------------------------------------------------------- + # Standalone server binaries (no GUI toolkit needed). + # --------------------------------------------------------------------------- + server: + name: Server (${{ matrix.label }}) + needs: create-release + strategy: + fail-fast: false + matrix: + include: + - label: linux-x86_64 + os: ubuntu-22.04 + target: x86_64-unknown-linux-gnu + - label: linux-aarch64 + os: ubuntu-22.04-arm + target: aarch64-unknown-linux-gnu + - label: macos-aarch64 + os: macos-14 + target: aarch64-apple-darwin + - label: macos-x86_64 + os: macos-13 + target: x86_64-apple-darwin + - label: windows-x86_64 + os: windows-latest + target: x86_64-pc-windows-msvc + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + + - uses: dtolnay/rust-toolchain@stable + with: + targets: ${{ matrix.target }} + + - uses: Swatinem/rust-cache@v2 + with: + workspaces: rust + key: server-${{ matrix.target }} + + - name: Build + working-directory: rust + run: cargo build --release --bin splatlab --target ${{ matrix.target }} + + - name: Package (unix) + if: matrix.os != 'windows-latest' + working-directory: rust + run: | + NAME="splatlab-${{ needs.create-release.outputs.version }}-${{ matrix.label }}" + mkdir -p "dist/$NAME" + cp "target/${{ matrix.target }}/release/splatlab" "dist/$NAME/" + cp ../LICENSE README.md "dist/$NAME/" + tar -C dist -czf "dist/$NAME.tar.gz" "$NAME" + shasum -a 256 "dist/$NAME.tar.gz" > "dist/$NAME.tar.gz.sha256" + + - name: Package (windows) + if: matrix.os == 'windows-latest' + working-directory: rust + shell: pwsh + run: | + $name = "splatlab-${{ needs.create-release.outputs.version }}-${{ matrix.label }}" + New-Item -ItemType Directory -Force -Path "dist/$name" | Out-Null + Copy-Item "target/${{ matrix.target }}/release/splatlab.exe" "dist/$name/" + Copy-Item "../LICENSE","README.md" "dist/$name/" + Compress-Archive -Path "dist/$name" -DestinationPath "dist/$name.zip" + (Get-FileHash "dist/$name.zip" -Algorithm SHA256).Hash | Out-File "dist/$name.zip.sha256" + + - name: Upload to release + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ needs.create-release.outputs.version }} + files: | + rust/dist/*.tar.gz + rust/dist/*.zip + rust/dist/*.sha256 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + # --------------------------------------------------------------------------- + publish: + name: Publish release + needs: [create-release, desktop, server] + runs-on: ubuntu-22.04 + steps: + - uses: actions/github-script@v7 + with: + script: | + await github.rest.repos.updateRelease({ + owner: context.repo.owner, + repo: context.repo.repo, + release_id: ${{ needs.create-release.outputs.release_id }}, + draft: false, + }); diff --git a/desktop/.gitignore b/desktop/.gitignore new file mode 100644 index 0000000..6b9867d --- /dev/null +++ b/desktop/.gitignore @@ -0,0 +1,2 @@ +/target +/gen/schemas diff --git a/desktop/Cargo.lock b/desktop/Cargo.lock new file mode 100644 index 0000000..096a9b0 --- /dev/null +++ b/desktop/Cargo.lock @@ -0,0 +1,5544 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "adler2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" + +[[package]] +name = "ahash" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c982642fa9e8606056828ee9a8505737230110bb1099153c79efe865c59d12ba" +dependencies = [ + "memchr", +] + +[[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.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e76a019e91224d279006ff972f1e984179a6e9feb050adba6ce8274aef23195" +dependencies = [ + "alloc-no-stdlib", +] + +[[package]] +name = "android_system_properties" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae221649c9976a6f6c56ae1facf410f3ddb33cc661c4b7b61020a912d4237fbc" +dependencies = [ + "libc", +] + +[[package]] +name = "anyhow" +version = "1.0.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470" + +[[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.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c96bf972d85afc50bf5ab8fe2d54d1586b4e0b46c97c50a0c9e71e2f7bcd812a" +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.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f7f2596bd5b78a9fec8088ccd89180d7f9f55b94b0576823bbbdc72ee8311" +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.119", +] + +[[package]] +name = "async-signal" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52b5aaafa020cf5053a01f2a60e8ff5dccf550f0f77ec54a4e47285ac2bab485" +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" + +[[package]] +name = "async-trait" +version = "0.1.91" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae36dc4177970ef04fde5178d3e2429882def40e57a451f919c098f72baa6cec" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[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" + +[[package]] +name = "autocfg" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" + +[[package]] +name = "axum" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f" +dependencies = [ + "async-trait", + "axum-core", + "axum-macros", + "bytes", + "futures-util", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-util", + "itoa", + "matchit", + "memchr", + "mime", + "multer", + "percent-encoding", + "pin-project-lite", + "rustversion", + "serde", + "serde_json", + "serde_path_to_error", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tower 0.5.3", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "axum-core" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" +dependencies = [ + "async-trait", + "bytes", + "futures-util", + "http", + "http-body", + "http-body-util", + "mime", + "pin-project-lite", + "rustversion", + "sync_wrapper", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "axum-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57d123550fa8d071b7255cb0cc04dc302baa6c8c4a79f55701552684d8399bce" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[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 = "bit-set" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b588b76d00fde79687d7646a9b5bdf3cc0f655e0bbd080335a95d7e96f3587da" +dependencies = [ + "serde_core", +] + +[[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 = "block-buffer" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2f6c7dbe95a6ed67ad9f18e57daf93a2f034c524b99fd2b76d18fdfeb6660aa" +dependencies = [ + "hybrid-array", +] + +[[package]] +name = "block2" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdeb9d870516001442e364c5220d3574d2da8dc765554b4a617230d33fa58ef5" +dependencies = [ + "objc2", +] + +[[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 = "brotli" +version = "8.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cc91aac060a7a1e25823bdccbfb6af1875b88f17c6daac97894eed8207166b3" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", + "brotli-decompressor", +] + +[[package]] +name = "brotli-decompressor" +version = "5.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a32acac15fe1967bc3986b2a6347dffc965602354ea6f450ad07e8bfd253583" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", +] + +[[package]] +name = "bs58" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "bumpalo" +version = "3.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" + +[[package]] +name = "bytemuck" +version = "1.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95832e849adfb21180ccb6826a99da14e5d266ae5c2e668e1602cf234f153797" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" +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.13.1", + "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.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb1307f12aa967b5a58416e87b3653360e0fd614a016b6e970db08fecbb1b80d" +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.19", +] + +[[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.12+spec-1.1.0", +] + +[[package]] +name = "cc" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5add81bb678e6cb321aff7fa0dc7689ad82b112dbc032cea19f91d6b8e3582b9" +dependencies = [ + "find-msvc-tools", + "shlex", +] + +[[package]] +name = "cesu8" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" + +[[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.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "chrono" +version = "0.4.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327" +dependencies = [ + "iana-time-zone", + "js-sys", + "num-traits", + "serde", + "wasm-bindgen", + "windows-link 0.2.1", +] + +[[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common 0.1.7", + "inout", +] + +[[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", +] + +[[package]] +name = "const-oid" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6ef517f0926dd24a1582492c791b6a4818a4d94e789a334894aa15b0d12f55c" + +[[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.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "064badf302c3194842cf2c5d61f56cc88e54a759313879cdf03abdd27d0c3b97" +dependencies = [ + "bitflags 2.13.1", + "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.13.1", + "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 = "cpufeatures" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201" +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 = "crossbeam-channel" +version = "0.5.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d85363c37faeca707aef026efa9f3b34d077bce547e48f770770625c6013679e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61803da095bee82a81bb1a452ecc25d3b2f1416d1897eb86430c6159ef717c17" + +[[package]] +name = "crypto-common" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "crypto-common" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce6e4c961d6cd6c9a86db418387425e8bdeaf05b3c8bc1411e6dca4c252f1453" +dependencies = [ + "hybrid-array", +] + +[[package]] +name = "cssparser" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dae61cf9c0abb83bd659dab65b7e4e38d8236824c85f0f804f173567bda257d2" +dependencies = [ + "cssparser-macros", + "dtoa-short", + "itoa", + "phf", + "smallvec", +] + +[[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.119", +] + +[[package]] +name = "ctor" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "352d39c2f7bef1d6ad73db6f5160efcaed66d94ef8c6c573a8410c00bf909a98" +dependencies = [ + "ctor-proc-macro", + "dtor", +] + +[[package]] +name = "ctor-proc-macro" +version = "0.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52560adf09603e58c9a7ee1fe1dcb95a16927b17c127f0ac02d6e768a0e25bc1" + +[[package]] +name = "darling" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25ae13da2f202d56bd7f91c25fba009e7717a1e4a1cc98a76d844b65ae912e9d" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9865a50f7c335f53564bb694ef660825eb8610e0a53d3e11bf1b0d3df31e03b0" +dependencies = [ + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.119", +] + +[[package]] +name = "darling_macro" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "dbus" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ab69f03cc8c4340c9c8e315114e1658e6775a9b16a04357973aa21cec22b32e" +dependencies = [ + "libc", + "libdbus-sys", + "windows-sys 0.61.2", +] + +[[package]] +name = "deranged" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" +dependencies = [ + "serde_core", +] + +[[package]] +name = "derive_more" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d751e9e49156b02b44f9c1815bcb94b984cdcc4396ecc32521c739452808b134" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb" +dependencies = [ + "proc-macro2", + "quote", + "rustc_version", + "syn 2.0.119", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer 0.10.4", + "crypto-common 0.1.7", + "subtle", +] + +[[package]] +name = "digest" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2" +dependencies = [ + "block-buffer 0.12.1", + "const-oid", + "crypto-common 0.2.2", +] + +[[package]] +name = "dirs" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e" +dependencies = [ + "dirs-sys", +] + +[[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", + "windows-sys 0.61.2", +] + +[[package]] +name = "dispatch2" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e0e367e4e7da84520dedcac1901e4da967309406d1e51017ae1abfb97adbd38" +dependencies = [ + "bitflags 2.13.1", + "block2", + "libc", + "objc2", +] + +[[package]] +name = "displaydoc" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "dlopen2" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e2c5bd4158e66d1e215c49b837e11d62f3267b30c92f1d171c4d3105e3dc4d4" +dependencies = [ + "dlopen2_derive", + "libc", + "once_cell", + "winapi", +] + +[[package]] +name = "dlopen2_derive" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fbbb781877580993a8707ec48672673ec7b81eeba04cfd2310bd28c08e47c8f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "dom_query" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "521e380c0c8afb8d9a1e83a1822ee03556fc3e3e7dbc1fd30be14e37f9cb3f89" +dependencies = [ + "bit-set", + "cssparser", + "foldhash", + "html5ever", + "precomputed-hash", + "selectors", + "tendril", +] + +[[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.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c3cf4824e2d5f025c7b531afcb2325364084a16806f6d47fbc1f5fbd9960590" + +[[package]] +name = "dtoa-short" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd1511a7b6a56299bd043a9c167a6d2bfb37bf84a6dfceaba651168adfb43c87" +dependencies = [ + "dtoa", +] + +[[package]] +name = "dtor" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1057d6c64987086ff8ed0fd3fbf377a6b7d205cc7715868cd401705f715cbe4" +dependencies = [ + "dtor-proc-macro", +] + +[[package]] +name = "dtor-proc-macro" +version = "0.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f678cf4a922c215c63e0de95eb1ff08a958a81d47e485cf9da1e27bf6305cfa5" + +[[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 = "embed-resource" +version = "3.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbfdaacccebec3b28e4866b8973543c7647797db5ada1bdab552e48fe665fbbd" +dependencies = [ + "cc", + "memchr", + "rustc_version", + "toml 1.1.4+spec-1.1.0", + "vswhom", + "winreg", +] + +[[package]] +name = "embed_plist" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ef6b89e5b37196644d8796de5268852ff179b44e96276cf4290264843743bb7" + +[[package]] +name = "encoding_rs" +version = "0.8.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "endi" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66b7e2430c6dff6a955451e2cfc438f09cea1965a9d6f87f7e3b90decc014099" + +[[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.119", +] + +[[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.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2add8a07dd6a8d93ff627029c51de145e12686fbc36ecb298ac22e74cf02dec" +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.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a23add41df1562121a9393cb065eab5146a1242410f23a644851e90cfd669d2" +dependencies = [ + "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 = "fallible-iterator" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" + +[[package]] +name = "fallible-streaming-iterator" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" + +[[package]] +name = "fastrand" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223" + +[[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.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" + +[[package]] +name = "flate2" +version = "1.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + +[[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.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea5190182e6915eb873ddbc16e23b711b6eb1f9c00a0d0a3a91b5f6228475225" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[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 = "futures-channel" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "262590f4fe6afeb0bc83be1daa64e52657fe185690a958af7f3ad0e92085c5ae" +dependencies = [ + "futures-core", +] + +[[package]] +name = "futures-core" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2cd50c473c80f6d7c3670a752354b8e569b1a7cbfdc0419ec88e5edad85e0dc7" + +[[package]] +name = "futures-executor" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6754879cc9f2c66f88c6e5c35344bb0bdb0708b0352b1201815667c7eabc7458" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4577ecaa3c4f96589d473f679a71b596316f6641bc350038b962a5daf0085d7a" + +[[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.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d6d3cde68c518367be28956066ddfef33813991b77a55005a69dae04bf3b10b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "futures-sink" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e34418ac499d6305c2fb5ad0ed2f6ac998c5f8ca209b4510f7f94242c647e307" + +[[package]] +name = "futures-task" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b231ed28831efb4a61a08580c4bc233ec56bc009f4cd8f52da2c3cb97df0c109" + +[[package]] +name = "futures-util" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a77a90a256fce34da66415271e30f94ee91c57b04b8a2c042d9cf3220179deaa" +dependencies = [ + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "slab", +] + +[[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 = "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.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "libc", + "r-efi 5.3.0", + "wasip2", +] + +[[package]] +name = "getrandom" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" +dependencies = [ + "cfg-if", + "libc", + "r-efi 6.0.0", +] + +[[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 = "glib" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "233daaf6e83ae6a12a52055f568f9d7cf4671dabb78ff9560ab6da230ce00ee5" +dependencies = [ + "bitflags 2.13.1", + "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.2", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[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.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4eba85ea1d0a966a983acd07deee566e67395d2d96b6fb39e62b5a833f1eb0b" + +[[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.119", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", +] + +[[package]] +name = "hashbrown" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" + +[[package]] +name = "hashlink" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af" +dependencies = [ + "hashbrown 0.14.5", +] + +[[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 0.10.7", +] + +[[package]] +name = "html5ever" +version = "0.38.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1054432bae2f14e0061e33d23402fbaa67a921d319d56adc6bcf887ddad1cbc2" +dependencies = [ + "log", + "markup5ever", +] + +[[package]] +name = "http" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "918d3568bebf352712bc2ef3d46a8bcf1a75b373be6539de198e9105cbbf9ce0" +dependencies = [ + "bytes", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2a8f2913ee65f60facd6a5905613afaa448497a0230cc41ce022d93290bc2c" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9f41fd6a08e4d4ec69df65976da761afd5ad5e58a9d4acb46bd1c953a9e3ff2" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "http-range-header" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9171a2ea8a68358193d15dd5d70c1c10a2afc3e7e4c5bc92bc9f025cebd7359c" + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "hybrid-array" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "707114b52a152fa7bdb290cd7cd5912d9467273b6d74e21b8d81aca1f8533f6b" +dependencies = [ + "typenum", +] + +[[package]] +name = "hyper" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d22053281f852e11534f5198498373cbb59295120a20771d90f7ed1897490a72" +dependencies = [ + "atomic-waker", + "bytes", + "futures-channel", + "futures-core", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-util" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures-channel", + "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.65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" +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.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e795dff5605e0f04bff85ca41b51a96b83e80b281e96231bcaaf1ac35103371" +dependencies = [ + "byteorder", + "png 0.17.16", +] + +[[package]] +name = "icu_collections" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2984d1cd16c883d7935b9e07e44071dca8d917fd52ecc02c04d5fa0b5a3f191c" +dependencies = [ + "displaydoc", + "potential_utf", + "utf8_iter", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c56e5ee99d6e3d33bd91c5d85458b6005a22140021cc324cea84dd0e72cff3b4" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da3be0ae77ea334f4da67c12f149704f19f81d1adf7c51cf482943e84a2bad38" + +[[package]] +name = "icu_properties" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bee3b67d0ea5c2cca5003417989af8996f8604e34fb9ddf96208a033901e70de" +dependencies = [ + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e2bbb201e0c04f7b4b3e14382af113e17ba4f63e2c9d2ee626b720cbce54a14" + +[[package]] +name = "icu_provider" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421" +dependencies = [ + "displaydoc", + "icu_locale_core", + "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.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[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.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" +dependencies = [ + "equivalent", + "hashbrown 0.17.1", + "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 = "inout" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" +dependencies = [ + "generic-array", +] + +[[package]] +name = "ipnet" +version = "2.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a756c3fac73139e83f14c2d742155dd2b78d3ee56597b419a0579b7bdd6dd78" + +[[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 = "itoa" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" + +[[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 0.3.1", + "log", + "thiserror 1.0.69", + "walkdir", + "windows-sys 0.45.0", +] + +[[package]] +name = "jni-sys" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41a652e1f9b6e0275df1f15b32661cf0d4b78d4d87ddec5e0c3c20f097433258" +dependencies = [ + "jni-sys 0.4.1", +] + +[[package]] +name = "jni-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2" +dependencies = [ + "jni-sys-macros", +] + +[[package]] +name = "jni-sys-macros" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" +dependencies = [ + "quote", + "syn 2.0.119", +] + +[[package]] +name = "js-sys" +version = "0.3.103" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53b44bfcdb3f8d5837a46dae1ca9660a837176eee74a28b229bc626816589102" +dependencies = [ + "cfg-if", + "futures-util", + "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.13.1", + "serde", + "unicode-segmentation", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[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", + "once_cell", +] + +[[package]] +name = "libc" +version = "0.2.189" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2" + +[[package]] +name = "libdbus-sys" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "328c4789d42200f1eeec05bd86c9c13c7f091d2ba9a6ea35acdf51f31bc0f043" +dependencies = [ + "pkg-config", +] + +[[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 = "libredox" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2026a5056764a10b2bf5d56488cba40da507f5493a6a429340e2004d9ed085fa" +dependencies = [ + "libc", +] + +[[package]] +name = "libsqlite3-sys" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c10584274047cb335c23d3e61bcef8e323adae7c5c8c760540f73610177fc3f" +dependencies = [ + "cc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "linux-raw-sys" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" + +[[package]] +name = "litemap" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0" + +[[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.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad" + +[[package]] +name = "markup5ever" +version = "0.38.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8983d30f2915feeaaab2d6babdd6bc7e9ed1a00b66b5e6d74df19aa9c0e91862" +dependencies = [ + "log", + "tendril", + "web_atoms", +] + +[[package]] +name = "matchers" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9" +dependencies = [ + "regex-automata", +] + +[[package]] +name = "matchit" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" + +[[package]] +name = "memchr" +version = "2.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" + +[[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 = "mime_guess" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" +dependencies = [ + "mime", + "unicase", +] + +[[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.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30d65c71f1ce40ab09135ce117d742b9f8a19ff91a41a8b57ed50bc2de59c427" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.61.2", +] + +[[package]] +name = "muda" +version = "0.19.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dd04e60bc0b07438a6771710ee1698f98f6ebbc7f89b61264af1563b8aeb878" +dependencies = [ + "crossbeam-channel", + "dpi", + "gtk", + "keyboard-types", + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation", + "once_cell", + "png 0.18.1", + "serde", + "thiserror 2.0.19", + "windows-sys 0.61.2", +] + +[[package]] +name = "multer" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83e87776546dc87511aa5ee218730c92b666d7264ab6ed41f9d215af9cd5224b" +dependencies = [ + "bytes", + "encoding_rs", + "futures-util", + "http", + "httparse", + "memchr", + "mime", + "spin", + "version_check", +] + +[[package]] +name = "ndk" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" +dependencies = [ + "bitflags 2.13.1", + "jni-sys 0.3.1", + "log", + "ndk-sys", + "num_enum", + "raw-window-handle", + "thiserror 1.0.69", +] + +[[package]] +name = "ndk-sys" +version = "0.6.0+11769913" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" +dependencies = [ + "jni-sys 0.3.1", +] + +[[package]] +name = "new_debug_unreachable" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" + +[[package]] +name = "nu-ansi-term" +version = "0.50.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "num-conv" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441" + +[[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.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0bca838442ec211fa11de3a8b0e0e8f3a4522575b5c4c06ed722e005036f26" +dependencies = [ + "num_enum_derive", + "rustversion", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "680998035259dcfcafe653688bf2aa6d3e2dc05e98be6ab46afb089dc84f1df8" +dependencies = [ + "proc-macro-crate 3.5.0", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "objc2" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a12a8ed07aefc768292f076dc3ac8c48f3781c8f2d5851dd3d98950e8c5a89f" +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.13.1", + "block2", + "objc2", + "objc2-core-foundation", + "objc2-foundation", +] + +[[package]] +name = "objc2-cloud-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ad74d880bb43877038da939b7427bba67e9dd42004a18b809ba7d87cee241c" +dependencies = [ + "bitflags 2.13.1", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-data" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b402a653efbb5e82ce4df10683b6b28027616a2715e90009947d50b8dd298fa" +dependencies = [ + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" +dependencies = [ + "bitflags 2.13.1", + "dispatch2", + "objc2", +] + +[[package]] +name = "objc2-core-graphics" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807" +dependencies = [ + "bitflags 2.13.1", + "dispatch2", + "objc2", + "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", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-location" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca347214e24bc973fc025fd0d36ebb179ff30536ed1f80252706db19ee452009" +dependencies = [ + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-text" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cde0dfb48d25d2b4862161a4d5fcc0e3c24367869ad306b0c9ec0073bfed92d" +dependencies = [ + "bitflags 2.13.1", + "objc2", + "objc2-core-foundation", + "objc2-core-graphics", +] + +[[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.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" +dependencies = [ + "bitflags 2.13.1", + "block2", + "objc2", + "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.13.1", + "objc2", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-quartz-core" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96c1358452b371bf9f104e21ec536d37a650eb10f7ee379fff67d2e08d537f1f" +dependencies = [ + "bitflags 2.13.1", + "objc2", + "objc2-core-foundation", + "objc2-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.13.1", + "block2", + "objc2", + "objc2-cloud-kit", + "objc2-core-data", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-core-image", + "objc2-core-location", + "objc2-core-text", + "objc2-foundation", + "objc2-quartz-core", + "objc2-user-notifications", +] + +[[package]] +name = "objc2-user-notifications" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9df9128cbbfef73cda168416ccf7f837b62737d748333bfe9ab71c245d76613e" +dependencies = [ + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-web-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2e5aaab980c433cf470df9d7af96a7b46a9d892d521a2cbbb2f8a4c16751e7f" +dependencies = [ + "bitflags 2.13.1", + "block2", + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation", +] + +[[package]] +name = "once_cell" +version = "1.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" + +[[package]] +name = "open" +version = "5.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9cfef937e9c486488c7e3d949ae31c0f1d06bdacd75b99c086cb35356e30408" +dependencies = [ + "dunce", + "is-wsl", + "libc", +] + +[[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 = "pbkdf2" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +dependencies = [ + "digest 0.10.7", + "hmac", +] + +[[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.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf" +dependencies = [ + "phf_macros", + "phf_shared", + "serde", +] + +[[package]] +name = "phf_codegen" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49aa7f9d80421bca176ca8dbfebe668cc7a2684708594ec9f3c0db0805d5d6e1" +dependencies = [ + "phf_generator", + "phf_shared", +] + +[[package]] +name = "phf_generator" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "135ace3a761e564ec88c03a77317a7c6b80bb7f7135ef2544dbe054243b89737" +dependencies = [ + "fastrand", + "phf_shared", +] + +[[package]] +name = "phf_macros" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "812f032b54b1e759ccd5f8b6677695d5268c588701effba24601f6932f8269ef" +dependencies = [ + "phf_generator", + "phf_shared", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "phf_shared" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e57fef6bc5981e38c2ce2d63bfa546861309f875b8a75f092d1d54ae2d64f266" +dependencies = [ + "siphasher", +] + +[[package]] +name = "pin-project" +version = "1.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2466b2336ed02bcdca6b294417127b90ec92038d1d5c4fbeac971a922e0e0924" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c96395f0a926bc13b1c17622aaddda1ecb55d49c8f1bf9777e4d877800a43f8b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" + +[[package]] +name = "piper" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c835479a4443ded371d6c535cbfd8d31ad92c5d23ae9770a61bc155e4992a3c1" +dependencies = [ + "atomic-waker", + "fastrand", + "futures-io", +] + +[[package]] +name = "pkg-config" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19f132c84eca552bf34cab8ec81f1c1dcc229b811638f9d283dceabe58c5569e" + +[[package]] +name = "plist" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da1d65da6dd5d1e44199ac0f58712d241c0f439f80adea8924d832384087f85" +dependencies = [ + "base64 0.22.1", + "indexmap 2.14.0", + "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.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60769b8b31b2a9f263dae2776c37b1b28ae246943cf719eb6946a1db05128a61" +dependencies = [ + "bitflags 2.13.1", + "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 = "potential_utf" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0103b1cef7ec0cf76490e969665504990193874ea05c85ff9bab8b911d0a0564" +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 = "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.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b00f26d3400549137f92511a46ac1cd8ce37cb5598a96d382381458b992a5d24" +dependencies = [ + "toml_datetime 0.6.3", + "toml_edit 0.20.2", +] + +[[package]] +name = "proc-macro-crate" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" +dependencies = [ + "toml_edit 0.25.13+spec-1.1.0", +] + +[[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-macro2" +version = "1.0.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quick-xml" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e660451e55124f798a69a5af3f49ccfbefbd41910eefd25caf2393e1f3473ec1" +dependencies = [ + "memchr", +] + +[[package]] +name = "quote" +version = "1.0.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001" +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 = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + +[[package]] +name = "rand" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22f6172bdec972074665ed81ed53b71da00bfc44b65a753cfde883ec4c702a1a" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[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", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.17", +] + +[[package]] +name = "raw-window-handle" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" + +[[package]] +name = "redox_syscall" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags 2.13.1", +] + +[[package]] +name = "redox_users" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac" +dependencies = [ + "getrandom 0.2.17", + "libredox", + "thiserror 2.0.19", +] + +[[package]] +name = "ref-cast" +version = "1.0.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "216e8f773d7923bcba9ceb86a86c93cabb3903a11872fc3f138c49630e50b96d" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9283685feec7d69af75fb0e858d5e7378f33fe4fc699383b2916ab9273e03c" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "regex" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad8553b9b26413251cbf30e620595c7a41b3887f03da04579c0e6b0d6a06b4b2" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4" + +[[package]] +name = "reqwest" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "219c5811de6525e5416c7d5d53bb656d3afdbc6c5af816e0802bcfa42dbdc1c3" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-util", + "js-sys", + "log", + "percent-encoding", + "pin-project-lite", + "serde", + "serde_json", + "sync_wrapper", + "tokio", + "tokio-util", + "tower 0.5.3", + "tower-http 0.6.11", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams", + "web-sys", +] + +[[package]] +name = "rusqlite" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b838eba278d213a8beaf485bd313fd580ca4505a00d5871caeb1457c55322cae" +dependencies = [ + "bitflags 2.13.1", + "fallible-iterator", + "fallible-streaming-iterator", + "hashlink", + "libsqlite3-sys", + "smallvec", +] + +[[package]] +name = "rust-embed" +version = "8.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9e7760e252aaba7b09f4be00e36476cf585bdb68a53552ac954cdf504ab4bc9" +dependencies = [ + "rust-embed-impl", + "rust-embed-utils", + "walkdir", +] + +[[package]] +name = "rust-embed-impl" +version = "8.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bcfc4d6f53af43755f7a723e4b6b8794fcce052a178dd8c6c1dadc5f5343097" +dependencies = [ + "mime_guess", + "proc-macro2", + "quote", + "rust-embed-utils", + "syn 2.0.119", + "walkdir", +] + +[[package]] +name = "rust-embed-utils" +version = "8.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ffa149f6aa81b58a5b3011d01a857c4ed12c7a732d2c51947a4c7c692185f0" +dependencies = [ + "sha2 0.11.0", + "walkdir", +] + +[[package]] +name = "rustc-hash" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d" + +[[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.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" +dependencies = [ + "bitflags 2.13.1", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustversion" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" + +[[package]] +name = "ryu" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" + +[[package]] +name = "salsa20" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" +dependencies = [ + "cipher", +] + +[[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 = "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.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "687274d293b6cdc6e73e0fee520bf2049650090d7164f87672d212a3c530cf4a" +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.119", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "scrypt" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0516a385866c09368f0b5bcd1caff3366aace790fcd46e2bb032697bb172fd1f" +dependencies = [ + "pbkdf2", + "salsa20", + "sha2 0.10.9", +] + +[[package]] +name = "selectors" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5d9c0c92a92d33f08817311cf3f2c29a3538a8240e94a6a3c622ce652d7e00c" +dependencies = [ + "bitflags 2.13.1", + "cssparser", + "derive_more", + "log", + "new_debug_unreachable", + "phf", + "phf_codegen", + "precomputed-hash", + "rustc-hash", + "servo_arc", + "smallvec", +] + +[[package]] +name = "semver" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" +dependencies = [ + "serde", + "serde_core", +] + +[[package]] +name = "serde" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" +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_core" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[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.119", +] + +[[package]] +name = "serde_json" +version = "1.0.151" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14" +dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + +[[package]] +name = "serde_path_to_error" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10a9ff822e371bb5403e391ecd83e182e0e77ba7f6fe0160b795797109d1b457" +dependencies = [ + "itoa", + "serde", + "serde_core", +] + +[[package]] +name = "serde_repr" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d3b1629de253c70a0508c3899572da79ca359fdab27c7920ff00406df418906" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[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.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6662b5879511e06e8999a8a235d848113e942c9124f211511b16466ee2995f26" +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.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a5c54c7310e7b8b9577c286d7e399ddd876c3e12b3ed917a8aabc4b96e9e8c" +dependencies = [ + "base64 0.22.1", + "bs58", + "chrono", + "hex", + "indexmap 1.9.3", + "indexmap 2.14.0", + "schemars 0.9.0", + "schemars 1.2.2", + "serde_core", + "serde_json", + "serde_with_macros", + "time", +] + +[[package]] +name = "serde_with_macros" +version = "3.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84d57bc0c8b9a17920c178daa6bb924850d54a9c97ab45194bb8c17ad66bb660" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[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.119", +] + +[[package]] +name = "servo_arc" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "170fb83ab34de17dc69aa7c67482b22218ddb85da56546f9bd6b929e32a05930" +dependencies = [ + "stable_deref_trait", +] + +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures 0.2.17", + "digest 0.10.7", +] + +[[package]] +name = "sha2" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "446ba717509524cb3f22f17ecc096f10f4822d76ab5c0b9822c5f9c284e825f4" +dependencies = [ + "cfg-if", + "cpufeatures 0.3.0", + "digest 0.11.3", +] + +[[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 = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" + +[[package]] +name = "signal-hook-registry" +version = "1.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" +dependencies = [ + "errno", + "libc", +] + +[[package]] +name = "simd-adler32" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea" + +[[package]] +name = "siphasher" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ee5873ec9cce0195efcb7a4e9507a04cd49aec9c83d0389df45b1ef7ba2e649" + +[[package]] +name = "slab" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" + +[[package]] +name = "smallvec" +version = "1.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90" + +[[package]] +name = "socket2" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "softbuffer" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aac18da81ebbf05109ab275b157c22a653bb3c12cf884450179942f81bcbf6c3" +dependencies = [ + "bytemuck", + "js-sys", + "ndk", + "objc2", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-foundation", + "objc2-quartz-core", + "raw-window-handle", + "redox_syscall", + "tracing", + "wasm-bindgen", + "web-sys", + "windows-sys 0.61.2", +] + +[[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.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3763264f6b73151db08c50ff20d7d8a0b8796e021cdea7ceedad07b80155fa0e" + +[[package]] +name = "splatlab" +version = "0.1.0" +dependencies = [ + "axum", + "base64 0.22.1", + "chrono", + "futures-util", + "libc", + "mime_guess", + "once_cell", + "rand", + "regex", + "rusqlite", + "rust-embed", + "scrypt", + "serde", + "serde_json", + "subtle", + "tokio", + "tokio-util", + "tower 0.4.13", + "tower-http 0.5.2", + "tracing", + "tracing-subscriber", + "uuid", +] + +[[package]] +name = "splatlab-desktop" +version = "0.1.0" +dependencies = [ + "splatlab", + "tauri", + "tauri-build", + "tauri-plugin-opener", + "tokio", + "tracing", + "tracing-subscriber", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + +[[package]] +name = "string_cache" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a18596f8c785a729f2819c0f6a7eae6ebeebdfffbfe4214ae6b087f690e31901" +dependencies = [ + "new_debug_unreachable", + "parking_lot", + "phf_shared", + "precomputed-hash", +] + +[[package]] +name = "string_cache_codegen" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "585635e46db231059f76c5849798146164652513eb9e8ab2685939dd90f29b69" +dependencies = [ + "phf_generator", + "phf_shared", + "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", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.119" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3" +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.119", +] + +[[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.2", + "version-compare", +] + +[[package]] +name = "tao" +version = "0.35.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1c93047acf68669466a34690ac58cca7010bd1b201e1ec86f1fd0a75d3dd4a9" +dependencies = [ + "bitflags 2.13.1", + "block2", + "core-foundation", + "core-graphics", + "crossbeam-channel", + "dbus", + "dispatch2", + "dlopen2", + "dpi", + "gdkwayland-sys", + "gdkx11-sys", + "gtk", + "jni", + "libc", + "log", + "ndk", + "ndk-sys", + "objc2", + "objc2-app-kit", + "objc2-foundation", + "objc2-ui-kit", + "once_cell", + "parking_lot", + "percent-encoding", + "raw-window-handle", + "tao-macros", + "unicode-segmentation", + "url", + "windows", + "windows-core 0.61.2", + "windows-version", + "x11-dl", +] + +[[package]] +name = "tao-macros" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f7eeb6d99155545da6150a1795945f16ac9c178deb2a5f2e74d776107bd5849" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[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.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "667b20e2726d572dea2de7370da16e188eb06008faf9a92fab7cdc46791190b5" +dependencies = [ + "anyhow", + "bytes", + "cookie", + "dirs", + "dunce", + "embed_plist", + "getrandom 0.3.4", + "glob", + "gtk", + "heck 0.5.0", + "http", + "jni", + "libc", + "log", + "mime", + "muda", + "objc2", + "objc2-app-kit", + "objc2-foundation", + "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.19", + "tokio", + "tray-icon", + "url", + "webkit2gtk", + "webview2-com", + "window-vibrancy", + "windows", +] + +[[package]] +name = "tauri-build" +version = "2.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc9ce40b16101cb6ea63d3e221567affd1c3a9205f95d7bc574941a10636b632" +dependencies = [ + "anyhow", + "cargo_toml", + "dirs", + "glob", + "heck 0.5.0", + "json-patch", + "schemars 0.8.22", + "semver", + "serde", + "serde_json", + "tauri-utils", + "tauri-winres", + "walkdir", +] + +[[package]] +name = "tauri-codegen" +version = "2.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08279169ff42f8fc45a1dbc9dcae888893ba95288142e5880c59b93a26d2cfc5" +dependencies = [ + "base64 0.22.1", + "brotli", + "ico", + "json-patch", + "plist", + "png 0.17.16", + "proc-macro2", + "quote", + "semver", + "serde", + "serde_json", + "sha2 0.10.9", + "syn 2.0.119", + "tauri-utils", + "thiserror 2.0.19", + "time", + "url", + "uuid", + "walkdir", +] + +[[package]] +name = "tauri-macros" +version = "2.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8b394794f399a421811d06966343e7933fcae92d59f5180b9388d1174497a45" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.119", + "tauri-codegen", + "tauri-utils", +] + +[[package]] +name = "tauri-plugin" +version = "2.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74be5dd4bed9afbd145e5716b5fa2ec28cbc29c34ffa61c258c9273d896c8020" +dependencies = [ + "anyhow", + "glob", + "plist", + "schemars 0.8.22", + "serde", + "serde_json", + "tauri-utils", + "walkdir", +] + +[[package]] +name = "tauri-plugin-opener" +version = "2.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17e1bea14edce6b793a04e2417e3fd924b9bc4faae83cdee7d714156cceeed29" +dependencies = [ + "dunce", + "glob", + "objc2-app-kit", + "objc2-foundation", + "open", + "schemars 0.8.22", + "serde", + "serde_json", + "tauri", + "tauri-plugin", + "thiserror 2.0.19", + "url", + "windows", + "zbus", +] + +[[package]] +name = "tauri-runtime" +version = "2.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0b4bc95aed361b0019067d189a1174a603d460d0f6c72606512d59fc9c12ec8" +dependencies = [ + "cookie", + "dpi", + "gtk", + "http", + "jni", + "objc2", + "objc2-ui-kit", + "objc2-web-kit", + "raw-window-handle", + "serde", + "serde_json", + "tauri-utils", + "thiserror 2.0.19", + "url", + "webkit2gtk", + "webview2-com", + "windows", +] + +[[package]] +name = "tauri-runtime-wry" +version = "2.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e6fac707727b7a2f48e4ded90976324267371073edbb415ffb73bb0458d203f" +dependencies = [ + "gtk", + "http", + "jni", + "log", + "objc2", + "objc2-app-kit", + "once_cell", + "percent-encoding", + "raw-window-handle", + "softbuffer", + "tao", + "tauri-runtime", + "tauri-utils", + "url", + "webkit2gtk", + "webview2-com", + "windows", + "wry", +] + +[[package]] +name = "tauri-utils" +version = "2.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e176a18e67764923c4f1ce66f25ae4abe5f688384d5eb1a0fa6c77f3d90f887" +dependencies = [ + "anyhow", + "brotli", + "cargo_metadata", + "ctor", + "dom_query", + "dunce", + "glob", + "http", + "infer", + "json-patch", + "log", + "memchr", + "phf", + "plist", + "proc-macro2", + "quote", + "regex", + "schemars 0.8.22", + "semver", + "serde", + "serde-untagged", + "serde_json", + "serde_with", + "swift-rs", + "thiserror 2.0.19", + "toml 1.1.4+spec-1.1.0", + "url", + "urlpattern", + "uuid", + "walkdir", +] + +[[package]] +name = "tauri-winres" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc65d45c68858bfe420dd29e834b5d15dbecf8a07a8a16cf4d532c7b1f69d4b6" +dependencies = [ + "dunce", + "embed-resource", + "toml 1.1.4+spec-1.1.0", +] + +[[package]] +name = "tempfile" +version = "3.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" +dependencies = [ + "fastrand", + "getrandom 0.4.3", + "once_cell", + "rustix", + "windows-sys 0.61.2", +] + +[[package]] +name = "tendril" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fed54709c5b3a53d09bb1c113ea4f5ceafd1e772ddcb0030a82e1d56c087b08" +dependencies = [ + "new_debug_unreachable", +] + +[[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.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09a43598840e33d5b0331f38c5e30d13bb11c11210a4b58f0d9b18a5a5eefcd9" +dependencies = [ + "thiserror-impl 2.0.19", +] + +[[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.119", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43cbfe0cf76104d42a574802844187e84a305e531ed54455f11fbde0f10541cd" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "thread_local" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ad99c4c6d32803332c548b1af0540b357b3f5fc0be8f6c6bfe8b2e6ae784070" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "time" +version = "0.3.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb87b95ec50ddfa440816d227a17b2ccbdda963a316a727fda0fc4334f7d134" +dependencies = [ + "deranged", + "num-conv", + "powerfmt", + "serde_core", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109" + +[[package]] +name = "time-macros" +version = "0.2.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e689342a48d2ea927c87ea50cabf8594854bf940e9310208848d680d668ed85" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tinystr" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tinyvec" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb4ebadaa0af04fab11ae01eb5f9fdb5f9c5b875506e210e71c07873528baa7f" +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.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "202caea871b69668250d242070849eb495be178ed697a3e98aebce5bc81a0bed" +dependencies = [ + "bytes", + "libc", + "mio", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys 0.61.2", +] + +[[package]] +name = "tokio-macros" +version = "2.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78773a2a397f451582ce068015985c33193cf6dea8b74d2a639fe457b2f07b0e" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "tokio-util" +version = "0.7.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "494815d09bf52b5548659851081238f0ca39ff638363907596da739561c62c52" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "toml" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" +dependencies = [ + "serde", + "serde_spanned 0.6.9", + "toml_datetime 0.6.3", + "toml_edit 0.20.2", +] + +[[package]] +name = "toml" +version = "0.9.12+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf92845e79fc2e2def6a5d828f0801e29a2f8acc037becc5ab08595c7d5e9863" +dependencies = [ + "indexmap 2.14.0", + "serde_core", + "serde_spanned 1.1.1", + "toml_datetime 0.7.5+spec-1.1.0", + "toml_parser", + "toml_writer", + "winnow 0.7.15", +] + +[[package]] +name = "toml" +version = "1.1.4+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3aace63f4bbcdfc2c965b059de67119c89c4017a70d633be6c104910f67056f5" +dependencies = [ + "indexmap 2.14.0", + "serde_core", + "serde_spanned 1.1.1", + "toml_datetime 1.1.1+spec-1.1.0", + "toml_parser", + "toml_writer", + "winnow 1.0.4", +] + +[[package]] +name = "toml_datetime" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_datetime" +version = "0.7.5+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347" +dependencies = [ + "serde_core", +] + +[[package]] +name = "toml_datetime" +version = "1.1.1+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7" +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.14.0", + "toml_datetime 0.6.3", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +dependencies = [ + "indexmap 2.14.0", + "serde", + "serde_spanned 0.6.9", + "toml_datetime 0.6.3", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.25.13+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6975367e4d2ef766d86af01ffad14b622fecc8d4357a998fbc4deb6e9bacaf9b" +dependencies = [ + "indexmap 2.14.0", + "toml_datetime 1.1.1+spec-1.1.0", + "toml_parser", + "winnow 1.0.4", +] + +[[package]] +name = "toml_parser" +version = "1.1.3+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d38ac1cf9b95face32296c0a3ede1fdc270627c9d9c02a7274dd6d960dc4d56" +dependencies = [ + "winnow 1.0.4", +] + +[[package]] +name = "toml_writer" +version = "1.1.2+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d56353a2a665ad0f41a421187180aab746c8c325620617ad883a99a1cbe66d2" + +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "pin-project", + "pin-project-lite", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-http" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9cd434a998747dd2c4276bc96ee2e0c7a2eadf3cae88e52be55a05fa9053f5" +dependencies = [ + "bitflags 2.13.1", + "bytes", + "futures-util", + "http", + "http-body", + "http-body-util", + "http-range-header", + "httpdate", + "mime", + "mime_guess", + "percent-encoding", + "pin-project-lite", + "tokio", + "tokio-util", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-http" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cfcf7e2740e6fc6d4d688b4ef00650406bb94adf4731e43c096c3a19fe40840" +dependencies = [ + "bitflags 2.13.1", + "bytes", + "futures-util", + "http", + "http-body", + "pin-project-lite", + "tower 0.5.3", + "tower-layer", + "tower-service", + "url", +] + +[[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.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" +dependencies = [ + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "tracing-core" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" +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.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7f578e5945fb242538965c2d0b04418d38ec25c79d160cd279bf0731c8d319" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex-automata", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", +] + +[[package]] +name = "tray-icon" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "045979e3f037cd18ad1cb2a419dfda133c5c29c9f3453370079f2255d46c257e" +dependencies = [ + "crossbeam-channel", + "dirs", + "libappindicator", + "muda", + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-foundation", + "once_cell", + "png 0.18.1", + "serde", + "thiserror 2.0.19", + "windows-sys 0.61.2", +] + +[[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.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" + +[[package]] +name = "uds_windows" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f6fb2847f6742cd76af783a2a2c49e9375d0a111c7bef6f71cd9e738c72d6e" +dependencies = [ + "memoffset", + "tempfile", + "windows-sys 0.61.2", +] + +[[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 = "unicase" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142" + +[[package]] +name = "unicode-ident" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" + +[[package]] +name = "unicode-segmentation" +version = "1.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8" + +[[package]] +name = "url" +version = "2.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", + "serde_derive", +] + +[[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 = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "uuid" +version = "1.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf3923a6f5c4c6382e0b653c4117f48d631ea17f38ed86e2a828e6f7412f5239" +dependencies = [ + "getrandom 0.4.3", + "js-sys", + "serde_core", + "wasm-bindgen", +] + +[[package]] +name = "valuable" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "version-compare" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03c2856837ef78f57382f06b2b8563a2f512f7185d732608fd9176cb3b8edf0e" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[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.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasip2" +version = "1.0.4+wasi-0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.126" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b067c0c11094aef6b7a801c1e34a26affafdf3d051dba08456b868789aaf9a4" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.76" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c62df1340f32221cb9c54d6a27b030e3dba64361d4a95bed55f9aacb44da291d" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.126" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "167ce5e579f6bcf889c4f7175a8a5a585de84e8ff93976ce393efa5f2837aab1" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.126" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3997c7839262f4ef12cf90b818d6340c18e80f263f1a94bf157d0ec4420380e" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn 2.0.119", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.126" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc1b4cb0cc549fcf58d7dfc081778139b3d283a081644e833e84682ad71cea24" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "wasm-streams" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1ec4f6517c9e11ae630e200b2b65d193279042e28edd4a2cda233e46670bbb" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "web-sys" +version = "0.3.103" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8622dcb61c0bcc9fffa6938bed81210af2da9a7e4a1a834b2e37a59b6dfb6141" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web_atoms" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "075474b12bcb3d2e3d4546580e9de478eeeead668a1761e2a8860c836b7ef297" +dependencies = [ + "phf", + "phf_codegen", + "string_cache", + "string_cache_codegen", +] + +[[package]] +name = "webkit2gtk" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1027150013530fb2eaf806408df88461ae4815a45c541c8975e61d6f2fc4793" +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.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "916a5f65c2ef0dfe12fff695960a2ec3d4565359fdbb2e9943c974e06c734ea5" +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 = "webview2-com" +version = "0.38.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7130243a7a5b33c54a444e54842e6a9e133de08b5ad7b5861cd8ed9a6a5bc96a" +dependencies = [ + "webview2-com-macros", + "webview2-com-sys", + "windows", + "windows-core 0.61.2", + "windows-implement", + "windows-interface", +] + +[[package]] +name = "webview2-com-macros" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a921c1b6914c367b2b823cd4cde6f96beec77d30a939c8199bb377cf9b9b54" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "webview2-com-sys" +version = "0.38.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "381336cfffd772377d291702245447a5251a2ffa5bad679c99e61bc48bacbf9c" +dependencies = [ + "thiserror 2.0.19", + "windows", + "windows-core 0.61.2", +] + +[[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", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation", + "raw-window-handle", + "windows-sys 0.59.0", + "windows-version", +] + +[[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", + "windows-interface", + "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", + "windows-interface", + "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.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[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.119", +] + +[[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.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.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.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", + "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-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.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[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.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[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.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[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_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[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.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[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.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[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.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[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.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945" + +[[package]] +name = "winnow" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b97319f7b8343df12cc98938e5c3eb436064524c8d2b4e30a1d3a36eecdf81" +dependencies = [ + "memchr", +] + +[[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.57.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" + +[[package]] +name = "writeable" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4" + +[[package]] +name = "wry" +version = "0.55.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "186f9871daa55fd9c016578b810d149de58367113db7fb72b462d2323ce19514" +dependencies = [ + "base64 0.22.1", + "block2", + "cookie", + "crossbeam-channel", + "dirs", + "dom_query", + "dpi", + "dunce", + "gdkx11", + "gtk", + "http", + "javascriptcore-rs", + "jni", + "libc", + "ndk", + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation", + "objc2-ui-kit", + "objc2-web-kit", + "once_cell", + "percent-encoding", + "raw-window-handle", + "sha2 0.10.9", + "soup3", + "tao-macros", + "thiserror 2.0.19", + "url", + "webkit2gtk", + "webkit2gtk-sys", + "webview2-com", + "windows", + "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.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "709fe23a0424b6a435d82152b1bd3fdfb0833487d5fa90d05d42762a9891fef5" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", + "synstructure", +] + +[[package]] +name = "zbus" +version = "5.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe18fb60dc696039e738717b76eaea21e7a4489bbb1885020b43c94236d7e98a" +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", + "libc", + "ordered-stream", + "rustix", + "serde", + "serde_repr", + "tracing", + "uds_windows", + "uuid", + "windows-sys 0.61.2", + "winnow 1.0.4", + "zbus_macros", + "zbus_names", + "zvariant", +] + +[[package]] +name = "zbus_macros" +version = "5.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe96480bed92df2b442a1a30df364e12d08eed03aeb061f2b8dc6afb2be91119" +dependencies = [ + "proc-macro-crate 3.5.0", + "proc-macro2", + "quote", + "syn 2.0.119", + "zbus_names", + "zvariant", + "zvariant_utils", +] + +[[package]] +name = "zbus_names" +version = "4.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8bf88b4a3ff53e883001e0e0115b297a9d53c31b9c1edd2bfdd853e3428624e" +dependencies = [ + "serde", + "winnow 1.0.4", + "zvariant", +] + +[[package]] +name = "zerocopy" +version = "0.8.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5a105cd7b140f6eeec8acff2ea38135d3cab283ada58540f629fe51e46696eb" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fe976fb70c78cd64cccfe3a6fc142244e8a77b70959b30faf9d0ac37ee228eb" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "zerofrom" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", + "synstructure", +] + +[[package]] +name = "zerotrie" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f9152d31db0792fa83f70fb2f83148effb5c1f5b8c7686c3459e361d9bc20bf" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "zmij" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" + +[[package]] +name = "zvariant" +version = "5.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bee2a0bcd2a907786a456fff45aaaaf54c9ba5f50b71ae9ec1a4edd200c94911" +dependencies = [ + "endi", + "enumflags2", + "serde", + "winnow 1.0.4", + "zvariant_derive", + "zvariant_utils", +] + +[[package]] +name = "zvariant_derive" +version = "5.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38a708216a18780796770bfe3f4739c7c83a3e8f789b755534bbbc06e4e23e12" +dependencies = [ + "proc-macro-crate 3.5.0", + "proc-macro2", + "quote", + "syn 2.0.119", + "zvariant_utils", +] + +[[package]] +name = "zvariant_utils" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90cb9383f9b45290407a1258b202d3f8f01db719eb60b4e4055c6375af4fc7c7" +dependencies = [ + "proc-macro2", + "quote", + "serde", + "syn 2.0.119", + "winnow 1.0.4", +] diff --git a/desktop/Cargo.toml b/desktop/Cargo.toml new file mode 100644 index 0000000..33f6888 --- /dev/null +++ b/desktop/Cargo.toml @@ -0,0 +1,26 @@ +[package] +name = "splatlab-desktop" +version = "0.1.0" +edition = "2021" +description = "SplatLab desktop — a self-hosted control plane for video-to-3D Gaussian reconstruction" +authors = ["NJ-Labs"] +license = "MIT" +repository = "https://github.com/NJ-Labs/SplatLab" + +[build-dependencies] +tauri-build = { version = "2", features = [] } + +[dependencies] +splatlab = { path = "../rust" } +tauri = { version = "2" } +tauri-plugin-opener = "2" +tokio = { version = "1", features = ["rt-multi-thread", "net", "macros"] } +tracing = "0.1" +tracing-subscriber = { version = "0.3", features = ["env-filter"] } + +[profile.release] +codegen-units = 1 +lto = true +opt-level = "s" +panic = "abort" +strip = true diff --git a/desktop/build.rs b/desktop/build.rs new file mode 100644 index 0000000..d860e1e --- /dev/null +++ b/desktop/build.rs @@ -0,0 +1,3 @@ +fn main() { + tauri_build::build() +} diff --git a/desktop/capabilities/default.json b/desktop/capabilities/default.json new file mode 100644 index 0000000..1d0c903 --- /dev/null +++ b/desktop/capabilities/default.json @@ -0,0 +1,7 @@ +{ + "$schema": "../gen/schemas/desktop-schema.json", + "identifier": "default", + "description": "Permissions for the SplatLab desktop shell.", + "windows": ["main"], + "permissions": ["core:default", "opener:default"] +} diff --git a/desktop/frontend/index.html b/desktop/frontend/index.html new file mode 100644 index 0000000..091d9bd --- /dev/null +++ b/desktop/frontend/index.html @@ -0,0 +1,43 @@ + + + + + + SplatLab + + + +
+ +

SPLATLAB

+

Starting control plane…

+
+ + diff --git a/desktop/icons/128x128.png b/desktop/icons/128x128.png new file mode 100644 index 0000000..07a5f7d Binary files /dev/null and b/desktop/icons/128x128.png differ diff --git a/desktop/icons/128x128@2x.png b/desktop/icons/128x128@2x.png new file mode 100644 index 0000000..bba3860 Binary files /dev/null and b/desktop/icons/128x128@2x.png differ diff --git a/desktop/icons/32x32.png b/desktop/icons/32x32.png new file mode 100644 index 0000000..85a03da Binary files /dev/null and b/desktop/icons/32x32.png differ diff --git a/desktop/icons/generate_icons.py b/desktop/icons/generate_icons.py new file mode 100644 index 0000000..03e3238 --- /dev/null +++ b/desktop/icons/generate_icons.py @@ -0,0 +1,135 @@ +#!/usr/bin/env python3 +"""Generate the SplatLab desktop icon set from the web brand mark. + +The web logo is four acid-green dots (``--acid: #d9ff43``) laid out as a splat +constellation; see ``rust/static/logo.svg`` and the ``.brand-mark`` rules in +``rust/static/styles.css``. This script reproduces that mark at icon sizes so +the desktop app, the favicon and the site header all share one identity. + +Usage: python3 generate_icons.py [output_dir] +""" + +from __future__ import annotations + +import struct +import sys +from pathlib import Path + +from PIL import Image, ImageDraw, ImageFilter + +ACID = (217, 255, 67) # #d9ff43 +BACKDROP = (13, 15, 14) # #0d0f0e +EDGE = (217, 255, 67, 38) + +# Dot layout copied from styles.css, expressed in the logo's 27x27 unit box as +# (centre_x, centre_y, radius). +DOTS = [ + (5.5, 8.5, 2.5), + (20.5, 6.5, 1.75), + (18.5, 21.5, 2.125), + (6.5, 20.5, 1.375), +] + +UNIT = 27.0 +SUPERSAMPLE = 4 + + +def render(size: int, *, transparent: bool = False) -> Image.Image: + """Draw the mark at `size` px, supersampled for clean edges.""" + canvas = size * SUPERSAMPLE + scale = canvas / UNIT + + base = Image.new("RGBA", (canvas, canvas), (0, 0, 0, 0)) + if not transparent: + draw = ImageDraw.Draw(base) + radius = canvas * 0.22 + draw.rounded_rectangle( + [(0, 0), (canvas - 1, canvas - 1)], + radius=radius, + fill=BACKDROP + (255,), + outline=EDGE, + width=max(1, canvas // 128), + ) + + # Glow pass, then the crisp dots on top -- mirrors the CSS box-shadow. + glow = Image.new("RGBA", (canvas, canvas), (0, 0, 0, 0)) + glow_draw = ImageDraw.Draw(glow) + dots = Image.new("RGBA", (canvas, canvas), (0, 0, 0, 0)) + dots_draw = ImageDraw.Draw(dots) + + for cx, cy, r in DOTS: + x, y = cx * scale, cy * scale + glow_r = r * scale * 2.1 + glow_draw.ellipse( + [(x - glow_r, y - glow_r), (x + glow_r, y + glow_r)], + fill=ACID + (150,), + ) + dot_r = r * scale + dots_draw.ellipse( + [(x - dot_r, y - dot_r), (x + dot_r, y + dot_r)], + fill=ACID + (255,), + ) + + glow = glow.filter(ImageFilter.GaussianBlur(radius=canvas * 0.035)) + base = Image.alpha_composite(base, glow) + base = Image.alpha_composite(base, dots) + return base.resize((size, size), Image.LANCZOS) + + +def write_icns(path: Path, images: dict[str, Image.Image]) -> None: + """Build an ICNS container of embedded PNGs (portable, no `iconutil`).""" + chunks = b"" + for ostype, image in images.items(): + import io + + buffer = io.BytesIO() + image.save(buffer, format="PNG") + payload = buffer.getvalue() + chunks += ostype.encode("ascii") + struct.pack(">I", len(payload) + 8) + payload + path.write_bytes(b"icns" + struct.pack(">I", len(chunks) + 8) + chunks) + + +def main() -> None: + out = Path(sys.argv[1] if len(sys.argv) > 1 else ".").resolve() + out.mkdir(parents=True, exist_ok=True) + + # Tauri's expected PNG set. + for name, size in [ + ("32x32.png", 32), + ("128x128.png", 128), + ("128x128@2x.png", 256), + ("icon.png", 512), + ]: + render(size).save(out / name) + + # Windows .ico with the usual embedded sizes. + render(256).save( + out / "icon.ico", + format="ICO", + sizes=[(16, 16), (24, 24), (32, 32), (48, 48), (64, 64), (128, 128), (256, 256)], + ) + + # macOS .icns. + write_icns( + out / "icon.icns", + { + "ic07": render(128), + "ic08": render(256), + "ic09": render(512), + "ic10": render(1024), + "ic11": render(32), + "ic12": render(64), + "ic13": render(256), + "ic14": render(512), + }, + ) + + # Transparent mark for docs and the web favicon fallback. + render(512, transparent=True).save(out / "mark.png") + + for item in sorted(out.iterdir()): + print(f" {item.name:18} {item.stat().st_size:>8,} bytes") + + +if __name__ == "__main__": + main() diff --git a/desktop/icons/icon.icns b/desktop/icons/icon.icns new file mode 100644 index 0000000..75d544d Binary files /dev/null and b/desktop/icons/icon.icns differ diff --git a/desktop/icons/icon.ico b/desktop/icons/icon.ico new file mode 100644 index 0000000..121ae80 Binary files /dev/null and b/desktop/icons/icon.ico differ diff --git a/desktop/icons/icon.png b/desktop/icons/icon.png new file mode 100644 index 0000000..872a203 Binary files /dev/null and b/desktop/icons/icon.png differ diff --git a/desktop/icons/mark.png b/desktop/icons/mark.png new file mode 100644 index 0000000..0649138 Binary files /dev/null and b/desktop/icons/mark.png differ diff --git a/desktop/src/main.rs b/desktop/src/main.rs new file mode 100644 index 0000000..3f07f78 --- /dev/null +++ b/desktop/src/main.rs @@ -0,0 +1,104 @@ +#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] + +//! SplatLab desktop. +//! +//! The desktop bundle is the exact same control plane as the server build: it +//! starts the axum server on a loopback port chosen by the OS, then points a +//! native webview at it. The SPA is compiled into the binary, so there is no +//! sidecar process and no external asset directory to locate. + +use std::net::SocketAddr; + +use splatlab::Settings; +use tauri::webview::NewWindowResponse; +use tauri::{Manager, WebviewUrl, WebviewWindowBuilder}; + +/// Bring up the control plane and report the loopback address it bound to. +fn start_server( + data_dir: std::path::PathBuf, +) -> Result<(SocketAddr, tokio::runtime::Runtime), Box> { + std::fs::create_dir_all(&data_dir)?; + + let settings = Settings::new(&data_dir); + let runtime = tokio::runtime::Builder::new_multi_thread() + .enable_all() + .thread_name("splatlab-server") + .build()?; + + // Bind before spawning so the window can be created against a known port. + let listener = + runtime.block_on(async { tokio::net::TcpListener::bind(("127.0.0.1", 0)).await })?; + let address = listener.local_addr()?; + + runtime.spawn(async move { + if let Err(error) = splatlab::serve(settings, listener).await { + tracing::error!(%error, "control plane stopped"); + } + }); + + Ok((address, runtime)) +} + +/// Hand a URL to the user's browser. Used for anything that is not the local +/// control plane, such as the GitHub link in the app header. +fn open_externally(url: &tauri::Url) { + if !matches!(url.scheme(), "http" | "https") { + return; + } + if let Err(error) = tauri_plugin_opener::open_url(url.as_str(), None::<&str>) { + tracing::warn!(%error, %url, "could not open external link"); + } +} + +fn is_control_plane(url: &tauri::Url) -> bool { + matches!(url.host_str(), Some("127.0.0.1") | Some("localhost")) +} + +fn main() { + tracing_subscriber::fmt() + .with_env_filter( + tracing_subscriber::EnvFilter::try_from_default_env() + .unwrap_or_else(|_| "splatlab=info,splatlab_desktop=info".into()), + ) + .init(); + + tauri::Builder::default() + .plugin(tauri_plugin_opener::init()) + .setup(|app| { + let data_dir = app.path().app_data_dir()?; + tracing::info!(path = %data_dir.display(), "data directory"); + + let (address, runtime) = start_server(data_dir)?; + tracing::info!(%address, "control plane ready"); + + // Keep the runtime alive for the lifetime of the app. + app.manage(runtime); + + let url = format!("http://{address}/"); + WebviewWindowBuilder::new(app, "main", WebviewUrl::External(url.parse()?)) + .title("SplatLab") + .inner_size(1440.0, 960.0) + .min_inner_size(960.0, 640.0) + .resizable(true) + .visible(true) + // Keep the webview pinned to the local control plane; anything else + // (the GitHub link in the header) belongs in the system browser. + .on_navigation(|target| { + if is_control_plane(target) { + return true; + } + open_externally(target); + false + }) + // `target="_blank"` links arrive here rather than as a navigation. + .on_new_window(|target, _features| { + open_externally(&target); + NewWindowResponse::Deny + }) + .build()?; + + Ok(()) + }) + .run(tauri::generate_context!()) + .expect("failed to start SplatLab"); +} diff --git a/desktop/tauri.conf.json b/desktop/tauri.conf.json new file mode 100644 index 0000000..850083d --- /dev/null +++ b/desktop/tauri.conf.json @@ -0,0 +1,52 @@ +{ + "$schema": "https://schema.tauri.app/config/2", + "productName": "SplatLab", + "version": "0.1.0", + "identifier": "com.njlabs.splatlab", + "build": { + "frontendDist": "frontend" + }, + "app": { + "windows": [], + "security": { + "csp": null + } + }, + "bundle": { + "active": true, + "targets": "all", + "createUpdaterArtifacts": false, + "category": "DeveloperTool", + "shortDescription": "Video to 3D Gaussian splat control plane", + "longDescription": "SplatLab is a self-hosted control plane for turning a carefully captured video into a 3D Gaussian splat. It queues reconstruction jobs and dispatches them to your own GPU agents.", + "copyright": "Copyright (c) 2026 NJ-Labs", + "licenseFile": "../LICENSE", + "icon": [ + "icons/32x32.png", + "icons/128x128.png", + "icons/128x128@2x.png", + "icons/icon.icns", + "icons/icon.ico" + ], + "linux": { + "deb": { + "depends": [] + }, + "rpm": { + "epoch": 0, + "release": "1" + }, + "appimage": { + "bundleMediaFramework": false + } + }, + "macOS": { + "minimumSystemVersion": "10.15" + }, + "windows": { + "nsis": { + "installMode": "perMachine" + } + } + } +} diff --git a/docs/screenshot.png b/docs/screenshot.png new file mode 100644 index 0000000..fffe0d2 Binary files /dev/null and b/docs/screenshot.png differ diff --git a/rust/.dockerignore b/rust/.dockerignore new file mode 100644 index 0000000..ece339d --- /dev/null +++ b/rust/.dockerignore @@ -0,0 +1,6 @@ +.git +.gitignore +target +data +.env +tests diff --git a/rust/.env.example b/rust/.env.example new file mode 100644 index 0000000..aa9156c --- /dev/null +++ b/rust/.env.example @@ -0,0 +1,6 @@ +SPLAT_PORT=8080 +SPLAT_HOST=0.0.0.0 +SPLAT_DATA_DIR=./data +SPLAT_MAX_UPLOAD_BYTES=8589934592 +SPLAT_MAX_RESULT_BYTES=8589934592 +SPLAT_AGENT_LEASE_SECONDS=60 diff --git a/rust/.gitignore b/rust/.gitignore new file mode 100644 index 0000000..5a4d878 --- /dev/null +++ b/rust/.gitignore @@ -0,0 +1,3 @@ +/target +/data +.env diff --git a/rust/Cargo.lock b/rust/Cargo.lock new file mode 100644 index 0000000..a209873 --- /dev/null +++ b/rust/Cargo.lock @@ -0,0 +1,1994 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "ahash" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c982642fa9e8606056828ee9a8505737230110bb1099153c79efe865c59d12ba" +dependencies = [ + "memchr", +] + +[[package]] +name = "android_system_properties" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae221649c9976a6f6c56ae1facf410f3ddb33cc661c4b7b61020a912d4237fbc" +dependencies = [ + "libc", +] + +[[package]] +name = "async-trait" +version = "0.1.91" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae36dc4177970ef04fde5178d3e2429882def40e57a451f919c098f72baa6cec" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "autocfg" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" + +[[package]] +name = "axum" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f" +dependencies = [ + "async-trait", + "axum-core", + "axum-macros", + "bytes", + "futures-util", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-util", + "itoa", + "matchit", + "memchr", + "mime", + "multer", + "percent-encoding", + "pin-project-lite", + "rustversion", + "serde", + "serde_json", + "serde_path_to_error", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tower 0.5.3", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "axum-core" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" +dependencies = [ + "async-trait", + "bytes", + "futures-util", + "http", + "http-body", + "http-body-util", + "mime", + "pin-project-lite", + "rustversion", + "sync_wrapper", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "axum-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57d123550fa8d071b7255cb0cc04dc302baa6c8c4a79f55701552684d8399bce" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "bitflags" +version = "2.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b588b76d00fde79687d7646a9b5bdf3cc0f655e0bbd080335a95d7e96f3587da" + +[[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 = "block-buffer" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2f6c7dbe95a6ed67ad9f18e57daf93a2f034c524b99fd2b76d18fdfeb6660aa" +dependencies = [ + "hybrid-array", +] + +[[package]] +name = "bumpalo" +version = "3.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" + +[[package]] +name = "bytes" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" + +[[package]] +name = "cc" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5add81bb678e6cb321aff7fa0dc7689ad82b112dbc032cea19f91d6b8e3582b9" +dependencies = [ + "find-msvc-tools", + "shlex", +] + +[[package]] +name = "cfg-if" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "chrono" +version = "0.4.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327" +dependencies = [ + "iana-time-zone", + "js-sys", + "num-traits", + "wasm-bindgen", + "windows-link", +] + +[[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common 0.1.7", + "inout", +] + +[[package]] +name = "const-oid" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6ef517f0926dd24a1582492c791b6a4818a4d94e789a334894aa15b0d12f55c" + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "cpufeatures" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201" +dependencies = [ + "libc", +] + +[[package]] +name = "crypto-common" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "crypto-common" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce6e4c961d6cd6c9a86db418387425e8bdeaf05b3c8bc1411e6dca4c252f1453" +dependencies = [ + "hybrid-array", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer 0.10.4", + "crypto-common 0.1.7", + "subtle", +] + +[[package]] +name = "digest" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2" +dependencies = [ + "block-buffer 0.12.1", + "const-oid", + "crypto-common 0.2.2", +] + +[[package]] +name = "displaydoc" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "encoding_rs" +version = "0.8.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" +dependencies = [ + "cfg-if", +] + +[[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 = "fallible-iterator" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" + +[[package]] +name = "fallible-streaming-iterator" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" + +[[package]] +name = "fastrand" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223" + +[[package]] +name = "find-msvc-tools" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" + +[[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 = "futures-channel" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "262590f4fe6afeb0bc83be1daa64e52657fe185690a958af7f3ad0e92085c5ae" +dependencies = [ + "futures-core", +] + +[[package]] +name = "futures-core" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2cd50c473c80f6d7c3670a752354b8e569b1a7cbfdc0419ec88e5edad85e0dc7" + +[[package]] +name = "futures-macro" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d6d3cde68c518367be28956066ddfef33813991b77a55005a69dae04bf3b10b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "futures-sink" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e34418ac499d6305c2fb5ad0ed2f6ac998c5f8ca209b4510f7f94242c647e307" + +[[package]] +name = "futures-task" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b231ed28831efb4a61a08580c4bc233ec56bc009f4cd8f52da2c3cb97df0c109" + +[[package]] +name = "futures-util" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a77a90a256fce34da66415271e30f94ee91c57b04b8a2c042d9cf3220179deaa" +dependencies = [ + "futures-core", + "futures-macro", + "futures-task", + "pin-project-lite", + "slab", +] + +[[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.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "getrandom" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" +dependencies = [ + "cfg-if", + "libc", + "r-efi", +] + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", +] + +[[package]] +name = "hashlink" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af" +dependencies = [ + "hashbrown", +] + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "http" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "918d3568bebf352712bc2ef3d46a8bcf1a75b373be6539de198e9105cbbf9ce0" +dependencies = [ + "bytes", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2a8f2913ee65f60facd6a5905613afaa448497a0230cc41ce022d93290bc2c" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9f41fd6a08e4d4ec69df65976da761afd5ad5e58a9d4acb46bd1c953a9e3ff2" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "http-range-header" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9171a2ea8a68358193d15dd5d70c1c10a2afc3e7e4c5bc92bc9f025cebd7359c" + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "hybrid-array" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "707114b52a152fa7bdb290cd7cd5912d9467273b6d74e21b8d81aca1f8533f6b" +dependencies = [ + "typenum", +] + +[[package]] +name = "hyper" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d22053281f852e11534f5198498373cbb59295120a20771d90f7ed1897490a72" +dependencies = [ + "atomic-waker", + "bytes", + "futures-channel", + "futures-core", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-util" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" +dependencies = [ + "base64", + "bytes", + "futures-channel", + "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.65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "log", + "wasm-bindgen", + "windows-core", +] + +[[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 = "icu_collections" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2984d1cd16c883d7935b9e07e44071dca8d917fd52ecc02c04d5fa0b5a3f191c" +dependencies = [ + "displaydoc", + "potential_utf", + "utf8_iter", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c56e5ee99d6e3d33bd91c5d85458b6005a22140021cc324cea84dd0e72cff3b4" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da3be0ae77ea334f4da67c12f149704f19f81d1adf7c51cf482943e84a2bad38" + +[[package]] +name = "icu_properties" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bee3b67d0ea5c2cca5003417989af8996f8604e34fb9ddf96208a033901e70de" +dependencies = [ + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e2bbb201e0c04f7b4b3e14382af113e17ba4f63e2c9d2ee626b720cbce54a14" + +[[package]] +name = "icu_provider" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[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.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "inout" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" +dependencies = [ + "generic-array", +] + +[[package]] +name = "ipnet" +version = "2.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a756c3fac73139e83f14c2d742155dd2b78d3ee56597b419a0579b7bdd6dd78" + +[[package]] +name = "itoa" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" + +[[package]] +name = "js-sys" +version = "0.3.103" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53b44bfcdb3f8d5837a46dae1ca9660a837176eee74a28b229bc626816589102" +dependencies = [ + "cfg-if", + "futures-util", + "wasm-bindgen", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[package]] +name = "libc" +version = "0.2.189" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2" + +[[package]] +name = "libsqlite3-sys" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c10584274047cb335c23d3e61bcef8e323adae7c5c8c760540f73610177fc3f" +dependencies = [ + "cc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "linux-raw-sys" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" + +[[package]] +name = "litemap" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0" + +[[package]] +name = "log" +version = "0.4.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad" + +[[package]] +name = "matchers" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9" +dependencies = [ + "regex-automata", +] + +[[package]] +name = "matchit" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" + +[[package]] +name = "memchr" +version = "2.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "mime_guess" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" +dependencies = [ + "mime", + "unicase", +] + +[[package]] +name = "mio" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30d65c71f1ce40ab09135ce117d742b9f8a19ff91a41a8b57ed50bc2de59c427" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.61.2", +] + +[[package]] +name = "multer" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83e87776546dc87511aa5ee218730c92b666d7264ab6ed41f9d215af9cd5224b" +dependencies = [ + "bytes", + "encoding_rs", + "futures-util", + "http", + "httparse", + "memchr", + "mime", + "spin", + "version_check", +] + +[[package]] +name = "nu-ansi-term" +version = "0.50.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "once_cell" +version = "1.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" + +[[package]] +name = "pbkdf2" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +dependencies = [ + "digest 0.10.7", + "hmac", +] + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "pin-project" +version = "1.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2466b2336ed02bcdca6b294417127b90ec92038d1d5c4fbeac971a922e0e0924" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c96395f0a926bc13b1c17622aaddda1ecb55d49c8f1bf9777e4d877800a43f8b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" + +[[package]] +name = "pkg-config" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19f132c84eca552bf34cab8ec81f1c1dcc229b811638f9d283dceabe58c5569e" + +[[package]] +name = "potential_utf" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0103b1cef7ec0cf76490e969665504990193874ea05c85ff9bab8b911d0a0564" +dependencies = [ + "zerovec", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "proc-macro2" +version = "1.0.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + +[[package]] +name = "rand" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22f6172bdec972074665ed81ed53b71da00bfc44b65a753cfde883ec4c702a1a" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[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", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.17", +] + +[[package]] +name = "regex" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad8553b9b26413251cbf30e620595c7a41b3887f03da04579c0e6b0d6a06b4b2" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4" + +[[package]] +name = "reqwest" +version = "0.12.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" +dependencies = [ + "base64", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-util", + "js-sys", + "log", + "mime_guess", + "percent-encoding", + "pin-project-lite", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tower 0.5.3", + "tower-http 0.6.11", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "rusqlite" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b838eba278d213a8beaf485bd313fd580ca4505a00d5871caeb1457c55322cae" +dependencies = [ + "bitflags", + "fallible-iterator", + "fallible-streaming-iterator", + "hashlink", + "libsqlite3-sys", + "smallvec", +] + +[[package]] +name = "rust-embed" +version = "8.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9e7760e252aaba7b09f4be00e36476cf585bdb68a53552ac954cdf504ab4bc9" +dependencies = [ + "rust-embed-impl", + "rust-embed-utils", + "walkdir", +] + +[[package]] +name = "rust-embed-impl" +version = "8.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bcfc4d6f53af43755f7a723e4b6b8794fcce052a178dd8c6c1dadc5f5343097" +dependencies = [ + "mime_guess", + "proc-macro2", + "quote", + "rust-embed-utils", + "syn 2.0.119", + "walkdir", +] + +[[package]] +name = "rust-embed-utils" +version = "8.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ffa149f6aa81b58a5b3011d01a857c4ed12c7a732d2c51947a4c7c692185f0" +dependencies = [ + "sha2 0.11.0", + "walkdir", +] + +[[package]] +name = "rustix" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustversion" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" + +[[package]] +name = "ryu" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" + +[[package]] +name = "salsa20" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" +dependencies = [ + "cipher", +] + +[[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 = "scrypt" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0516a385866c09368f0b5bcd1caff3366aace790fcd46e2bb032697bb172fd1f" +dependencies = [ + "pbkdf2", + "salsa20", + "sha2 0.10.9", +] + +[[package]] +name = "serde" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "serde_json" +version = "1.0.151" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14" +dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + +[[package]] +name = "serde_path_to_error" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10a9ff822e371bb5403e391ecd83e182e0e77ba7f6fe0160b795797109d1b457" +dependencies = [ + "itoa", + "serde", + "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 = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures 0.2.17", + "digest 0.10.7", +] + +[[package]] +name = "sha2" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "446ba717509524cb3f22f17ecc096f10f4822d76ab5c0b9822c5f9c284e825f4" +dependencies = [ + "cfg-if", + "cpufeatures 0.3.0", + "digest 0.11.3", +] + +[[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 = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" + +[[package]] +name = "signal-hook-registry" +version = "1.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" +dependencies = [ + "errno", + "libc", +] + +[[package]] +name = "slab" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" + +[[package]] +name = "smallvec" +version = "1.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90" + +[[package]] +name = "socket2" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "spin" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3763264f6b73151db08c50ff20d7d8a0b8796e021cdea7ceedad07b80155fa0e" + +[[package]] +name = "splatlab" +version = "0.1.0" +dependencies = [ + "axum", + "base64", + "chrono", + "futures-util", + "libc", + "mime_guess", + "once_cell", + "rand", + "regex", + "reqwest", + "rusqlite", + "rust-embed", + "scrypt", + "serde", + "serde_json", + "subtle", + "tempfile", + "tokio", + "tokio-util", + "tower 0.4.13", + "tower-http 0.5.2", + "tracing", + "tracing-subscriber", + "uuid", + "windows-sys 0.59.0", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "syn" +version = "2.0.119" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3" +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.119", +] + +[[package]] +name = "tempfile" +version = "3.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" +dependencies = [ + "fastrand", + "getrandom 0.4.3", + "once_cell", + "rustix", + "windows-sys 0.61.2", +] + +[[package]] +name = "thread_local" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ad99c4c6d32803332c548b1af0540b357b3f5fc0be8f6c6bfe8b2e6ae784070" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "tinystr" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tokio" +version = "1.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "202caea871b69668250d242070849eb495be178ed697a3e98aebce5bc81a0bed" +dependencies = [ + "bytes", + "libc", + "mio", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys 0.61.2", +] + +[[package]] +name = "tokio-macros" +version = "2.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78773a2a397f451582ce068015985c33193cf6dea8b74d2a639fe457b2f07b0e" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "tokio-util" +version = "0.7.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "494815d09bf52b5548659851081238f0ca39ff638363907596da739561c62c52" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "pin-project", + "pin-project-lite", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-http" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9cd434a998747dd2c4276bc96ee2e0c7a2eadf3cae88e52be55a05fa9053f5" +dependencies = [ + "bitflags", + "bytes", + "futures-util", + "http", + "http-body", + "http-body-util", + "http-range-header", + "httpdate", + "mime", + "mime_guess", + "percent-encoding", + "pin-project-lite", + "tokio", + "tokio-util", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-http" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cfcf7e2740e6fc6d4d688b4ef00650406bb94adf4731e43c096c3a19fe40840" +dependencies = [ + "bitflags", + "bytes", + "futures-util", + "http", + "http-body", + "pin-project-lite", + "tower 0.5.3", + "tower-layer", + "tower-service", + "url", +] + +[[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.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" +dependencies = [ + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "tracing-core" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" +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.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7f578e5945fb242538965c2d0b04418d38ec25c79d160cd279bf0731c8d319" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex-automata", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "typenum" +version = "1.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" + +[[package]] +name = "unicase" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142" + +[[package]] +name = "unicode-ident" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" + +[[package]] +name = "url" +version = "2.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", +] + +[[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.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf3923a6f5c4c6382e0b653c4117f48d631ea17f38ed86e2a828e6f7412f5239" +dependencies = [ + "getrandom 0.4.3", + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "valuable" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[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.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasm-bindgen" +version = "0.2.126" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b067c0c11094aef6b7a801c1e34a26affafdf3d051dba08456b868789aaf9a4" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.76" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c62df1340f32221cb9c54d6a27b030e3dba64361d4a95bed55f9aacb44da291d" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.126" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "167ce5e579f6bcf889c4f7175a8a5a585de84e8ff93976ce393efa5f2837aab1" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.126" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3997c7839262f4ef12cf90b818d6340c18e80f263f1a94bf157d0ec4420380e" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn 2.0.119", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.126" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc1b4cb0cc549fcf58d7dfc081778139b3d283a081644e833e84682ad71cea24" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "web-sys" +version = "0.3.103" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8622dcb61c0bcc9fffa6938bed81210af2da9a7e4a1a834b2e37a59b6dfb6141" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[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 = "windows-core" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link", + "windows-result", + "windows-strings", +] + +[[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.119", +] + +[[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.119", +] + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-result" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-strings" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[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_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[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_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[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_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "writeable" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4" + +[[package]] +name = "yoke" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "709fe23a0424b6a435d82152b1bd3fdfb0833487d5fa90d05d42762a9891fef5" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", + "synstructure", +] + +[[package]] +name = "zerocopy" +version = "0.8.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5a105cd7b140f6eeec8acff2ea38135d3cab283ada58540f629fe51e46696eb" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fe976fb70c78cd64cccfe3a6fc142244e8a77b70959b30faf9d0ac37ee228eb" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "zerofrom" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", + "synstructure", +] + +[[package]] +name = "zerotrie" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f9152d31db0792fa83f70fb2f83148effb5c1f5b8c7686c3459e361d9bc20bf" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "zmij" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" diff --git a/rust/Cargo.toml b/rust/Cargo.toml new file mode 100644 index 0000000..e8c2c03 --- /dev/null +++ b/rust/Cargo.toml @@ -0,0 +1,47 @@ +[package] +name = "splatlab" +version = "0.1.0" +edition = "2021" +description = "A self-hosted control plane for video-to-3D Gaussian reconstruction" +license = "MIT" + +[[bin]] +name = "splatlab" +path = "src/main.rs" + +[lib] +name = "splatlab" +path = "src/lib.rs" + +[dependencies] +axum = { version = "0.7", features = ["multipart", "macros"] } +tokio = { version = "1", features = ["rt-multi-thread", "macros", "fs", "signal", "io-util", "net"] } +tokio-util = { version = "0.7", features = ["io"] } +tower = { version = "0.4", features = ["util"] } +tower-http = { version = "0.5", features = ["fs", "trace"] } +rust-embed = "8" +mime_guess = "2" +serde = { version = "1", features = ["derive"] } +serde_json = "1" +rusqlite = { version = "0.31", features = ["bundled"] } +chrono = "0.4" +uuid = { version = "1", features = ["v4"] } +regex = "1" +once_cell = "1" +rand = "0.8" +scrypt = { version = "0.11", default-features = false } +base64 = "0.22" +subtle = "2" +futures-util = "0.3" +tracing = "0.1" +tracing-subscriber = { version = "0.3", features = ["env-filter"] } + +[target.'cfg(unix)'.dependencies] +libc = "0.2" + +[target.'cfg(windows)'.dependencies] +windows-sys = { version = "0.59", features = ["Win32_Foundation", "Win32_Storage_FileSystem"] } + +[dev-dependencies] +reqwest = { version = "0.12", default-features = false, features = ["json", "multipart"] } +tempfile = "3" diff --git a/rust/Dockerfile b/rust/Dockerfile new file mode 100644 index 0000000..09a654a --- /dev/null +++ b/rust/Dockerfile @@ -0,0 +1,42 @@ +# ---- build ---------------------------------------------------------------- +FROM rust:1.83-slim AS builder +WORKDIR /usr/src/splatlab + +RUN apt-get update \ + && apt-get install -y --no-install-recommends pkg-config \ + && rm -rf /var/lib/apt/lists/* + +# Cache the dependency graph before the sources change. +COPY Cargo.toml Cargo.lock ./ +RUN mkdir -p src \ + && echo 'fn main() {}' > src/main.rs \ + && echo '' > src/lib.rs \ + && cargo build --release 2>/dev/null || true \ + && rm -rf src + +COPY src ./src +RUN touch src/main.rs src/lib.rs && cargo build --release --bin splatlab + +# ---- runtime -------------------------------------------------------------- +FROM debian:bookworm-slim +ENV SPLAT_DATA_DIR=/data \ + SPLAT_STATIC_DIR=/opt/splatlab/static \ + SPLAT_HOST=0.0.0.0 \ + SPLAT_PORT=8080 + +RUN apt-get update \ + && apt-get install -y --no-install-recommends ca-certificates curl \ + && rm -rf /var/lib/apt/lists/* \ + && useradd --system --uid 10001 --home /opt/splatlab splatlab + +WORKDIR /opt/splatlab +COPY --from=builder /usr/src/splatlab/target/release/splatlab /usr/local/bin/splatlab +COPY static ./static +RUN mkdir -p /data && chown -R splatlab:splatlab /data /opt/splatlab + +USER splatlab +EXPOSE 8080 +HEALTHCHECK --interval=20s --timeout=5s --start-period=5s --retries=3 \ + CMD curl -fsS http://127.0.0.1:8080/api/health || exit 1 + +CMD ["splatlab"] diff --git a/rust/Makefile b/rust/Makefile new file mode 100644 index 0000000..e952dd6 --- /dev/null +++ b/rust/Makefile @@ -0,0 +1,31 @@ +.PHONY: build dev test verify fmt release up down logs clean + +build: + cargo build + +dev: + SPLAT_DATA_DIR=./data SPLAT_HOST=127.0.0.1 SPLAT_PORT=8080 cargo run + +test: + cargo test + +verify: test + cargo build --release + +fmt: + cargo fmt + +release: + cargo build --release + +up: + docker compose up -d --build + +down: + docker compose down + +logs: + docker compose logs -f + +clean: + cargo clean diff --git a/rust/README.md b/rust/README.md new file mode 100644 index 0000000..dd59b57 --- /dev/null +++ b/rust/README.md @@ -0,0 +1,260 @@ +
+ +SplatLab + +# SplatLab (Rust) + +**A self-hosted control plane for video-to-3D Gaussian-splat reconstruction.** + +[![CI](https://github.com/NJ-Labs/SplatLab/actions/workflows/ci.yml/badge.svg)](https://github.com/NJ-Labs/SplatLab/actions/workflows/ci.yml) +[![Release](https://github.com/NJ-Labs/SplatLab/actions/workflows/release.yml/badge.svg)](https://github.com/NJ-Labs/SplatLab/actions/workflows/release.yml) +[![License: MIT](https://img.shields.io/badge/License-MIT-d9ff43.svg)](../LICENSE) + +[github.com/NJ-Labs/SplatLab](https://github.com/NJ-Labs/SplatLab) + +
+ +![SplatLab](../docs/screenshot.png) + +--- + +This is a feature-complete port of the Python/FastAPI implementation in `../`. It speaks the +same HTTP API, uses the same SQLite schema, serves the same SPA, and is a drop-in replacement +for existing `splat-agent` workers — no agent changes required. + +SplatLab does **no** GPU work itself. It accepts video uploads, records jobs, routes them to +named queues, and hands them to external GPU agents that authenticate with access/secret key +pairs. Agents claim work atomically, stream status and logs back, and upload a `.ply` result. +Agents that stop sending heartbeats have their leases expired and their jobs failed. + +## Stack + +| Concern | Python original | Rust port | +| --- | --- | --- | +| HTTP | FastAPI + uvicorn | `axum` + `hyper` + `tokio` | +| Database | `sqlite3` (stdlib) | `rusqlite` (bundled SQLite) | +| Static SPA | `StaticFiles` | `tower-http::ServeDir` | +| Password hashing | `hashlib.scrypt` | `scrypt` crate (identical parameters) | +| Constant-time compare | `hmac.compare_digest` | `subtle` | + +The database format is unchanged: **an existing `splatlab.sqlite3` can be used as-is.** +scrypt parameters (`N=16384, r=8, p=1, dklen=32`, 16-byte salt, base64 storage) match the +Python implementation exactly, so previously issued worker credentials keep working. + +## Install + +### Desktop app + +Download the installer for your platform from the +[latest release](https://github.com/NJ-Labs/SplatLab/releases/latest): + +| Platform | Artifact | +| --- | --- | +| Windows x86_64 | `SplatLab__x64-setup.exe` (NSIS) or `SplatLab__x64_en-US.msi` | +| macOS Apple Silicon | `SplatLab__aarch64.dmg` | +| macOS Intel | `SplatLab__x64.dmg` | +| Linux x86_64 | `.AppImage`, `.deb` or `.rpm` | +| Linux arm64 | `.deb` or `.rpm` | + +The desktop app is the same control plane in a native window. It starts the server on a +loopback port chosen by the OS and stores its database under the platform app-data directory +(`~/.local/share/com.njlabs.splatlab`, `~/Library/Application Support/com.njlabs.splatlab`, +or `%APPDATA%\com.njlabs.splatlab`). Nothing listens on an external interface. + +macOS and Windows builds are unsigned unless signing secrets are configured, so the first +launch needs Gatekeeper's *Open Anyway* or the SmartScreen *More info → Run anyway* prompt. + +### Server + +Standalone `splatlab` binaries are attached to each release for the same five targets. +The SPA is embedded in the binary, so a single file is all you need: + +```bash +tar xzf splatlab-v0.1.0-linux-x86_64.tar.gz +cd splatlab-v0.1.0-linux-x86_64 +SPLAT_DATA_DIR=./data ./splatlab # http://0.0.0.0:8080 +``` + +## Quick start + +```bash +cd rust +make dev # http://127.0.0.1:8080 +make test # 30 integration tests +make up # docker compose, bound to 127.0.0.1 only +``` + +Desktop app, from source (needs the +[Tauri prerequisites](https://tauri.app/start/prerequisites/) for your platform): + +```bash +cd desktop +cargo install tauri-cli --version "^2" +cargo tauri dev # run +cargo tauri build # bundle for the current platform +``` + +## Configuration + +All settings come from the environment; see `.env.example`. + +| Variable | Default | Purpose | +| --- | --- | --- | +| `SPLAT_DATA_DIR` | `./data` | Database and job payload root | +| `SPLAT_HOST` | `0.0.0.0` | Bind address | +| `SPLAT_PORT` | `8080` | Bind port | +| `SPLAT_MAX_UPLOAD_BYTES` | `8589934592` (8 GiB) | Video upload ceiling | +| `SPLAT_MAX_RESULT_BYTES` | `8589934592` (8 GiB) | `.ply` result ceiling | +| `SPLAT_AGENT_LEASE_SECONDS` | `60` | Heartbeat lease before a job is failed | +| `SPLAT_STATIC_DIR` | `./static` | SPA asset directory | + +On-disk layout: + +``` +{data_dir}/splatlab.sqlite3 +{data_dir}/.uploads/ # transient upload staging +{data_dir}/jobs/{job_id}/source{ext} +{data_dir}/jobs/{job_id}/pipeline.log +{data_dir}/jobs/{job_id}/remote-scene.ply +``` + +## API + +Errors always use the `{"detail": "..."}` envelope. + +### Browser / operator (unauthenticated) + +| Method | Path | Success | Notes | +| --- | --- | --- | --- | +| `GET` | `/api/health` | 200 | Agent counts, disk usage, upload ceiling | +| `GET` | `/api/jobs` | 200 | Newest first, capped at 50 | +| `POST` | `/api/jobs` | **202** | multipart intake | +| `GET` | `/api/jobs/{id}` | 200 | | +| `DELETE` | `/api/jobs/{id}` | 204 | 409 while the job is active | +| `POST` | `/api/jobs/{id}/cancel` | 200 | Immediate if queued, cooperative if running | +| `GET` | `/api/jobs/{id}/logs?tail=300` | 200 | `text/plain`, tail clamped to 1..2000 | +| `GET` | `/api/jobs/{id}/result` | 200 | 409 until the scene is ready | +| `GET` | `/api/agents` | 200 | | +| `GET` | `/api/settings/keys` | 200 | Never exposes salts or hashes | +| `POST` | `/api/settings/keys` | **201** | Secret is returned once and never stored | +| `PATCH` | `/api/settings/keys/{access_key}` | 200 | Relabel a credential; secret material is untouched | +| `DELETE` | `/api/settings/keys/{access_key}` | 204 | Cascades to agents and their active jobs | + +`POST /api/jobs` fields: `video` (file), `name`, `quality` (`standard`\|`high`), +`camera_type` (`perspective`\|`equirectangular`), `target_frames` (24–1200), +`queue` (`^[a-z0-9][a-z0-9._-]{0,63}$`), `static_scene_confirmed` (must be true). +Allowed extensions: `.mp4 .mov .m4v .avi .mkv .webm`. + +### Agent (requires `X-Splat-Access-Key` + `X-Splat-Secret-Key`) + +| Method | Path | Success | +| --- | --- | --- | +| `GET` | `/api/agents/auth-check` | 200 | +| `PUT` | `/api/agents/{agent_id}` | 200 | +| `POST` | `/api/agents/{agent_id}/heartbeat` | 200 | +| `POST` | `/api/agents/{agent_id}/disconnect` | 200 | +| `POST` | `/api/agents/{agent_id}/claim` | 200 | +| `GET` | `/api/agents/{agent_id}/jobs/{job_id}/input` | 200 | +| `GET` | `/api/agents/{agent_id}/jobs/{job_id}/control` | 200 | +| `POST` | `/api/agents/{agent_id}/jobs/{job_id}/status` | 200 | +| `POST` | `/api/agents/{agent_id}/jobs/{job_id}/logs` | 204 | +| `POST` | `/api/agents/{agent_id}/jobs/{job_id}/result` | 200 | + +`agent_id` must be 32 lowercase hex characters. Unknown, malformed, or +cross-tenant agent IDs all return **404** — the API never confirms the existence +of another credential's agent. Every agent request renews the job lease. +`completed` is not an accepted status update; only the result upload completes a job. + +## Job lifecycle + +``` +queued → assigned → inspecting → processing → training → exporting → uploading → completed + ↘ failed + ↘ cancelled +``` + +Dispatch is oldest-first within an exactly matching queue, guarded by a SQLite +`BEGIN IMMEDIATE` transaction so two agents can never claim the same job. A reconnecting +agent that already holds a job re-leases it instead of claiming a new one. + +Lease expiry is evaluated lazily whenever `/api/health`, `/api/agents`, or a claim is +served — there is no background scheduler. + +## Deliberate differences from the Python version + +1. **Uploads are streamed to a staging directory** (`{data_dir}/.uploads`) rather than + buffered by the framework, then moved into place once validation passes. Nothing is + ever left behind in `jobs/` when intake fails, and memory use is constant regardless + of an 8 GiB upload. +2. **The "no work available" claim path commits.** The Python implementation returned early + from inside its connection context manager, silently discarding the `agent → idle` + update. The port commits it, so an idle agent is actually reported as idle. +3. **scrypt verification runs on a blocking thread pool** so the deliberately expensive + hash cannot stall the async runtime. +4. `SPLAT_LOCAL_WORKER` is gone; it was vestigial and never read. + +## Security posture + +Unchanged from the original, and stated plainly: **every route except the ten agent +endpoints is unauthenticated**, including worker-key creation and revocation. Terminate +TLS, authenticate operators, and rate-limit at the deployment boundary. Compose binds to +`127.0.0.1` by default for this reason. + +## Tests + +```bash +cargo test +``` + +`tests/api.rs` is a direct port of the original `tests/test_api.py` (8 tests). +`tests/parity.rs` adds 22 tests for behaviour the Python suite never exercised: +lease expiry, delete/result conflicts, agent-ID hijacking, credential revocation +cascades, upload bounds, queue normalization, dispatch ordering, claim idempotency, +and startup crash recovery. + +## Repository layout + +``` +rust/ control plane: server binary + library (the SPA is embedded here) +rust/static/ the single-page app; logo.svg is the shared brand mark +desktop/ Tauri shell that wraps the same library in a native window +desktop/icons/ icon set, generated from the web logo by generate_icons.py +docs/ screenshot used above +.github/ CI and release workflows +``` + +The desktop app depends on `rust/` as a path dependency, so there is exactly one +implementation of the control plane and one copy of the SPA. + +## Releasing + +Tag and push; the release workflow does the rest: + +```bash +git tag v0.1.0 +git push origin v0.1.0 +``` + +`.github/workflows/release.yml` runs the test suite, opens a draft release, then builds in +parallel across five runners — Ubuntu x86_64 and arm64, macOS 14 (Apple Silicon) and macOS 13 +(Intel), and Windows — attaching desktop bundles (`deb`, `rpm`, `AppImage`, `msi`, `nsis`, +`dmg`) plus standalone server archives with SHA-256 sums. The release is published only once +every job succeeds. + +To sign macOS builds, set the `APPLE_CERTIFICATE`, `APPLE_CERTIFICATE_PASSWORD`, +`APPLE_SIGNING_IDENTITY`, `APPLE_ID`, `APPLE_PASSWORD` and `APPLE_TEAM_ID` repository secrets. +Without them the workflow still succeeds and simply produces unsigned bundles. + +## Branding + +The mark is four acid-green dots (`#d9ff43`) in a splat constellation. It is defined once as +CSS in `rust/static/styles.css` (`.brand-mark`), mirrored as `rust/static/logo.svg` for the +favicon, and rendered to platform icon formats by `desktop/icons/generate_icons.py`: + +```bash +python3 desktop/icons/generate_icons.py desktop/icons +``` + +## License + +MIT. diff --git a/rust/compose.yaml b/rust/compose.yaml new file mode 100644 index 0000000..dd8be9d --- /dev/null +++ b/rust/compose.yaml @@ -0,0 +1,16 @@ +services: + splatlab: + build: + context: . + dockerfile: Dockerfile + image: splatlab-rs:local + restart: unless-stopped + ports: + - "127.0.0.1:${SPLAT_PORT:-8080}:8080" + environment: + SPLAT_DATA_DIR: /data + SPLAT_MAX_UPLOAD_BYTES: ${SPLAT_MAX_UPLOAD_BYTES:-8589934592} + SPLAT_MAX_RESULT_BYTES: ${SPLAT_MAX_RESULT_BYTES:-8589934592} + SPLAT_AGENT_LEASE_SECONDS: ${SPLAT_AGENT_LEASE_SECONDS:-60} + volumes: + - ./data:/data diff --git a/rust/src/app.rs b/rust/src/app.rs new file mode 100644 index 0000000..48da9bd --- /dev/null +++ b/rust/src/app.rs @@ -0,0 +1,196 @@ +use std::path::PathBuf; +use std::sync::Arc; + +use axum::body::Body; +use axum::extract::DefaultBodyLimit; +use axum::http::{Request, StatusCode}; +use axum::response::{IntoResponse, Response}; +use axum::routing::{delete, get, post, put}; +use axum::Router; +use tower::ServiceExt; +use tower_http::services::ServeDir; + +use crate::config::Settings; +use crate::error::ApiError; +use crate::routes; +use crate::store::JobStore; + +pub const VERSION: &str = "0.1.0"; +pub const JOB_LIST_LIMIT: i64 = 50; + +#[derive(Clone)] +pub struct AppState { + pub settings: Arc, + pub store: Arc, +} + +impl AppState { + pub fn new(settings: Settings) -> std::io::Result { + settings.prepare()?; + let store = JobStore::new(settings.database_path()); + store + .initialize() + .map_err(|error| std::io::Error::other(error.to_string()))?; + Ok(Self { + settings: Arc::new(settings), + store: Arc::new(store), + }) + } + + /// Staging area for in-flight uploads. Deliberately outside `jobs/` so a + /// rejected upload never leaves a stray directory behind. + pub fn staging_dir(&self) -> PathBuf { + self.settings.data_dir.join(".uploads") + } +} + +/// The SPA is compiled into the binary so a single artifact can be shipped to +/// servers and desktop bundles alike. `SPLAT_STATIC_DIR` overrides it for +/// front-end development against a live directory. +#[derive(rust_embed::RustEmbed)] +#[folder = "static/"] +struct Assets; + +fn static_override() -> Option { + std::env::var("SPLAT_STATIC_DIR").ok().map(PathBuf::from) +} + +pub fn create_app(settings: Settings) -> std::io::Result { + let state = AppState::new(settings)?; + Ok(build_router(state)) +} + +/// Run the control plane on an already-bound listener. +/// +/// Embedders (the desktop bundle) bind port 0 themselves so they can learn the +/// assigned port before the server starts. +pub async fn serve(settings: Settings, listener: tokio::net::TcpListener) -> std::io::Result<()> { + let app = create_app(settings)?; + axum::serve(listener, app).await +} + +pub fn build_router(state: AppState) -> Router { + let api = Router::new() + .route("/api/health", get(routes::health::health)) + // jobs + .route( + "/api/jobs", + get(routes::jobs::list_jobs).post(routes::jobs::create_job), + ) + .route( + "/api/jobs/:job_id", + get(routes::jobs::get_job).delete(routes::jobs::delete_job), + ) + .route("/api/jobs/:job_id/cancel", post(routes::jobs::cancel_job)) + .route("/api/jobs/:job_id/logs", get(routes::jobs::job_logs)) + .route("/api/jobs/:job_id/result", get(routes::jobs::job_result)) + // agents + .route("/api/agents", get(routes::agents::list_agents)) + .route("/api/agents/auth-check", get(routes::agents::auth_check)) + .route("/api/agents/:agent_id", put(routes::agents::register_agent)) + .route( + "/api/agents/:agent_id/heartbeat", + post(routes::agents::heartbeat), + ) + .route( + "/api/agents/:agent_id/disconnect", + post(routes::agents::disconnect), + ) + .route("/api/agents/:agent_id/claim", post(routes::agents::claim)) + .route( + "/api/agents/:agent_id/jobs/:job_id/input", + get(routes::agents::job_input), + ) + .route( + "/api/agents/:agent_id/jobs/:job_id/control", + get(routes::agents::job_control), + ) + .route( + "/api/agents/:agent_id/jobs/:job_id/status", + post(routes::agents::job_status), + ) + .route( + "/api/agents/:agent_id/jobs/:job_id/logs", + post(routes::agents::job_logs), + ) + .route( + "/api/agents/:agent_id/jobs/:job_id/result", + post(routes::agents::job_result), + ) + // worker credentials + .route( + "/api/settings/keys", + get(routes::keys::list_keys).post(routes::keys::create_key), + ) + .route( + "/api/settings/keys/:access_key", + delete(routes::keys::revoke_key).patch(routes::keys::update_key), + ); + + Router::new() + .merge(api) + // Uploads are streamed to disk, so the framework-level body cap is off. + .layer(DefaultBodyLimit::disable()) + // Routing rejections are emitted by the framework with an empty body; + // give them the same `{"detail": ...}` envelope as every other error. + .layer(axum::middleware::map_response(envelope_bare_rejections)) + .fallback(fallback) + .with_state(state) +} + +/// Serve the SPA, but never let an unmatched `/api/` path fall through to it. +async fn fallback(request: Request) -> Response { + if request.uri().path().starts_with("/api/") { + return ApiError::not_found("Not Found").into_response(); + } + + if let Some(dir) = static_override() { + return match ServeDir::new(dir) + .append_index_html_on_directories(true) + .oneshot(request) + .await + { + Ok(response) => response.into_response(), + Err(_) => ApiError::not_found("Not Found").into_response(), + }; + } + + let path = request.uri().path().trim_start_matches('/'); + let path = if path.is_empty() { "index.html" } else { path }; + let asset = Assets::get(path).or_else(|| Assets::get("index.html")); + match asset { + Some(asset) => { + let mime = mime_guess::from_path(path).first_or_octet_stream(); + ( + [(axum::http::header::CONTENT_TYPE, mime.as_ref())], + asset.data.into_owned(), + ) + .into_response() + } + None => ApiError::not_found("Not Found").into_response(), + } +} + +async fn envelope_bare_rejections(response: Response) -> Response { + let status = response.status(); + let is_bare = response + .headers() + .get(axum::http::header::CONTENT_TYPE) + .is_none(); + if !is_bare { + return response; + } + let detail = match status { + StatusCode::METHOD_NOT_ALLOWED => "Method Not Allowed", + StatusCode::NOT_FOUND => "Not Found", + StatusCode::UNSUPPORTED_MEDIA_TYPE => "Unsupported Media Type", + StatusCode::LENGTH_REQUIRED => "Length Required", + _ => return response, + }; + let (mut parts, _) = response.into_parts(); + parts.headers.remove(axum::http::header::CONTENT_LENGTH); + let body = ApiError::new(status, detail).into_response(); + let (body_parts, body) = body.into_parts(); + parts.headers.extend(body_parts.headers); + Response::from_parts(parts, body) +} diff --git a/rust/src/config.rs b/rust/src/config.rs new file mode 100644 index 0000000..ed76d70 --- /dev/null +++ b/rust/src/config.rs @@ -0,0 +1,112 @@ +use std::env; +use std::path::{Path, PathBuf}; + +pub const DEFAULT_MAX_BYTES: u64 = 8 * 1024 * 1024 * 1024; +pub const DEFAULT_LEASE_SECONDS: i64 = 60; + +#[derive(Debug, Clone)] +pub struct Settings { + pub data_dir: PathBuf, + pub max_upload_bytes: u64, + pub max_result_bytes: u64, + pub agent_lease_seconds: i64, +} + +fn positive_int(name: &str, default: u64) -> Result { + match env::var(name) { + Err(_) => Ok(default), + Ok(raw) => { + let value: i64 = raw + .trim() + .parse() + .map_err(|_| format!("{name} must be an integer"))?; + if value <= 0 { + return Err(format!("{name} must be positive")); + } + Ok(value as u64) + } + } +} + +impl Settings { + /// Mirrors `Settings(data_dir=...)` in Python: defaults for everything else. + pub fn new(data_dir: impl AsRef) -> Self { + Self { + data_dir: data_dir.as_ref().to_path_buf(), + max_upload_bytes: DEFAULT_MAX_BYTES, + max_result_bytes: DEFAULT_MAX_BYTES, + agent_lease_seconds: DEFAULT_LEASE_SECONDS, + } + } + + pub fn with_max_upload_bytes(mut self, value: u64) -> Self { + self.max_upload_bytes = value; + self + } + + pub fn with_max_result_bytes(mut self, value: u64) -> Self { + self.max_result_bytes = value; + self + } + + pub fn with_agent_lease_seconds(mut self, value: i64) -> Self { + self.agent_lease_seconds = value; + self + } + + pub fn from_env() -> Result { + let raw_dir = env::var("SPLAT_DATA_DIR").unwrap_or_else(|_| "./data".to_string()); + let raw_dir = PathBuf::from(raw_dir); + // `Path.resolve()` does not require the path to exist. + let data_dir = resolve(&raw_dir); + Ok(Self { + data_dir, + max_upload_bytes: positive_int("SPLAT_MAX_UPLOAD_BYTES", DEFAULT_MAX_BYTES)?, + max_result_bytes: positive_int("SPLAT_MAX_RESULT_BYTES", DEFAULT_MAX_BYTES)?, + agent_lease_seconds: positive_int( + "SPLAT_AGENT_LEASE_SECONDS", + DEFAULT_LEASE_SECONDS as u64, + )? as i64, + }) + } + + pub fn jobs_dir(&self) -> PathBuf { + self.data_dir.join("jobs") + } + + pub fn database_path(&self) -> PathBuf { + self.data_dir.join("splatlab.sqlite3") + } + + pub fn prepare(&self) -> std::io::Result<()> { + std::fs::create_dir_all(self.jobs_dir()) + } +} + +/// Lexical absolutisation that does not require the path to exist, +/// matching Python's `Path.resolve()` closely enough for our purposes. +pub fn resolve(path: &Path) -> PathBuf { + let absolute = if path.is_absolute() { + path.to_path_buf() + } else { + env::current_dir() + .unwrap_or_else(|_| PathBuf::from("/")) + .join(path) + }; + normalize(&absolute) +} + +pub fn normalize(path: &Path) -> PathBuf { + use std::path::Component; + let mut out = PathBuf::new(); + for component in path.components() { + match component { + Component::CurDir => {} + Component::ParentDir => { + out.pop(); + } + other => out.push(other.as_os_str()), + } + } + out +} diff --git a/rust/src/error.rs b/rust/src/error.rs new file mode 100644 index 0000000..0ad6aac --- /dev/null +++ b/rust/src/error.rs @@ -0,0 +1,87 @@ +use axum::http::{HeaderMap, HeaderName, HeaderValue, StatusCode}; +use axum::response::{IntoResponse, Response}; +use axum::Json; +use serde_json::json; + +/// Every error the API emits uses FastAPI's `{"detail": ...}` envelope so the +/// bundled SPA and existing agents keep working unchanged. +#[derive(Debug)] +pub struct ApiError { + pub status: StatusCode, + pub detail: String, + pub headers: Vec<(HeaderName, HeaderValue)>, +} + +impl ApiError { + pub fn new(status: StatusCode, detail: impl Into) -> Self { + Self { + status, + detail: detail.into(), + headers: Vec::new(), + } + } + + pub fn with_header(mut self, name: HeaderName, value: HeaderValue) -> Self { + self.headers.push((name, value)); + self + } + + pub fn bad_request(detail: impl Into) -> Self { + Self::new(StatusCode::BAD_REQUEST, detail) + } + + pub fn unauthorized(detail: impl Into) -> Self { + Self::new(StatusCode::UNAUTHORIZED, detail).with_header( + axum::http::header::WWW_AUTHENTICATE, + HeaderValue::from_static("SplatKey"), + ) + } + + pub fn not_found(detail: impl Into) -> Self { + Self::new(StatusCode::NOT_FOUND, detail) + } + + pub fn conflict(detail: impl Into) -> Self { + Self::new(StatusCode::CONFLICT, detail) + } + + pub fn unsupported_media_type(detail: impl Into) -> Self { + Self::new(StatusCode::UNSUPPORTED_MEDIA_TYPE, detail) + } + + pub fn payload_too_large(detail: impl Into) -> Self { + Self::new(StatusCode::PAYLOAD_TOO_LARGE, detail) + } + + pub fn unprocessable(detail: impl Into) -> Self { + Self::new(StatusCode::UNPROCESSABLE_ENTITY, detail) + } + + pub fn internal(detail: impl Into) -> Self { + Self::new(StatusCode::INTERNAL_SERVER_ERROR, detail) + } +} + +impl IntoResponse for ApiError { + fn into_response(self) -> Response { + let mut headers = HeaderMap::new(); + for (name, value) in self.headers { + headers.insert(name, value); + } + (self.status, headers, Json(json!({ "detail": self.detail }))).into_response() + } +} + +impl From for ApiError { + fn from(error: rusqlite::Error) -> Self { + ApiError::internal(format!("Database error: {error}")) + } +} + +impl From for ApiError { + fn from(error: std::io::Error) -> Self { + ApiError::internal(format!("Storage error: {error}")) + } +} + +pub type ApiResult = Result; diff --git a/rust/src/io_util.rs b/rust/src/io_util.rs new file mode 100644 index 0000000..5cd6934 --- /dev/null +++ b/rust/src/io_util.rs @@ -0,0 +1,111 @@ +use std::path::{Path, PathBuf}; + +use axum::body::Body; +use axum::extract::multipart::Field; +use axum::http::{header, HeaderValue, StatusCode}; +use axum::response::{IntoResponse, Response}; +use tokio::io::AsyncWriteExt; +use tokio_util::io::ReaderStream; + +use crate::config::resolve; +use crate::error::{ApiError, ApiResult}; + +#[derive(Debug, PartialEq, Eq)] +pub enum SaveOutcome { + Saved(u64), + TooLarge, + Empty, +} + +/// Stream a multipart field to disk without ever buffering it in memory. +/// The cumulative size is checked after every chunk, mirroring the Python +/// implementation's 1 MiB loop. +pub async fn save_field( + field: &mut Field<'_>, + destination: &Path, + limit: u64, +) -> ApiResult { + let mut file = tokio::fs::File::options() + .write(true) + .create_new(true) + .open(destination) + .await?; + + let mut written: u64 = 0; + loop { + let chunk = match field.chunk().await { + Ok(Some(chunk)) => chunk, + Ok(None) => break, + Err(error) => { + drop(file); + let _ = tokio::fs::remove_file(destination).await; + return Err(ApiError::bad_request(format!("Upload failed: {error}"))); + } + }; + written += chunk.len() as u64; + if written > limit { + drop(file); + let _ = tokio::fs::remove_file(destination).await; + return Ok(SaveOutcome::TooLarge); + } + if let Err(error) = file.write_all(&chunk).await { + drop(file); + let _ = tokio::fs::remove_file(destination).await; + return Err(error.into()); + } + } + file.flush().await?; + drop(file); + + if written == 0 { + let _ = tokio::fs::remove_file(destination).await; + return Ok(SaveOutcome::Empty); + } + Ok(SaveOutcome::Saved(written)) +} + +/// Read a field to completion and discard it, so the rest of the multipart +/// stream can still be parsed after a rejected upload. +pub async fn drain_field(field: &mut Field<'_>) { + while let Ok(Some(_)) = field.chunk().await {} +} + +/// `jobs_dir` must be a strict ancestor of `path`, matching the Python guard +/// `settings.jobs_dir not in path.resolve().parents`. +pub fn is_inside(jobs_dir: &Path, path: &Path) -> bool { + let resolved = resolve(path); + let jobs_dir = resolve(jobs_dir); + match resolved.parent() { + None => false, + Some(_) => resolved + .ancestors() + .skip(1) + .any(|ancestor| ancestor == jobs_dir), + } +} + +pub async fn file_response(path: PathBuf, filename: &str, media_type: &str) -> ApiResult { + let file = tokio::fs::File::open(&path) + .await + .map_err(|_| ApiError::not_found("Result file is missing"))?; + let length = file.metadata().await.ok().map(|meta| meta.len()); + let stream = ReaderStream::new(file); + let mut response = Response::new(Body::from_stream(stream)); + *response.status_mut() = StatusCode::OK; + let headers = response.headers_mut(); + headers.insert( + header::CONTENT_TYPE, + HeaderValue::from_str(media_type) + .unwrap_or(HeaderValue::from_static("application/octet-stream")), + ); + let disposition = format!("attachment; filename=\"{}\"", filename.replace('"', "")); + if let Ok(value) = HeaderValue::from_str(&disposition) { + headers.insert(header::CONTENT_DISPOSITION, value); + } + if let Some(length) = length { + if let Ok(value) = HeaderValue::from_str(&length.to_string()) { + headers.insert(header::CONTENT_LENGTH, value); + } + } + Ok(response.into_response()) +} diff --git a/rust/src/lib.rs b/rust/src/lib.rs new file mode 100644 index 0000000..034a028 --- /dev/null +++ b/rust/src/lib.rs @@ -0,0 +1,16 @@ +//! SplatLab — a self-hosted control plane for video-to-3D Gaussian reconstruction. + +pub mod app; +pub mod config; +pub mod error; +pub mod io_util; +pub mod routes; +pub mod store; +pub mod validation; + +pub use app::{build_router, create_app, serve, AppState, VERSION}; +pub use config::Settings; +pub use store::JobStore; + +/// Re-exported so integration tests and embedders can build column values. +pub use rusqlite; diff --git a/rust/src/main.rs b/rust/src/main.rs new file mode 100644 index 0000000..3af0b25 --- /dev/null +++ b/rust/src/main.rs @@ -0,0 +1,52 @@ +use std::net::SocketAddr; + +use splatlab::{create_app, Settings}; + +#[tokio::main] +async fn main() -> Result<(), Box> { + tracing_subscriber::fmt() + .with_env_filter( + tracing_subscriber::EnvFilter::try_from_default_env() + .unwrap_or_else(|_| "splatlab=info,tower_http=warn".into()), + ) + .init(); + + let settings = Settings::from_env()?; + let port: u16 = std::env::var("SPLAT_PORT") + .ok() + .and_then(|value| value.parse().ok()) + .unwrap_or(8080); + let host = std::env::var("SPLAT_HOST").unwrap_or_else(|_| "0.0.0.0".to_string()); + let address: SocketAddr = format!("{host}:{port}").parse()?; + + tracing::info!(data_dir = %settings.data_dir.display(), "starting SplatLab"); + let app = create_app(settings)?; + + let listener = tokio::net::TcpListener::bind(address).await?; + tracing::info!("listening on http://{address}"); + axum::serve(listener, app) + .with_graceful_shutdown(shutdown_signal()) + .await?; + Ok(()) +} + +async fn shutdown_signal() { + let ctrl_c = async { + let _ = tokio::signal::ctrl_c().await; + }; + #[cfg(unix)] + let terminate = async { + if let Ok(mut signal) = + tokio::signal::unix::signal(tokio::signal::unix::SignalKind::terminate()) + { + signal.recv().await; + } + }; + #[cfg(not(unix))] + let terminate = std::future::pending::<()>(); + + tokio::select! { + _ = ctrl_c => {}, + _ = terminate => {}, + } +} diff --git a/rust/src/routes/agents.rs b/rust/src/routes/agents.rs new file mode 100644 index 0000000..ca8b50b --- /dev/null +++ b/rust/src/routes/agents.rs @@ -0,0 +1,504 @@ +use std::path::PathBuf; + +use axum::async_trait; +use axum::extract::{FromRef, FromRequestParts, Multipart, Path as AxumPath, State}; +use axum::http::request::Parts; +use axum::http::StatusCode; +use axum::response::Response; +use axum::Json; +use rusqlite::types::Value as SqlValue; +use serde::Deserialize; +use serde_json::{json, Map, Value}; +use tokio::io::AsyncWriteExt; + +use crate::app::AppState; +use crate::error::{ApiError, ApiResult}; +use crate::io_util::{file_response, is_inside, save_field, SaveOutcome}; +use crate::store::{is_terminal, utc_now, Job}; +use crate::validation::{ + normalize_queue, public_agent, public_job, sanitize_name, validate_agent_id, +}; + +const ACCESS_KEY_HEADER: &str = "x-splat-access-key"; +const SECRET_KEY_HEADER: &str = "x-splat-secret-key"; + +/// A verified worker credential; the extracted value is the access key. +pub struct AgentCredential(pub String); + +#[async_trait] +impl FromRequestParts for AgentCredential +where + AppState: FromRef, + S: Send + Sync, +{ + type Rejection = ApiError; + + async fn from_request_parts(parts: &mut Parts, state: &S) -> Result { + let app_state = AppState::from_ref(state); + let header = |name: &str| { + parts + .headers + .get(name) + .and_then(|value| value.to_str().ok()) + .map(str::to_string) + }; + let access_key = header(ACCESS_KEY_HEADER); + let secret_key = header(SECRET_KEY_HEADER); + let (access_key, secret_key) = match (access_key, secret_key) { + (Some(access_key), Some(secret_key)) + if !access_key.is_empty() && !secret_key.is_empty() => + { + (access_key, secret_key) + } + _ => { + return Err(ApiError::unauthorized( + "Invalid or revoked worker credentials", + )) + } + }; + + // scrypt is intentionally expensive, so keep it off the async runtime. + let store = app_state.store.clone(); + let candidate = access_key.clone(); + let authenticated = tokio::task::spawn_blocking(move || { + store.authenticate_worker_key(&candidate, &secret_key) + }) + .await + .map_err(|_| ApiError::internal("Authentication task failed"))??; + + if !authenticated { + return Err(ApiError::unauthorized( + "Invalid or revoked worker credentials", + )); + } + Ok(AgentCredential(access_key)) + } +} + +// --------------------------------------------------------------------------- +// Guards +// --------------------------------------------------------------------------- + +fn verify_agent_owner( + state: &AppState, + agent_id: &str, + credential: &str, +) -> ApiResult> { + validate_agent_id(agent_id)?; + let agent = state + .store + .get_agent(agent_id)? + .ok_or_else(|| ApiError::not_found("Agent not registered"))?; + if agent.get("access_key").and_then(Value::as_str) != Some(credential) { + // Deliberately a 404: never confirm the existence of another tenant's agent. + return Err(ApiError::not_found("Agent not registered")); + } + Ok(agent) +} + +fn assigned_job( + state: &AppState, + agent_id: &str, + job_id: &str, + credential: &str, +) -> ApiResult { + verify_agent_owner(state, agent_id, credential)?; + let job = state + .store + .get(job_id)? + .ok_or_else(|| ApiError::not_found("Assigned job not found"))?; + if job.get("assigned_agent_id").and_then(Value::as_str) != Some(agent_id) { + return Err(ApiError::not_found("Assigned job not found")); + } + let status = job.get("status").and_then(Value::as_str).unwrap_or(""); + if is_terminal(status) { + return Err(ApiError::conflict("Assigned job is already terminal")); + } + Ok(job) +} + +fn renew_lease(state: &AppState, agent_id: &str, job_id: &str) -> ApiResult<()> { + state.store.update_remote_job( + agent_id, + job_id, + state.settings.agent_lease_seconds, + Vec::new(), + )?; + Ok(()) +} + +// --------------------------------------------------------------------------- +// Routes +// --------------------------------------------------------------------------- + +pub async fn list_agents(State(state): State) -> ApiResult> { + state.store.expire_stale_agents()?; + let agents: Vec = state + .store + .list_agents()? + .iter() + .map(public_agent) + .collect(); + Ok(Json(json!({ "agents": agents }))) +} + +pub async fn auth_check(AgentCredential(credential): AgentCredential) -> Json { + Json(json!({ "authenticated": true, "access_key": credential })) +} + +#[derive(Deserialize)] +pub struct AgentRegistration { + pub name: String, + pub queue: String, + #[serde(default)] + pub hostname: Option, + #[serde(default)] + pub version: Option, + #[serde(default)] + pub capabilities: Value, +} + +pub async fn register_agent( + State(state): State, + AxumPath(agent_id): AxumPath, + AgentCredential(credential): AgentCredential, + Json(payload): Json, +) -> ApiResult> { + validate_agent_id(&agent_id)?; + + if let Some(existing) = state.store.get_agent(&agent_id)? { + match existing.get("access_key").and_then(Value::as_str) { + None => {} + Some(owner) if owner == credential => {} + Some(_) => return Err(ApiError::conflict("Agent ID belongs to another access key")), + } + } + + if payload.hostname.as_ref().map(|value| value.chars().count()) > Some(255) + || payload.version.as_ref().map(|value| value.chars().count()) > Some(40) + { + return Err(ApiError::unprocessable("Agent metadata is too long")); + } + + let name = sanitize_name(&payload.name); + if name.is_empty() { + return Err(ApiError::unprocessable("Agent name is required")); + } + let queue = normalize_queue(&payload.queue)?; + let capabilities = if payload.capabilities.is_object() { + payload.capabilities.clone() + } else { + json!({}) + }; + + let agent = state.store.register_agent( + &agent_id, + &name, + &queue, + payload.hostname.as_deref(), + payload.version.as_deref(), + &capabilities, + &credential, + )?; + + Ok(Json(json!({ + "agent": public_agent(&agent), + "lease_seconds": state.settings.agent_lease_seconds, + }))) +} + +pub async fn heartbeat( + State(state): State, + AxumPath(agent_id): AxumPath, + AgentCredential(credential): AgentCredential, +) -> ApiResult> { + verify_agent_owner(&state, &agent_id, &credential)?; + let agent = state + .store + .heartbeat_agent(&agent_id)? + .ok_or_else(|| ApiError::not_found("Agent not registered"))?; + Ok(Json(json!({ "agent": public_agent(&agent) }))) +} + +pub async fn disconnect( + State(state): State, + AxumPath(agent_id): AxumPath, + AgentCredential(credential): AgentCredential, +) -> ApiResult> { + verify_agent_owner(&state, &agent_id, &credential)?; + let agent = state + .store + .set_agent_status(&agent_id, "offline")? + .ok_or_else(|| ApiError::not_found("Agent not registered"))?; + Ok(Json(json!({ "agent": public_agent(&agent) }))) +} + +pub async fn claim( + State(state): State, + AxumPath(agent_id): AxumPath, + AgentCredential(credential): AgentCredential, +) -> ApiResult> { + state.store.expire_stale_agents()?; + verify_agent_owner(&state, &agent_id, &credential)?; + + let job = state + .store + .claim_for_agent(&agent_id, state.settings.agent_lease_seconds)?; + let job = match job { + None => return Ok(Json(json!({ "job": Value::Null }))), + Some(job) => job, + }; + let job_id = job + .get("id") + .and_then(Value::as_str) + .unwrap_or_default() + .to_string(); + let mut payload = public_job(&job); + if let Some(object) = payload.as_object_mut() { + object.insert( + "input_url".into(), + Value::String(format!("/api/agents/{agent_id}/jobs/{job_id}/input")), + ); + } + Ok(Json(json!({ "job": payload }))) +} + +pub async fn job_input( + State(state): State, + AxumPath((agent_id, job_id)): AxumPath<(String, String)>, + AgentCredential(credential): AgentCredential, +) -> ApiResult { + let job = assigned_job(&state, &agent_id, &job_id, &credential)?; + renew_lease(&state, &agent_id, &job_id)?; + + let input_path = PathBuf::from( + job.get("input_path") + .and_then(Value::as_str) + .unwrap_or_default(), + ); + if !input_path.is_file() || !is_inside(&state.settings.jobs_dir(), &input_path) { + return Err(ApiError::not_found("Input file is missing")); + } + let filename = job + .get("original_filename") + .and_then(Value::as_str) + .unwrap_or("source"); + file_response(input_path, filename, "application/octet-stream").await +} + +pub async fn job_control( + State(state): State, + AxumPath((agent_id, job_id)): AxumPath<(String, String)>, + AgentCredential(credential): AgentCredential, +) -> ApiResult> { + let job = assigned_job(&state, &agent_id, &job_id, &credential)?; + renew_lease(&state, &agent_id, &job_id)?; + let cancel_requested = job + .get("cancel_requested") + .and_then(Value::as_i64) + .unwrap_or(0) + != 0; + Ok(Json(json!({ + "cancel_requested": cancel_requested, + "lease_seconds": state.settings.agent_lease_seconds, + }))) +} + +const REMOTE_STATUSES: [&str; 7] = [ + "inspecting", + "processing", + "training", + "exporting", + "uploading", + "failed", + "cancelled", +]; + +#[derive(Deserialize)] +pub struct RemoteJobUpdate { + pub status: String, + pub stage: String, + pub progress: i64, + #[serde(default)] + pub error: Option, + #[serde(default)] + pub width: Option, + #[serde(default)] + pub height: Option, + #[serde(default)] + pub fps: Option, + #[serde(default)] + pub duration_seconds: Option, +} + +pub async fn job_status( + State(state): State, + AxumPath((agent_id, job_id)): AxumPath<(String, String)>, + AgentCredential(credential): AgentCredential, + Json(update): Json, +) -> ApiResult> { + assigned_job(&state, &agent_id, &job_id, &credential)?; + + // `completed` is reserved for the result upload endpoint. + if !REMOTE_STATUSES.contains(&update.status.as_str()) { + return Err(ApiError::unprocessable("Invalid remote job status")); + } + if update.stage.is_empty() || update.stage.chars().count() > 160 { + return Err(ApiError::unprocessable("Invalid stage")); + } + if !(0..=99).contains(&update.progress) { + return Err(ApiError::unprocessable("Progress must be between 0 and 99")); + } + + let mut values: Vec<(&str, SqlValue)> = vec![ + ("status", SqlValue::Text(update.status.clone())), + ("stage", SqlValue::Text(update.stage.clone())), + ("progress", SqlValue::Integer(update.progress)), + ]; + if let Some(error) = &update.error { + values.push(("error", SqlValue::Text(error.clone()))); + } + if let Some(width) = update.width { + values.push(("width", SqlValue::Integer(width))); + } + if let Some(height) = update.height { + values.push(("height", SqlValue::Integer(height))); + } + if let Some(fps) = update.fps { + values.push(("fps", SqlValue::Real(fps))); + } + if let Some(duration) = update.duration_seconds { + values.push(("duration_seconds", SqlValue::Real(duration))); + } + if is_terminal(&update.status) { + values.push(("completed_at", SqlValue::Text(utc_now()))); + } + + let job = state + .store + .update_remote_job( + &agent_id, + &job_id, + state.settings.agent_lease_seconds, + values, + )? + .ok_or_else(|| ApiError::not_found("Assigned job not found"))?; + Ok(Json(json!({ "job": public_job(&job) }))) +} + +#[derive(Deserialize)] +pub struct AgentLogBatch { + pub content: String, +} + +pub async fn job_logs( + State(state): State, + AxumPath((agent_id, job_id)): AxumPath<(String, String)>, + AgentCredential(credential): AgentCredential, + Json(batch): Json, +) -> ApiResult { + assigned_job(&state, &agent_id, &job_id, &credential)?; + if batch.content.is_empty() || batch.content.len() > 65536 { + return Err(ApiError::unprocessable("Invalid log batch")); + } + + let job_dir = state.settings.jobs_dir().join(&job_id); + tokio::fs::create_dir_all(&job_dir).await?; + let mut content = batch.content; + if !content.ends_with('\n') { + content.push('\n'); + } + let mut file = tokio::fs::File::options() + .create(true) + .append(true) + .open(job_dir.join("pipeline.log")) + .await?; + file.write_all(content.as_bytes()).await?; + file.flush().await?; + + renew_lease(&state, &agent_id, &job_id)?; + Ok(StatusCode::NO_CONTENT) +} + +pub async fn job_result( + State(state): State, + AxumPath((agent_id, job_id)): AxumPath<(String, String)>, + AgentCredential(credential): AgentCredential, + mut multipart: Multipart, +) -> ApiResult> { + assigned_job(&state, &agent_id, &job_id, &credential)?; + + let lease = state.settings.agent_lease_seconds; + state.store.update_remote_job( + &agent_id, + &job_id, + lease, + vec![ + ("status", SqlValue::Text("uploading".into())), + ("stage", SqlValue::Text("Uploading Gaussian PLY".into())), + ("progress", SqlValue::Integer(99)), + ], + )?; + + let job_dir = state.settings.jobs_dir().join(&job_id); + tokio::fs::create_dir_all(&job_dir).await?; + let destination = job_dir.join("remote-scene.ply"); + let _ = tokio::fs::remove_file(&destination).await; + + let mut outcome: Option = None; + while let Some(mut field) = multipart + .next_field() + .await + .map_err(|error| ApiError::bad_request(format!("Malformed upload: {error}")))? + { + if field.name() == Some("result_file") { + outcome = + Some(save_field(&mut field, &destination, state.settings.max_result_bytes).await?); + break; + } + } + + let failure = match outcome { + Some(SaveOutcome::Saved(_)) => None, + Some(SaveOutcome::TooLarge) => Some(ApiError::payload_too_large( + "File exceeds the configured upload limit", + )), + Some(SaveOutcome::Empty) => Some(ApiError::bad_request("The uploaded video is empty")), + None => Some(ApiError::unprocessable("A result file is required")), + }; + + if let Some(error) = failure { + state.store.update_remote_job( + &agent_id, + &job_id, + lease, + vec![ + ("status", SqlValue::Text("failed".into())), + ("stage", SqlValue::Text("Result upload failed".into())), + ("error", SqlValue::Text(error.detail.clone())), + ("completed_at", SqlValue::Text(utc_now())), + ], + )?; + return Err(error); + } + + let job = state + .store + .update_remote_job( + &agent_id, + &job_id, + lease, + vec![ + ("status", SqlValue::Text("completed".into())), + ("stage", SqlValue::Text("Scene ready".into())), + ("progress", SqlValue::Integer(100)), + ( + "result_path", + SqlValue::Text(destination.to_string_lossy().to_string()), + ), + ("completed_at", SqlValue::Text(utc_now())), + ], + )? + .ok_or_else(|| ApiError::not_found("Assigned job not found"))?; + Ok(Json(json!({ "job": public_job(&job) }))) +} diff --git a/rust/src/routes/health.rs b/rust/src/routes/health.rs new file mode 100644 index 0000000..209090b --- /dev/null +++ b/rust/src/routes/health.rs @@ -0,0 +1,66 @@ +use axum::extract::State; +use axum::Json; +use serde_json::{json, Value}; + +use crate::app::{AppState, VERSION}; +use crate::error::ApiResult; + +/// Free and total bytes for the volume holding the data directory, +/// mirroring `shutil.disk_usage`. +fn disk_usage(path: &std::path::Path) -> (u64, u64) { + #[cfg(unix)] + { + use std::ffi::CString; + use std::os::unix::ffi::OsStrExt; + if let Ok(raw) = CString::new(path.as_os_str().as_bytes()) { + unsafe { + let mut stats: libc::statvfs = std::mem::zeroed(); + if libc::statvfs(raw.as_ptr(), &mut stats) == 0 { + let frsize = stats.f_frsize as u64; + return ( + stats.f_bavail as u64 * frsize, + stats.f_blocks as u64 * frsize, + ); + } + } + } + } + + #[cfg(windows)] + { + use std::os::windows::ffi::OsStrExt; + use windows_sys::Win32::Storage::FileSystem::GetDiskFreeSpaceExW; + + let mut wide: Vec = path.as_os_str().encode_wide().collect(); + wide.push(0); + let mut free: u64 = 0; + let mut total: u64 = 0; + unsafe { + if GetDiskFreeSpaceExW(wide.as_ptr(), &mut free, &mut total, std::ptr::null_mut()) != 0 + { + return (free, total); + } + } + } + + (0, 0) +} + +pub async fn health(State(state): State) -> ApiResult> { + state.store.expire_stale_agents()?; + let (free_bytes, total_bytes) = disk_usage(&state.settings.data_dir); + let agents = state.store.list_agents()?; + let online = agents + .iter() + .filter(|agent| agent.get("status").and_then(Value::as_str) != Some("offline")) + .count(); + + Ok(Json(json!({ + "status": "ok", + "version": VERSION, + "worker_mode": "remote", + "agents": { "online": online, "total": agents.len() }, + "storage": { "free_bytes": free_bytes, "total_bytes": total_bytes }, + "max_upload_bytes": state.settings.max_upload_bytes, + }))) +} diff --git a/rust/src/routes/jobs.rs b/rust/src/routes/jobs.rs new file mode 100644 index 0000000..b6dfe2b --- /dev/null +++ b/rust/src/routes/jobs.rs @@ -0,0 +1,316 @@ +use std::path::PathBuf; + +use axum::extract::{Multipart, Path as AxumPath, Query, State}; +use axum::http::StatusCode; +use axum::response::Response; +use axum::Json; +use serde::Deserialize; +use serde_json::{json, Value}; + +use crate::app::{AppState, JOB_LIST_LIMIT}; +use crate::error::{ApiError, ApiResult}; +use crate::io_util::{drain_field, file_response, is_inside, save_field, SaveOutcome}; +use crate::store::is_terminal; +use crate::validation::{ + download_filename, extension_of, normalize_queue, public_job, sanitize_name, ALLOWED_EXTENSIONS, +}; + +pub async fn list_jobs(State(state): State) -> ApiResult> { + let jobs: Vec = state + .store + .list(JOB_LIST_LIMIT)? + .iter() + .map(public_job) + .collect(); + Ok(Json(json!({ "jobs": jobs }))) +} + +pub async fn get_job( + State(state): State, + AxumPath(job_id): AxumPath, +) -> ApiResult> { + let job = state + .store + .get(&job_id)? + .ok_or_else(|| ApiError::not_found("Job not found"))?; + Ok(Json(public_job(&job))) +} + +pub async fn cancel_job( + State(state): State, + AxumPath(job_id): AxumPath, +) -> ApiResult> { + let job = state + .store + .request_cancel(&job_id)? + .ok_or_else(|| ApiError::not_found("Job not found"))?; + Ok(Json(public_job(&job))) +} + +pub async fn delete_job( + State(state): State, + AxumPath(job_id): AxumPath, +) -> ApiResult { + let job = state + .store + .get(&job_id)? + .ok_or_else(|| ApiError::not_found("Job not found"))?; + let status = job.get("status").and_then(Value::as_str).unwrap_or(""); + if !is_terminal(status) { + return Err(ApiError::conflict( + "Cancel the active job before deleting it", + )); + } + state.store.delete(&job_id)?; + let job_dir = state.settings.jobs_dir().join(&job_id); + tokio::task::spawn_blocking(move || { + let _ = std::fs::remove_dir_all(job_dir); + }); + Ok(StatusCode::NO_CONTENT) +} + +#[derive(Deserialize)] +pub struct LogQuery { + #[serde(default = "default_tail")] + pub tail: i64, +} + +fn default_tail() -> i64 { + 300 +} + +pub async fn job_logs( + State(state): State, + AxumPath(job_id): AxumPath, + Query(query): Query, +) -> ApiResult { + if state.store.get(&job_id)?.is_none() { + return Err(ApiError::not_found("Job not found")); + } + let tail = query.tail.clamp(1, 2000) as usize; + let log_path = state.settings.jobs_dir().join(&job_id).join("pipeline.log"); + let content = match tokio::fs::read_to_string(&log_path).await { + Err(_) => return Ok("No pipeline output yet.".to_string()), + Ok(content) => content, + }; + let lines: Vec<&str> = content.lines().collect(); + let start = lines.len().saturating_sub(tail); + Ok(lines[start..].join("\n")) +} + +pub async fn job_result( + State(state): State, + AxumPath(job_id): AxumPath, +) -> ApiResult { + let job = state + .store + .get(&job_id)? + .ok_or_else(|| ApiError::not_found("Job not found"))?; + let status = job.get("status").and_then(Value::as_str).unwrap_or(""); + let result_path = job.get("result_path").and_then(Value::as_str); + let result_path = match (status, result_path) { + ("completed", Some(path)) => PathBuf::from(path), + _ => return Err(ApiError::conflict("Scene is not ready")), + }; + if !result_path.is_file() || !is_inside(&state.settings.jobs_dir(), &result_path) { + return Err(ApiError::not_found("Result file is missing")); + } + let name = job.get("name").and_then(Value::as_str).unwrap_or("scene"); + file_response( + result_path, + &download_filename(name), + "application/octet-stream", + ) + .await +} + +// --------------------------------------------------------------------------- +// Upload +// --------------------------------------------------------------------------- + +#[derive(Default)] +struct JobForm { + name: Option, + quality: Option, + camera_type: Option, + target_frames: Option, + queue: Option, + static_scene_confirmed: Option, + original_filename: Option, + staged_path: Option, + extension: Option, + oversize: bool, + empty: bool, +} + +fn parse_bool(raw: Option<&String>) -> bool { + match raw.map(|value| value.trim().to_lowercase()) { + Some(value) => matches!(value.as_str(), "true" | "1" | "on" | "yes" | "y" | "t"), + None => false, + } +} + +pub async fn create_job( + State(state): State, + multipart: Multipart, +) -> ApiResult<(StatusCode, Json)> { + let staging_dir = state.staging_dir(); + tokio::fs::create_dir_all(&staging_dir).await?; + + let form = read_job_form(&state, &staging_dir, multipart).await?; + let result = build_job(&state, &form).await; + if result.is_err() { + if let Some(path) = &form.staged_path { + let _ = tokio::fs::remove_file(path).await; + } + } + result +} + +async fn read_job_form( + state: &AppState, + staging_dir: &std::path::Path, + mut multipart: Multipart, +) -> ApiResult { + let mut form = JobForm::default(); + loop { + let field = multipart + .next_field() + .await + .map_err(|error| ApiError::bad_request(format!("Malformed upload: {error}")))?; + let mut field = match field { + None => break, + Some(field) => field, + }; + let field_name = field.name().unwrap_or_default().to_string(); + if field_name == "video" { + let original_filename = field.file_name().unwrap_or_default().to_string(); + let extension = extension_of(&original_filename); + form.original_filename = Some(original_filename); + form.extension = Some(extension.clone()); + if !ALLOWED_EXTENSIONS.contains(&extension.as_str()) { + // Rejected later, in the same order as the reference API. + drain_field(&mut field).await; + continue; + } + let staged = + staging_dir.join(format!("{}{}", uuid::Uuid::new_v4().simple(), extension)); + match save_field(&mut field, &staged, state.settings.max_upload_bytes).await? { + SaveOutcome::Saved(_) => form.staged_path = Some(staged), + SaveOutcome::TooLarge => { + form.oversize = true; + drain_field(&mut field).await; + } + SaveOutcome::Empty => form.empty = true, + } + continue; + } + let value = field + .text() + .await + .map_err(|error| ApiError::bad_request(format!("Malformed upload: {error}")))?; + match field_name.as_str() { + "name" => form.name = Some(value), + "quality" => form.quality = Some(value), + "camera_type" => form.camera_type = Some(value), + "target_frames" => form.target_frames = Some(value), + "queue" => form.queue = Some(value), + "static_scene_confirmed" => form.static_scene_confirmed = Some(value), + _ => {} + } + } + Ok(form) +} + +async fn build_job(state: &AppState, form: &JobForm) -> ApiResult<(StatusCode, Json)> { + if !parse_bool(form.static_scene_confirmed.as_ref()) { + return Err(ApiError::unprocessable( + "This pipeline requires a stationary scene and moving camera", + )); + } + + let quality = form.quality.clone().unwrap_or_else(|| "standard".into()); + if quality != "standard" && quality != "high" { + return Err(ApiError::unprocessable("Quality must be standard or high")); + } + + let camera_type = form + .camera_type + .clone() + .unwrap_or_else(|| "perspective".into()); + if camera_type != "perspective" && camera_type != "equirectangular" { + return Err(ApiError::unprocessable("Unsupported camera type")); + } + + let target_frames: i64 = match form.target_frames.as_deref() { + None => 180, + Some(raw) => raw + .trim() + .parse() + .map_err(|_| ApiError::unprocessable("Target frames must be between 24 and 1200"))?, + }; + if !(24..=1200).contains(&target_frames) { + return Err(ApiError::unprocessable( + "Target frames must be between 24 and 1200", + )); + } + + let extension = form.extension.clone().unwrap_or_default(); + if !ALLOWED_EXTENSIONS.contains(&extension.as_str()) { + return Err(ApiError::unsupported_media_type( + "Unsupported video file extension", + )); + } + + let name = sanitize_name(form.name.as_deref().unwrap_or_default()); + if name.is_empty() { + return Err(ApiError::unprocessable("Scene name is required")); + } + + let queue = normalize_queue(form.queue.as_deref().unwrap_or("default"))?; + + if form.oversize { + return Err(ApiError::payload_too_large( + "File exceeds the configured upload limit", + )); + } + if form.empty { + return Err(ApiError::bad_request("The uploaded video is empty")); + } + let staged_path = form + .staged_path + .as_ref() + .ok_or_else(|| ApiError::unprocessable("A video file is required"))?; + + let job_id = uuid::Uuid::new_v4().simple().to_string(); + let job_dir = state.settings.jobs_dir().join(&job_id); + tokio::fs::create_dir_all(&job_dir).await?; + let input_path = job_dir.join(format!("source{extension}")); + + let outcome = async { + tokio::fs::rename(staged_path, &input_path).await?; + state + .store + .create( + &job_id, + &name, + form.original_filename.as_deref().unwrap_or("upload"), + &input_path.to_string_lossy(), + &quality, + &camera_type, + target_frames, + &queue, + ) + .map_err(ApiError::from) + } + .await; + + match outcome { + Ok(job) => Ok((StatusCode::ACCEPTED, Json(public_job(&job)))), + Err(error) => { + // Leave nothing behind if any part of intake failed. + let _ = tokio::fs::remove_dir_all(&job_dir).await; + Err(error) + } + } +} diff --git a/rust/src/routes/keys.rs b/rust/src/routes/keys.rs new file mode 100644 index 0000000..4956e53 --- /dev/null +++ b/rust/src/routes/keys.rs @@ -0,0 +1,62 @@ +use axum::extract::{Path as AxumPath, State}; +use axum::http::StatusCode; +use axum::Json; +use serde::Deserialize; +use serde_json::{json, Value}; + +use crate::app::AppState; +use crate::error::{ApiError, ApiResult}; +use crate::validation::sanitize_name; + +#[derive(Deserialize)] +pub struct WorkerKeyRequest { + pub name: String, +} + +pub async fn list_keys(State(state): State) -> ApiResult> { + let keys = state.store.list_worker_keys()?; + Ok(Json(json!({ "keys": keys }))) +} + +pub async fn create_key( + State(state): State, + Json(payload): Json, +) -> ApiResult<(StatusCode, Json)> { + if payload.name.is_empty() || payload.name.chars().count() > 80 { + return Err(ApiError::unprocessable("Credential name is required")); + } + let name = sanitize_name(&payload.name); + if name.is_empty() { + return Err(ApiError::unprocessable("Credential name is required")); + } + // The plaintext secret is returned exactly once and never persisted. + let credential = state.store.create_worker_key(&name)?; + Ok((StatusCode::CREATED, Json(credential))) +} + +pub async fn revoke_key( + State(state): State, + AxumPath(access_key): AxumPath, +) -> ApiResult { + if !state.store.revoke_worker_key(&access_key)? { + return Err(ApiError::not_found("Active worker key not found")); + } + Ok(StatusCode::NO_CONTENT) +} + +/// Relabel an issued credential without rotating it. +pub async fn update_key( + State(state): State, + AxumPath(access_key): AxumPath, + Json(payload): Json, +) -> ApiResult> { + let name = sanitize_name(&payload.name); + if name.is_empty() { + return Err(ApiError::unprocessable("Credential name is required")); + } + let key = state + .store + .rename_worker_key(&access_key, &name)? + .ok_or_else(|| ApiError::not_found("Worker key not found"))?; + Ok(Json(key)) +} diff --git a/rust/src/routes/mod.rs b/rust/src/routes/mod.rs new file mode 100644 index 0000000..7e39aaa --- /dev/null +++ b/rust/src/routes/mod.rs @@ -0,0 +1,4 @@ +pub mod agents; +pub mod health; +pub mod jobs; +pub mod keys; diff --git a/rust/src/store.rs b/rust/src/store.rs new file mode 100644 index 0000000..cee7964 --- /dev/null +++ b/rust/src/store.rs @@ -0,0 +1,863 @@ +use std::path::{Path, PathBuf}; + +use base64::Engine as _; +use chrono::{Duration, SecondsFormat, Utc}; +use rand::RngCore; +use rusqlite::types::Value as SqlValue; +use rusqlite::{Connection, OptionalExtension, Row, TransactionBehavior}; +use serde_json::{json, Map, Value}; + +pub const ACTIVE_STATUSES: [&str; 6] = [ + "assigned", + "inspecting", + "processing", + "training", + "exporting", + "uploading", +]; + +pub const TERMINAL_STATUSES: [&str; 3] = ["completed", "failed", "cancelled"]; + +const ACTIVE_SQL_LIST: &str = + "('assigned','inspecting','processing','training','exporting','uploading')"; + +pub fn is_active(status: &str) -> bool { + ACTIVE_STATUSES.contains(&status) +} + +pub fn is_terminal(status: &str) -> bool { + TERMINAL_STATUSES.contains(&status) +} + +pub fn utc_now() -> String { + Utc::now().to_rfc3339_opts(SecondsFormat::Micros, false) +} + +pub fn lease_deadline(seconds: i64) -> String { + (Utc::now() + Duration::seconds(seconds)).to_rfc3339_opts(SecondsFormat::Micros, false) +} + +fn b64() -> base64::engine::general_purpose::GeneralPurpose { + base64::engine::general_purpose::STANDARD +} + +// --------------------------------------------------------------------------- +// Row shaping +// --------------------------------------------------------------------------- + +fn job_row(row: &Row<'_>) -> rusqlite::Result> { + let mut job = Map::new(); + macro_rules! text { + ($k:literal) => { + let v: Option = row.get($k)?; + job.insert($k.to_string(), v.map(Value::from).unwrap_or(Value::Null)); + }; + } + macro_rules! int { + ($k:literal) => { + let v: Option = row.get($k)?; + job.insert($k.to_string(), v.map(Value::from).unwrap_or(Value::Null)); + }; + } + macro_rules! real { + ($k:literal) => { + let v: Option = row.get($k)?; + job.insert($k.to_string(), v.map(Value::from).unwrap_or(Value::Null)); + }; + } + text!("id"); + text!("name"); + text!("original_filename"); + text!("input_path"); + text!("status"); + text!("stage"); + int!("progress"); + text!("quality"); + text!("camera_type"); + int!("target_frames"); + text!("queue"); + text!("assigned_agent_id"); + text!("lease_expires_at"); + text!("created_at"); + text!("updated_at"); + text!("started_at"); + text!("completed_at"); + text!("error"); + text!("result_path"); + text!("config_path"); + int!("width"); + int!("height"); + real!("fps"); + real!("duration_seconds"); + int!("cancel_requested"); + text!("assigned_agent_name"); + Ok(job) +} + +fn agent_row(row: &Row<'_>) -> rusqlite::Result> { + let mut agent = Map::new(); + let raw: String = row.get("capabilities_json")?; + let capabilities: Value = serde_json::from_str(&raw).unwrap_or_else(|_| json!({})); + let take = |key: &str| -> rusqlite::Result { + let v: Option = row.get(key)?; + Ok(v.map(Value::from).unwrap_or(Value::Null)) + }; + agent.insert("id".into(), take("id")?); + agent.insert("name".into(), take("name")?); + agent.insert("queue".into(), take("queue")?); + agent.insert("hostname".into(), take("hostname")?); + agent.insert("version".into(), take("version")?); + agent.insert("capabilities".into(), capabilities); + agent.insert("status".into(), take("status")?); + agent.insert("current_job_id".into(), take("current_job_id")?); + agent.insert("access_key".into(), take("access_key")?); + agent.insert("registered_at".into(), take("registered_at")?); + agent.insert("last_seen".into(), take("last_seen")?); + Ok(agent) +} + +pub type Job = Map; +pub type Agent = Map; + +// --------------------------------------------------------------------------- +// Store +// --------------------------------------------------------------------------- + +#[derive(Debug, Clone)] +pub struct JobStore { + database_path: PathBuf, +} + +impl JobStore { + pub fn new(database_path: impl AsRef) -> Self { + Self { + database_path: database_path.as_ref().to_path_buf(), + } + } + + pub fn connect(&self) -> rusqlite::Result { + let connection = Connection::open(&self.database_path)?; + connection.busy_timeout(std::time::Duration::from_secs(30))?; + connection.execute_batch("PRAGMA foreign_keys = ON;")?; + connection.pragma_update(None, "journal_mode", "WAL")?; + Ok(connection) + } + + // -- schema ------------------------------------------------------------ + + pub fn initialize(&self) -> rusqlite::Result<()> { + if let Some(parent) = self.database_path.parent() { + let _ = std::fs::create_dir_all(parent); + } + let connection = self.connect()?; + connection.execute_batch( + r#" + CREATE TABLE IF NOT EXISTS jobs ( + id TEXT PRIMARY KEY, + name TEXT NOT NULL, + original_filename TEXT NOT NULL, + input_path TEXT NOT NULL, + status TEXT NOT NULL, + stage TEXT NOT NULL, + progress INTEGER NOT NULL DEFAULT 0, + quality TEXT NOT NULL, + camera_type TEXT NOT NULL, + target_frames INTEGER NOT NULL, + queue TEXT NOT NULL DEFAULT 'default', + assigned_agent_id TEXT, + lease_expires_at TEXT, + created_at TEXT NOT NULL, + updated_at TEXT NOT NULL, + started_at TEXT, + completed_at TEXT, + error TEXT, + result_path TEXT, + config_path TEXT, + width INTEGER, + height INTEGER, + fps REAL, + duration_seconds REAL, + cancel_requested INTEGER NOT NULL DEFAULT 0 + ); + + CREATE TABLE IF NOT EXISTS agents ( + id TEXT PRIMARY KEY, + name TEXT NOT NULL, + queue TEXT NOT NULL, + hostname TEXT, + version TEXT, + capabilities_json TEXT NOT NULL DEFAULT '{}', + status TEXT NOT NULL, + current_job_id TEXT, + access_key TEXT, + registered_at TEXT NOT NULL, + last_seen TEXT NOT NULL + ); + + CREATE TABLE IF NOT EXISTS worker_keys ( + access_key TEXT PRIMARY KEY, + name TEXT NOT NULL, + secret_salt TEXT NOT NULL, + secret_hash TEXT NOT NULL, + created_at TEXT NOT NULL, + last_used_at TEXT, + revoked_at TEXT + ); + "#, + )?; + + ensure_column( + &connection, + "jobs", + "queue", + "TEXT NOT NULL DEFAULT 'default'", + )?; + ensure_column(&connection, "jobs", "assigned_agent_id", "TEXT")?; + ensure_column(&connection, "jobs", "lease_expires_at", "TEXT")?; + ensure_column(&connection, "agents", "access_key", "TEXT")?; + + let now = utc_now(); + connection.execute( + &format!( + "UPDATE jobs + SET status = 'failed', + stage = 'Interrupted', + progress = 0, + error = 'The local worker stopped while this job was running. Submit it again to retry.', + completed_at = ?, + updated_at = ? + WHERE status IN {ACTIVE_SQL_LIST} AND assigned_agent_id IS NULL" + ), + rusqlite::params![now, now], + )?; + Ok(()) + } + + // -- jobs -------------------------------------------------------------- + + #[allow(clippy::too_many_arguments)] + pub fn create( + &self, + id: &str, + name: &str, + original_filename: &str, + input_path: &str, + quality: &str, + camera_type: &str, + target_frames: i64, + queue: &str, + ) -> rusqlite::Result { + let now = utc_now(); + let connection = self.connect()?; + connection.execute( + "INSERT INTO jobs ( + id, name, original_filename, input_path, status, stage, progress, + quality, camera_type, target_frames, queue, created_at, updated_at + ) VALUES (?, ?, ?, ?, 'queued', ?, 0, ?, ?, ?, ?, ?, ?)", + rusqlite::params![ + id, + name, + original_filename, + input_path, + format!("Waiting for {queue} agent"), + quality, + camera_type, + target_frames, + queue, + now, + now + ], + )?; + drop(connection); + Ok(self.get(id)?.expect("inserted job must exist")) + } + + pub fn get(&self, job_id: &str) -> rusqlite::Result> { + let connection = self.connect()?; + let mut statement = connection.prepare( + "SELECT jobs.*, agents.name AS assigned_agent_name + FROM jobs LEFT JOIN agents ON agents.id = jobs.assigned_agent_id + WHERE jobs.id = ?", + )?; + statement.query_row([job_id], job_row).optional() + } + + pub fn list(&self, limit: i64) -> rusqlite::Result> { + let connection = self.connect()?; + let mut statement = connection.prepare( + "SELECT jobs.*, agents.name AS assigned_agent_name + FROM jobs LEFT JOIN agents ON agents.id = jobs.assigned_agent_id + ORDER BY jobs.created_at DESC LIMIT ?", + )?; + let rows = statement.query_map([limit], job_row)?; + rows.collect() + } + + pub fn update( + &self, + job_id: &str, + values: Vec<(&str, SqlValue)>, + ) -> rusqlite::Result> { + if values.is_empty() { + return self.get(job_id); + } + let mut columns: Vec = Vec::new(); + let mut params: Vec = Vec::new(); + for (column, value) in values { + columns.push(format!("{column} = ?")); + params.push(value); + } + columns.push("updated_at = ?".to_string()); + params.push(SqlValue::Text(utc_now())); + params.push(SqlValue::Text(job_id.to_string())); + + let connection = self.connect()?; + connection.execute( + &format!("UPDATE jobs SET {} WHERE id = ?", columns.join(", ")), + rusqlite::params_from_iter(params.iter()), + )?; + drop(connection); + self.get(job_id) + } + + pub fn delete(&self, job_id: &str) -> rusqlite::Result { + let connection = self.connect()?; + let changed = connection.execute("DELETE FROM jobs WHERE id = ?", [job_id])?; + Ok(changed > 0) + } + + pub fn request_cancel(&self, job_id: &str) -> rusqlite::Result> { + let job = match self.get(job_id)? { + None => return Ok(None), + Some(job) => job, + }; + let status = job.get("status").and_then(Value::as_str).unwrap_or(""); + if is_terminal(status) { + return Ok(Some(job)); + } + let now = utc_now(); + let connection = self.connect()?; + if status == "queued" { + connection.execute( + "UPDATE jobs + SET status = 'cancelled', stage = 'Cancelled', completed_at = ?, + updated_at = ?, cancel_requested = 1 + WHERE id = ?", + rusqlite::params![now, now, job_id], + )?; + } else { + connection.execute( + "UPDATE jobs + SET cancel_requested = 1, stage = 'Stopping safely', updated_at = ? + WHERE id = ?", + rusqlite::params![now, job_id], + )?; + } + drop(connection); + self.get(job_id) + } + + // -- agents ------------------------------------------------------------ + + #[allow(clippy::too_many_arguments)] + pub fn register_agent( + &self, + agent_id: &str, + name: &str, + queue: &str, + hostname: Option<&str>, + version: Option<&str>, + capabilities: &Value, + access_key: &str, + ) -> rusqlite::Result { + let now = utc_now(); + let payload = canonical_json(capabilities); + let connection = self.connect()?; + + let existing: Option<(String, Option)> = connection + .query_row( + "SELECT registered_at, current_job_id FROM agents WHERE id = ?", + [agent_id], + |row| Ok((row.get(0)?, row.get(1)?)), + ) + .optional()?; + let (registered_at, current_job_id) = match existing { + Some((registered_at, current_job_id)) => (registered_at, current_job_id), + None => (now.clone(), None), + }; + + connection.execute( + "INSERT INTO agents ( + id, name, queue, hostname, version, capabilities_json, + status, current_job_id, access_key, registered_at, last_seen + ) VALUES (?, ?, ?, ?, ?, ?, 'idle', ?, ?, ?, ?) + ON CONFLICT(id) DO UPDATE SET + name = excluded.name, + queue = excluded.queue, + hostname = excluded.hostname, + version = excluded.version, + capabilities_json = excluded.capabilities_json, + access_key = excluded.access_key, + status = CASE WHEN agents.current_job_id IS NULL THEN 'idle' ELSE 'busy' END, + last_seen = excluded.last_seen", + rusqlite::params![ + agent_id, + name, + queue, + hostname, + version, + payload, + current_job_id, + access_key, + registered_at, + now + ], + )?; + drop(connection); + Ok(self.get_agent(agent_id)?.expect("registered agent exists")) + } + + pub fn get_agent(&self, agent_id: &str) -> rusqlite::Result> { + let connection = self.connect()?; + let mut statement = connection.prepare("SELECT * FROM agents WHERE id = ?")?; + statement.query_row([agent_id], agent_row).optional() + } + + pub fn list_agents(&self) -> rusqlite::Result> { + let connection = self.connect()?; + let mut statement = + connection.prepare("SELECT * FROM agents ORDER BY name COLLATE NOCASE")?; + let rows = statement.query_map([], agent_row)?; + rows.collect() + } + + pub fn heartbeat_agent(&self, agent_id: &str) -> rusqlite::Result> { + let connection = self.connect()?; + connection.execute( + "UPDATE agents SET last_seen = ? WHERE id = ?", + rusqlite::params![utc_now(), agent_id], + )?; + drop(connection); + self.get_agent(agent_id) + } + + pub fn set_agent_status( + &self, + agent_id: &str, + status: &str, + ) -> rusqlite::Result> { + let connection = self.connect()?; + connection.execute( + "UPDATE agents SET status = ?, last_seen = ? WHERE id = ?", + rusqlite::params![status, utc_now(), agent_id], + )?; + drop(connection); + self.get_agent(agent_id) + } + + pub fn finish_agent_job(&self, agent_id: &str, job_id: &str) -> rusqlite::Result<()> { + let connection = self.connect()?; + connection.execute( + "UPDATE agents SET status = 'idle', current_job_id = NULL, last_seen = ? + WHERE id = ? AND current_job_id = ?", + rusqlite::params![utc_now(), agent_id, job_id], + )?; + Ok(()) + } + + /// Atomically hand the oldest queued job for the agent's queue to that agent. + pub fn claim_for_agent( + &self, + agent_id: &str, + lease_seconds: i64, + ) -> rusqlite::Result> { + let mut connection = self.connect()?; + let transaction = connection.transaction_with_behavior(TransactionBehavior::Immediate)?; + + let agent: Option<(String, String, Option)> = transaction + .query_row( + "SELECT name, queue, current_job_id FROM agents WHERE id = ?", + [agent_id], + |row| Ok((row.get(0)?, row.get(1)?, row.get(2)?)), + ) + .optional()?; + let (agent_name, agent_queue, current_job_id) = match agent { + None => return Ok(None), + Some(agent) => agent, + }; + + let mut job_id: Option = None; + if let Some(current) = current_job_id.as_deref() { + let existing: Option = transaction + .query_row( + &format!( + "SELECT id FROM jobs + WHERE id = ? AND assigned_agent_id = ? AND status IN {ACTIVE_SQL_LIST}" + ), + rusqlite::params![current, agent_id], + |row| row.get(0), + ) + .optional()?; + match existing { + Some(existing_id) => { + let now = utc_now(); + transaction.execute( + "UPDATE agents SET status = 'busy', last_seen = ? WHERE id = ?", + rusqlite::params![now, agent_id], + )?; + transaction.execute( + "UPDATE jobs SET lease_expires_at = ?, updated_at = ? WHERE id = ?", + rusqlite::params![lease_deadline(lease_seconds), now, existing_id], + )?; + job_id = Some(existing_id); + } + None => { + transaction.execute( + "UPDATE agents SET current_job_id = NULL WHERE id = ?", + [agent_id], + )?; + } + } + } + + if job_id.is_none() { + let next: Option = transaction + .query_row( + "SELECT id FROM jobs + WHERE status = 'queued' AND cancel_requested = 0 AND queue = ? + ORDER BY created_at ASC LIMIT 1", + [&agent_queue], + |row| row.get(0), + ) + .optional()?; + match next { + None => { + transaction.execute( + "UPDATE agents SET status = 'idle', last_seen = ? WHERE id = ?", + rusqlite::params![utc_now(), agent_id], + )?; + transaction.commit()?; + return Ok(None); + } + Some(next_id) => { + let now = utc_now(); + transaction.execute( + "UPDATE jobs + SET status = 'assigned', stage = ?, progress = 1, + assigned_agent_id = ?, lease_expires_at = ?, + started_at = COALESCE(started_at, ?), updated_at = ? + WHERE id = ? AND status = 'queued'", + rusqlite::params![ + format!("Assigned to {agent_name}"), + agent_id, + lease_deadline(lease_seconds), + now, + now, + next_id + ], + )?; + transaction.execute( + "UPDATE agents SET status = 'busy', current_job_id = ?, last_seen = ? + WHERE id = ?", + rusqlite::params![next_id, now, agent_id], + )?; + job_id = Some(next_id); + } + } + } + + transaction.commit()?; + match job_id { + Some(job_id) => self.get(&job_id), + None => Ok(None), + } + } + + /// Apply an agent-supplied update, renewing the lease and the heartbeat. + pub fn update_remote_job( + &self, + agent_id: &str, + job_id: &str, + lease_seconds: i64, + mut values: Vec<(&str, SqlValue)>, + ) -> rusqlite::Result> { + let job = match self.get(job_id)? { + None => return Ok(None), + Some(job) => job, + }; + if job.get("assigned_agent_id").and_then(Value::as_str) != Some(agent_id) { + return Ok(None); + } + let status = values + .iter() + .find(|(key, _)| *key == "status") + .and_then(|(_, value)| match value { + SqlValue::Text(text) => Some(text.clone()), + _ => None, + }); + values.push(( + "lease_expires_at", + SqlValue::Text(lease_deadline(lease_seconds)), + )); + let updated = self.update(job_id, values)?; + self.heartbeat_agent(agent_id)?; + if let Some(status) = status { + if is_terminal(&status) { + self.finish_agent_job(agent_id, job_id)?; + } + } + Ok(updated) + } + + /// Fail jobs whose agent lease elapsed and mark those agents offline. + pub fn expire_stale_agents(&self) -> rusqlite::Result { + let now = utc_now(); + let connection = self.connect()?; + let stale: Vec = { + let mut statement = connection.prepare(&format!( + "SELECT DISTINCT assigned_agent_id FROM jobs + WHERE status IN {ACTIVE_SQL_LIST} + AND lease_expires_at IS NOT NULL + AND lease_expires_at < ? + AND assigned_agent_id IS NOT NULL" + ))?; + let rows = statement.query_map([&now], |row| row.get::<_, String>(0))?; + rows.collect::>>()? + }; + let changed = connection.execute( + &format!( + "UPDATE jobs + SET status = 'failed', stage = 'Agent disconnected', progress = 0, + error = 'The assigned agent stopped sending heartbeats. Submit the job again to retry.', + completed_at = ?, updated_at = ? + WHERE status IN {ACTIVE_SQL_LIST} + AND lease_expires_at IS NOT NULL + AND lease_expires_at < ?" + ), + rusqlite::params![now, now, now], + )?; + for agent_id in stale { + connection.execute( + "UPDATE agents SET status = 'offline', current_job_id = NULL WHERE id = ?", + [&agent_id], + )?; + } + Ok(changed) + } + + // -- worker keys ------------------------------------------------------- + + fn hash_secret(secret: &str, salt: &[u8]) -> Vec { + let params = scrypt::Params::new(14, 8, 1, 32).expect("valid scrypt params"); + let mut output = vec![0u8; 32]; + scrypt::scrypt(secret.as_bytes(), salt, ¶ms, &mut output).expect("scrypt"); + output + } + + pub fn create_worker_key(&self, name: &str) -> rusqlite::Result { + let access_key = format!("spl_{}", random_hex(12)); + let secret_key = format!("sk_{}", random_urlsafe(32)); + let mut salt = [0u8; 16]; + rand::thread_rng().fill_bytes(&mut salt); + let digest = Self::hash_secret(&secret_key, &salt); + let created_at = utc_now(); + + let connection = self.connect()?; + connection.execute( + "INSERT INTO worker_keys (access_key, name, secret_salt, secret_hash, created_at) + VALUES (?, ?, ?, ?, ?)", + rusqlite::params![ + access_key, + name, + b64().encode(salt), + b64().encode(&digest), + created_at + ], + )?; + Ok(json!({ + "access_key": access_key, + "secret_key": secret_key, + "name": name, + "created_at": created_at, + })) + } + + pub fn list_worker_keys(&self) -> rusqlite::Result> { + let connection = self.connect()?; + let mut statement = connection.prepare( + "SELECT access_key, name, created_at, last_used_at, revoked_at + FROM worker_keys ORDER BY created_at DESC", + )?; + let rows = statement.query_map([], |row| { + Ok(json!({ + "access_key": row.get::<_, String>(0)?, + "name": row.get::<_, String>(1)?, + "created_at": row.get::<_, String>(2)?, + "last_used_at": row.get::<_, Option>(3)?, + "revoked_at": row.get::<_, Option>(4)?, + })) + })?; + rows.collect() + } + + /// Rename an issued credential. The secret material is untouched. + pub fn rename_worker_key( + &self, + access_key: &str, + name: &str, + ) -> rusqlite::Result> { + let connection = self.connect()?; + let changed = connection.execute( + "UPDATE worker_keys SET name = ? WHERE access_key = ?", + rusqlite::params![name, access_key], + )?; + if changed == 0 { + return Ok(None); + } + let record = connection + .query_row( + "SELECT access_key, name, created_at, last_used_at, revoked_at + FROM worker_keys WHERE access_key = ?", + [access_key], + |row| { + Ok(json!({ + "access_key": row.get::<_, String>(0)?, + "name": row.get::<_, String>(1)?, + "created_at": row.get::<_, String>(2)?, + "last_used_at": row.get::<_, Option>(3)?, + "revoked_at": row.get::<_, Option>(4)?, + })) + }, + ) + .optional()?; + Ok(record) + } + + pub fn revoke_worker_key(&self, access_key: &str) -> rusqlite::Result { + let now = utc_now(); + let connection = self.connect()?; + let revoked = connection.execute( + "UPDATE worker_keys SET revoked_at = ? WHERE access_key = ? AND revoked_at IS NULL", + rusqlite::params![now, access_key], + )?; + connection.execute( + "UPDATE agents SET status = 'offline', current_job_id = NULL WHERE access_key = ?", + [access_key], + )?; + connection.execute( + &format!( + "UPDATE jobs + SET status = 'failed', stage = 'Worker key revoked', progress = 0, + error = 'The credential used by the assigned agent was revoked.', + completed_at = ?, updated_at = ? + WHERE assigned_agent_id IN (SELECT id FROM agents WHERE access_key = ?) + AND status IN {ACTIVE_SQL_LIST}" + ), + rusqlite::params![now, now, access_key], + )?; + Ok(revoked > 0) + } + + pub fn authenticate_worker_key( + &self, + access_key: &str, + secret_key: &str, + ) -> rusqlite::Result { + let connection = self.connect()?; + let record: Option<(String, String)> = connection + .query_row( + "SELECT secret_salt, secret_hash FROM worker_keys + WHERE access_key = ? AND revoked_at IS NULL", + [access_key], + |row| Ok((row.get(0)?, row.get(1)?)), + ) + .optional()?; + let (salt, expected) = match record { + None => return Ok(false), + Some(record) => record, + }; + let salt = match b64().decode(salt.as_bytes()) { + Ok(salt) => salt, + Err(_) => return Ok(false), + }; + let expected = match b64().decode(expected.as_bytes()) { + Ok(expected) => expected, + Err(_) => return Ok(false), + }; + let digest = Self::hash_secret(secret_key, &salt); + let matches = constant_time_eq(&digest, &expected); + if matches { + connection.execute( + "UPDATE worker_keys SET last_used_at = ? WHERE access_key = ?", + rusqlite::params![utc_now(), access_key], + )?; + } + Ok(matches) + } +} + +// --------------------------------------------------------------------------- +// Helpers +// --------------------------------------------------------------------------- + +fn ensure_column( + connection: &Connection, + table: &str, + column: &str, + definition: &str, +) -> rusqlite::Result<()> { + let mut statement = connection.prepare(&format!("PRAGMA table_info({table})"))?; + let existing: Vec = statement + .query_map([], |row| row.get::<_, String>(1))? + .collect::>>()?; + drop(statement); + if !existing.iter().any(|name| name == column) { + connection.execute_batch(&format!( + "ALTER TABLE {table} ADD COLUMN {column} {definition}" + ))?; + } + Ok(()) +} + +fn constant_time_eq(left: &[u8], right: &[u8]) -> bool { + use subtle::ConstantTimeEq; + left.len() == right.len() && bool::from(left.ct_eq(right)) +} + +fn random_hex(bytes: usize) -> String { + let mut buffer = vec![0u8; bytes]; + rand::thread_rng().fill_bytes(&mut buffer); + buffer.iter().map(|byte| format!("{byte:02x}")).collect() +} + +fn random_urlsafe(bytes: usize) -> String { + let mut buffer = vec![0u8; bytes]; + rand::thread_rng().fill_bytes(&mut buffer); + base64::engine::general_purpose::URL_SAFE_NO_PAD.encode(buffer) +} + +/// `json.dumps(value, separators=(",", ":"), sort_keys=True)` +pub fn canonical_json(value: &Value) -> String { + match value { + Value::Object(map) => { + let mut keys: Vec<&String> = map.keys().collect(); + keys.sort(); + let body: Vec = keys + .into_iter() + .map(|key| { + format!( + "{}:{}", + Value::String(key.clone()), + canonical_json(&map[key]) + ) + }) + .collect(); + format!("{{{}}}", body.join(",")) + } + Value::Array(items) => { + let body: Vec = items.iter().map(canonical_json).collect(); + format!("[{}]", body.join(",")) + } + other => other.to_string(), + } +} diff --git a/rust/src/validation.rs b/rust/src/validation.rs new file mode 100644 index 0000000..36eca73 --- /dev/null +++ b/rust/src/validation.rs @@ -0,0 +1,101 @@ +use once_cell::sync::Lazy; +use regex::Regex; +use serde_json::{Map, Value}; + +use crate::error::{ApiError, ApiResult}; + +pub const ALLOWED_EXTENSIONS: [&str; 6] = [".mp4", ".mov", ".m4v", ".avi", ".mkv", ".webm"]; + +/// Characters stripped out of user supplied names. +static NAME_PATTERN: Lazy = Lazy::new(|| Regex::new(r"[^\w .\-]+").unwrap()); +static QUEUE_PATTERN: Lazy = + Lazy::new(|| Regex::new(r"^[a-z0-9][a-z0-9._-]{0,63}$").unwrap()); +static AGENT_ID_PATTERN: Lazy = Lazy::new(|| Regex::new(r"^[a-f0-9]{32}$").unwrap()); +static FILENAME_PATTERN: Lazy = Lazy::new(|| Regex::new(r"[^A-Za-z0-9_-]+").unwrap()); + +pub fn sanitize_name(raw: &str) -> String { + let stripped = NAME_PATTERN.replace_all(raw, ""); + stripped.trim().chars().take(80).collect() +} + +pub fn normalize_queue(raw: &str) -> ApiResult { + let queue = raw.trim().to_lowercase(); + if !QUEUE_PATTERN.is_match(&queue) { + return Err(ApiError::unprocessable( + "Queue must be 1-64 lowercase letters, numbers, dots, underscores, or hyphens", + )); + } + Ok(queue) +} + +pub fn validate_agent_id(agent_id: &str) -> ApiResult<()> { + if !AGENT_ID_PATTERN.is_match(agent_id) { + return Err(ApiError::not_found("Agent not found")); + } + Ok(()) +} + +pub fn extension_of(filename: &str) -> String { + match filename.rfind('.') { + Some(index) if index > 0 && index + 1 < filename.len() => filename[index..].to_lowercase(), + _ => String::new(), + } +} + +pub fn download_filename(name: &str) -> String { + let replaced = FILENAME_PATTERN.replace_all(name, "-"); + let trimmed = replaced.trim_matches('-'); + if trimmed.is_empty() { + "scene.ply".to_string() + } else { + format!("{trimmed}.ply") + } +} + +/// Strip on-disk paths and attach the browser facing URLs. +pub fn public_job(job: &Map) -> Value { + let mut clean = Map::new(); + for (key, value) in job { + if matches!(key.as_str(), "input_path" | "result_path" | "config_path") { + continue; + } + clean.insert(key.clone(), value.clone()); + } + let cancel_requested = job + .get("cancel_requested") + .and_then(Value::as_i64) + .unwrap_or(0) + != 0; + clean.insert("cancel_requested".into(), Value::Bool(cancel_requested)); + + let id = job.get("id").and_then(Value::as_str).unwrap_or_default(); + let has_result = job + .get("result_path") + .map(|value| !value.is_null()) + .unwrap_or(false); + clean.insert( + "result_url".into(), + if has_result { + Value::String(format!("/api/jobs/{id}/result")) + } else { + Value::Null + }, + ); + clean.insert( + "log_url".into(), + Value::String(format!("/api/jobs/{id}/logs")), + ); + Value::Object(clean) +} + +/// Never leak the access key that owns an agent. +pub fn public_agent(agent: &Map) -> Value { + let mut clean = Map::new(); + for (key, value) in agent { + if key == "access_key" { + continue; + } + clean.insert(key.clone(), value.clone()); + } + Value::Object(clean) +} diff --git a/rust/static/app.js b/rust/static/app.js new file mode 100644 index 0000000..5c8c1a3 --- /dev/null +++ b/rust/static/app.js @@ -0,0 +1,474 @@ +const $ = (selector) => document.querySelector(selector); +const form = $("#job-form"); +const fileInput = $("#video-input"); +const dropZone = $("#drop-zone"); +const submitButton = $("#submit-button"); +const formError = $("#form-error"); +const jobList = $("#job-list"); +const logDialog = $("#log-dialog"); +const settingsDialog = $("#settings-dialog"); +let pipelineReady = false; +let jobs = []; +let agents = []; + +const terminal = new Set(["completed", "failed", "cancelled"]); + +function formatBytes(bytes) { + if (!Number.isFinite(bytes)) return "—"; + const units = ["B", "KB", "MB", "GB", "TB"]; + let value = bytes; + let unit = 0; + while (value >= 1024 && unit < units.length - 1) { value /= 1024; unit += 1; } + return `${value >= 10 || unit === 0 ? value.toFixed(0) : value.toFixed(1)} ${units[unit]}`; +} + +function formatDate(value) { + if (!value) return "—"; + return new Intl.DateTimeFormat(undefined, { month: "short", day: "numeric", hour: "2-digit", minute: "2-digit" }).format(new Date(value)); +} + +function setError(message = "") { + formError.textContent = message; + formError.hidden = !message; +} + +function setFile(file) { + if (!file) return; + const transfer = new DataTransfer(); + transfer.items.add(file); + fileInput.files = transfer.files; + dropZone.classList.add("has-file"); + $("#drop-title").textContent = file.name; + $("#drop-copy").textContent = `${formatBytes(file.size)} · ready for local upload`; + if (!$("#scene-name").value) { + $("#scene-name").value = file.name.replace(/\.[^.]+$/, "").replace(/[-_]+/g, " ").slice(0, 80); + } +} + +fileInput.addEventListener("change", () => setFile(fileInput.files[0])); +["dragenter", "dragover"].forEach((eventName) => dropZone.addEventListener(eventName, (event) => { + event.preventDefault(); + dropZone.classList.add("dragging"); +})); +["dragleave", "drop"].forEach((eventName) => dropZone.addEventListener(eventName, (event) => { + event.preventDefault(); + dropZone.classList.remove("dragging"); +})); +dropZone.addEventListener("drop", (event) => setFile(event.dataTransfer.files[0])); +$("#target-frames").addEventListener("input", (event) => { $("#frame-output").value = event.target.value; }); + +async function loadHealth() { + const pill = $("#runtime-pill"); + try { + const response = await fetch("/api/health"); + const health = await response.json(); + pipelineReady = response.ok; + pill.className = "runtime-pill ready"; + const count = health.agents.online; + $("#runtime-label").textContent = count ? `${count} agent${count === 1 ? "" : "s"} online` : "Control plane ready"; + } catch { + pipelineReady = false; + pill.className = "runtime-pill offline"; + $("#runtime-label").textContent = "Service unavailable"; + } + submitButton.disabled = !pipelineReady; +} + +function button(label, action, className = "") { + const element = document.createElement("button"); + element.type = "button"; + element.textContent = label; + element.className = className; + element.addEventListener("click", action); + return element; +} + +function renderJobs() { + jobList.replaceChildren(); + if (!jobs.length) { + const empty = document.createElement("div"); + empty.className = "empty-state"; + const glyph = document.createElement("span"); glyph.className = "empty-glyph"; glyph.textContent = "✣"; + const title = document.createElement("strong"); title.textContent = "No scenes in the queue"; + const copy = document.createElement("p"); copy.textContent = "Your first reconstruction will appear here."; + empty.append(glyph, title, copy); jobList.append(empty); return; + } + + for (const job of jobs) { + const card = document.createElement("article"); + card.className = `job-card ${job.status}`; + const top = document.createElement("div"); top.className = "job-top"; + const title = document.createElement("strong"); title.textContent = job.name; + const status = document.createElement("span"); status.className = "job-status"; status.textContent = job.status; + top.append(title, status); + const meta = document.createElement("div"); meta.className = "job-meta"; + const profile = document.createElement("span"); profile.textContent = `${job.quality === "high" ? "HIGH" : "STD"} · ${job.target_frames} FRAMES · ${job.queue}`; + const date = document.createElement("span"); date.textContent = formatDate(job.created_at); + meta.append(profile, date); + const track = document.createElement("div"); track.className = "progress-track"; + const fill = document.createElement("i"); fill.style.width = `${job.progress}%`; track.append(fill); + const stage = document.createElement("div"); stage.className = "job-stage"; stage.textContent = `${job.progress}% · ${job.stage}${job.assigned_agent_name ? ` · ${job.assigned_agent_name}` : ""}`; + card.append(top, meta, track, stage); + if (job.error) { const error = document.createElement("p"); error.className = "job-error"; error.textContent = job.error; card.append(error); } + const actions = document.createElement("div"); actions.className = "job-actions"; + if (job.result_url) { + const download = document.createElement("a"); download.href = job.result_url; download.className = "result-action"; download.textContent = "Download PLY"; actions.append(download); + } + actions.append(button("View log", () => openLog(job))); + if (!terminal.has(job.status)) actions.append(button("Cancel", () => cancelJob(job.id))); + if (terminal.has(job.status)) actions.append(button("Delete", () => deleteJob(job))); + card.append(actions); + jobList.append(card); + } +} + +function renderAgents() { + const container = $("#agent-list"); + container.replaceChildren(); + const online = agents.filter((agent) => agent.status !== "offline"); + $("#agent-count").textContent = `${online.length} AGENT${online.length === 1 ? "" : "S"}`; + const queueOptions = $("#queue-options"); + queueOptions.replaceChildren(); + for (const queue of [...new Set(agents.map((agent) => agent.queue))].sort()) { + const option = document.createElement("option"); option.value = queue; queueOptions.append(option); + } + if (!agents.length) { + const empty = document.createElement("span"); empty.textContent = "No remote agents connected"; container.append(empty); return; + } + for (const agent of agents) { + const chip = document.createElement("div"); chip.className = `agent-chip ${agent.status}`; + const dot = document.createElement("i"); + const name = document.createElement("b"); name.textContent = agent.name; + const queue = document.createElement("small"); queue.textContent = `${agent.queue} · ${agent.status}`; + chip.append(dot, name, queue); container.append(chip); + } +} + +async function loadAgents() { + try { + const response = await fetch("/api/agents"); + if (!response.ok) throw new Error("Could not load agents"); + agents = (await response.json()).agents; + renderAgents(); + } catch (error) { + console.error(error); + } +} + +async function loadJobs() { + try { + const response = await fetch("/api/jobs"); + if (!response.ok) throw new Error("Could not load jobs"); + jobs = (await response.json()).jobs; + renderJobs(); + } catch (error) { + console.error(error); + } +} + +form.addEventListener("submit", (event) => { + event.preventDefault(); + setError(); + if (!pipelineReady) { setError("The SplatLab control plane is unavailable."); return; } + if (!fileInput.files[0]) { setError("Choose a capture video first."); return; } + const data = new FormData(form); + const request = new XMLHttpRequest(); + submitButton.disabled = true; + $("#upload-progress").hidden = false; + request.upload.addEventListener("progress", (progress) => { + if (!progress.lengthComputable) return; + const percentage = Math.round(progress.loaded / progress.total * 100); + $("#upload-bar").style.width = `${percentage}%`; + $("#upload-label").textContent = `Uploading locally · ${percentage}%`; + }); + request.addEventListener("load", async () => { + submitButton.disabled = !pipelineReady; + $("#upload-progress").hidden = true; + if (request.status >= 200 && request.status < 300) { + form.reset(); + $("#frame-output").value = "180"; + dropZone.classList.remove("has-file"); + $("#drop-title").textContent = "Drop your capture here"; + $("#drop-copy").textContent = "MP4, MOV, MKV, AVI or WebM"; + await loadJobs(); + return; + } + try { setError(JSON.parse(request.responseText).detail || "Upload failed"); } + catch { setError("Upload failed. Check the service log and try again."); } + }); + request.addEventListener("error", () => { + submitButton.disabled = !pipelineReady; + $("#upload-progress").hidden = true; + setError("The local service could not receive the upload."); + }); + request.open("POST", "/api/jobs"); + request.send(data); +}); + +async function cancelJob(id) { + await fetch(`/api/jobs/${id}/cancel`, { method: "POST" }); + await loadJobs(); +} + +async function deleteJob(job) { + if (!confirm(`Delete “${job.name}” and its local files?`)) return; + const response = await fetch(`/api/jobs/${job.id}`, { method: "DELETE" }); + if (!response.ok) alert("The scene could not be deleted."); + await loadJobs(); +} + +async function openLog(job) { + $("#log-title").textContent = job.name; + $("#log-content").textContent = "Loading…"; + logDialog.showModal(); + const response = await fetch(job.log_url); + $("#log-content").textContent = response.ok ? await response.text() : "Log unavailable."; + $("#log-content").scrollTop = $("#log-content").scrollHeight; +} + +function renderKeys(keys) { + const container = $("#key-list"); + container.replaceChildren(); + if (!keys.length) { + const empty = document.createElement("p"); empty.textContent = "No worker keys generated."; container.append(empty); return; + } + for (const key of keys) { + const row = document.createElement("div"); row.className = "key-row"; + const details = document.createElement("div"); + const name = document.createElement("strong"); name.textContent = key.name; + const access = document.createElement("code"); access.textContent = key.access_key; + const used = document.createElement("small"); + used.textContent = key.revoked_at ? `Revoked ${formatDate(key.revoked_at)}` : key.last_used_at ? `Last used ${formatDate(key.last_used_at)}` : "Never used"; + details.append(name, access, used); row.append(details); + if (!key.revoked_at) row.append(button("Revoke", () => revokeKey(key))); + container.append(row); + } +} + +async function loadKeys() { + const response = await fetch("/api/settings/keys"); + if (response.ok) renderKeys((await response.json()).keys); +} + +async function revokeKey(key) { + if (!confirm(`Revoke access for “${key.name}”? Connected agents using it will stop.`)) return; + await fetch(`/api/settings/keys/${encodeURIComponent(key.access_key)}`, { method: "DELETE" }); + await Promise.all([loadKeys(), loadAgents(), loadJobs()]); +} + +/* ---- Issued credential panel -------------------------------------------- */ + +// The credential currently displayed in the panel. The secret only ever lives +// here in memory; the server stores a salted hash and never returns it again. +let issuedCredential = null; +let credentialFormat = "json"; + +const token = (text, cls) => ({ text, cls }); + +const CREDENTIAL_FORMATS = { + json: { + instruction: "Save this as splat-agent.json beside the agent, or merge it into your existing config.", + lines: ({ name, url, access, secret }) => [ + [token("{", "code-punct")], + [token(" // " + name, "code-comment")], + [token(" \"server_url\"", "code-prop"), token(": ", "code-punct"), token(`"${url}"`, "code-val"), token(",", "code-punct")], + [token(" \"queue\"", "code-prop"), token(": ", "code-punct"), token('"default"', "code-val"), token(",", "code-punct")], + [token(" \"credentials\"", "code-kw"), token(": {", "code-punct")], + [token(" \"access_key\"", "code-key"), token(": ", "code-punct"), token(`"${access}"`, "code-val"), token(",", "code-punct")], + [token(" \"secret_key\"", "code-key"), token(": ", "code-punct"), token(`"${secret}"`, "code-val")], + [token(" }", "code-punct")], + [token("}", "code-punct")], + ], + }, + env: { + instruction: "Export these before starting the agent, or drop them into an .env file.", + lines: ({ name, url, access, secret }) => [ + [token("# " + name, "code-comment")], + [token("SPLAT_SERVER_URL", "code-prop"), token("=", "code-punct"), token(url, "code-val")], + [token("SPLAT_ACCESS_KEY", "code-key"), token("=", "code-punct"), token(access, "code-val")], + [token("SPLAT_SECRET_KEY", "code-key"), token("=", "code-punct"), token(secret, "code-val")], + [token("SPLAT_QUEUE", "code-prop"), token("=", "code-punct"), token("default", "code-val")], + ], + }, + docker: { + instruction: "Run the agent container on the GPU host. It claims jobs from the queue you name.", + lines: ({ url, access, secret }) => [ + [token("docker run", "code-kw"), token(" --rm --gpus all \\", "code-val")], + [token(" -e ", "code-punct"), token("SPLAT_SERVER_URL", "code-prop"), token("=", "code-punct"), token(url + " \\", "code-val")], + [token(" -e ", "code-punct"), token("SPLAT_ACCESS_KEY", "code-key"), token("=", "code-punct"), token(access + " \\", "code-val")], + [token(" -e ", "code-punct"), token("SPLAT_SECRET_KEY", "code-key"), token("=", "code-punct"), token(secret + " \\", "code-val")], + [token(" -e ", "code-punct"), token("SPLAT_QUEUE", "code-prop"), token("=", "code-punct"), token("default \\", "code-val")], + [token(" ghcr.io/nj-labs/splat-agent:latest", "code-val")], + ], + }, +}; + +function credentialContext() { + return { + name: issuedCredential?.name || "SplatLab worker", + url: location.origin, + access: issuedCredential?.access_key || "", + secret: issuedCredential?.secret_key || "", + }; +} + +function credentialLines() { + return CREDENTIAL_FORMATS[credentialFormat].lines(credentialContext()); +} + +// Built with DOM nodes rather than innerHTML: the label is user supplied. +function renderCredentialConfig() { + if (!issuedCredential) return; + $("#credential-instruction").textContent = CREDENTIAL_FORMATS[credentialFormat].instruction; + + const code = $("#credential-code"); + code.replaceChildren(); + const lines = credentialLines(); + lines.forEach((line, index) => { + for (const part of line) { + const span = document.createElement("span"); + span.className = part.cls; + span.textContent = part.text; + code.append(span); + } + if (index < lines.length - 1) code.append(document.createTextNode("\n")); + }); + + for (const tab of document.querySelectorAll(".credential-tab")) { + const active = tab.dataset.format === credentialFormat; + tab.classList.toggle("is-active", active); + tab.setAttribute("aria-selected", String(active)); + } +} + +function credentialPlainText() { + return credentialLines().map((line) => line.map((part) => part.text).join("")).join("\n"); +} + +function credentialStatus(message, tone) { + const status = $("#credential-status"); + status.textContent = message; + if (tone) status.dataset.tone = tone; else delete status.dataset.tone; +} + +function showCredential(credential) { + issuedCredential = credential; + credentialFormat = "json"; + $("#new-access-key").textContent = credential.access_key; + $("#new-secret-key").textContent = credential.secret_key; + $("#credential-label").value = credential.name || ""; + credentialStatus(""); + $("#credential-result").hidden = false; + renderCredentialConfig(); +} + +$("#credential-tabs").addEventListener("click", (event) => { + const tab = event.target.closest(".credential-tab"); + if (!tab) return; + credentialFormat = tab.dataset.format; + renderCredentialConfig(); +}); + +$("#key-form").addEventListener("submit", async (event) => { + event.preventDefault(); + const response = await fetch("/api/settings/keys", { + method: "POST", + headers: { "Content-Type": "application/json" }, + body: JSON.stringify({ name: $("#key-name").value }), + }); + if (!response.ok) { alert("The worker key could not be generated."); return; } + showCredential(await response.json()); + $("#key-form").reset(); + await loadKeys(); +}); + +$("#update-label").addEventListener("click", async () => { + if (!issuedCredential) return; + const name = $("#credential-label").value.trim(); + if (!name) { credentialStatus("Label cannot be empty", "error"); return; } + + const response = await fetch(`/api/settings/keys/${encodeURIComponent(issuedCredential.access_key)}`, { + method: "PATCH", + headers: { "Content-Type": "application/json" }, + body: JSON.stringify({ name }), + }); + if (!response.ok) { + const detail = await response.json().catch(() => ({})); + credentialStatus(detail.detail || "Could not update the label", "error"); + return; + } + const updated = await response.json(); + issuedCredential = { ...issuedCredential, name: updated.name }; + $("#credential-label").value = updated.name; + credentialStatus("Label updated"); + renderCredentialConfig(); + await loadKeys(); +}); + +$("#copy-credentials").addEventListener("click", async () => { + try { + await navigator.clipboard.writeText(credentialPlainText()); + credentialStatus("Config copied to clipboard"); + } catch { + credentialStatus("Clipboard unavailable — select the text instead", "error"); + } +}); + +$("#close-log").addEventListener("click", () => logDialog.close()); +$("#settings-button").addEventListener("click", () => { settingsDialog.showModal(); loadKeys(); }); +$("#close-settings").addEventListener("click", () => settingsDialog.close()); + +// Drop the secret from the DOM as soon as the dialog closes. +settingsDialog.addEventListener("close", () => { + issuedCredential = null; + $("#credential-result").hidden = true; + $("#new-access-key").textContent = ""; + $("#new-secret-key").textContent = ""; + $("#credential-code").replaceChildren(); + credentialStatus(""); +}); +$("#refresh-button").addEventListener("click", () => { loadJobs(); loadAgents(); }); + +function animateField() { + if (matchMedia("(prefers-reduced-motion: reduce)").matches) return; + const canvas = $("#field"); + const context = canvas.getContext("2d"); + let points = []; + function resize() { + const scale = Math.min(devicePixelRatio, 2); + canvas.width = canvas.clientWidth * scale; + canvas.height = canvas.clientHeight * scale; + context.setTransform(scale, 0, 0, scale, 0, 0); + points = Array.from({ length: 220 }, (_, index) => ({ + angle: Math.random() * Math.PI * 2, + radius: 45 + Math.random() * Math.min(canvas.clientWidth, canvas.clientHeight) * .38, + tilt: (Math.random() - .5) * 1.2, + size: .45 + Math.random() * 1.8, + speed: .00006 + Math.random() * .00013, + bright: index % 17 === 0, + })); + } + function draw(time) { + context.clearRect(0, 0, canvas.clientWidth, canvas.clientHeight); + const cx = canvas.clientWidth * .58, cy = canvas.clientHeight * .46; + for (const point of points) { + const angle = point.angle + time * point.speed; + const x = cx + Math.cos(angle) * point.radius; + const y = cy + Math.sin(angle) * point.radius * .44 + Math.sin(point.tilt + angle * 2) * 38; + const alpha = .1 + .55 * (Math.sin(angle) + 1) / 2; + context.beginPath(); context.arc(x, y, point.size, 0, Math.PI * 2); + context.fillStyle = point.bright ? `rgba(217,255,67,${alpha})` : `rgba(184,194,176,${alpha * .5})`; + context.fill(); + } + requestAnimationFrame(draw); + } + addEventListener("resize", resize); resize(); requestAnimationFrame(draw); +} + +loadHealth(); +loadJobs(); +loadAgents(); +setInterval(loadJobs, 3000); +setInterval(loadAgents, 5000); +setInterval(loadHealth, 15000); +animateField(); diff --git a/rust/static/index.html b/rust/static/index.html new file mode 100644 index 0000000..af54a68 --- /dev/null +++ b/rust/static/index.html @@ -0,0 +1,250 @@ + + + + + + + SplatLab — Video to spatial scene + + + + + +
+
+ + + SPLATLAB + +
+ + + GITHUB + + +
+ + Checking control plane +
+
+
+ +
+
+
01 Spatial reconstruction
+

A video goes in.
A place comes back.

+

+ Convert a slow, overlapping camera pass into a high-fidelity 3D Gaussian scene, + processed privately on your own GPU. +

+
+
3pipeline stages
+
6–12GB GPU memory
+
.PLYscene output
+
+
+ +
+
+
+
+ 01 / CAPTURE +

Start a reconstruction

+
+ SELF-HOSTED +
+ +
+ + +
+ + + +
+ +
+ Reconstruction profile + + +
+ + + + + + + + +
+
+ + +
+
+ +
+ SPLATLAB / ON-PREMISE PIPELINE + NERFSTUDIO · COLMAP · GSPLAT +
+
+ + +
+
PIPELINE OUTPUT

Scene log

+ +
+
Loading…
+
+ + +
+
CONTROL PLANE

Worker credentials

+ +
+
+

Generate credentials for a remote splat-agent. The secret is shown once and stored only as a salted hash.

+
+ + +
+ +
ISSUED KEYS
+

No worker keys generated.

+
+
+ + + + diff --git a/rust/static/logo.svg b/rust/static/logo.svg new file mode 100644 index 0000000..520a3d0 --- /dev/null +++ b/rust/static/logo.svg @@ -0,0 +1,18 @@ + + SplatLab + + + + + + + + + + + + + + + + diff --git a/rust/static/styles.css b/rust/static/styles.css new file mode 100644 index 0000000..618550a --- /dev/null +++ b/rust/static/styles.css @@ -0,0 +1,497 @@ +:root { + color-scheme: dark; + --ink: #eef0e8; + --muted: #8d938a; + --dim: #5d625d; + --line: rgba(238, 240, 232, 0.12); + --panel: rgba(19, 21, 20, 0.88); + --panel-solid: #131514; + --acid: #d9ff43; + --acid-soft: rgba(217, 255, 67, 0.12); + --orange: #ff774d; + --background: #090b0a; + --radius: 4px; +} + +* { box-sizing: border-box; } + +html { background: var(--background); scroll-behavior: smooth; } + +body { + margin: 0; + min-width: 320px; + color: var(--ink); + background: + radial-gradient(circle at 80% 8%, rgba(94, 113, 62, 0.16), transparent 30rem), + linear-gradient(180deg, #0a0c0b, #090b0a 58%, #0c0e0d); + font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; + min-height: 100vh; +} + +body::before { + content: ""; + position: fixed; + inset: 0; + pointer-events: none; + opacity: 0.22; + background-image: + linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), + linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px); + background-size: 64px 64px; + mask-image: linear-gradient(to bottom, black, transparent 75%); +} + +button, input, select { font: inherit; } +button, label, select { -webkit-tap-highlight-color: transparent; } +button { color: inherit; } + +#field { + position: absolute; + z-index: 0; + top: 0; + right: 0; + width: min(52vw, 880px); + height: 650px; + pointer-events: none; + opacity: 0.8; + mask-image: radial-gradient(ellipse at 62% 45%, black 5%, transparent 69%); +} + +.page-shell { position: relative; z-index: 1; max-width: 1460px; margin: auto; padding: 0 38px; } + +.topbar { + height: 92px; + display: flex; + align-items: center; + justify-content: space-between; + border-bottom: 1px solid var(--line); +} + +.top-actions, .heading-actions { display: flex; align-items: center; gap: 9px; } +.settings-button { + border: 1px solid var(--line); + background: transparent; + color: #8f958c; + padding: 9px 12px; + cursor: pointer; + font: 650 9px ui-monospace, monospace; + letter-spacing: .1em; + text-transform: uppercase; +} +.settings-button:hover { color: var(--acid); border-color: rgba(217,255,67,.4); } + +.brand { + color: var(--ink); + text-decoration: none; + display: flex; + align-items: center; + gap: 12px; + font-size: 15px; + font-weight: 850; + letter-spacing: 0.13em; +} + +.brand > span:last-child span { color: var(--acid); } + +.brand-mark { position: relative; display: grid; width: 27px; height: 27px; place-items: center; } +.brand-mark i { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 9px var(--acid); } +.brand-mark i:nth-child(1) { transform: translate(-8px,-5px); } +.brand-mark i:nth-child(2) { transform: translate(7px,-7px) scale(.7); } +.brand-mark i:nth-child(3) { transform: translate(5px,8px) scale(.85); } +.brand-mark i:nth-child(4) { transform: translate(-7px,7px) scale(.55); } + +/* Repository link: the same splat mark, in the same acid green. */ +.repo-link { + display: inline-flex; + align-items: center; + gap: 4px; + border: 1px solid var(--line); + padding: 9px 12px 9px 8px; + color: var(--acid); + text-decoration: none; + background: rgba(11, 13, 12, 0.72); + font: 650 9px ui-monospace, SFMono-Regular, Menlo, monospace; + letter-spacing: .1em; + text-transform: uppercase; + transition: border-color .18s ease, background-color .18s ease; +} +.repo-link:hover { border-color: rgba(217,255,67,.4); background: var(--acid-soft); } +.repo-link:focus-visible { outline: 2px solid var(--acid); outline-offset: 2px; } +.repo-link .brand-mark { width: 18px; height: 18px; transform: scale(.62); } + +.runtime-pill, .local-chip { + display: inline-flex; + align-items: center; + gap: 9px; + border: 1px solid var(--line); + padding: 9px 12px; + color: #aeb3ac; + background: rgba(11, 13, 12, 0.72); + font-family: ui-monospace, SFMono-Regular, Menlo, monospace; + font-size: 10px; + letter-spacing: .08em; + text-transform: uppercase; +} + +.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #d2a73f; box-shadow: 0 0 8px #d2a73f; } +.runtime-pill.ready .status-dot { background: var(--acid); box-shadow: 0 0 8px var(--acid); } +.runtime-pill.offline .status-dot { background: var(--orange); box-shadow: 0 0 8px var(--orange); } + +.hero { min-height: 470px; padding: 94px 0 70px; position: relative; } +.eyebrow, .section-number { + color: #777d75; + font: 700 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; + letter-spacing: .14em; +} +.eyebrow span { color: var(--acid); margin-right: 15px; } + +.hero h1 { + margin: 25px 0 22px; + font-size: clamp(48px, 6.3vw, 92px); + line-height: .96; + letter-spacing: -0.062em; + font-weight: 610; + max-width: 940px; +} + +.hero h1 em { color: var(--acid); font-style: normal; font-weight: 360; } +.hero > p { color: #92978f; max-width: 580px; margin: 0; font-size: 16px; line-height: 1.65; } + +.hero-stats { + position: absolute; + right: 0; + bottom: 76px; + display: flex; + border: 1px solid var(--line); + background: rgba(10, 12, 11, .65); + backdrop-filter: blur(12px); +} +.hero-stats div { padding: 18px 25px; min-width: 125px; border-right: 1px solid var(--line); } +.hero-stats div:last-child { border-right: 0; } +.hero-stats strong { display: block; font: 500 19px ui-monospace, monospace; color: var(--ink); } +.hero-stats span { display: block; margin-top: 6px; color: var(--dim); font-size: 9px; text-transform: uppercase; letter-spacing: .1em; } + +.workspace { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(370px, .7fr); gap: 18px; align-items: start; } +.panel { border: 1px solid var(--line); background: var(--panel); backdrop-filter: blur(18px); } +.create-panel { padding: 31px; } +.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 27px; } +.panel-heading h2 { font-size: 21px; margin: 8px 0 0; font-weight: 540; letter-spacing: -.025em; } +.panel-heading.compact { padding: 27px 27px 22px; margin: 0; border-bottom: 1px solid var(--line); } +.local-chip { color: var(--acid); border-color: rgba(217,255,67,.22); background: var(--acid-soft); } + +.drop-zone { + min-height: 247px; + border: 1px dashed #4a5048; + background: + linear-gradient(135deg, rgba(217,255,67,.035), transparent 40%), + rgba(255,255,255,.012); + cursor: pointer; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + transition: .2s ease; + position: relative; + overflow: hidden; +} +.drop-zone::after { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(255,255,255,.025); pointer-events: none; } +.drop-zone:hover, .drop-zone.dragging { border-color: var(--acid); background-color: rgba(217,255,67,.035); } +.drop-zone.has-file { border-style: solid; border-color: rgba(217,255,67,.45); } +.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; } +.drop-orbit { width: 62px; height: 62px; position: relative; display: grid; place-items: center; margin-bottom: 17px; } +.drop-orbit::before, .drop-orbit::after { content: ""; position: absolute; border: 1px solid #41463f; border-radius: 50%; inset: 8px; } +.drop-orbit::after { inset: 17px; border-color: #71786d; } +.drop-orbit i { width: 5px; height: 5px; position: absolute; border-radius: 50%; background: var(--acid); box-shadow: 0 0 6px var(--acid); } +.drop-orbit i:nth-child(1) { top: 7px; left: 20px; } +.drop-orbit i:nth-child(2) { right: 2px; top: 29px; transform: scale(.7); } +.drop-orbit i:nth-child(3) { left: 6px; bottom: 9px; transform: scale(.55); } +.drop-orbit b { position: relative; font-size: 19px; font-weight: 400; } +.drop-title { font-size: 16px; font-weight: 580; } +.drop-copy { color: var(--dim); font-size: 12px; margin-top: 7px; } +.browse-button { color: var(--acid); text-transform: uppercase; font: 700 9px ui-monospace, monospace; letter-spacing: .12em; border-bottom: 1px solid rgba(217,255,67,.45); padding-bottom: 3px; margin-top: 18px; } + +.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 20px; } +.field-grid.three-fields { grid-template-columns: 1.2fr 1fr .8fr; } +.field { display: grid; gap: 8px; color: #a6aaa3; font-size: 11px; } +.field input, .field select { + width: 100%; + border: 1px solid var(--line); + border-radius: 0; + outline: none; + background: #0e100f; + color: var(--ink); + padding: 13px 14px; + font-size: 13px; + transition: border .2s; +} +.field input:focus, .field select:focus { border-color: rgba(217,255,67,.55); } +.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),linear-gradient(135deg,var(--muted) 50%,transparent 50%); background-position: calc(100% - 17px) 18px,calc(100% - 12px) 18px; background-size:5px 5px; background-repeat:no-repeat; } + +.quality-fieldset { border: 0; padding: 0; margin: 22px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } +.quality-fieldset legend { color: #a6aaa3; font-size: 11px; margin-bottom: 9px; } +.quality-option input { position: absolute; opacity: 0; } +.quality-card { display: flex; justify-content: space-between; align-items: center; padding: 14px; border: 1px solid var(--line); background: #0e100f; cursor: pointer; transition: .2s; } +.quality-card strong, .quality-card small { display: block; } +.quality-card strong { font-size: 12px; font-weight: 600; } +.quality-card small { color: var(--dim); font-size: 10px; margin-top: 5px; } +.quality-card b { color: var(--dim); font: 500 10px ui-monospace, monospace; } +.quality-option input:checked + .quality-card { border-color: rgba(217,255,67,.55); background: var(--acid-soft); } +.quality-option input:checked + .quality-card b { color: var(--acid); } + +.range-field { display: block; margin-top: 22px; } +.range-field > span { display: flex; justify-content: space-between; font-size: 11px; color: #a6aaa3; } +.range-field output { color: var(--acid); font: 600 11px ui-monospace, monospace; } +.range-field input { width: 100%; accent-color: var(--acid); margin: 12px 0 4px; } +.range-field small { color: var(--dim); font-size: 10px; line-height: 1.5; } + +.confirm-field { display: flex; gap: 10px; align-items: flex-start; margin: 20px 0; color: #989d95; font-size: 11px; line-height: 1.5; cursor: pointer; } +.confirm-field input { position: absolute; opacity: 0; } +.checkmark { width: 15px; height: 15px; border: 1px solid #50554e; background: #0e100f; flex: 0 0 auto; position: relative; margin-top: 1px; } +.confirm-field input:checked + .checkmark { border-color: var(--acid); background: var(--acid); } +.confirm-field input:checked + .checkmark::after { content: "✓"; color: #11140b; font-size: 11px; position: absolute; left: 2px; top: -1px; font-weight: 900; } + +.primary-button { width: 100%; border: 0; background: var(--acid); color: #12150c; padding: 16px 18px; display: flex; justify-content: space-between; font-weight: 750; font-size: 12px; cursor: pointer; transition: .2s; } +.primary-button:hover { background: #e5ff78; transform: translateY(-1px); } +.primary-button:disabled { opacity: .35; cursor: not-allowed; transform: none; } +.primary-button b { font-size: 17px; line-height: 11px; } +.form-error { border-left: 2px solid var(--orange); background: rgba(255,119,77,.08); color: #ffb49d; padding: 11px 13px; font-size: 11px; margin: 0 0 15px; } +.upload-progress { margin-top: 13px; color: var(--muted); font-size: 10px; } +.upload-progress > div { height: 2px; background: #2b2e2a; margin-top: 7px; } +.upload-progress i { display: block; height: 100%; width: 0; background: var(--acid); box-shadow: 0 0 8px var(--acid); transition: width .15s; } + +.right-column { display: grid; gap: 18px; } +.queue-panel { min-height: 385px; } +.agent-count { color: #656b63; font: 650 8px ui-monospace, monospace; letter-spacing: .08em; } +.agent-list { display: flex; gap: 7px; overflow-x: auto; padding: 11px 25px; border-bottom: 1px solid var(--line); min-height: 43px; } +.agent-list > span { color: var(--dim); font: 550 9px ui-monospace, monospace; align-self: center; white-space: nowrap; } +.agent-chip { display: flex; gap: 7px; align-items: center; border: 1px solid var(--line); padding: 6px 8px; white-space: nowrap; } +.agent-chip i { width: 5px; height: 5px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 6px var(--acid); } +.agent-chip.offline i { background: #555a54; box-shadow: none; } +.agent-chip b { font: 600 9px ui-monospace, monospace; } +.agent-chip small { color: var(--dim); font: 500 8px ui-monospace, monospace; } +.icon-button { width: 34px; height: 34px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; font-size: 18px; } +.icon-button:hover { color: var(--acid); border-color: rgba(217,255,67,.4); } +.job-list { max-height: 520px; overflow-y: auto; } +.empty-state { text-align: center; min-height: 270px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--dim); } +.empty-glyph { color: #5d635a; font-size: 31px; margin-bottom: 13px; } +.empty-state strong { color: #a7aba4; font-size: 12px; } +.empty-state p { font-size: 10px; margin: 7px 0 0; } + +.job-card { padding: 20px 25px; border-bottom: 1px solid var(--line); } +.job-card:last-child { border-bottom: 0; } +.job-top, .job-meta, .job-actions { display: flex; justify-content: space-between; gap: 12px; align-items: center; } +.job-top strong { font-size: 13px; font-weight: 580; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } +.job-status { color: var(--acid); font: 650 9px ui-monospace, monospace; text-transform: uppercase; letter-spacing: .08em; flex: 0 0 auto; } +.job-card.failed .job-status, .job-card.cancelled .job-status { color: var(--orange); } +.job-meta { color: var(--dim); font: 500 9px ui-monospace, monospace; margin: 10px 0 12px; } +.progress-track { height: 2px; background: #2b2e2a; overflow: hidden; } +.progress-track i { display: block; height: 100%; background: var(--acid); box-shadow: 0 0 7px rgba(217,255,67,.6); transition: width .5s; } +.job-card.failed .progress-track i, .job-card.cancelled .progress-track i { background: var(--orange); } +.job-stage { color: #7f847c; font-size: 10px; margin-top: 9px; min-height: 15px; } +.job-error { color: #d99580; font-size: 10px; line-height: 1.45; margin: 9px 0 0; } +.job-actions { justify-content: flex-start; margin-top: 14px; } +.job-actions button, .job-actions a { border: 1px solid var(--line); background: transparent; color: #9ea39a; padding: 7px 9px; text-decoration: none; text-transform: uppercase; font: 650 8px ui-monospace, monospace; letter-spacing: .08em; cursor: pointer; } +.job-actions .result-action { color: #15170d; background: var(--acid); border-color: var(--acid); } +.job-actions button:hover, .job-actions a:hover { border-color: rgba(217,255,67,.45); color: var(--acid); } +.job-actions .result-action:hover { color: #15170d; } + +.capture-guide { border: 1px solid var(--line); padding: 27px; background: rgba(12,14,13,.62); } +.capture-guide h3 { font-size: 19px; font-weight: 500; margin: 11px 0 24px; letter-spacing: -.02em; } +.capture-guide ol { list-style: none; padding: 0; margin: 0; } +.capture-guide li { display: grid; grid-template-columns: 34px 1fr; gap: 13px; border-top: 1px solid var(--line); padding: 15px 0; } +.capture-guide li > span { color: var(--acid); font: 600 9px ui-monospace, monospace; margin-top: 3px; } +.capture-guide p { margin: 0; color: var(--dim); font-size: 10px; line-height: 1.5; } +.capture-guide p strong { color: #afb3ac; display: block; font-size: 11px; margin-bottom: 3px; } + +footer { display: flex; justify-content: space-between; color: #4e534d; font: 600 9px ui-monospace, monospace; letter-spacing: .1em; padding: 34px 0 50px; } + +dialog { width: min(850px, calc(100vw - 32px)); padding: 0; border: 1px solid #3d423c; background: #0d0f0e; color: var(--ink); box-shadow: 0 25px 100px #000; } +dialog::backdrop { background: rgba(3,5,4,.82); backdrop-filter: blur(6px); } +.dialog-heading { display: flex; justify-content: space-between; align-items: center; padding: 20px 22px; border-bottom: 1px solid var(--line); } +.dialog-heading h2 { font-size: 16px; margin: 5px 0 0; } +dialog pre { margin: 0; padding: 22px; max-height: 65vh; overflow: auto; color: #aeb5aa; font: 10px/1.65 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; } +.settings-dialog { max-width: 680px; } +.settings-content { padding: 24px; } +.settings-intro { margin: 0 0 20px; color: var(--muted); font-size: 12px; line-height: 1.6; } +.settings-intro code { color: var(--acid); } +.key-form { display: grid; grid-template-columns: 1fr 190px; gap: 10px; align-items: end; } +.key-form .primary-button { height: 43px; } +/* ---- Issued credential panel ------------------------------------------- */ + +.credential-panel { + border: 1px solid rgba(217,255,67,.35); + background: var(--acid-soft); + padding: 24px 26px 20px; + margin-top: 18px; +} + +.credential-shield { display: flex; justify-content: center; color: var(--acid); } +.credential-shield svg { filter: drop-shadow(0 0 10px rgba(217,255,67,.35)); } + +.credential-title { + margin: 13px 0 0; + text-align: center; + color: var(--acid); + font-size: 13px; + font-weight: 800; + letter-spacing: .16em; + text-transform: uppercase; +} + +.credential-warning { + margin: 8px 0 20px; + text-align: center; + color: var(--muted); + font: 9px ui-monospace, SFMono-Regular, Menlo, monospace; + letter-spacing: .08em; + text-transform: uppercase; +} + +.credential-keys { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); } +.credential-row { display: flex; gap: 14px; padding: 11px 0; font-size: 11px; line-height: 1.5; } +.credential-row + .credential-row { border-top: 1px solid rgba(238,240,232,.06); } +.credential-key-label { width: 92px; flex-shrink: 0; color: var(--muted); font-size: 10px; } +.credential-key-value { + color: var(--ink); + word-break: break-all; + user-select: all; + font: 10px ui-monospace, SFMono-Regular, Menlo, monospace; +} + +.credential-tabs { + display: flex; + justify-content: center; + gap: 26px; + margin-top: 22px; + border-bottom: 1px solid var(--line); +} +.credential-tab { + background: none; + border: none; + color: var(--dim); + padding: 0 0 9px; + cursor: pointer; + position: relative; + font: 700 9px ui-monospace, SFMono-Regular, Menlo, monospace; + letter-spacing: .1em; + text-transform: uppercase; +} +.credential-tab:hover { color: var(--muted); } +.credential-tab.is-active { color: var(--acid); } +.credential-tab.is-active::after { + content: ""; + position: absolute; + left: 0; right: 0; bottom: -1px; + height: 2px; + background: var(--acid); +} +.credential-tab:focus-visible { outline: 2px solid var(--acid); outline-offset: 3px; } + +.credential-instruction { + margin: 15px 0 11px; + color: var(--muted); + font-size: 10px; + line-height: 1.5; +} + +.credential-code { + margin: 0; + background: #0b0d0c; + border: 1px solid var(--line); + padding: 14px 16px; + overflow-x: auto; + color: var(--ink); + font: 10px/1.65 ui-monospace, SFMono-Regular, Menlo, monospace; + white-space: pre; + tab-size: 2; +} +.credential-code:focus-visible { outline: 1px solid var(--acid); } +.code-kw { color: var(--acid); } +.code-key { color: var(--acid); } +.code-prop { color: var(--ink); } +.code-val { color: #9da5b4; } +.code-comment { color: var(--dim); } +.code-punct { color: #6f746d; } + +.credential-actions { display: flex; gap: 9px; align-items: center; margin-top: 16px; flex-wrap: wrap; } +.credential-label-input { + flex: 1; + min-width: 150px; + background: #0b0d0c; + border: 1px solid var(--line); + color: var(--ink); + padding: 9px 12px; + font: 10px ui-monospace, SFMono-Regular, Menlo, monospace; + outline: none; +} +.credential-label-input::placeholder { color: var(--dim); } +.credential-label-input:focus { border-color: var(--acid); } + +.credential-ghost-button, .credential-copy-button { + border: 1px solid var(--acid); + background: transparent; + color: var(--acid); + padding: 9px 13px; + cursor: pointer; + font: 650 9px ui-monospace, SFMono-Regular, Menlo, monospace; + letter-spacing: .08em; + text-transform: uppercase; + transition: background-color .18s ease, color .18s ease; +} +.credential-ghost-button { border-color: var(--line); color: var(--muted); } +.credential-ghost-button:hover { border-color: rgba(217,255,67,.4); color: var(--acid); } +.credential-copy-button:hover { background: var(--acid); color: var(--background); } + +.credential-status { + margin: 10px 0 0; + min-height: 12px; + color: var(--acid); + font: 9px ui-monospace, SFMono-Regular, Menlo, monospace; + letter-spacing: .08em; + text-transform: uppercase; +} +.credential-status[data-tone="error"] { color: var(--orange); } +.key-heading { margin-top: 27px; padding-bottom: 9px; border-bottom: 1px solid var(--line); } +.key-list > p { color: var(--dim); font-size: 10px; } +.key-row { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); } +.key-row strong, .key-row code, .key-row small { display: block; } +.key-row strong { font-size: 11px; } +.key-row code { color: #9da399; font: 9px ui-monospace, monospace; margin-top: 5px; } +.key-row small { color: var(--dim); font-size: 8px; margin-top: 5px; } +.key-row button { border: 1px solid rgba(255,119,77,.25); background: transparent; color: #d78a73; padding: 7px 9px; cursor: pointer; font: 650 8px ui-monospace, monospace; text-transform: uppercase; } + +@media (max-width: 980px) { + .hero-stats { position: static; width: max-content; margin-top: 38px; } + .hero { padding-top: 70px; } + .workspace { grid-template-columns: 1fr; } + .right-column { grid-template-columns: 1fr 1fr; } + #field { width: 75vw; opacity: .45; } +} + +@media (max-width: 680px) { + .page-shell { padding: 0 18px; } + .topbar { height: 72px; } + .runtime-pill { max-width: 170px; overflow: hidden; white-space: nowrap; } + .hero { min-height: auto; padding: 58px 0 48px; } + .hero h1 { font-size: clamp(43px, 14vw, 62px); } + .hero-stats { width: 100%; } + .hero-stats div { padding: 14px 11px; min-width: 0; flex: 1; } + .create-panel { padding: 20px; } + .drop-zone { min-height: 210px; } + .field-grid, .quality-fieldset, .right-column { grid-template-columns: 1fr; } + .field-grid.three-fields, .key-form { grid-template-columns: 1fr; } + .top-actions { gap: 5px; } + .repo-link span:last-child { display: none; } + .repo-link { padding: 8px; } + .settings-button { padding: 8px; } + .credential-panel { padding: 18px 16px 16px; } + .credential-row { flex-direction: column; gap: 4px; } + .credential-key-label { width: auto; } + .credential-tabs { gap: 16px; } + footer { gap: 20px; flex-direction: column; } +} + +@media (prefers-reduced-motion: reduce) { + *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } + #field { display: none; } +} diff --git a/rust/tests/api.rs b/rust/tests/api.rs new file mode 100644 index 0000000..aefcd64 --- /dev/null +++ b/rust/tests/api.rs @@ -0,0 +1,481 @@ +mod common; + +use common::{video_form, TestApp}; +use reqwest::multipart::{Form, Part}; +use reqwest::StatusCode; +use serde_json::{json, Value}; + +// --------------------------------------------------------------------------- + +#[tokio::test] +async fn health_reports_remote_worker_mode() { + let app = TestApp::new().await; + let response = app.client.get(app.url("/api/health")).send().await.unwrap(); + assert_eq!(response.status(), StatusCode::OK); + let payload: Value = response.json().await.unwrap(); + assert_eq!(payload["status"], "ok"); + assert_eq!(payload["worker_mode"], "remote"); +} + +#[tokio::test] +async fn control_plane_accepts_job_without_local_gpu() { + let app = TestApp::new().await; + let health: Value = app + .client + .get(app.url("/api/health")) + .send() + .await + .unwrap() + .json() + .await + .unwrap(); + assert_eq!(health["worker_mode"], "remote"); + + let response = app + .client + .post(app.url("/api/jobs")) + .multipart(video_form( + "Remote queue", + "gpu-west", + "capture.mp4", + b"video", + )) + .send() + .await + .unwrap(); + assert_eq!(response.status(), StatusCode::ACCEPTED); + let job: Value = response.json().await.unwrap(); + assert_eq!(job["status"], "queued"); + assert_eq!(job["queue"], "gpu-west"); +} + +#[tokio::test] +async fn static_confirmation_is_required() { + let app = TestApp::new().await; + let form = Form::new() + .text("name", "Unconfirmed") + .text("static_scene_confirmed", "false") + .part( + "video", + Part::bytes(&b"video"[..]) + .file_name("capture.mp4") + .mime_str("video/mp4") + .unwrap(), + ); + let response = app + .client + .post(app.url("/api/jobs")) + .multipart(form) + .send() + .await + .unwrap(); + assert_eq!(response.status(), StatusCode::UNPROCESSABLE_ENTITY); + let payload: Value = response.json().await.unwrap(); + assert!(payload["detail"] + .as_str() + .unwrap() + .contains("stationary scene")); +} + +#[tokio::test] +async fn rejects_unsupported_extension_and_oversize_upload() { + let app = TestApp::with(|settings| settings.with_max_upload_bytes(4)).await; + + let response = app + .client + .post(app.url("/api/jobs")) + .multipart(video_form("Text file", "default", "notes.txt", b"nope")) + .send() + .await + .unwrap(); + assert_eq!(response.status(), StatusCode::UNSUPPORTED_MEDIA_TYPE); + + let response = app + .client + .post(app.url("/api/jobs")) + .multipart(video_form("Too big", "default", "capture.mp4", b"12345")) + .send() + .await + .unwrap(); + assert_eq!(response.status(), StatusCode::PAYLOAD_TOO_LARGE); + + // Nothing may be left behind after a rejected intake. + let entries: Vec<_> = std::fs::read_dir(app.settings.jobs_dir()) + .unwrap() + .collect(); + assert!(entries.is_empty()); +} + +#[tokio::test] +async fn cancel_queued_job() { + let app = TestApp::new().await; + let created: Value = app + .client + .post(app.url("/api/jobs")) + .multipart(video_form("Cancel me", "default", "capture.mov", b"video")) + .send() + .await + .unwrap() + .json() + .await + .unwrap(); + + let response = app + .client + .post(app.url(&format!( + "/api/jobs/{}/cancel", + created["id"].as_str().unwrap() + ))) + .send() + .await + .unwrap(); + assert_eq!(response.status(), StatusCode::OK); + let job: Value = response.json().await.unwrap(); + assert_eq!(job["status"], "cancelled"); +} + +#[tokio::test] +async fn worker_keys_are_hashed_authenticated_and_revocable() { + let app = TestApp::new().await; + let (credential, headers) = app.credentials("Test worker").await; + + let listing: Value = app + .client + .get(app.url("/api/settings/keys")) + .send() + .await + .unwrap() + .json() + .await + .unwrap(); + let key = &listing["keys"][0]; + assert_eq!(key["access_key"], credential["access_key"]); + assert!(key.get("secret_key").is_none()); + assert!(key.get("secret_hash").is_none()); + + let response = app + .authorized(app.client.get(app.url("/api/agents/auth-check")), &headers) + .send() + .await + .unwrap(); + assert_eq!(response.status(), StatusCode::OK); + + let response = app + .client + .get(app.url("/api/agents/auth-check")) + .header( + "X-Splat-Access-Key", + credential["access_key"].as_str().unwrap(), + ) + .header("X-Splat-Secret-Key", "wrong") + .send() + .await + .unwrap(); + assert_eq!(response.status(), StatusCode::UNAUTHORIZED); + + let response = app + .client + .delete(app.url(&format!( + "/api/settings/keys/{}", + credential["access_key"].as_str().unwrap() + ))) + .send() + .await + .unwrap(); + assert_eq!(response.status(), StatusCode::NO_CONTENT); + + let response = app + .authorized(app.client.get(app.url("/api/agents/auth-check")), &headers) + .send() + .await + .unwrap(); + assert_eq!(response.status(), StatusCode::UNAUTHORIZED); +} + +#[tokio::test] +async fn remote_agent_routes_by_queue_and_completes_job() { + let app = TestApp::with(|settings| settings.with_agent_lease_seconds(30)).await; + let (_credential, headers) = app.credentials("West GPU").await; + let agent_id = "a".repeat(32); + + let form = Form::new() + .text("name", "Remote scene") + .text("queue", "gpu-west") + .text("quality", "high") + .text("target_frames", "240") + .text("static_scene_confirmed", "true") + .part( + "video", + Part::bytes(&b"remote-video"[..]) + .file_name("capture.mp4") + .mime_str("video/mp4") + .unwrap(), + ); + let created: Value = app + .client + .post(app.url("/api/jobs")) + .multipart(form) + .send() + .await + .unwrap() + .json() + .await + .unwrap(); + + // Registered on the wrong queue: nothing to claim. + let response = app + .authorized( + app.client.put(app.url(&format!("/api/agents/{agent_id}"))), + &headers, + ) + .json(&json!({ "name": "RTX West", "queue": "another-queue" })) + .send() + .await + .unwrap(); + assert_eq!(response.status(), StatusCode::OK); + + let claim: Value = app + .authorized( + app.client + .post(app.url(&format!("/api/agents/{agent_id}/claim"))), + &headers, + ) + .send() + .await + .unwrap() + .json() + .await + .unwrap(); + assert!(claim["job"].is_null()); + + // Re-register on the matching queue. + app.authorized( + app.client.put(app.url(&format!("/api/agents/{agent_id}"))), + &headers, + ) + .json(&json!({ "name": "RTX West", "queue": "gpu-west" })) + .send() + .await + .unwrap(); + + let claim: Value = app + .authorized( + app.client + .post(app.url(&format!("/api/agents/{agent_id}/claim"))), + &headers, + ) + .send() + .await + .unwrap() + .json() + .await + .unwrap(); + let claimed = &claim["job"]; + assert_eq!(claimed["id"], created["id"]); + assert_eq!(claimed["assigned_agent_name"], "RTX West"); + assert_eq!(claimed["quality"], "high"); + assert_eq!(claimed["target_frames"], 240); + + let input = app + .authorized( + app.client + .get(app.url(claimed["input_url"].as_str().unwrap())), + &headers, + ) + .send() + .await + .unwrap() + .bytes() + .await + .unwrap(); + assert_eq!(&input[..], b"remote-video"); + + let job_id = created["id"].as_str().unwrap(); + let status: Value = app + .authorized( + app.client + .post(app.url(&format!("/api/agents/{agent_id}/jobs/{job_id}/status"))), + &headers, + ) + .json(&json!({ + "status": "training", + "stage": "Training Gaussians", + "progress": 72, + "width": 1920, + "height": 1080, + "fps": 30.0, + "duration_seconds": 12.5 + })) + .send() + .await + .unwrap() + .json() + .await + .unwrap(); + assert_eq!(status["job"]["progress"], 72); + + let response = app + .authorized( + app.client + .post(app.url(&format!("/api/agents/{agent_id}/jobs/{job_id}/logs"))), + &headers, + ) + .json(&json!({ "content": "remote training output" })) + .send() + .await + .unwrap(); + assert_eq!(response.status(), StatusCode::NO_CONTENT); + + let result_form = Form::new().part( + "result_file", + Part::bytes(&b"ply\nremote-scene"[..]) + .file_name("scene.ply") + .mime_str("application/octet-stream") + .unwrap(), + ); + let finished: Value = app + .authorized( + app.client + .post(app.url(&format!("/api/agents/{agent_id}/jobs/{job_id}/result"))), + &headers, + ) + .multipart(result_form) + .send() + .await + .unwrap() + .json() + .await + .unwrap(); + assert_eq!(finished["job"]["status"], "completed"); + + let download = app + .client + .get(app.url(finished["job"]["result_url"].as_str().unwrap())) + .send() + .await + .unwrap() + .bytes() + .await + .unwrap(); + assert_eq!(&download[..], b"ply\nremote-scene"); + + let logs = app + .client + .get(app.url(created["log_url"].as_str().unwrap())) + .send() + .await + .unwrap() + .text() + .await + .unwrap(); + assert!(logs.contains("remote training output")); + + let agents: Value = app + .client + .get(app.url("/api/agents")) + .send() + .await + .unwrap() + .json() + .await + .unwrap(); + let agent = &agents["agents"][0]; + assert_eq!(agent["status"], "idle"); + assert_eq!(agent["queue"], "gpu-west"); + assert!(agent.get("access_key").is_none()); +} + +#[tokio::test] +async fn remote_agent_observes_cancellation_and_key_ownership() { + let app = TestApp::with(|settings| settings.with_agent_lease_seconds(30)).await; + let (_first, headers) = app.credentials("Primary").await; + let (_second, other_headers) = app.credentials("Secondary").await; + let agent_id = "b".repeat(32); + + let created: Value = app + .client + .post(app.url("/api/jobs")) + .multipart(video_form( + "Cancel remote", + "gpu-east", + "capture.mkv", + b"video", + )) + .send() + .await + .unwrap() + .json() + .await + .unwrap(); + let job_id = created["id"].as_str().unwrap(); + + app.authorized( + app.client.put(app.url(&format!("/api/agents/{agent_id}"))), + &headers, + ) + .json(&json!({ "name": "RTX East", "queue": "gpu-east" })) + .send() + .await + .unwrap(); + + let claim: Value = app + .authorized( + app.client + .post(app.url(&format!("/api/agents/{agent_id}/claim"))), + &headers, + ) + .send() + .await + .unwrap() + .json() + .await + .unwrap(); + assert_eq!(claim["job"]["id"], created["id"]); + + // A different credential must not observe this agent at all. + let response = app + .authorized( + app.client + .get(app.url(&format!("/api/agents/{agent_id}/jobs/{job_id}/control"))), + &other_headers, + ) + .send() + .await + .unwrap(); + assert_eq!(response.status(), StatusCode::NOT_FOUND); + + app.client + .post(app.url(&format!("/api/jobs/{job_id}/cancel"))) + .send() + .await + .unwrap(); + + let control: Value = app + .authorized( + app.client + .get(app.url(&format!("/api/agents/{agent_id}/jobs/{job_id}/control"))), + &headers, + ) + .send() + .await + .unwrap() + .json() + .await + .unwrap(); + assert_eq!(control["cancel_requested"], true); + + let cancelled: Value = app + .authorized( + app.client + .post(app.url(&format!("/api/agents/{agent_id}/jobs/{job_id}/status"))), + &headers, + ) + .json(&json!({ "status": "cancelled", "stage": "Cancelled", "progress": 0 })) + .send() + .await + .unwrap() + .json() + .await + .unwrap(); + assert_eq!(cancelled["job"]["status"], "cancelled"); +} diff --git a/rust/tests/common/mod.rs b/rust/tests/common/mod.rs new file mode 100644 index 0000000..e4e69c6 --- /dev/null +++ b/rust/tests/common/mod.rs @@ -0,0 +1,138 @@ +#![allow(dead_code)] + +use std::net::SocketAddr; + +use reqwest::multipart::{Form, Part}; +use reqwest::{Client, StatusCode}; +use serde_json::{json, Value}; +use splatlab::{build_router, AppState, Settings}; +use tempfile::TempDir; + +pub struct TestApp { + pub address: SocketAddr, + pub client: Client, + pub settings: Settings, + _temp: TempDir, +} + +impl TestApp { + pub async fn with(settings_for: impl FnOnce(Settings) -> Settings) -> Self { + let temp = TempDir::new().expect("temp dir"); + let settings = settings_for(Settings::new(temp.path())); + let state = AppState::new(settings.clone()).expect("state"); + let router = build_router(state); + + let listener = tokio::net::TcpListener::bind("127.0.0.1:0").await.unwrap(); + let address = listener.local_addr().unwrap(); + tokio::spawn(async move { + let _ = axum::serve(listener, router).await; + }); + + Self { + address, + client: Client::new(), + settings, + _temp: temp, + } + } + + pub async fn new() -> Self { + Self::with(|settings| settings).await + } + + pub fn url(&self, path: &str) -> String { + format!("http://{}{}", self.address, path) + } + + pub async fn credentials(&self, name: &str) -> (Value, Vec<(String, String)>) { + let response = self + .client + .post(self.url("/api/settings/keys")) + .json(&json!({ "name": name })) + .send() + .await + .unwrap(); + assert_eq!(response.status(), StatusCode::CREATED); + let credential: Value = response.json().await.unwrap(); + let headers = vec![ + ( + "X-Splat-Access-Key".to_string(), + credential["access_key"].as_str().unwrap().to_string(), + ), + ( + "X-Splat-Secret-Key".to_string(), + credential["secret_key"].as_str().unwrap().to_string(), + ), + ]; + (credential, headers) + } + + pub fn authorized( + &self, + builder: reqwest::RequestBuilder, + headers: &[(String, String)], + ) -> reqwest::RequestBuilder { + headers + .iter() + .fold(builder, |builder, (key, value)| builder.header(key, value)) + } + + /// Submit a valid job and return its public representation. + pub async fn submit_job(&self, name: &str, queue: &str) -> Value { + let response = self + .client + .post(self.url("/api/jobs")) + .multipart(video_form(name, queue, "capture.mp4", b"video")) + .send() + .await + .unwrap(); + assert_eq!(response.status(), StatusCode::ACCEPTED); + response.json().await.unwrap() + } + + pub async fn register_agent( + &self, + agent_id: &str, + name: &str, + queue: &str, + headers: &[(String, String)], + ) -> reqwest::Response { + self.authorized( + self.client + .put(self.url(&format!("/api/agents/{agent_id}"))), + headers, + ) + .json(&json!({ "name": name, "queue": queue })) + .send() + .await + .unwrap() + } + + pub async fn claim(&self, agent_id: &str, headers: &[(String, String)]) -> Value { + self.authorized( + self.client + .post(self.url(&format!("/api/agents/{agent_id}/claim"))), + headers, + ) + .send() + .await + .unwrap() + .json() + .await + .unwrap() + } +} + +pub fn video_form(name: &str, queue: &str, filename: &str, body: &'static [u8]) -> Form { + Form::new() + .text("name", name.to_string()) + .text("queue", queue.to_string()) + .text("static_scene_confirmed", "true") + .part( + "video", + Part::bytes(body) + .file_name(filename.to_string()) + .mime_str("video/mp4") + .unwrap(), + ) +} diff --git a/rust/tests/parity.rs b/rust/tests/parity.rs new file mode 100644 index 0000000..adf0d05 --- /dev/null +++ b/rust/tests/parity.rs @@ -0,0 +1,639 @@ +//! Coverage for behaviour the original Python test-suite never exercised. + +mod common; + +use common::{video_form, TestApp}; +use reqwest::multipart::{Form, Part}; +use reqwest::StatusCode; +use serde_json::{json, Value}; + +fn form_without_video(fields: &[(&str, &str)]) -> Form { + fields.iter().fold(Form::new(), |form, (key, value)| { + form.text(key.to_string(), value.to_string()) + }) +} + +fn video_part(filename: &str, body: &'static [u8]) -> Part { + Part::bytes(body) + .file_name(filename.to_string()) + .mime_str("video/mp4") + .unwrap() +} + +#[tokio::test] +async fn rejects_empty_upload() { + let app = TestApp::new().await; + let form = form_without_video(&[("name", "Empty"), ("static_scene_confirmed", "true")]) + .part("video", video_part("capture.mp4", b"")); + let response = app + .client + .post(app.url("/api/jobs")) + .multipart(form) + .send() + .await + .unwrap(); + assert_eq!(response.status(), StatusCode::BAD_REQUEST); + let payload: Value = response.json().await.unwrap(); + assert!(payload["detail"].as_str().unwrap().contains("empty")); +} + +#[tokio::test] +async fn enforces_target_frame_bounds() { + let app = TestApp::new().await; + for frames in ["12", "1201"] { + let form = form_without_video(&[ + ("name", "Bounds"), + ("static_scene_confirmed", "true"), + ("target_frames", frames), + ]) + .part("video", video_part("capture.mp4", b"video")); + let response = app + .client + .post(app.url("/api/jobs")) + .multipart(form) + .send() + .await + .unwrap(); + assert_eq!( + response.status(), + StatusCode::UNPROCESSABLE_ENTITY, + "target_frames={frames} should be rejected" + ); + } + + // The upper bound of 1200 is inclusive, even though the SPA slider stops at 600. + let form = form_without_video(&[ + ("name", "Bounds"), + ("static_scene_confirmed", "true"), + ("target_frames", "1200"), + ]) + .part("video", video_part("capture.mp4", b"video")); + let response = app + .client + .post(app.url("/api/jobs")) + .multipart(form) + .send() + .await + .unwrap(); + assert_eq!(response.status(), StatusCode::ACCEPTED); +} + +#[tokio::test] +async fn rejects_invalid_queue_and_blank_name() { + let app = TestApp::new().await; + + let response = app + .client + .post(app.url("/api/jobs")) + .multipart(video_form( + "Bad queue", + "not a queue!", + "capture.mp4", + b"video", + )) + .send() + .await + .unwrap(); + assert_eq!(response.status(), StatusCode::UNPROCESSABLE_ENTITY); + + // The name is stripped of unsafe characters; if nothing survives it is rejected. + let response = app + .client + .post(app.url("/api/jobs")) + .multipart(video_form("///", "default", "capture.mp4", b"video")) + .send() + .await + .unwrap(); + assert_eq!(response.status(), StatusCode::UNPROCESSABLE_ENTITY); + let payload: Value = response.json().await.unwrap(); + assert!(payload["detail"].as_str().unwrap().contains("Scene name")); +} + +#[tokio::test] +async fn queue_names_are_normalized_to_lowercase() { + let app = TestApp::new().await; + let job = app.submit_job("Mixed case", "GPU-West").await; + assert_eq!(job["queue"], "gpu-west"); +} + +#[tokio::test] +async fn result_download_conflicts_until_the_scene_is_ready() { + let app = TestApp::new().await; + let job = app.submit_job("Not ready", "default").await; + let response = app + .client + .get(app.url(&format!("/api/jobs/{}/result", job["id"].as_str().unwrap()))) + .send() + .await + .unwrap(); + assert_eq!(response.status(), StatusCode::CONFLICT); + let payload: Value = response.json().await.unwrap(); + assert_eq!(payload["detail"], "Scene is not ready"); +} + +#[tokio::test] +async fn deleting_an_active_job_conflicts_but_terminal_jobs_are_removed() { + let app = TestApp::new().await; + let job = app.submit_job("Delete me", "default").await; + let job_id = job["id"].as_str().unwrap().to_string(); + + let response = app + .client + .delete(app.url(&format!("/api/jobs/{job_id}"))) + .send() + .await + .unwrap(); + assert_eq!(response.status(), StatusCode::CONFLICT); + + app.client + .post(app.url(&format!("/api/jobs/{job_id}/cancel"))) + .send() + .await + .unwrap(); + + let response = app + .client + .delete(app.url(&format!("/api/jobs/{job_id}"))) + .send() + .await + .unwrap(); + assert_eq!(response.status(), StatusCode::NO_CONTENT); + + let response = app + .client + .get(app.url(&format!("/api/jobs/{job_id}"))) + .send() + .await + .unwrap(); + assert_eq!(response.status(), StatusCode::NOT_FOUND); + + // The on-disk payload is reclaimed asynchronously. + for _ in 0..50 { + if !app.settings.jobs_dir().join(&job_id).exists() { + break; + } + tokio::time::sleep(std::time::Duration::from_millis(20)).await; + } + assert!(!app.settings.jobs_dir().join(&job_id).exists()); +} + +#[tokio::test] +async fn logs_fall_back_to_a_placeholder_and_404_for_unknown_jobs() { + let app = TestApp::new().await; + let job = app.submit_job("No logs", "default").await; + + let body = app + .client + .get(app.url(job["log_url"].as_str().unwrap())) + .send() + .await + .unwrap() + .text() + .await + .unwrap(); + assert_eq!(body, "No pipeline output yet."); + + let response = app + .client + .get(app.url("/api/jobs/missing/logs")) + .send() + .await + .unwrap(); + assert_eq!(response.status(), StatusCode::NOT_FOUND); +} + +#[tokio::test] +async fn malformed_agent_ids_are_not_found() { + let app = TestApp::new().await; + let (_credential, headers) = app.credentials("Probe").await; + + let response = app + .register_agent("NOT-HEX", "Agent", "default", &headers) + .await; + assert_eq!(response.status(), StatusCode::NOT_FOUND); +} + +#[tokio::test] +async fn agent_ids_cannot_be_hijacked_by_another_credential() { + let app = TestApp::new().await; + let (_first, headers) = app.credentials("Owner").await; + let (_second, other_headers) = app.credentials("Intruder").await; + let agent_id = "c".repeat(32); + + let response = app + .register_agent(&agent_id, "Mine", "default", &headers) + .await; + assert_eq!(response.status(), StatusCode::OK); + + let response = app + .register_agent(&agent_id, "Yours", "default", &other_headers) + .await; + assert_eq!(response.status(), StatusCode::CONFLICT); + let payload: Value = response.json().await.unwrap(); + assert_eq!(payload["detail"], "Agent ID belongs to another access key"); +} + +#[tokio::test] +async fn heartbeat_and_disconnect_track_agent_presence() { + let app = TestApp::new().await; + let (_credential, headers) = app.credentials("Presence").await; + let agent_id = "d".repeat(32); + app.register_agent(&agent_id, "Idle box", "default", &headers) + .await; + + let beat: Value = app + .authorized( + app.client + .post(app.url(&format!("/api/agents/{agent_id}/heartbeat"))), + &headers, + ) + .send() + .await + .unwrap() + .json() + .await + .unwrap(); + assert_eq!(beat["agent"]["status"], "idle"); + assert!(beat["agent"].get("access_key").is_none()); + + let gone: Value = app + .authorized( + app.client + .post(app.url(&format!("/api/agents/{agent_id}/disconnect"))), + &headers, + ) + .send() + .await + .unwrap() + .json() + .await + .unwrap(); + assert_eq!(gone["agent"]["status"], "offline"); + + let health: Value = app + .client + .get(app.url("/api/health")) + .send() + .await + .unwrap() + .json() + .await + .unwrap(); + assert_eq!(health["agents"]["total"], 1); + assert_eq!(health["agents"]["online"], 0); +} + +#[tokio::test] +async fn agent_status_updates_cannot_complete_a_job() { + let app = TestApp::new().await; + let (_credential, headers) = app.credentials("Status").await; + let agent_id = "e".repeat(32); + let job = app.submit_job("Status job", "default").await; + let job_id = job["id"].as_str().unwrap().to_string(); + app.register_agent(&agent_id, "Worker", "default", &headers) + .await; + app.claim(&agent_id, &headers).await; + + let response = app + .authorized( + app.client + .post(app.url(&format!("/api/agents/{agent_id}/jobs/{job_id}/status"))), + &headers, + ) + .json(&json!({ "status": "completed", "stage": "Done", "progress": 99 })) + .send() + .await + .unwrap(); + assert_eq!(response.status(), StatusCode::UNPROCESSABLE_ENTITY); + let payload: Value = response.json().await.unwrap(); + assert_eq!(payload["detail"], "Invalid remote job status"); +} + +#[tokio::test] +async fn terminal_jobs_reject_further_agent_traffic() { + let app = TestApp::new().await; + let (_credential, headers) = app.credentials("Terminal").await; + let agent_id = "f".repeat(32); + let job = app.submit_job("Terminal job", "default").await; + let job_id = job["id"].as_str().unwrap().to_string(); + app.register_agent(&agent_id, "Worker", "default", &headers) + .await; + app.claim(&agent_id, &headers).await; + + app.authorized( + app.client + .post(app.url(&format!("/api/agents/{agent_id}/jobs/{job_id}/status"))), + &headers, + ) + .json(&json!({ "status": "failed", "stage": "Boom", "progress": 0 })) + .send() + .await + .unwrap(); + + let response = app + .authorized( + app.client + .get(app.url(&format!("/api/agents/{agent_id}/jobs/{job_id}/control"))), + &headers, + ) + .send() + .await + .unwrap(); + assert_eq!(response.status(), StatusCode::CONFLICT); +} + +#[tokio::test] +async fn claiming_is_idempotent_for_a_reconnecting_agent() { + let app = TestApp::new().await; + let (_credential, headers) = app.credentials("Reconnect").await; + let agent_id = "1".repeat(32); + let first = app.submit_job("First", "default").await; + let _second = app.submit_job("Second", "default").await; + app.register_agent(&agent_id, "Worker", "default", &headers) + .await; + + let claim = app.claim(&agent_id, &headers).await; + assert_eq!(claim["job"]["id"], first["id"]); + + // A repeat claim must re-lease the same job rather than grabbing the next one. + let again = app.claim(&agent_id, &headers).await; + assert_eq!(again["job"]["id"], first["id"]); +} + +#[tokio::test] +async fn jobs_are_dispatched_oldest_first() { + let app = TestApp::new().await; + let (_credential, headers) = app.credentials("Ordering").await; + let first = app.submit_job("Oldest", "default").await; + tokio::time::sleep(std::time::Duration::from_millis(5)).await; + let second = app.submit_job("Newest", "default").await; + + // Listings are newest first. + let listing: Value = app + .client + .get(app.url("/api/jobs")) + .send() + .await + .unwrap() + .json() + .await + .unwrap(); + assert_eq!(listing["jobs"][0]["id"], second["id"]); + + // Dispatch is oldest first. + let agent_id = "2".repeat(32); + app.register_agent(&agent_id, "Worker", "default", &headers) + .await; + let claim = app.claim(&agent_id, &headers).await; + assert_eq!(claim["job"]["id"], first["id"]); +} + +#[tokio::test] +async fn expired_leases_fail_the_job_and_offline_the_agent() { + let app = TestApp::with(|settings| settings.with_agent_lease_seconds(1)).await; + let (_credential, headers) = app.credentials("Flaky").await; + let agent_id = "3".repeat(32); + let job = app.submit_job("Abandoned", "default").await; + let job_id = job["id"].as_str().unwrap().to_string(); + app.register_agent(&agent_id, "Flaky box", "default", &headers) + .await; + let claim = app.claim(&agent_id, &headers).await; + assert_eq!(claim["job"]["id"], job["id"]); + + tokio::time::sleep(std::time::Duration::from_millis(1200)).await; + + // Expiry is evaluated lazily whenever the control plane is polled. + app.client.get(app.url("/api/health")).send().await.unwrap(); + + let failed: Value = app + .client + .get(app.url(&format!("/api/jobs/{job_id}"))) + .send() + .await + .unwrap() + .json() + .await + .unwrap(); + assert_eq!(failed["status"], "failed"); + assert_eq!(failed["stage"], "Agent disconnected"); + assert!(failed["error"].as_str().unwrap().contains("heartbeats")); + + let agents: Value = app + .client + .get(app.url("/api/agents")) + .send() + .await + .unwrap() + .json() + .await + .unwrap(); + assert_eq!(agents["agents"][0]["status"], "offline"); + assert!(agents["agents"][0]["current_job_id"].is_null()); +} + +#[tokio::test] +async fn revoking_a_key_fails_that_agents_active_job() { + let app = TestApp::new().await; + let (credential, headers) = app.credentials("Doomed").await; + let agent_id = "4".repeat(32); + let job = app.submit_job("Orphaned", "default").await; + let job_id = job["id"].as_str().unwrap().to_string(); + app.register_agent(&agent_id, "Worker", "default", &headers) + .await; + app.claim(&agent_id, &headers).await; + + let response = app + .client + .delete(app.url(&format!( + "/api/settings/keys/{}", + credential["access_key"].as_str().unwrap() + ))) + .send() + .await + .unwrap(); + assert_eq!(response.status(), StatusCode::NO_CONTENT); + + let failed: Value = app + .client + .get(app.url(&format!("/api/jobs/{job_id}"))) + .send() + .await + .unwrap() + .json() + .await + .unwrap(); + assert_eq!(failed["status"], "failed"); + assert_eq!(failed["stage"], "Worker key revoked"); + + // A second revocation of the same key is a 404. + let response = app + .client + .delete(app.url(&format!( + "/api/settings/keys/{}", + credential["access_key"].as_str().unwrap() + ))) + .send() + .await + .unwrap(); + assert_eq!(response.status(), StatusCode::NOT_FOUND); +} + +#[tokio::test] +async fn missing_credentials_are_rejected() { + let app = TestApp::new().await; + let response = app + .client + .get(app.url("/api/agents/auth-check")) + .send() + .await + .unwrap(); + assert_eq!(response.status(), StatusCode::UNAUTHORIZED); + assert_eq!( + response.headers().get("www-authenticate").unwrap(), + "SplatKey" + ); +} + +#[tokio::test] +async fn interrupted_local_jobs_are_recovered_on_startup() { + use splatlab::{JobStore, Settings}; + + let temp = tempfile::TempDir::new().unwrap(); + let settings = Settings::new(temp.path()); + settings.prepare().unwrap(); + let store = JobStore::new(settings.database_path()); + store.initialize().unwrap(); + store + .create( + "job1", + "Stranded", + "a.mp4", + "/tmp/a.mp4", + "standard", + "perspective", + 180, + "default", + ) + .unwrap(); + store + .update("job1", vec![("status", rusqlite_text("processing"))]) + .unwrap(); + + // A fresh boot must not leave orphaned in-flight jobs behind. + store.initialize().unwrap(); + let job = store.get("job1").unwrap().unwrap(); + assert_eq!(job["status"], "failed"); + assert_eq!(job["stage"], "Interrupted"); +} + +fn rusqlite_text(value: &str) -> splatlab::rusqlite::types::Value { + splatlab::rusqlite::types::Value::Text(value.to_string()) +} + +#[tokio::test] +async fn routing_rejections_use_the_detail_envelope() { + let app = TestApp::new().await; + + // Unmatched API paths must not fall through to the SPA. + let response = app.client.get(app.url("/api/nope")).send().await.unwrap(); + assert_eq!(response.status(), StatusCode::NOT_FOUND); + let payload: Value = response.json().await.unwrap(); + assert_eq!(payload["detail"], "Not Found"); + + // Wrong method on a real route. + let response = app + .client + .get(app.url("/api/jobs/whatever/cancel")) + .send() + .await + .unwrap(); + assert_eq!(response.status(), StatusCode::METHOD_NOT_ALLOWED); + let payload: Value = response.json().await.unwrap(); + assert_eq!(payload["detail"], "Method Not Allowed"); +} + +#[tokio::test] +async fn spa_is_still_served_at_the_root() { + let app = TestApp::new().await; + let response = app.client.get(app.url("/")).send().await.unwrap(); + assert_eq!(response.status(), StatusCode::OK); + let content_type = response + .headers() + .get("content-type") + .unwrap() + .to_str() + .unwrap() + .to_string(); + assert!(content_type.starts_with("text/html")); + assert!(response.text().await.unwrap().contains("SplatLab")); +} + +#[tokio::test] +async fn worker_keys_can_be_relabelled() { + let app = TestApp::new().await; + let (credential, headers) = app.credentials("Temporary name").await; + let access_key = credential["access_key"].as_str().unwrap().to_string(); + + let response = app + .client + .patch(app.url(&format!("/api/settings/keys/{access_key}"))) + .json(&json!({ "name": "Studio GPU" })) + .send() + .await + .unwrap(); + assert_eq!(response.status(), StatusCode::OK); + let updated: Value = response.json().await.unwrap(); + assert_eq!(updated["name"], "Studio GPU"); + assert_eq!(updated["access_key"], access_key); + // Renaming must never echo secret material. + assert!(updated.get("secret_key").is_none()); + assert!(updated.get("secret_hash").is_none()); + + // The new label is what the listing reports. + let listing: Value = app + .client + .get(app.url("/api/settings/keys")) + .send() + .await + .unwrap() + .json() + .await + .unwrap(); + assert_eq!(listing["keys"][0]["name"], "Studio GPU"); + + // The credential itself still authenticates. + let response = app + .authorized(app.client.get(app.url("/api/agents/auth-check")), &headers) + .send() + .await + .unwrap(); + assert_eq!(response.status(), StatusCode::OK); +} + +#[tokio::test] +async fn relabelling_rejects_blank_names_and_unknown_keys() { + let app = TestApp::new().await; + let (credential, _headers) = app.credentials("Named").await; + let access_key = credential["access_key"].as_str().unwrap().to_string(); + + // Sanitising strips every character, leaving nothing usable. + let response = app + .client + .patch(app.url(&format!("/api/settings/keys/{access_key}"))) + .json(&json!({ "name": "///" })) + .send() + .await + .unwrap(); + assert_eq!(response.status(), StatusCode::UNPROCESSABLE_ENTITY); + let payload: Value = response.json().await.unwrap(); + assert_eq!(payload["detail"], "Credential name is required"); + + let response = app + .client + .patch(app.url("/api/settings/keys/spl_missing")) + .json(&json!({ "name": "Ghost" })) + .send() + .await + .unwrap(); + assert_eq!(response.status(), StatusCode::NOT_FOUND); +}