├── .github └── workflows │ └── release.yml ├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── README.md ├── docs ├── Snipaste_2025-04-26_15-18-02.png ├── Snipaste_2025-04-26_15-18-15.png └── config.png └── src └── main.rs /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release 2 | 3 | on: 4 | push: 5 | tags: 6 | - 'v*' 7 | 8 | env: 9 | CARGO_TERM_COLOR: always 10 | 11 | jobs: 12 | build-and-release: 13 | strategy: 14 | fail-fast: false 15 | matrix: 16 | include: 17 | - platform: 'macos-latest' 18 | target: 'aarch64-apple-darwin' 19 | artifact_name: 'imagen3-mcp-aarch64-apple-darwin' 20 | - platform: 'macos-latest' 21 | target: 'x86_64-apple-darwin' 22 | artifact_name: 'imagen3-mcp-x86_64-apple-darwin' 23 | - platform: 'ubuntu-22.04' 24 | target: 'x86_64-unknown-linux-gnu' 25 | artifact_name: 'imagen3-mcp-x86_64-linux' 26 | - platform: 'windows-latest' 27 | target: 'x86_64-pc-windows-msvc' 28 | artifact_name: 'imagen3-mcp-x86_64-windows' 29 | 30 | runs-on: ${{ matrix.platform }} 31 | 32 | steps: 33 | - uses: actions/checkout@v4 34 | 35 | - name: Install Rust 36 | uses: actions-rs/toolchain@v1 37 | with: 38 | toolchain: stable 39 | profile: minimal 40 | override: true 41 | target: ${{ matrix.target }} 42 | 43 | - name: Build 44 | run: cargo build --release --target ${{ matrix.target || 'x86_64-unknown-linux-gnu' }} --verbose 45 | 46 | - name: Create artifact directory 47 | run: mkdir -p artifacts 48 | 49 | - name: Package (Unix) 50 | if: runner.os != 'Windows' 51 | run: | 52 | cp target/${{ matrix.target || 'x86_64-unknown-linux-gnu' }}/release/imagen3-mcp artifacts/${{ matrix.artifact_name }} 53 | chmod +x artifacts/${{ matrix.artifact_name }} 54 | 55 | - name: Package (Windows) 56 | if: runner.os == 'Windows' 57 | run: copy target\${{ matrix.target || 'x86_64-pc-windows-msvc' }}\release\imagen3-mcp.exe artifacts\${{ matrix.artifact_name }}.exe 58 | 59 | - name: Upload artifacts 60 | uses: actions/upload-artifact@v4 61 | with: 62 | name: ${{ matrix.artifact_name }} 63 | path: artifacts/${{ matrix.artifact_name }}${{ runner.os == 'Windows' && '.exe' || '' }} 64 | if-no-files-found: error 65 | 66 | create-release: 67 | needs: build-and-release 68 | runs-on: ubuntu-latest 69 | steps: 70 | - name: Download all artifacts 71 | uses: actions/download-artifact@v4 72 | with: 73 | path: artifacts 74 | 75 | - name: Create Release 76 | id: create_release 77 | uses: actions/create-release@v1 78 | env: 79 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 80 | with: 81 | tag_name: ${{ github.ref_name }} 82 | release_name: Release ${{ github.ref_name }} 83 | draft: true 84 | prerelease: false 85 | 86 | - name: Upload Release Assets (macOS ARM) 87 | uses: actions/upload-release-asset@v1 88 | env: 89 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 90 | with: 91 | upload_url: ${{ steps.create_release.outputs.upload_url }} 92 | asset_path: artifacts/imagen3-mcp-aarch64-apple-darwin/imagen3-mcp-aarch64-apple-darwin 93 | asset_name: imagen3-mcp-aarch64-apple-darwin 94 | asset_content_type: application/octet-stream 95 | 96 | - name: Upload Release Assets (macOS Intel) 97 | uses: actions/upload-release-asset@v1 98 | env: 99 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 100 | with: 101 | upload_url: ${{ steps.create_release.outputs.upload_url }} 102 | asset_path: artifacts/imagen3-mcp-x86_64-apple-darwin/imagen3-mcp-x86_64-apple-darwin 103 | asset_name: imagen3-mcp-x86_64-apple-darwin 104 | asset_content_type: application/octet-stream 105 | 106 | - name: Upload Release Assets (Linux) 107 | uses: actions/upload-release-asset@v1 108 | env: 109 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 110 | with: 111 | upload_url: ${{ steps.create_release.outputs.upload_url }} 112 | asset_path: artifacts/imagen3-mcp-x86_64-linux/imagen3-mcp-x86_64-linux 113 | asset_name: imagen3-mcp-x86_64-linux 114 | asset_content_type: application/octet-stream 115 | 116 | - name: Upload Release Assets (Windows) 117 | uses: actions/upload-release-asset@v1 118 | env: 119 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 120 | with: 121 | upload_url: ${{ steps.create_release.outputs.upload_url }} 122 | asset_path: artifacts/imagen3-mcp-x86_64-windows/imagen3-mcp-x86_64-windows.exe 123 | asset_name: imagen3-mcp-x86_64-windows.exe 124 | asset_content_type: application/octet-stream 125 | 126 | - name: Publish Release 127 | uses: eregon/publish-release@v1 128 | env: 129 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 130 | with: 131 | release_id: ${{ steps.create_release.outputs.id }} 132 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 4 4 | 5 | [[package]] 6 | name = "addr2line" 7 | version = "0.24.2" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" 10 | dependencies = [ 11 | "gimli", 12 | ] 13 | 14 | [[package]] 15 | name = "adler2" 16 | version = "2.0.0" 17 | source = "registry+https://github.com/rust-lang/crates.io-index" 18 | checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" 19 | 20 | [[package]] 21 | name = "aho-corasick" 22 | version = "1.1.3" 23 | source = "registry+https://github.com/rust-lang/crates.io-index" 24 | checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" 25 | dependencies = [ 26 | "memchr", 27 | ] 28 | 29 | [[package]] 30 | name = "android-tzdata" 31 | version = "0.1.1" 32 | source = "registry+https://github.com/rust-lang/crates.io-index" 33 | checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" 34 | 35 | [[package]] 36 | name = "android_system_properties" 37 | version = "0.1.5" 38 | source = "registry+https://github.com/rust-lang/crates.io-index" 39 | checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" 40 | dependencies = [ 41 | "libc", 42 | ] 43 | 44 | [[package]] 45 | name = "autocfg" 46 | version = "1.4.0" 47 | source = "registry+https://github.com/rust-lang/crates.io-index" 48 | checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" 49 | 50 | [[package]] 51 | name = "backtrace" 52 | version = "0.3.74" 53 | source = "registry+https://github.com/rust-lang/crates.io-index" 54 | checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" 55 | dependencies = [ 56 | "addr2line", 57 | "cfg-if", 58 | "libc", 59 | "miniz_oxide", 60 | "object", 61 | "rustc-demangle", 62 | "windows-targets 0.52.6", 63 | ] 64 | 65 | [[package]] 66 | name = "base64" 67 | version = "0.21.7" 68 | source = "registry+https://github.com/rust-lang/crates.io-index" 69 | checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" 70 | 71 | [[package]] 72 | name = "bit_field" 73 | version = "0.10.2" 74 | source = "registry+https://github.com/rust-lang/crates.io-index" 75 | checksum = "dc827186963e592360843fb5ba4b973e145841266c1357f7180c43526f2e5b61" 76 | 77 | [[package]] 78 | name = "bitflags" 79 | version = "1.3.2" 80 | source = "registry+https://github.com/rust-lang/crates.io-index" 81 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 82 | 83 | [[package]] 84 | name = "bitflags" 85 | version = "2.9.0" 86 | source = "registry+https://github.com/rust-lang/crates.io-index" 87 | checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" 88 | 89 | [[package]] 90 | name = "block-buffer" 91 | version = "0.10.4" 92 | source = "registry+https://github.com/rust-lang/crates.io-index" 93 | checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" 94 | dependencies = [ 95 | "generic-array", 96 | ] 97 | 98 | [[package]] 99 | name = "bumpalo" 100 | version = "3.17.0" 101 | source = "registry+https://github.com/rust-lang/crates.io-index" 102 | checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" 103 | 104 | [[package]] 105 | name = "bytemuck" 106 | version = "1.22.0" 107 | source = "registry+https://github.com/rust-lang/crates.io-index" 108 | checksum = "b6b1fc10dbac614ebc03540c9dbd60e83887fda27794998c6528f1782047d540" 109 | 110 | [[package]] 111 | name = "byteorder" 112 | version = "1.5.0" 113 | source = "registry+https://github.com/rust-lang/crates.io-index" 114 | checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" 115 | 116 | [[package]] 117 | name = "bytes" 118 | version = "1.10.1" 119 | source = "registry+https://github.com/rust-lang/crates.io-index" 120 | checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" 121 | 122 | [[package]] 123 | name = "cc" 124 | version = "1.2.20" 125 | source = "registry+https://github.com/rust-lang/crates.io-index" 126 | checksum = "04da6a0d40b948dfc4fa8f5bbf402b0fc1a64a28dbf7d12ffd683550f2c1b63a" 127 | dependencies = [ 128 | "shlex", 129 | ] 130 | 131 | [[package]] 132 | name = "cfg-if" 133 | version = "1.0.0" 134 | source = "registry+https://github.com/rust-lang/crates.io-index" 135 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 136 | 137 | [[package]] 138 | name = "chrono" 139 | version = "0.4.40" 140 | source = "registry+https://github.com/rust-lang/crates.io-index" 141 | checksum = "1a7964611d71df112cb1730f2ee67324fcf4d0fc6606acbbe9bfe06df124637c" 142 | dependencies = [ 143 | "android-tzdata", 144 | "iana-time-zone", 145 | "js-sys", 146 | "num-traits", 147 | "serde", 148 | "wasm-bindgen", 149 | "windows-link", 150 | ] 151 | 152 | [[package]] 153 | name = "color_quant" 154 | version = "1.1.0" 155 | source = "registry+https://github.com/rust-lang/crates.io-index" 156 | checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" 157 | 158 | [[package]] 159 | name = "core-foundation" 160 | version = "0.9.4" 161 | source = "registry+https://github.com/rust-lang/crates.io-index" 162 | checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" 163 | dependencies = [ 164 | "core-foundation-sys", 165 | "libc", 166 | ] 167 | 168 | [[package]] 169 | name = "core-foundation-sys" 170 | version = "0.8.7" 171 | source = "registry+https://github.com/rust-lang/crates.io-index" 172 | checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" 173 | 174 | [[package]] 175 | name = "cpufeatures" 176 | version = "0.2.17" 177 | source = "registry+https://github.com/rust-lang/crates.io-index" 178 | checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" 179 | dependencies = [ 180 | "libc", 181 | ] 182 | 183 | [[package]] 184 | name = "crc32fast" 185 | version = "1.4.2" 186 | source = "registry+https://github.com/rust-lang/crates.io-index" 187 | checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" 188 | dependencies = [ 189 | "cfg-if", 190 | ] 191 | 192 | [[package]] 193 | name = "crossbeam-channel" 194 | version = "0.5.15" 195 | source = "registry+https://github.com/rust-lang/crates.io-index" 196 | checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2" 197 | dependencies = [ 198 | "crossbeam-utils", 199 | ] 200 | 201 | [[package]] 202 | name = "crossbeam-deque" 203 | version = "0.8.6" 204 | source = "registry+https://github.com/rust-lang/crates.io-index" 205 | checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" 206 | dependencies = [ 207 | "crossbeam-epoch", 208 | "crossbeam-utils", 209 | ] 210 | 211 | [[package]] 212 | name = "crossbeam-epoch" 213 | version = "0.9.18" 214 | source = "registry+https://github.com/rust-lang/crates.io-index" 215 | checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" 216 | dependencies = [ 217 | "crossbeam-utils", 218 | ] 219 | 220 | [[package]] 221 | name = "crossbeam-utils" 222 | version = "0.8.21" 223 | source = "registry+https://github.com/rust-lang/crates.io-index" 224 | checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" 225 | 226 | [[package]] 227 | name = "crunchy" 228 | version = "0.2.3" 229 | source = "registry+https://github.com/rust-lang/crates.io-index" 230 | checksum = "43da5946c66ffcc7745f48db692ffbb10a83bfe0afd96235c5c2a4fb23994929" 231 | 232 | [[package]] 233 | name = "crypto-common" 234 | version = "0.1.6" 235 | source = "registry+https://github.com/rust-lang/crates.io-index" 236 | checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" 237 | dependencies = [ 238 | "generic-array", 239 | "typenum", 240 | ] 241 | 242 | [[package]] 243 | name = "data-encoding" 244 | version = "2.9.0" 245 | source = "registry+https://github.com/rust-lang/crates.io-index" 246 | checksum = "2a2330da5de22e8a3cb63252ce2abb30116bf5265e89c0e01bc17015ce30a476" 247 | 248 | [[package]] 249 | name = "deranged" 250 | version = "0.4.0" 251 | source = "registry+https://github.com/rust-lang/crates.io-index" 252 | checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e" 253 | dependencies = [ 254 | "powerfmt", 255 | ] 256 | 257 | [[package]] 258 | name = "digest" 259 | version = "0.10.7" 260 | source = "registry+https://github.com/rust-lang/crates.io-index" 261 | checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" 262 | dependencies = [ 263 | "block-buffer", 264 | "crypto-common", 265 | ] 266 | 267 | [[package]] 268 | name = "directories" 269 | version = "5.0.1" 270 | source = "registry+https://github.com/rust-lang/crates.io-index" 271 | checksum = "9a49173b84e034382284f27f1af4dcbbd231ffa358c0fe316541a7337f376a35" 272 | dependencies = [ 273 | "dirs-sys", 274 | ] 275 | 276 | [[package]] 277 | name = "dirs-sys" 278 | version = "0.4.1" 279 | source = "registry+https://github.com/rust-lang/crates.io-index" 280 | checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" 281 | dependencies = [ 282 | "libc", 283 | "option-ext", 284 | "redox_users", 285 | "windows-sys 0.48.0", 286 | ] 287 | 288 | [[package]] 289 | name = "displaydoc" 290 | version = "0.2.5" 291 | source = "registry+https://github.com/rust-lang/crates.io-index" 292 | checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" 293 | dependencies = [ 294 | "proc-macro2", 295 | "quote", 296 | "syn", 297 | ] 298 | 299 | [[package]] 300 | name = "dyn-clone" 301 | version = "1.0.19" 302 | source = "registry+https://github.com/rust-lang/crates.io-index" 303 | checksum = "1c7a8fb8a9fbf66c1f703fe16184d10ca0ee9d23be5b4436400408ba54a95005" 304 | 305 | [[package]] 306 | name = "either" 307 | version = "1.15.0" 308 | source = "registry+https://github.com/rust-lang/crates.io-index" 309 | checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" 310 | 311 | [[package]] 312 | name = "encoding_rs" 313 | version = "0.8.35" 314 | source = "registry+https://github.com/rust-lang/crates.io-index" 315 | checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" 316 | dependencies = [ 317 | "cfg-if", 318 | ] 319 | 320 | [[package]] 321 | name = "equivalent" 322 | version = "1.0.2" 323 | source = "registry+https://github.com/rust-lang/crates.io-index" 324 | checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" 325 | 326 | [[package]] 327 | name = "errno" 328 | version = "0.3.11" 329 | source = "registry+https://github.com/rust-lang/crates.io-index" 330 | checksum = "976dd42dc7e85965fe702eb8164f21f450704bdde31faefd6471dba214cb594e" 331 | dependencies = [ 332 | "libc", 333 | "windows-sys 0.59.0", 334 | ] 335 | 336 | [[package]] 337 | name = "exr" 338 | version = "1.73.0" 339 | source = "registry+https://github.com/rust-lang/crates.io-index" 340 | checksum = "f83197f59927b46c04a183a619b7c29df34e63e63c7869320862268c0ef687e0" 341 | dependencies = [ 342 | "bit_field", 343 | "half", 344 | "lebe", 345 | "miniz_oxide", 346 | "rayon-core", 347 | "smallvec", 348 | "zune-inflate", 349 | ] 350 | 351 | [[package]] 352 | name = "fastrand" 353 | version = "2.3.0" 354 | source = "registry+https://github.com/rust-lang/crates.io-index" 355 | checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" 356 | 357 | [[package]] 358 | name = "fdeflate" 359 | version = "0.3.7" 360 | source = "registry+https://github.com/rust-lang/crates.io-index" 361 | checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c" 362 | dependencies = [ 363 | "simd-adler32", 364 | ] 365 | 366 | [[package]] 367 | name = "flate2" 368 | version = "1.1.1" 369 | source = "registry+https://github.com/rust-lang/crates.io-index" 370 | checksum = "7ced92e76e966ca2fd84c8f7aa01a4aea65b0eb6648d72f7c8f3e2764a67fece" 371 | dependencies = [ 372 | "crc32fast", 373 | "miniz_oxide", 374 | ] 375 | 376 | [[package]] 377 | name = "fnv" 378 | version = "1.0.7" 379 | source = "registry+https://github.com/rust-lang/crates.io-index" 380 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 381 | 382 | [[package]] 383 | name = "foreign-types" 384 | version = "0.3.2" 385 | source = "registry+https://github.com/rust-lang/crates.io-index" 386 | checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" 387 | dependencies = [ 388 | "foreign-types-shared", 389 | ] 390 | 391 | [[package]] 392 | name = "foreign-types-shared" 393 | version = "0.1.1" 394 | source = "registry+https://github.com/rust-lang/crates.io-index" 395 | checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" 396 | 397 | [[package]] 398 | name = "form_urlencoded" 399 | version = "1.2.1" 400 | source = "registry+https://github.com/rust-lang/crates.io-index" 401 | checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" 402 | dependencies = [ 403 | "percent-encoding", 404 | ] 405 | 406 | [[package]] 407 | name = "futures" 408 | version = "0.3.31" 409 | source = "registry+https://github.com/rust-lang/crates.io-index" 410 | checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" 411 | dependencies = [ 412 | "futures-channel", 413 | "futures-core", 414 | "futures-executor", 415 | "futures-io", 416 | "futures-sink", 417 | "futures-task", 418 | "futures-util", 419 | ] 420 | 421 | [[package]] 422 | name = "futures-channel" 423 | version = "0.3.31" 424 | source = "registry+https://github.com/rust-lang/crates.io-index" 425 | checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" 426 | dependencies = [ 427 | "futures-core", 428 | "futures-sink", 429 | ] 430 | 431 | [[package]] 432 | name = "futures-core" 433 | version = "0.3.31" 434 | source = "registry+https://github.com/rust-lang/crates.io-index" 435 | checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" 436 | 437 | [[package]] 438 | name = "futures-executor" 439 | version = "0.3.31" 440 | source = "registry+https://github.com/rust-lang/crates.io-index" 441 | checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" 442 | dependencies = [ 443 | "futures-core", 444 | "futures-task", 445 | "futures-util", 446 | ] 447 | 448 | [[package]] 449 | name = "futures-io" 450 | version = "0.3.31" 451 | source = "registry+https://github.com/rust-lang/crates.io-index" 452 | checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" 453 | 454 | [[package]] 455 | name = "futures-macro" 456 | version = "0.3.31" 457 | source = "registry+https://github.com/rust-lang/crates.io-index" 458 | checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" 459 | dependencies = [ 460 | "proc-macro2", 461 | "quote", 462 | "syn", 463 | ] 464 | 465 | [[package]] 466 | name = "futures-sink" 467 | version = "0.3.31" 468 | source = "registry+https://github.com/rust-lang/crates.io-index" 469 | checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" 470 | 471 | [[package]] 472 | name = "futures-task" 473 | version = "0.3.31" 474 | source = "registry+https://github.com/rust-lang/crates.io-index" 475 | checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" 476 | 477 | [[package]] 478 | name = "futures-util" 479 | version = "0.3.31" 480 | source = "registry+https://github.com/rust-lang/crates.io-index" 481 | checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" 482 | dependencies = [ 483 | "futures-channel", 484 | "futures-core", 485 | "futures-io", 486 | "futures-macro", 487 | "futures-sink", 488 | "futures-task", 489 | "memchr", 490 | "pin-project-lite", 491 | "pin-utils", 492 | "slab", 493 | ] 494 | 495 | [[package]] 496 | name = "generic-array" 497 | version = "0.14.7" 498 | source = "registry+https://github.com/rust-lang/crates.io-index" 499 | checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" 500 | dependencies = [ 501 | "typenum", 502 | "version_check", 503 | ] 504 | 505 | [[package]] 506 | name = "getrandom" 507 | version = "0.2.16" 508 | source = "registry+https://github.com/rust-lang/crates.io-index" 509 | checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" 510 | dependencies = [ 511 | "cfg-if", 512 | "libc", 513 | "wasi 0.11.0+wasi-snapshot-preview1", 514 | ] 515 | 516 | [[package]] 517 | name = "getrandom" 518 | version = "0.3.2" 519 | source = "registry+https://github.com/rust-lang/crates.io-index" 520 | checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0" 521 | dependencies = [ 522 | "cfg-if", 523 | "libc", 524 | "r-efi", 525 | "wasi 0.14.2+wasi-0.2.4", 526 | ] 527 | 528 | [[package]] 529 | name = "gif" 530 | version = "0.13.1" 531 | source = "registry+https://github.com/rust-lang/crates.io-index" 532 | checksum = "3fb2d69b19215e18bb912fa30f7ce15846e301408695e44e0ef719f1da9e19f2" 533 | dependencies = [ 534 | "color_quant", 535 | "weezl", 536 | ] 537 | 538 | [[package]] 539 | name = "gimli" 540 | version = "0.31.1" 541 | source = "registry+https://github.com/rust-lang/crates.io-index" 542 | checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" 543 | 544 | [[package]] 545 | name = "h2" 546 | version = "0.3.26" 547 | source = "registry+https://github.com/rust-lang/crates.io-index" 548 | checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" 549 | dependencies = [ 550 | "bytes", 551 | "fnv", 552 | "futures-core", 553 | "futures-sink", 554 | "futures-util", 555 | "http 0.2.12", 556 | "indexmap", 557 | "slab", 558 | "tokio", 559 | "tokio-util", 560 | "tracing", 561 | ] 562 | 563 | [[package]] 564 | name = "half" 565 | version = "2.6.0" 566 | source = "registry+https://github.com/rust-lang/crates.io-index" 567 | checksum = "459196ed295495a68f7d7fe1d84f6c4b7ff0e21fe3017b2f283c6fac3ad803c9" 568 | dependencies = [ 569 | "cfg-if", 570 | "crunchy", 571 | ] 572 | 573 | [[package]] 574 | name = "hashbrown" 575 | version = "0.15.2" 576 | source = "registry+https://github.com/rust-lang/crates.io-index" 577 | checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" 578 | 579 | [[package]] 580 | name = "headers" 581 | version = "0.3.9" 582 | source = "registry+https://github.com/rust-lang/crates.io-index" 583 | checksum = "06683b93020a07e3dbcf5f8c0f6d40080d725bea7936fc01ad345c01b97dc270" 584 | dependencies = [ 585 | "base64", 586 | "bytes", 587 | "headers-core", 588 | "http 0.2.12", 589 | "httpdate", 590 | "mime", 591 | "sha1", 592 | ] 593 | 594 | [[package]] 595 | name = "headers-core" 596 | version = "0.2.0" 597 | source = "registry+https://github.com/rust-lang/crates.io-index" 598 | checksum = "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429" 599 | dependencies = [ 600 | "http 0.2.12", 601 | ] 602 | 603 | [[package]] 604 | name = "http" 605 | version = "0.2.12" 606 | source = "registry+https://github.com/rust-lang/crates.io-index" 607 | checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" 608 | dependencies = [ 609 | "bytes", 610 | "fnv", 611 | "itoa", 612 | ] 613 | 614 | [[package]] 615 | name = "http" 616 | version = "1.3.1" 617 | source = "registry+https://github.com/rust-lang/crates.io-index" 618 | checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" 619 | dependencies = [ 620 | "bytes", 621 | "fnv", 622 | "itoa", 623 | ] 624 | 625 | [[package]] 626 | name = "http-body" 627 | version = "0.4.6" 628 | source = "registry+https://github.com/rust-lang/crates.io-index" 629 | checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" 630 | dependencies = [ 631 | "bytes", 632 | "http 0.2.12", 633 | "pin-project-lite", 634 | ] 635 | 636 | [[package]] 637 | name = "httparse" 638 | version = "1.10.1" 639 | source = "registry+https://github.com/rust-lang/crates.io-index" 640 | checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" 641 | 642 | [[package]] 643 | name = "httpdate" 644 | version = "1.0.3" 645 | source = "registry+https://github.com/rust-lang/crates.io-index" 646 | checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" 647 | 648 | [[package]] 649 | name = "hyper" 650 | version = "0.14.32" 651 | source = "registry+https://github.com/rust-lang/crates.io-index" 652 | checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" 653 | dependencies = [ 654 | "bytes", 655 | "futures-channel", 656 | "futures-core", 657 | "futures-util", 658 | "h2", 659 | "http 0.2.12", 660 | "http-body", 661 | "httparse", 662 | "httpdate", 663 | "itoa", 664 | "pin-project-lite", 665 | "socket2", 666 | "tokio", 667 | "tower-service", 668 | "tracing", 669 | "want", 670 | ] 671 | 672 | [[package]] 673 | name = "hyper-tls" 674 | version = "0.5.0" 675 | source = "registry+https://github.com/rust-lang/crates.io-index" 676 | checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" 677 | dependencies = [ 678 | "bytes", 679 | "hyper", 680 | "native-tls", 681 | "tokio", 682 | "tokio-native-tls", 683 | ] 684 | 685 | [[package]] 686 | name = "iana-time-zone" 687 | version = "0.1.63" 688 | source = "registry+https://github.com/rust-lang/crates.io-index" 689 | checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8" 690 | dependencies = [ 691 | "android_system_properties", 692 | "core-foundation-sys", 693 | "iana-time-zone-haiku", 694 | "js-sys", 695 | "log", 696 | "wasm-bindgen", 697 | "windows-core", 698 | ] 699 | 700 | [[package]] 701 | name = "iana-time-zone-haiku" 702 | version = "0.1.2" 703 | source = "registry+https://github.com/rust-lang/crates.io-index" 704 | checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" 705 | dependencies = [ 706 | "cc", 707 | ] 708 | 709 | [[package]] 710 | name = "icu_collections" 711 | version = "1.5.0" 712 | source = "registry+https://github.com/rust-lang/crates.io-index" 713 | checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" 714 | dependencies = [ 715 | "displaydoc", 716 | "yoke", 717 | "zerofrom", 718 | "zerovec", 719 | ] 720 | 721 | [[package]] 722 | name = "icu_locid" 723 | version = "1.5.0" 724 | source = "registry+https://github.com/rust-lang/crates.io-index" 725 | checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" 726 | dependencies = [ 727 | "displaydoc", 728 | "litemap", 729 | "tinystr", 730 | "writeable", 731 | "zerovec", 732 | ] 733 | 734 | [[package]] 735 | name = "icu_locid_transform" 736 | version = "1.5.0" 737 | source = "registry+https://github.com/rust-lang/crates.io-index" 738 | checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" 739 | dependencies = [ 740 | "displaydoc", 741 | "icu_locid", 742 | "icu_locid_transform_data", 743 | "icu_provider", 744 | "tinystr", 745 | "zerovec", 746 | ] 747 | 748 | [[package]] 749 | name = "icu_locid_transform_data" 750 | version = "1.5.1" 751 | source = "registry+https://github.com/rust-lang/crates.io-index" 752 | checksum = "7515e6d781098bf9f7205ab3fc7e9709d34554ae0b21ddbcb5febfa4bc7df11d" 753 | 754 | [[package]] 755 | name = "icu_normalizer" 756 | version = "1.5.0" 757 | source = "registry+https://github.com/rust-lang/crates.io-index" 758 | checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" 759 | dependencies = [ 760 | "displaydoc", 761 | "icu_collections", 762 | "icu_normalizer_data", 763 | "icu_properties", 764 | "icu_provider", 765 | "smallvec", 766 | "utf16_iter", 767 | "utf8_iter", 768 | "write16", 769 | "zerovec", 770 | ] 771 | 772 | [[package]] 773 | name = "icu_normalizer_data" 774 | version = "1.5.1" 775 | source = "registry+https://github.com/rust-lang/crates.io-index" 776 | checksum = "c5e8338228bdc8ab83303f16b797e177953730f601a96c25d10cb3ab0daa0cb7" 777 | 778 | [[package]] 779 | name = "icu_properties" 780 | version = "1.5.1" 781 | source = "registry+https://github.com/rust-lang/crates.io-index" 782 | checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" 783 | dependencies = [ 784 | "displaydoc", 785 | "icu_collections", 786 | "icu_locid_transform", 787 | "icu_properties_data", 788 | "icu_provider", 789 | "tinystr", 790 | "zerovec", 791 | ] 792 | 793 | [[package]] 794 | name = "icu_properties_data" 795 | version = "1.5.1" 796 | source = "registry+https://github.com/rust-lang/crates.io-index" 797 | checksum = "85fb8799753b75aee8d2a21d7c14d9f38921b54b3dbda10f5a3c7a7b82dba5e2" 798 | 799 | [[package]] 800 | name = "icu_provider" 801 | version = "1.5.0" 802 | source = "registry+https://github.com/rust-lang/crates.io-index" 803 | checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" 804 | dependencies = [ 805 | "displaydoc", 806 | "icu_locid", 807 | "icu_provider_macros", 808 | "stable_deref_trait", 809 | "tinystr", 810 | "writeable", 811 | "yoke", 812 | "zerofrom", 813 | "zerovec", 814 | ] 815 | 816 | [[package]] 817 | name = "icu_provider_macros" 818 | version = "1.5.0" 819 | source = "registry+https://github.com/rust-lang/crates.io-index" 820 | checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" 821 | dependencies = [ 822 | "proc-macro2", 823 | "quote", 824 | "syn", 825 | ] 826 | 827 | [[package]] 828 | name = "idna" 829 | version = "1.0.3" 830 | source = "registry+https://github.com/rust-lang/crates.io-index" 831 | checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" 832 | dependencies = [ 833 | "idna_adapter", 834 | "smallvec", 835 | "utf8_iter", 836 | ] 837 | 838 | [[package]] 839 | name = "idna_adapter" 840 | version = "1.2.0" 841 | source = "registry+https://github.com/rust-lang/crates.io-index" 842 | checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" 843 | dependencies = [ 844 | "icu_normalizer", 845 | "icu_properties", 846 | ] 847 | 848 | [[package]] 849 | name = "image" 850 | version = "0.24.9" 851 | source = "registry+https://github.com/rust-lang/crates.io-index" 852 | checksum = "5690139d2f55868e080017335e4b94cb7414274c74f1669c84fb5feba2c9f69d" 853 | dependencies = [ 854 | "bytemuck", 855 | "byteorder", 856 | "color_quant", 857 | "exr", 858 | "gif", 859 | "jpeg-decoder", 860 | "num-traits", 861 | "png", 862 | "qoi", 863 | "tiff", 864 | ] 865 | 866 | [[package]] 867 | name = "imagen3-mcp" 868 | version = "0.1.0" 869 | dependencies = [ 870 | "base64", 871 | "chrono", 872 | "directories", 873 | "image", 874 | "nanoid", 875 | "reqwest", 876 | "rmcp", 877 | "serde", 878 | "serde_json", 879 | "tokio", 880 | "tokio-util", 881 | "tracing", 882 | "tracing-appender", 883 | "tracing-subscriber", 884 | "warp", 885 | ] 886 | 887 | [[package]] 888 | name = "indexmap" 889 | version = "2.9.0" 890 | source = "registry+https://github.com/rust-lang/crates.io-index" 891 | checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" 892 | dependencies = [ 893 | "equivalent", 894 | "hashbrown", 895 | ] 896 | 897 | [[package]] 898 | name = "ipnet" 899 | version = "2.11.0" 900 | source = "registry+https://github.com/rust-lang/crates.io-index" 901 | checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" 902 | 903 | [[package]] 904 | name = "itoa" 905 | version = "1.0.15" 906 | source = "registry+https://github.com/rust-lang/crates.io-index" 907 | checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" 908 | 909 | [[package]] 910 | name = "jpeg-decoder" 911 | version = "0.3.1" 912 | source = "registry+https://github.com/rust-lang/crates.io-index" 913 | checksum = "f5d4a7da358eff58addd2877a45865158f0d78c911d43a5784ceb7bbf52833b0" 914 | dependencies = [ 915 | "rayon", 916 | ] 917 | 918 | [[package]] 919 | name = "js-sys" 920 | version = "0.3.77" 921 | source = "registry+https://github.com/rust-lang/crates.io-index" 922 | checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" 923 | dependencies = [ 924 | "once_cell", 925 | "wasm-bindgen", 926 | ] 927 | 928 | [[package]] 929 | name = "lazy_static" 930 | version = "1.5.0" 931 | source = "registry+https://github.com/rust-lang/crates.io-index" 932 | checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" 933 | 934 | [[package]] 935 | name = "lebe" 936 | version = "0.5.2" 937 | source = "registry+https://github.com/rust-lang/crates.io-index" 938 | checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8" 939 | 940 | [[package]] 941 | name = "libc" 942 | version = "0.2.172" 943 | source = "registry+https://github.com/rust-lang/crates.io-index" 944 | checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa" 945 | 946 | [[package]] 947 | name = "libredox" 948 | version = "0.1.3" 949 | source = "registry+https://github.com/rust-lang/crates.io-index" 950 | checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" 951 | dependencies = [ 952 | "bitflags 2.9.0", 953 | "libc", 954 | ] 955 | 956 | [[package]] 957 | name = "linux-raw-sys" 958 | version = "0.9.4" 959 | source = "registry+https://github.com/rust-lang/crates.io-index" 960 | checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" 961 | 962 | [[package]] 963 | name = "litemap" 964 | version = "0.7.5" 965 | source = "registry+https://github.com/rust-lang/crates.io-index" 966 | checksum = "23fb14cb19457329c82206317a5663005a4d404783dc74f4252769b0d5f42856" 967 | 968 | [[package]] 969 | name = "log" 970 | version = "0.4.27" 971 | source = "registry+https://github.com/rust-lang/crates.io-index" 972 | checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" 973 | 974 | [[package]] 975 | name = "matchers" 976 | version = "0.1.0" 977 | source = "registry+https://github.com/rust-lang/crates.io-index" 978 | checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" 979 | dependencies = [ 980 | "regex-automata 0.1.10", 981 | ] 982 | 983 | [[package]] 984 | name = "memchr" 985 | version = "2.7.4" 986 | source = "registry+https://github.com/rust-lang/crates.io-index" 987 | checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" 988 | 989 | [[package]] 990 | name = "mime" 991 | version = "0.3.17" 992 | source = "registry+https://github.com/rust-lang/crates.io-index" 993 | checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" 994 | 995 | [[package]] 996 | name = "mime_guess" 997 | version = "2.0.5" 998 | source = "registry+https://github.com/rust-lang/crates.io-index" 999 | checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" 1000 | dependencies = [ 1001 | "mime", 1002 | "unicase", 1003 | ] 1004 | 1005 | [[package]] 1006 | name = "miniz_oxide" 1007 | version = "0.8.8" 1008 | source = "registry+https://github.com/rust-lang/crates.io-index" 1009 | checksum = "3be647b768db090acb35d5ec5db2b0e1f1de11133ca123b9eacf5137868f892a" 1010 | dependencies = [ 1011 | "adler2", 1012 | "simd-adler32", 1013 | ] 1014 | 1015 | [[package]] 1016 | name = "mio" 1017 | version = "1.0.3" 1018 | source = "registry+https://github.com/rust-lang/crates.io-index" 1019 | checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" 1020 | dependencies = [ 1021 | "libc", 1022 | "wasi 0.11.0+wasi-snapshot-preview1", 1023 | "windows-sys 0.52.0", 1024 | ] 1025 | 1026 | [[package]] 1027 | name = "multer" 1028 | version = "2.1.0" 1029 | source = "registry+https://github.com/rust-lang/crates.io-index" 1030 | checksum = "01acbdc23469fd8fe07ab135923371d5f5a422fbf9c522158677c8eb15bc51c2" 1031 | dependencies = [ 1032 | "bytes", 1033 | "encoding_rs", 1034 | "futures-util", 1035 | "http 0.2.12", 1036 | "httparse", 1037 | "log", 1038 | "memchr", 1039 | "mime", 1040 | "spin", 1041 | "version_check", 1042 | ] 1043 | 1044 | [[package]] 1045 | name = "nanoid" 1046 | version = "0.4.0" 1047 | source = "registry+https://github.com/rust-lang/crates.io-index" 1048 | checksum = "3ffa00dec017b5b1a8b7cf5e2c008bfda1aa7e0697ac1508b491fdf2622fb4d8" 1049 | dependencies = [ 1050 | "rand", 1051 | ] 1052 | 1053 | [[package]] 1054 | name = "native-tls" 1055 | version = "0.2.14" 1056 | source = "registry+https://github.com/rust-lang/crates.io-index" 1057 | checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e" 1058 | dependencies = [ 1059 | "libc", 1060 | "log", 1061 | "openssl", 1062 | "openssl-probe", 1063 | "openssl-sys", 1064 | "schannel", 1065 | "security-framework", 1066 | "security-framework-sys", 1067 | "tempfile", 1068 | ] 1069 | 1070 | [[package]] 1071 | name = "nu-ansi-term" 1072 | version = "0.46.0" 1073 | source = "registry+https://github.com/rust-lang/crates.io-index" 1074 | checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" 1075 | dependencies = [ 1076 | "overload", 1077 | "winapi", 1078 | ] 1079 | 1080 | [[package]] 1081 | name = "num-conv" 1082 | version = "0.1.0" 1083 | source = "registry+https://github.com/rust-lang/crates.io-index" 1084 | checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" 1085 | 1086 | [[package]] 1087 | name = "num-traits" 1088 | version = "0.2.19" 1089 | source = "registry+https://github.com/rust-lang/crates.io-index" 1090 | checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" 1091 | dependencies = [ 1092 | "autocfg", 1093 | ] 1094 | 1095 | [[package]] 1096 | name = "object" 1097 | version = "0.36.7" 1098 | source = "registry+https://github.com/rust-lang/crates.io-index" 1099 | checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" 1100 | dependencies = [ 1101 | "memchr", 1102 | ] 1103 | 1104 | [[package]] 1105 | name = "once_cell" 1106 | version = "1.21.3" 1107 | source = "registry+https://github.com/rust-lang/crates.io-index" 1108 | checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" 1109 | 1110 | [[package]] 1111 | name = "openssl" 1112 | version = "0.10.72" 1113 | source = "registry+https://github.com/rust-lang/crates.io-index" 1114 | checksum = "fedfea7d58a1f73118430a55da6a286e7b044961736ce96a16a17068ea25e5da" 1115 | dependencies = [ 1116 | "bitflags 2.9.0", 1117 | "cfg-if", 1118 | "foreign-types", 1119 | "libc", 1120 | "once_cell", 1121 | "openssl-macros", 1122 | "openssl-sys", 1123 | ] 1124 | 1125 | [[package]] 1126 | name = "openssl-macros" 1127 | version = "0.1.1" 1128 | source = "registry+https://github.com/rust-lang/crates.io-index" 1129 | checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" 1130 | dependencies = [ 1131 | "proc-macro2", 1132 | "quote", 1133 | "syn", 1134 | ] 1135 | 1136 | [[package]] 1137 | name = "openssl-probe" 1138 | version = "0.1.6" 1139 | source = "registry+https://github.com/rust-lang/crates.io-index" 1140 | checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" 1141 | 1142 | [[package]] 1143 | name = "openssl-sys" 1144 | version = "0.9.107" 1145 | source = "registry+https://github.com/rust-lang/crates.io-index" 1146 | checksum = "8288979acd84749c744a9014b4382d42b8f7b2592847b5afb2ed29e5d16ede07" 1147 | dependencies = [ 1148 | "cc", 1149 | "libc", 1150 | "pkg-config", 1151 | "vcpkg", 1152 | ] 1153 | 1154 | [[package]] 1155 | name = "option-ext" 1156 | version = "0.2.0" 1157 | source = "registry+https://github.com/rust-lang/crates.io-index" 1158 | checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" 1159 | 1160 | [[package]] 1161 | name = "overload" 1162 | version = "0.1.1" 1163 | source = "registry+https://github.com/rust-lang/crates.io-index" 1164 | checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" 1165 | 1166 | [[package]] 1167 | name = "paste" 1168 | version = "1.0.15" 1169 | source = "registry+https://github.com/rust-lang/crates.io-index" 1170 | checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" 1171 | 1172 | [[package]] 1173 | name = "percent-encoding" 1174 | version = "2.3.1" 1175 | source = "registry+https://github.com/rust-lang/crates.io-index" 1176 | checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" 1177 | 1178 | [[package]] 1179 | name = "pin-project" 1180 | version = "1.1.10" 1181 | source = "registry+https://github.com/rust-lang/crates.io-index" 1182 | checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" 1183 | dependencies = [ 1184 | "pin-project-internal", 1185 | ] 1186 | 1187 | [[package]] 1188 | name = "pin-project-internal" 1189 | version = "1.1.10" 1190 | source = "registry+https://github.com/rust-lang/crates.io-index" 1191 | checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" 1192 | dependencies = [ 1193 | "proc-macro2", 1194 | "quote", 1195 | "syn", 1196 | ] 1197 | 1198 | [[package]] 1199 | name = "pin-project-lite" 1200 | version = "0.2.16" 1201 | source = "registry+https://github.com/rust-lang/crates.io-index" 1202 | checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" 1203 | 1204 | [[package]] 1205 | name = "pin-utils" 1206 | version = "0.1.0" 1207 | source = "registry+https://github.com/rust-lang/crates.io-index" 1208 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 1209 | 1210 | [[package]] 1211 | name = "pkg-config" 1212 | version = "0.3.32" 1213 | source = "registry+https://github.com/rust-lang/crates.io-index" 1214 | checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" 1215 | 1216 | [[package]] 1217 | name = "png" 1218 | version = "0.17.16" 1219 | source = "registry+https://github.com/rust-lang/crates.io-index" 1220 | checksum = "82151a2fc869e011c153adc57cf2789ccb8d9906ce52c0b39a6b5697749d7526" 1221 | dependencies = [ 1222 | "bitflags 1.3.2", 1223 | "crc32fast", 1224 | "fdeflate", 1225 | "flate2", 1226 | "miniz_oxide", 1227 | ] 1228 | 1229 | [[package]] 1230 | name = "powerfmt" 1231 | version = "0.2.0" 1232 | source = "registry+https://github.com/rust-lang/crates.io-index" 1233 | checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" 1234 | 1235 | [[package]] 1236 | name = "ppv-lite86" 1237 | version = "0.2.21" 1238 | source = "registry+https://github.com/rust-lang/crates.io-index" 1239 | checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" 1240 | dependencies = [ 1241 | "zerocopy", 1242 | ] 1243 | 1244 | [[package]] 1245 | name = "proc-macro2" 1246 | version = "1.0.95" 1247 | source = "registry+https://github.com/rust-lang/crates.io-index" 1248 | checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" 1249 | dependencies = [ 1250 | "unicode-ident", 1251 | ] 1252 | 1253 | [[package]] 1254 | name = "qoi" 1255 | version = "0.4.1" 1256 | source = "registry+https://github.com/rust-lang/crates.io-index" 1257 | checksum = "7f6d64c71eb498fe9eae14ce4ec935c555749aef511cca85b5568910d6e48001" 1258 | dependencies = [ 1259 | "bytemuck", 1260 | ] 1261 | 1262 | [[package]] 1263 | name = "quote" 1264 | version = "1.0.40" 1265 | source = "registry+https://github.com/rust-lang/crates.io-index" 1266 | checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" 1267 | dependencies = [ 1268 | "proc-macro2", 1269 | ] 1270 | 1271 | [[package]] 1272 | name = "r-efi" 1273 | version = "5.2.0" 1274 | source = "registry+https://github.com/rust-lang/crates.io-index" 1275 | checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" 1276 | 1277 | [[package]] 1278 | name = "rand" 1279 | version = "0.8.5" 1280 | source = "registry+https://github.com/rust-lang/crates.io-index" 1281 | checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 1282 | dependencies = [ 1283 | "libc", 1284 | "rand_chacha", 1285 | "rand_core", 1286 | ] 1287 | 1288 | [[package]] 1289 | name = "rand_chacha" 1290 | version = "0.3.1" 1291 | source = "registry+https://github.com/rust-lang/crates.io-index" 1292 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 1293 | dependencies = [ 1294 | "ppv-lite86", 1295 | "rand_core", 1296 | ] 1297 | 1298 | [[package]] 1299 | name = "rand_core" 1300 | version = "0.6.4" 1301 | source = "registry+https://github.com/rust-lang/crates.io-index" 1302 | checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 1303 | dependencies = [ 1304 | "getrandom 0.2.16", 1305 | ] 1306 | 1307 | [[package]] 1308 | name = "rayon" 1309 | version = "1.10.0" 1310 | source = "registry+https://github.com/rust-lang/crates.io-index" 1311 | checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" 1312 | dependencies = [ 1313 | "either", 1314 | "rayon-core", 1315 | ] 1316 | 1317 | [[package]] 1318 | name = "rayon-core" 1319 | version = "1.12.1" 1320 | source = "registry+https://github.com/rust-lang/crates.io-index" 1321 | checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" 1322 | dependencies = [ 1323 | "crossbeam-deque", 1324 | "crossbeam-utils", 1325 | ] 1326 | 1327 | [[package]] 1328 | name = "redox_users" 1329 | version = "0.4.6" 1330 | source = "registry+https://github.com/rust-lang/crates.io-index" 1331 | checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" 1332 | dependencies = [ 1333 | "getrandom 0.2.16", 1334 | "libredox", 1335 | "thiserror 1.0.69", 1336 | ] 1337 | 1338 | [[package]] 1339 | name = "regex" 1340 | version = "1.11.1" 1341 | source = "registry+https://github.com/rust-lang/crates.io-index" 1342 | checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" 1343 | dependencies = [ 1344 | "aho-corasick", 1345 | "memchr", 1346 | "regex-automata 0.4.9", 1347 | "regex-syntax 0.8.5", 1348 | ] 1349 | 1350 | [[package]] 1351 | name = "regex-automata" 1352 | version = "0.1.10" 1353 | source = "registry+https://github.com/rust-lang/crates.io-index" 1354 | checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" 1355 | dependencies = [ 1356 | "regex-syntax 0.6.29", 1357 | ] 1358 | 1359 | [[package]] 1360 | name = "regex-automata" 1361 | version = "0.4.9" 1362 | source = "registry+https://github.com/rust-lang/crates.io-index" 1363 | checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" 1364 | dependencies = [ 1365 | "aho-corasick", 1366 | "memchr", 1367 | "regex-syntax 0.8.5", 1368 | ] 1369 | 1370 | [[package]] 1371 | name = "regex-syntax" 1372 | version = "0.6.29" 1373 | source = "registry+https://github.com/rust-lang/crates.io-index" 1374 | checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" 1375 | 1376 | [[package]] 1377 | name = "regex-syntax" 1378 | version = "0.8.5" 1379 | source = "registry+https://github.com/rust-lang/crates.io-index" 1380 | checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" 1381 | 1382 | [[package]] 1383 | name = "reqwest" 1384 | version = "0.11.27" 1385 | source = "registry+https://github.com/rust-lang/crates.io-index" 1386 | checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" 1387 | dependencies = [ 1388 | "base64", 1389 | "bytes", 1390 | "encoding_rs", 1391 | "futures-core", 1392 | "futures-util", 1393 | "h2", 1394 | "http 0.2.12", 1395 | "http-body", 1396 | "hyper", 1397 | "hyper-tls", 1398 | "ipnet", 1399 | "js-sys", 1400 | "log", 1401 | "mime", 1402 | "native-tls", 1403 | "once_cell", 1404 | "percent-encoding", 1405 | "pin-project-lite", 1406 | "rustls-pemfile", 1407 | "serde", 1408 | "serde_json", 1409 | "serde_urlencoded", 1410 | "sync_wrapper", 1411 | "system-configuration", 1412 | "tokio", 1413 | "tokio-native-tls", 1414 | "tower-service", 1415 | "url", 1416 | "wasm-bindgen", 1417 | "wasm-bindgen-futures", 1418 | "web-sys", 1419 | "winreg", 1420 | ] 1421 | 1422 | [[package]] 1423 | name = "rmcp" 1424 | version = "0.1.5" 1425 | source = "registry+https://github.com/rust-lang/crates.io-index" 1426 | checksum = "33a0110d28bd076f39e14bfd5b0340216dd18effeb5d02b43215944cc3e5c751" 1427 | dependencies = [ 1428 | "base64", 1429 | "chrono", 1430 | "futures", 1431 | "paste", 1432 | "pin-project-lite", 1433 | "rmcp-macros", 1434 | "schemars", 1435 | "serde", 1436 | "serde_json", 1437 | "thiserror 2.0.12", 1438 | "tokio", 1439 | "tokio-util", 1440 | "tracing", 1441 | ] 1442 | 1443 | [[package]] 1444 | name = "rmcp-macros" 1445 | version = "0.1.5" 1446 | source = "registry+https://github.com/rust-lang/crates.io-index" 1447 | checksum = "a6e2b2fd7497540489fa2db285edd43b7ed14c49157157438664278da6e42a7a" 1448 | dependencies = [ 1449 | "proc-macro2", 1450 | "quote", 1451 | "syn", 1452 | ] 1453 | 1454 | [[package]] 1455 | name = "rustc-demangle" 1456 | version = "0.1.24" 1457 | source = "registry+https://github.com/rust-lang/crates.io-index" 1458 | checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" 1459 | 1460 | [[package]] 1461 | name = "rustix" 1462 | version = "1.0.5" 1463 | source = "registry+https://github.com/rust-lang/crates.io-index" 1464 | checksum = "d97817398dd4bb2e6da002002db259209759911da105da92bec29ccb12cf58bf" 1465 | dependencies = [ 1466 | "bitflags 2.9.0", 1467 | "errno", 1468 | "libc", 1469 | "linux-raw-sys", 1470 | "windows-sys 0.59.0", 1471 | ] 1472 | 1473 | [[package]] 1474 | name = "rustls-pemfile" 1475 | version = "1.0.4" 1476 | source = "registry+https://github.com/rust-lang/crates.io-index" 1477 | checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" 1478 | dependencies = [ 1479 | "base64", 1480 | ] 1481 | 1482 | [[package]] 1483 | name = "rustversion" 1484 | version = "1.0.20" 1485 | source = "registry+https://github.com/rust-lang/crates.io-index" 1486 | checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2" 1487 | 1488 | [[package]] 1489 | name = "ryu" 1490 | version = "1.0.20" 1491 | source = "registry+https://github.com/rust-lang/crates.io-index" 1492 | checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" 1493 | 1494 | [[package]] 1495 | name = "schannel" 1496 | version = "0.1.27" 1497 | source = "registry+https://github.com/rust-lang/crates.io-index" 1498 | checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" 1499 | dependencies = [ 1500 | "windows-sys 0.59.0", 1501 | ] 1502 | 1503 | [[package]] 1504 | name = "schemars" 1505 | version = "0.8.22" 1506 | source = "registry+https://github.com/rust-lang/crates.io-index" 1507 | checksum = "3fbf2ae1b8bc8e02df939598064d22402220cd5bbcca1c76f7d6a310974d5615" 1508 | dependencies = [ 1509 | "dyn-clone", 1510 | "schemars_derive", 1511 | "serde", 1512 | "serde_json", 1513 | ] 1514 | 1515 | [[package]] 1516 | name = "schemars_derive" 1517 | version = "0.8.22" 1518 | source = "registry+https://github.com/rust-lang/crates.io-index" 1519 | checksum = "32e265784ad618884abaea0600a9adf15393368d840e0222d101a072f3f7534d" 1520 | dependencies = [ 1521 | "proc-macro2", 1522 | "quote", 1523 | "serde_derive_internals", 1524 | "syn", 1525 | ] 1526 | 1527 | [[package]] 1528 | name = "scoped-tls" 1529 | version = "1.0.1" 1530 | source = "registry+https://github.com/rust-lang/crates.io-index" 1531 | checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" 1532 | 1533 | [[package]] 1534 | name = "security-framework" 1535 | version = "2.11.1" 1536 | source = "registry+https://github.com/rust-lang/crates.io-index" 1537 | checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" 1538 | dependencies = [ 1539 | "bitflags 2.9.0", 1540 | "core-foundation", 1541 | "core-foundation-sys", 1542 | "libc", 1543 | "security-framework-sys", 1544 | ] 1545 | 1546 | [[package]] 1547 | name = "security-framework-sys" 1548 | version = "2.14.0" 1549 | source = "registry+https://github.com/rust-lang/crates.io-index" 1550 | checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" 1551 | dependencies = [ 1552 | "core-foundation-sys", 1553 | "libc", 1554 | ] 1555 | 1556 | [[package]] 1557 | name = "serde" 1558 | version = "1.0.219" 1559 | source = "registry+https://github.com/rust-lang/crates.io-index" 1560 | checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" 1561 | dependencies = [ 1562 | "serde_derive", 1563 | ] 1564 | 1565 | [[package]] 1566 | name = "serde_derive" 1567 | version = "1.0.219" 1568 | source = "registry+https://github.com/rust-lang/crates.io-index" 1569 | checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" 1570 | dependencies = [ 1571 | "proc-macro2", 1572 | "quote", 1573 | "syn", 1574 | ] 1575 | 1576 | [[package]] 1577 | name = "serde_derive_internals" 1578 | version = "0.29.1" 1579 | source = "registry+https://github.com/rust-lang/crates.io-index" 1580 | checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" 1581 | dependencies = [ 1582 | "proc-macro2", 1583 | "quote", 1584 | "syn", 1585 | ] 1586 | 1587 | [[package]] 1588 | name = "serde_json" 1589 | version = "1.0.140" 1590 | source = "registry+https://github.com/rust-lang/crates.io-index" 1591 | checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" 1592 | dependencies = [ 1593 | "itoa", 1594 | "memchr", 1595 | "ryu", 1596 | "serde", 1597 | ] 1598 | 1599 | [[package]] 1600 | name = "serde_urlencoded" 1601 | version = "0.7.1" 1602 | source = "registry+https://github.com/rust-lang/crates.io-index" 1603 | checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" 1604 | dependencies = [ 1605 | "form_urlencoded", 1606 | "itoa", 1607 | "ryu", 1608 | "serde", 1609 | ] 1610 | 1611 | [[package]] 1612 | name = "sha1" 1613 | version = "0.10.6" 1614 | source = "registry+https://github.com/rust-lang/crates.io-index" 1615 | checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" 1616 | dependencies = [ 1617 | "cfg-if", 1618 | "cpufeatures", 1619 | "digest", 1620 | ] 1621 | 1622 | [[package]] 1623 | name = "sharded-slab" 1624 | version = "0.1.7" 1625 | source = "registry+https://github.com/rust-lang/crates.io-index" 1626 | checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" 1627 | dependencies = [ 1628 | "lazy_static", 1629 | ] 1630 | 1631 | [[package]] 1632 | name = "shlex" 1633 | version = "1.3.0" 1634 | source = "registry+https://github.com/rust-lang/crates.io-index" 1635 | checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" 1636 | 1637 | [[package]] 1638 | name = "simd-adler32" 1639 | version = "0.3.7" 1640 | source = "registry+https://github.com/rust-lang/crates.io-index" 1641 | checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" 1642 | 1643 | [[package]] 1644 | name = "slab" 1645 | version = "0.4.9" 1646 | source = "registry+https://github.com/rust-lang/crates.io-index" 1647 | checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" 1648 | dependencies = [ 1649 | "autocfg", 1650 | ] 1651 | 1652 | [[package]] 1653 | name = "smallvec" 1654 | version = "1.15.0" 1655 | source = "registry+https://github.com/rust-lang/crates.io-index" 1656 | checksum = "8917285742e9f3e1683f0a9c4e6b57960b7314d0b08d30d1ecd426713ee2eee9" 1657 | 1658 | [[package]] 1659 | name = "socket2" 1660 | version = "0.5.9" 1661 | source = "registry+https://github.com/rust-lang/crates.io-index" 1662 | checksum = "4f5fd57c80058a56cf5c777ab8a126398ece8e442983605d280a44ce79d0edef" 1663 | dependencies = [ 1664 | "libc", 1665 | "windows-sys 0.52.0", 1666 | ] 1667 | 1668 | [[package]] 1669 | name = "spin" 1670 | version = "0.9.8" 1671 | source = "registry+https://github.com/rust-lang/crates.io-index" 1672 | checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" 1673 | 1674 | [[package]] 1675 | name = "stable_deref_trait" 1676 | version = "1.2.0" 1677 | source = "registry+https://github.com/rust-lang/crates.io-index" 1678 | checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" 1679 | 1680 | [[package]] 1681 | name = "syn" 1682 | version = "2.0.100" 1683 | source = "registry+https://github.com/rust-lang/crates.io-index" 1684 | checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0" 1685 | dependencies = [ 1686 | "proc-macro2", 1687 | "quote", 1688 | "unicode-ident", 1689 | ] 1690 | 1691 | [[package]] 1692 | name = "sync_wrapper" 1693 | version = "0.1.2" 1694 | source = "registry+https://github.com/rust-lang/crates.io-index" 1695 | checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" 1696 | 1697 | [[package]] 1698 | name = "synstructure" 1699 | version = "0.13.1" 1700 | source = "registry+https://github.com/rust-lang/crates.io-index" 1701 | checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" 1702 | dependencies = [ 1703 | "proc-macro2", 1704 | "quote", 1705 | "syn", 1706 | ] 1707 | 1708 | [[package]] 1709 | name = "system-configuration" 1710 | version = "0.5.1" 1711 | source = "registry+https://github.com/rust-lang/crates.io-index" 1712 | checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" 1713 | dependencies = [ 1714 | "bitflags 1.3.2", 1715 | "core-foundation", 1716 | "system-configuration-sys", 1717 | ] 1718 | 1719 | [[package]] 1720 | name = "system-configuration-sys" 1721 | version = "0.5.0" 1722 | source = "registry+https://github.com/rust-lang/crates.io-index" 1723 | checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" 1724 | dependencies = [ 1725 | "core-foundation-sys", 1726 | "libc", 1727 | ] 1728 | 1729 | [[package]] 1730 | name = "tempfile" 1731 | version = "3.19.1" 1732 | source = "registry+https://github.com/rust-lang/crates.io-index" 1733 | checksum = "7437ac7763b9b123ccf33c338a5cc1bac6f69b45a136c19bdd8a65e3916435bf" 1734 | dependencies = [ 1735 | "fastrand", 1736 | "getrandom 0.3.2", 1737 | "once_cell", 1738 | "rustix", 1739 | "windows-sys 0.59.0", 1740 | ] 1741 | 1742 | [[package]] 1743 | name = "thiserror" 1744 | version = "1.0.69" 1745 | source = "registry+https://github.com/rust-lang/crates.io-index" 1746 | checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" 1747 | dependencies = [ 1748 | "thiserror-impl 1.0.69", 1749 | ] 1750 | 1751 | [[package]] 1752 | name = "thiserror" 1753 | version = "2.0.12" 1754 | source = "registry+https://github.com/rust-lang/crates.io-index" 1755 | checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" 1756 | dependencies = [ 1757 | "thiserror-impl 2.0.12", 1758 | ] 1759 | 1760 | [[package]] 1761 | name = "thiserror-impl" 1762 | version = "1.0.69" 1763 | source = "registry+https://github.com/rust-lang/crates.io-index" 1764 | checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" 1765 | dependencies = [ 1766 | "proc-macro2", 1767 | "quote", 1768 | "syn", 1769 | ] 1770 | 1771 | [[package]] 1772 | name = "thiserror-impl" 1773 | version = "2.0.12" 1774 | source = "registry+https://github.com/rust-lang/crates.io-index" 1775 | checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" 1776 | dependencies = [ 1777 | "proc-macro2", 1778 | "quote", 1779 | "syn", 1780 | ] 1781 | 1782 | [[package]] 1783 | name = "thread_local" 1784 | version = "1.1.8" 1785 | source = "registry+https://github.com/rust-lang/crates.io-index" 1786 | checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" 1787 | dependencies = [ 1788 | "cfg-if", 1789 | "once_cell", 1790 | ] 1791 | 1792 | [[package]] 1793 | name = "tiff" 1794 | version = "0.9.1" 1795 | source = "registry+https://github.com/rust-lang/crates.io-index" 1796 | checksum = "ba1310fcea54c6a9a4fd1aad794ecc02c31682f6bfbecdf460bf19533eed1e3e" 1797 | dependencies = [ 1798 | "flate2", 1799 | "jpeg-decoder", 1800 | "weezl", 1801 | ] 1802 | 1803 | [[package]] 1804 | name = "time" 1805 | version = "0.3.41" 1806 | source = "registry+https://github.com/rust-lang/crates.io-index" 1807 | checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40" 1808 | dependencies = [ 1809 | "deranged", 1810 | "itoa", 1811 | "num-conv", 1812 | "powerfmt", 1813 | "serde", 1814 | "time-core", 1815 | "time-macros", 1816 | ] 1817 | 1818 | [[package]] 1819 | name = "time-core" 1820 | version = "0.1.4" 1821 | source = "registry+https://github.com/rust-lang/crates.io-index" 1822 | checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c" 1823 | 1824 | [[package]] 1825 | name = "time-macros" 1826 | version = "0.2.22" 1827 | source = "registry+https://github.com/rust-lang/crates.io-index" 1828 | checksum = "3526739392ec93fd8b359c8e98514cb3e8e021beb4e5f597b00a0221f8ed8a49" 1829 | dependencies = [ 1830 | "num-conv", 1831 | "time-core", 1832 | ] 1833 | 1834 | [[package]] 1835 | name = "tinystr" 1836 | version = "0.7.6" 1837 | source = "registry+https://github.com/rust-lang/crates.io-index" 1838 | checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" 1839 | dependencies = [ 1840 | "displaydoc", 1841 | "zerovec", 1842 | ] 1843 | 1844 | [[package]] 1845 | name = "tokio" 1846 | version = "1.44.2" 1847 | source = "registry+https://github.com/rust-lang/crates.io-index" 1848 | checksum = "e6b88822cbe49de4185e3a4cbf8321dd487cf5fe0c5c65695fef6346371e9c48" 1849 | dependencies = [ 1850 | "backtrace", 1851 | "bytes", 1852 | "libc", 1853 | "mio", 1854 | "pin-project-lite", 1855 | "socket2", 1856 | "tokio-macros", 1857 | "windows-sys 0.52.0", 1858 | ] 1859 | 1860 | [[package]] 1861 | name = "tokio-macros" 1862 | version = "2.5.0" 1863 | source = "registry+https://github.com/rust-lang/crates.io-index" 1864 | checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" 1865 | dependencies = [ 1866 | "proc-macro2", 1867 | "quote", 1868 | "syn", 1869 | ] 1870 | 1871 | [[package]] 1872 | name = "tokio-native-tls" 1873 | version = "0.3.1" 1874 | source = "registry+https://github.com/rust-lang/crates.io-index" 1875 | checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" 1876 | dependencies = [ 1877 | "native-tls", 1878 | "tokio", 1879 | ] 1880 | 1881 | [[package]] 1882 | name = "tokio-tungstenite" 1883 | version = "0.21.0" 1884 | source = "registry+https://github.com/rust-lang/crates.io-index" 1885 | checksum = "c83b561d025642014097b66e6c1bb422783339e0909e4429cde4749d1990bc38" 1886 | dependencies = [ 1887 | "futures-util", 1888 | "log", 1889 | "tokio", 1890 | "tungstenite", 1891 | ] 1892 | 1893 | [[package]] 1894 | name = "tokio-util" 1895 | version = "0.7.15" 1896 | source = "registry+https://github.com/rust-lang/crates.io-index" 1897 | checksum = "66a539a9ad6d5d281510d5bd368c973d636c02dbf8a67300bfb6b950696ad7df" 1898 | dependencies = [ 1899 | "bytes", 1900 | "futures-core", 1901 | "futures-sink", 1902 | "pin-project-lite", 1903 | "tokio", 1904 | ] 1905 | 1906 | [[package]] 1907 | name = "tower-service" 1908 | version = "0.3.3" 1909 | source = "registry+https://github.com/rust-lang/crates.io-index" 1910 | checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" 1911 | 1912 | [[package]] 1913 | name = "tracing" 1914 | version = "0.1.41" 1915 | source = "registry+https://github.com/rust-lang/crates.io-index" 1916 | checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" 1917 | dependencies = [ 1918 | "log", 1919 | "pin-project-lite", 1920 | "tracing-attributes", 1921 | "tracing-core", 1922 | ] 1923 | 1924 | [[package]] 1925 | name = "tracing-appender" 1926 | version = "0.2.3" 1927 | source = "registry+https://github.com/rust-lang/crates.io-index" 1928 | checksum = "3566e8ce28cc0a3fe42519fc80e6b4c943cc4c8cef275620eb8dac2d3d4e06cf" 1929 | dependencies = [ 1930 | "crossbeam-channel", 1931 | "thiserror 1.0.69", 1932 | "time", 1933 | "tracing-subscriber", 1934 | ] 1935 | 1936 | [[package]] 1937 | name = "tracing-attributes" 1938 | version = "0.1.28" 1939 | source = "registry+https://github.com/rust-lang/crates.io-index" 1940 | checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" 1941 | dependencies = [ 1942 | "proc-macro2", 1943 | "quote", 1944 | "syn", 1945 | ] 1946 | 1947 | [[package]] 1948 | name = "tracing-core" 1949 | version = "0.1.33" 1950 | source = "registry+https://github.com/rust-lang/crates.io-index" 1951 | checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" 1952 | dependencies = [ 1953 | "once_cell", 1954 | "valuable", 1955 | ] 1956 | 1957 | [[package]] 1958 | name = "tracing-log" 1959 | version = "0.2.0" 1960 | source = "registry+https://github.com/rust-lang/crates.io-index" 1961 | checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" 1962 | dependencies = [ 1963 | "log", 1964 | "once_cell", 1965 | "tracing-core", 1966 | ] 1967 | 1968 | [[package]] 1969 | name = "tracing-subscriber" 1970 | version = "0.3.19" 1971 | source = "registry+https://github.com/rust-lang/crates.io-index" 1972 | checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" 1973 | dependencies = [ 1974 | "matchers", 1975 | "nu-ansi-term", 1976 | "once_cell", 1977 | "regex", 1978 | "sharded-slab", 1979 | "smallvec", 1980 | "thread_local", 1981 | "tracing", 1982 | "tracing-core", 1983 | "tracing-log", 1984 | ] 1985 | 1986 | [[package]] 1987 | name = "try-lock" 1988 | version = "0.2.5" 1989 | source = "registry+https://github.com/rust-lang/crates.io-index" 1990 | checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" 1991 | 1992 | [[package]] 1993 | name = "tungstenite" 1994 | version = "0.21.0" 1995 | source = "registry+https://github.com/rust-lang/crates.io-index" 1996 | checksum = "9ef1a641ea34f399a848dea702823bbecfb4c486f911735368f1f137cb8257e1" 1997 | dependencies = [ 1998 | "byteorder", 1999 | "bytes", 2000 | "data-encoding", 2001 | "http 1.3.1", 2002 | "httparse", 2003 | "log", 2004 | "rand", 2005 | "sha1", 2006 | "thiserror 1.0.69", 2007 | "url", 2008 | "utf-8", 2009 | ] 2010 | 2011 | [[package]] 2012 | name = "typenum" 2013 | version = "1.18.0" 2014 | source = "registry+https://github.com/rust-lang/crates.io-index" 2015 | checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" 2016 | 2017 | [[package]] 2018 | name = "unicase" 2019 | version = "2.8.1" 2020 | source = "registry+https://github.com/rust-lang/crates.io-index" 2021 | checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" 2022 | 2023 | [[package]] 2024 | name = "unicode-ident" 2025 | version = "1.0.18" 2026 | source = "registry+https://github.com/rust-lang/crates.io-index" 2027 | checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" 2028 | 2029 | [[package]] 2030 | name = "url" 2031 | version = "2.5.4" 2032 | source = "registry+https://github.com/rust-lang/crates.io-index" 2033 | checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" 2034 | dependencies = [ 2035 | "form_urlencoded", 2036 | "idna", 2037 | "percent-encoding", 2038 | ] 2039 | 2040 | [[package]] 2041 | name = "utf-8" 2042 | version = "0.7.6" 2043 | source = "registry+https://github.com/rust-lang/crates.io-index" 2044 | checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" 2045 | 2046 | [[package]] 2047 | name = "utf16_iter" 2048 | version = "1.0.5" 2049 | source = "registry+https://github.com/rust-lang/crates.io-index" 2050 | checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" 2051 | 2052 | [[package]] 2053 | name = "utf8_iter" 2054 | version = "1.0.4" 2055 | source = "registry+https://github.com/rust-lang/crates.io-index" 2056 | checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" 2057 | 2058 | [[package]] 2059 | name = "valuable" 2060 | version = "0.1.1" 2061 | source = "registry+https://github.com/rust-lang/crates.io-index" 2062 | checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" 2063 | 2064 | [[package]] 2065 | name = "vcpkg" 2066 | version = "0.2.15" 2067 | source = "registry+https://github.com/rust-lang/crates.io-index" 2068 | checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" 2069 | 2070 | [[package]] 2071 | name = "version_check" 2072 | version = "0.9.5" 2073 | source = "registry+https://github.com/rust-lang/crates.io-index" 2074 | checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" 2075 | 2076 | [[package]] 2077 | name = "want" 2078 | version = "0.3.1" 2079 | source = "registry+https://github.com/rust-lang/crates.io-index" 2080 | checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" 2081 | dependencies = [ 2082 | "try-lock", 2083 | ] 2084 | 2085 | [[package]] 2086 | name = "warp" 2087 | version = "0.3.7" 2088 | source = "registry+https://github.com/rust-lang/crates.io-index" 2089 | checksum = "4378d202ff965b011c64817db11d5829506d3404edeadb61f190d111da3f231c" 2090 | dependencies = [ 2091 | "bytes", 2092 | "futures-channel", 2093 | "futures-util", 2094 | "headers", 2095 | "http 0.2.12", 2096 | "hyper", 2097 | "log", 2098 | "mime", 2099 | "mime_guess", 2100 | "multer", 2101 | "percent-encoding", 2102 | "pin-project", 2103 | "scoped-tls", 2104 | "serde", 2105 | "serde_json", 2106 | "serde_urlencoded", 2107 | "tokio", 2108 | "tokio-tungstenite", 2109 | "tokio-util", 2110 | "tower-service", 2111 | "tracing", 2112 | ] 2113 | 2114 | [[package]] 2115 | name = "wasi" 2116 | version = "0.11.0+wasi-snapshot-preview1" 2117 | source = "registry+https://github.com/rust-lang/crates.io-index" 2118 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 2119 | 2120 | [[package]] 2121 | name = "wasi" 2122 | version = "0.14.2+wasi-0.2.4" 2123 | source = "registry+https://github.com/rust-lang/crates.io-index" 2124 | checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" 2125 | dependencies = [ 2126 | "wit-bindgen-rt", 2127 | ] 2128 | 2129 | [[package]] 2130 | name = "wasm-bindgen" 2131 | version = "0.2.100" 2132 | source = "registry+https://github.com/rust-lang/crates.io-index" 2133 | checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" 2134 | dependencies = [ 2135 | "cfg-if", 2136 | "once_cell", 2137 | "rustversion", 2138 | "wasm-bindgen-macro", 2139 | ] 2140 | 2141 | [[package]] 2142 | name = "wasm-bindgen-backend" 2143 | version = "0.2.100" 2144 | source = "registry+https://github.com/rust-lang/crates.io-index" 2145 | checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" 2146 | dependencies = [ 2147 | "bumpalo", 2148 | "log", 2149 | "proc-macro2", 2150 | "quote", 2151 | "syn", 2152 | "wasm-bindgen-shared", 2153 | ] 2154 | 2155 | [[package]] 2156 | name = "wasm-bindgen-futures" 2157 | version = "0.4.50" 2158 | source = "registry+https://github.com/rust-lang/crates.io-index" 2159 | checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" 2160 | dependencies = [ 2161 | "cfg-if", 2162 | "js-sys", 2163 | "once_cell", 2164 | "wasm-bindgen", 2165 | "web-sys", 2166 | ] 2167 | 2168 | [[package]] 2169 | name = "wasm-bindgen-macro" 2170 | version = "0.2.100" 2171 | source = "registry+https://github.com/rust-lang/crates.io-index" 2172 | checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" 2173 | dependencies = [ 2174 | "quote", 2175 | "wasm-bindgen-macro-support", 2176 | ] 2177 | 2178 | [[package]] 2179 | name = "wasm-bindgen-macro-support" 2180 | version = "0.2.100" 2181 | source = "registry+https://github.com/rust-lang/crates.io-index" 2182 | checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" 2183 | dependencies = [ 2184 | "proc-macro2", 2185 | "quote", 2186 | "syn", 2187 | "wasm-bindgen-backend", 2188 | "wasm-bindgen-shared", 2189 | ] 2190 | 2191 | [[package]] 2192 | name = "wasm-bindgen-shared" 2193 | version = "0.2.100" 2194 | source = "registry+https://github.com/rust-lang/crates.io-index" 2195 | checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" 2196 | dependencies = [ 2197 | "unicode-ident", 2198 | ] 2199 | 2200 | [[package]] 2201 | name = "web-sys" 2202 | version = "0.3.77" 2203 | source = "registry+https://github.com/rust-lang/crates.io-index" 2204 | checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" 2205 | dependencies = [ 2206 | "js-sys", 2207 | "wasm-bindgen", 2208 | ] 2209 | 2210 | [[package]] 2211 | name = "weezl" 2212 | version = "0.1.8" 2213 | source = "registry+https://github.com/rust-lang/crates.io-index" 2214 | checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082" 2215 | 2216 | [[package]] 2217 | name = "winapi" 2218 | version = "0.3.9" 2219 | source = "registry+https://github.com/rust-lang/crates.io-index" 2220 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 2221 | dependencies = [ 2222 | "winapi-i686-pc-windows-gnu", 2223 | "winapi-x86_64-pc-windows-gnu", 2224 | ] 2225 | 2226 | [[package]] 2227 | name = "winapi-i686-pc-windows-gnu" 2228 | version = "0.4.0" 2229 | source = "registry+https://github.com/rust-lang/crates.io-index" 2230 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 2231 | 2232 | [[package]] 2233 | name = "winapi-x86_64-pc-windows-gnu" 2234 | version = "0.4.0" 2235 | source = "registry+https://github.com/rust-lang/crates.io-index" 2236 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 2237 | 2238 | [[package]] 2239 | name = "windows-core" 2240 | version = "0.61.0" 2241 | source = "registry+https://github.com/rust-lang/crates.io-index" 2242 | checksum = "4763c1de310c86d75a878046489e2e5ba02c649d185f21c67d4cf8a56d098980" 2243 | dependencies = [ 2244 | "windows-implement", 2245 | "windows-interface", 2246 | "windows-link", 2247 | "windows-result", 2248 | "windows-strings", 2249 | ] 2250 | 2251 | [[package]] 2252 | name = "windows-implement" 2253 | version = "0.60.0" 2254 | source = "registry+https://github.com/rust-lang/crates.io-index" 2255 | checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" 2256 | dependencies = [ 2257 | "proc-macro2", 2258 | "quote", 2259 | "syn", 2260 | ] 2261 | 2262 | [[package]] 2263 | name = "windows-interface" 2264 | version = "0.59.1" 2265 | source = "registry+https://github.com/rust-lang/crates.io-index" 2266 | checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" 2267 | dependencies = [ 2268 | "proc-macro2", 2269 | "quote", 2270 | "syn", 2271 | ] 2272 | 2273 | [[package]] 2274 | name = "windows-link" 2275 | version = "0.1.1" 2276 | source = "registry+https://github.com/rust-lang/crates.io-index" 2277 | checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" 2278 | 2279 | [[package]] 2280 | name = "windows-result" 2281 | version = "0.3.2" 2282 | source = "registry+https://github.com/rust-lang/crates.io-index" 2283 | checksum = "c64fd11a4fd95df68efcfee5f44a294fe71b8bc6a91993e2791938abcc712252" 2284 | dependencies = [ 2285 | "windows-link", 2286 | ] 2287 | 2288 | [[package]] 2289 | name = "windows-strings" 2290 | version = "0.4.0" 2291 | source = "registry+https://github.com/rust-lang/crates.io-index" 2292 | checksum = "7a2ba9642430ee452d5a7aa78d72907ebe8cfda358e8cb7918a2050581322f97" 2293 | dependencies = [ 2294 | "windows-link", 2295 | ] 2296 | 2297 | [[package]] 2298 | name = "windows-sys" 2299 | version = "0.48.0" 2300 | source = "registry+https://github.com/rust-lang/crates.io-index" 2301 | checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" 2302 | dependencies = [ 2303 | "windows-targets 0.48.5", 2304 | ] 2305 | 2306 | [[package]] 2307 | name = "windows-sys" 2308 | version = "0.52.0" 2309 | source = "registry+https://github.com/rust-lang/crates.io-index" 2310 | checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" 2311 | dependencies = [ 2312 | "windows-targets 0.52.6", 2313 | ] 2314 | 2315 | [[package]] 2316 | name = "windows-sys" 2317 | version = "0.59.0" 2318 | source = "registry+https://github.com/rust-lang/crates.io-index" 2319 | checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" 2320 | dependencies = [ 2321 | "windows-targets 0.52.6", 2322 | ] 2323 | 2324 | [[package]] 2325 | name = "windows-targets" 2326 | version = "0.48.5" 2327 | source = "registry+https://github.com/rust-lang/crates.io-index" 2328 | checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" 2329 | dependencies = [ 2330 | "windows_aarch64_gnullvm 0.48.5", 2331 | "windows_aarch64_msvc 0.48.5", 2332 | "windows_i686_gnu 0.48.5", 2333 | "windows_i686_msvc 0.48.5", 2334 | "windows_x86_64_gnu 0.48.5", 2335 | "windows_x86_64_gnullvm 0.48.5", 2336 | "windows_x86_64_msvc 0.48.5", 2337 | ] 2338 | 2339 | [[package]] 2340 | name = "windows-targets" 2341 | version = "0.52.6" 2342 | source = "registry+https://github.com/rust-lang/crates.io-index" 2343 | checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" 2344 | dependencies = [ 2345 | "windows_aarch64_gnullvm 0.52.6", 2346 | "windows_aarch64_msvc 0.52.6", 2347 | "windows_i686_gnu 0.52.6", 2348 | "windows_i686_gnullvm", 2349 | "windows_i686_msvc 0.52.6", 2350 | "windows_x86_64_gnu 0.52.6", 2351 | "windows_x86_64_gnullvm 0.52.6", 2352 | "windows_x86_64_msvc 0.52.6", 2353 | ] 2354 | 2355 | [[package]] 2356 | name = "windows_aarch64_gnullvm" 2357 | version = "0.48.5" 2358 | source = "registry+https://github.com/rust-lang/crates.io-index" 2359 | checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" 2360 | 2361 | [[package]] 2362 | name = "windows_aarch64_gnullvm" 2363 | version = "0.52.6" 2364 | source = "registry+https://github.com/rust-lang/crates.io-index" 2365 | checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" 2366 | 2367 | [[package]] 2368 | name = "windows_aarch64_msvc" 2369 | version = "0.48.5" 2370 | source = "registry+https://github.com/rust-lang/crates.io-index" 2371 | checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" 2372 | 2373 | [[package]] 2374 | name = "windows_aarch64_msvc" 2375 | version = "0.52.6" 2376 | source = "registry+https://github.com/rust-lang/crates.io-index" 2377 | checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" 2378 | 2379 | [[package]] 2380 | name = "windows_i686_gnu" 2381 | version = "0.48.5" 2382 | source = "registry+https://github.com/rust-lang/crates.io-index" 2383 | checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" 2384 | 2385 | [[package]] 2386 | name = "windows_i686_gnu" 2387 | version = "0.52.6" 2388 | source = "registry+https://github.com/rust-lang/crates.io-index" 2389 | checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" 2390 | 2391 | [[package]] 2392 | name = "windows_i686_gnullvm" 2393 | version = "0.52.6" 2394 | source = "registry+https://github.com/rust-lang/crates.io-index" 2395 | checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" 2396 | 2397 | [[package]] 2398 | name = "windows_i686_msvc" 2399 | version = "0.48.5" 2400 | source = "registry+https://github.com/rust-lang/crates.io-index" 2401 | checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" 2402 | 2403 | [[package]] 2404 | name = "windows_i686_msvc" 2405 | version = "0.52.6" 2406 | source = "registry+https://github.com/rust-lang/crates.io-index" 2407 | checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" 2408 | 2409 | [[package]] 2410 | name = "windows_x86_64_gnu" 2411 | version = "0.48.5" 2412 | source = "registry+https://github.com/rust-lang/crates.io-index" 2413 | checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" 2414 | 2415 | [[package]] 2416 | name = "windows_x86_64_gnu" 2417 | version = "0.52.6" 2418 | source = "registry+https://github.com/rust-lang/crates.io-index" 2419 | checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" 2420 | 2421 | [[package]] 2422 | name = "windows_x86_64_gnullvm" 2423 | version = "0.48.5" 2424 | source = "registry+https://github.com/rust-lang/crates.io-index" 2425 | checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" 2426 | 2427 | [[package]] 2428 | name = "windows_x86_64_gnullvm" 2429 | version = "0.52.6" 2430 | source = "registry+https://github.com/rust-lang/crates.io-index" 2431 | checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" 2432 | 2433 | [[package]] 2434 | name = "windows_x86_64_msvc" 2435 | version = "0.48.5" 2436 | source = "registry+https://github.com/rust-lang/crates.io-index" 2437 | checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" 2438 | 2439 | [[package]] 2440 | name = "windows_x86_64_msvc" 2441 | version = "0.52.6" 2442 | source = "registry+https://github.com/rust-lang/crates.io-index" 2443 | checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" 2444 | 2445 | [[package]] 2446 | name = "winreg" 2447 | version = "0.50.0" 2448 | source = "registry+https://github.com/rust-lang/crates.io-index" 2449 | checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" 2450 | dependencies = [ 2451 | "cfg-if", 2452 | "windows-sys 0.48.0", 2453 | ] 2454 | 2455 | [[package]] 2456 | name = "wit-bindgen-rt" 2457 | version = "0.39.0" 2458 | source = "registry+https://github.com/rust-lang/crates.io-index" 2459 | checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" 2460 | dependencies = [ 2461 | "bitflags 2.9.0", 2462 | ] 2463 | 2464 | [[package]] 2465 | name = "write16" 2466 | version = "1.0.0" 2467 | source = "registry+https://github.com/rust-lang/crates.io-index" 2468 | checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" 2469 | 2470 | [[package]] 2471 | name = "writeable" 2472 | version = "0.5.5" 2473 | source = "registry+https://github.com/rust-lang/crates.io-index" 2474 | checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" 2475 | 2476 | [[package]] 2477 | name = "yoke" 2478 | version = "0.7.5" 2479 | source = "registry+https://github.com/rust-lang/crates.io-index" 2480 | checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" 2481 | dependencies = [ 2482 | "serde", 2483 | "stable_deref_trait", 2484 | "yoke-derive", 2485 | "zerofrom", 2486 | ] 2487 | 2488 | [[package]] 2489 | name = "yoke-derive" 2490 | version = "0.7.5" 2491 | source = "registry+https://github.com/rust-lang/crates.io-index" 2492 | checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" 2493 | dependencies = [ 2494 | "proc-macro2", 2495 | "quote", 2496 | "syn", 2497 | "synstructure", 2498 | ] 2499 | 2500 | [[package]] 2501 | name = "zerocopy" 2502 | version = "0.8.25" 2503 | source = "registry+https://github.com/rust-lang/crates.io-index" 2504 | checksum = "a1702d9583232ddb9174e01bb7c15a2ab8fb1bc6f227aa1233858c351a3ba0cb" 2505 | dependencies = [ 2506 | "zerocopy-derive", 2507 | ] 2508 | 2509 | [[package]] 2510 | name = "zerocopy-derive" 2511 | version = "0.8.25" 2512 | source = "registry+https://github.com/rust-lang/crates.io-index" 2513 | checksum = "28a6e20d751156648aa063f3800b706ee209a32c0b4d9f24be3d980b01be55ef" 2514 | dependencies = [ 2515 | "proc-macro2", 2516 | "quote", 2517 | "syn", 2518 | ] 2519 | 2520 | [[package]] 2521 | name = "zerofrom" 2522 | version = "0.1.6" 2523 | source = "registry+https://github.com/rust-lang/crates.io-index" 2524 | checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" 2525 | dependencies = [ 2526 | "zerofrom-derive", 2527 | ] 2528 | 2529 | [[package]] 2530 | name = "zerofrom-derive" 2531 | version = "0.1.6" 2532 | source = "registry+https://github.com/rust-lang/crates.io-index" 2533 | checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" 2534 | dependencies = [ 2535 | "proc-macro2", 2536 | "quote", 2537 | "syn", 2538 | "synstructure", 2539 | ] 2540 | 2541 | [[package]] 2542 | name = "zerovec" 2543 | version = "0.10.4" 2544 | source = "registry+https://github.com/rust-lang/crates.io-index" 2545 | checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" 2546 | dependencies = [ 2547 | "yoke", 2548 | "zerofrom", 2549 | "zerovec-derive", 2550 | ] 2551 | 2552 | [[package]] 2553 | name = "zerovec-derive" 2554 | version = "0.10.3" 2555 | source = "registry+https://github.com/rust-lang/crates.io-index" 2556 | checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" 2557 | dependencies = [ 2558 | "proc-macro2", 2559 | "quote", 2560 | "syn", 2561 | ] 2562 | 2563 | [[package]] 2564 | name = "zune-inflate" 2565 | version = "0.2.54" 2566 | source = "registry+https://github.com/rust-lang/crates.io-index" 2567 | checksum = "73ab332fe2f6680068f3582b16a24f90ad7096d5d39b974d1c0aff0125116f02" 2568 | dependencies = [ 2569 | "simd-adler32", 2570 | ] 2571 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "imagen3-mcp" 3 | version = "0.1.0" 4 | edition = "2024" 5 | 6 | [dependencies] 7 | rmcp = { version = "0.1", features = ["server", "transport-io"] } 8 | tokio = { version = "1.44.2", features = ["macros", "rt-multi-thread", "fs", "io-util"] } 9 | tokio-util = "0.7.15" 10 | serde = { version = "1.0", features = ["derive"] } 11 | serde_json = "1.0" 12 | warp = "0.3" 13 | image = "0.24.8" 14 | directories = "5.0.1" 15 | reqwest = { version = "0.11", features = ["json"] } 16 | base64 = "0.21" 17 | chrono = "0.4" 18 | nanoid = "0.4.0" 19 | tracing = "0.1" 20 | tracing-subscriber = { version = "0.3", features = ["env-filter", "fmt"] } 21 | tracing-appender = "0.2" 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Imagen3-MCP 2 | 3 | [English Version](#imagen3-mcp-english) 4 | 5 | 基于 Google 的 Imagen 3.0 的图像生成工具,通过 MCP(Model Control Protocol)提供服务。 6 | 7 | ## 效果 8 | 9 | 画一只奔跑的杰克罗素犬,长焦镜头,阳光透过狗狗的毛发,照片级画质 10 | 11 | ![奔跑的杰克罗素犬](./docs/Snipaste_2025-04-26_15-18-15.png) 12 | 13 | 画一个科技感十足的苹果 14 | 15 | ![科技感十足的苹果](./docs/Snipaste_2025-04-26_15-18-02.png) 16 | 17 | ## 安装要求 18 | 19 | - 有效的 [Google Gemini API 密钥](https://aistudio.google.com/apikey) 20 | 21 | ## 安装步骤——Cherry Studio 22 | 23 | 1. 从 [GitHub Releases](https://github.com/hamflx/imagen3-mcp/releases) 下载最新版本的可执行文件 24 | 2. 将下载的可执行文件放置在系统中的任意位置,例如 `C:\bin\imagen3-mcp.exe` 25 | 3. 在 Cherry Studio 中配置: 26 | - Command 字段填写可执行文件路径,例如 `C:\bin\imagen3-mcp.exe` 27 | - 环境变量 `GEMINI_API_KEY` 中填写你的 Gemini API 密钥 28 | - [可选] 环境变量 `BASE_URL` 中填写代理地址,例如 `https://lingxi-proxy.hamflx.dev/api/provider/google`(这个地址可以解决 GFW 的问题,但是解决不了 Google 对 IP 的限制问题,因此还是得挂梯子)。 29 | - [可选] 环境变量 `SERVER_LISTEN_ADDR`:设置服务器监听的 IP 地址(默认为 `127.0.0.1`)。 30 | - [可选] 环境变量 `SERVER_PORT`:设置服务器监听的端口和图片 URL 使用的端口(默认为 `9981`)。 31 | - [可选] 环境变量 `IMAGE_RESOURCE_SERVER_ADDR`:设置图片 URL 中使用的服务器地址(默认为 `127.0.0.1`)。这在服务器运行在容器或远程机器上时很有用。 32 | 33 | ![配置](./docs/config.png) 34 | 35 | ## 安装步骤——Cursor 36 | 37 | ```json 38 | { 39 | "mcpServers": { 40 | "imagen3": { 41 | "command": "C:\\bin\\imagen3-mcp.exe", 42 | "env": { 43 | "GEMINI_API_KEY": "" 44 | // Optional environment variables: 45 | // "BASE_URL": "", 46 | // "SERVER_LISTEN_ADDR": "0.0.0.0", // Example: Listen on all interfaces 47 | // "SERVER_PORT": "9981", 48 | // "IMAGE_RESOURCE_SERVER_ADDR": "your.domain.com" // Example: Use a domain name for image URLs 49 | } 50 | } 51 | } 52 | } 53 | ``` 54 | 55 | ## 许可证 56 | 57 | MIT 58 | 59 | --- 60 | 61 | # Imagen3-MCP (English) 62 | 63 | An image generation tool based on Google's Imagen 3.0, providing services through MCP (Model Control Protocol). 64 | 65 | ## Examples 66 | 67 | A running Jack Russell Terrier, telephoto lens, sunlight filtering through the dog's fur, photorealistic quality 68 | 69 | ![Running Jack Russell Terrier](./docs/Snipaste_2025-04-26_15-18-15.png) 70 | 71 | A high-tech apple 72 | 73 | ![High-tech apple](./docs/Snipaste_2025-04-26_15-18-02.png) 74 | 75 | ## Requirements 76 | 77 | - Valid [Google Gemini API key](https://aistudio.google.com/apikey) 78 | 79 | ## Installation Steps—Cherry Studio 80 | 81 | 1. Download the latest executable from [GitHub Releases](https://github.com/hamflx/imagen3-mcp/releases) 82 | 2. Place the downloaded executable anywhere in your system, e.g., `C:\bin\imagen3-mcp.exe` 83 | 3. Configure in Cherry Studio: 84 | - Fill in the Command field with the executable path, e.g., `C:\bin\imagen3-mcp.exe` 85 | - Enter your Gemini API key in the `GEMINI_API_KEY` environment variable 86 | - [Optional] Enter a proxy URL in the `BASE_URL` environment variable, e.g., `https://your-proxy.com`. 87 | - [Optional] Set the `SERVER_LISTEN_ADDR` environment variable: The IP address the server listens on (defaults to `127.0.0.1`). 88 | - [Optional] Set the `SERVER_PORT` environment variable: The port the server listens on and uses for image URLs (defaults to `9981`). 89 | - [Optional] Set the `IMAGE_RESOURCE_SERVER_ADDR` environment variable: The server address used in the image URLs (defaults to `127.0.0.1`). Useful if the server runs in a container or remote machine. 90 | 91 | ![Configuration](./docs/config.png) 92 | 93 | ## Installation Steps—Cursor 94 | 95 | ```json 96 | { 97 | "mcpServers": { 98 | "imagen3": { 99 | "command": "C:\\bin\\imagen3-mcp.exe", 100 | "env": { 101 | "GEMINI_API_KEY": "" 102 | // Optional environment variables: 103 | // "BASE_URL": "", 104 | // "SERVER_LISTEN_ADDR": "0.0.0.0", // Example: Listen on all interfaces 105 | // "SERVER_PORT": "9981", 106 | // "IMAGE_RESOURCE_SERVER_ADDR": "your.domain.com" // Example: Use a domain name for image URLs 107 | } 108 | } 109 | } 110 | } 111 | ``` 112 | 113 | ## License 114 | 115 | MIT 116 | -------------------------------------------------------------------------------- /docs/Snipaste_2025-04-26_15-18-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hamflx/imagen3-mcp/1b293dca12153bb0440de5091825b3c746b6cf9d/docs/Snipaste_2025-04-26_15-18-02.png -------------------------------------------------------------------------------- /docs/Snipaste_2025-04-26_15-18-15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hamflx/imagen3-mcp/1b293dca12153bb0440de5091825b3c746b6cf9d/docs/Snipaste_2025-04-26_15-18-15.png -------------------------------------------------------------------------------- /docs/config.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hamflx/imagen3-mcp/1b293dca12153bb0440de5091825b3c746b6cf9d/docs/config.png -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | use base64::{self, Engine as _}; 2 | use chrono; 3 | use directories::ProjectDirs; 4 | use nanoid; 5 | use reqwest; 6 | use rmcp::{ 7 | ServerHandler, ServiceExt, 8 | model::{Implementation, ServerCapabilities, ServerInfo}, 9 | schemars, tool, 10 | }; 11 | use serde::{Deserialize, Serialize}; 12 | use std::env; 13 | use std::fs; 14 | use std::net::SocketAddr; 15 | use std::path::PathBuf; 16 | use tracing::{error, info, instrument}; 17 | use tracing_subscriber::{EnvFilter, fmt, prelude::*}; 18 | use warp::Filter; 19 | 20 | #[derive(Debug, Clone)] 21 | struct ImageGenerationServer { 22 | resources_path: PathBuf, 23 | image_resource_server_addr: String, 24 | server_port: u16, 25 | } 26 | 27 | #[derive(Debug, Deserialize, schemars::JsonSchema)] 28 | struct ImagePrompt { 29 | #[schemars( 30 | description = "The prompt text for image generation. The prompt MUST be in English." 31 | )] 32 | prompt: String, 33 | 34 | // Supported values are "1:1", "3:4", "4:3", "9:16", and "16:9". The default is "1:1". 35 | #[schemars( 36 | description = "The aspect ratio of the image to generate. Supported values are \"1:1\", \"3:4\", \"4:3\", \"9:16\", and \"16:9\". The default is \"1:1\"." 37 | )] 38 | aspect_ratio: Option, 39 | } 40 | 41 | // Request and response structures for the Gemini API 42 | #[derive(Debug, Serialize)] 43 | struct GeminiRequest { 44 | instances: Vec, 45 | parameters: GeminiParameters, 46 | } 47 | 48 | #[derive(Debug, Serialize)] 49 | struct GeminiInstance { 50 | prompt: String, 51 | } 52 | 53 | #[derive(Debug, Serialize)] 54 | struct GeminiParameters { 55 | #[serde(rename = "sampleCount")] 56 | sample_count: i32, 57 | #[serde(rename = "aspectRatio")] 58 | aspect_ratio: Option, 59 | } 60 | 61 | #[derive(Debug, Deserialize)] 62 | struct GeminiResponse { 63 | predictions: Option>, 64 | } 65 | 66 | #[derive(Debug, Deserialize)] 67 | struct GeminiPrediction { 68 | #[serde(rename = "mimeType")] 69 | mime_type: String, 70 | #[serde(rename = "bytesBase64Encoded")] 71 | bytes_base64_encoded: String, 72 | } 73 | 74 | // Function to generate an image using the Gemini API 75 | #[instrument(skip(resources_path), fields(prompt_length = prompt.len()))] 76 | async fn generate_image_from_gemini( 77 | prompt: &str, 78 | aspect_ratio: Option<&str>, 79 | resources_path: &PathBuf, 80 | ) -> Result, Box> { 81 | info!(?prompt, ?aspect_ratio, "Generating image from Gemini"); 82 | 83 | // Get the API key from environment variables 84 | let api_key = 85 | env::var("GEMINI_API_KEY").map_err(|_| "GEMINI_API_KEY environment variable not set")?; 86 | 87 | // Create the request 88 | let request = GeminiRequest { 89 | instances: vec![GeminiInstance { 90 | prompt: prompt.to_string(), 91 | }], 92 | parameters: GeminiParameters { 93 | sample_count: 1, // Just generate one image 94 | aspect_ratio: aspect_ratio.map(|s| s.to_string()), 95 | }, 96 | }; 97 | info!( 98 | "Sending request to Gemini: {}", 99 | serde_json::to_string(&request)? 100 | ); 101 | 102 | // Create URL with API key 103 | let base_url = env::var("BASE_URL") 104 | .unwrap_or_else(|_| "https://generativelanguage.googleapis.com".to_string()); 105 | let url = format!( 106 | "{}/v1beta/models/imagen-3.0-generate-002:predict?key={}", 107 | base_url, api_key 108 | ); 109 | 110 | // Make the request 111 | let client = reqwest::Client::new(); 112 | let response_result = client.post(&url).json(&request).send().await; 113 | 114 | let response_text = match response_result { 115 | Ok(resp) => resp.text().await?, 116 | Err(e) => { 117 | error!("Failed to send request to Gemini: {}", e); 118 | return Err(e.into()); 119 | } 120 | }; 121 | 122 | let response: GeminiResponse = match serde_json::from_str(&response_text) { 123 | Ok(response) => response, 124 | Err(e) => { 125 | error!( 126 | response_body = %response_text, 127 | "Failed to parse Gemini response: {}", 128 | e 129 | ); 130 | return Err(format!( 131 | "Failed to parse Gemini response: {} 132 | The response was: {}", 133 | e, response_text 134 | ) 135 | .into()); 136 | } 137 | }; 138 | 139 | let predictions = response.predictions.unwrap_or_default(); 140 | 141 | // Make sure we got at least one prediction 142 | if predictions.is_empty() { 143 | error!("No images were generated by Gemini. This might be due to safety filters."); 144 | return Err("No images were generated. This might be due to the image not passing Google's safety review.".into()); 145 | } 146 | 147 | let mut filenames = Vec::new(); 148 | 149 | // Get the first prediction 150 | for pred in predictions { 151 | // Generate a filename based on the prompt 152 | let timestamp = chrono::Local::now().format("%Y%m%d%H%M%S").to_string(); 153 | let id = nanoid::nanoid!(10); 154 | let filename = format!("{}_{}.png", id, timestamp); 155 | let path = resources_path.join("images").join(&filename); 156 | 157 | // Decode the base64 image using updated API 158 | let image_data = 159 | match base64::engine::general_purpose::STANDARD.decode(&pred.bytes_base64_encoded) { 160 | Ok(data) => data, 161 | Err(e) => { 162 | error!("Failed to decode base64 image: {}", e); 163 | return Err(e.into()); 164 | } 165 | }; 166 | 167 | // Write the image to disk 168 | if let Err(e) = fs::write(&path, &image_data) { 169 | error!(file_path = %path.display(), "Failed to write image to disk: {}", e); 170 | return Err(e.into()); 171 | } 172 | info!(file_path = %path.display(), "Successfully saved generated image."); 173 | 174 | filenames.push(filename); 175 | } 176 | 177 | Ok(filenames) 178 | } 179 | 180 | // Define the tool and its implementation 181 | #[tool(tool_box)] 182 | impl ImageGenerationServer { 183 | #[tool( 184 | description = "Generate an image based on a prompt. Returns an image URL that can be used in markdown format like ![description](URL) to display the image" 185 | )] 186 | // #[instrument(skip(self))] // Removed due to macro conflict 187 | async fn generate_image(&self, #[tool(aggr)] args: ImagePrompt) -> String { 188 | info!(?args, "Received image generation request"); // Log args explicitly 189 | 190 | // Generate the image using the Gemini API 191 | 192 | const SUPPORTED_ASPECT_RATIOS: [&str; 5] = ["1:1", "3:4", "4:3", "9:16", "16:9"]; 193 | if let Some(aspect_ratio) = &args.aspect_ratio { 194 | if !SUPPORTED_ASPECT_RATIOS.contains(&aspect_ratio.as_str()) { 195 | let error_msg = format!( 196 | "Invalid aspect ratio: {}, supported values are: {}", 197 | aspect_ratio, 198 | SUPPORTED_ASPECT_RATIOS.join(", ") 199 | ); 200 | error!("{}", error_msg); 201 | return error_msg; 202 | } 203 | } 204 | 205 | match generate_image_from_gemini( 206 | &args.prompt, 207 | args.aspect_ratio.as_deref(), 208 | &self.resources_path, 209 | ) 210 | .await 211 | { 212 | Ok(filenames) => { 213 | // Return the URL to the generated image using the configured address and port 214 | let urls = filenames 215 | .iter() 216 | .map(|filename| { 217 | format!( 218 | "http://{}:{}/images/{}", 219 | self.image_resource_server_addr, 220 | self.server_port, // Use the configured port 221 | filename 222 | ) 223 | }) 224 | .collect::>() 225 | .join("\n"); 226 | info!(num_images = filenames.len(), "Image generation successful."); 227 | urls 228 | } 229 | Err(e) => { 230 | error!("Error generating image: {}", e); 231 | format!("Error generating image: {}", e) 232 | } 233 | } 234 | } 235 | } 236 | 237 | // Implement ServerHandler trait for our image generation server 238 | #[tool(tool_box)] 239 | impl ServerHandler for ImageGenerationServer { 240 | fn get_info(&self) -> ServerInfo { 241 | ServerInfo { 242 | server_info: Implementation { 243 | name: "imagen3-mcp".into(), 244 | version: "0.1.0".into(), 245 | }, 246 | instructions: Some(r#" 247 | Use the generate_image tool to create images from text descriptions. The returned URL can be used in markdown format like ![description](URL) to display the image. 248 | 249 | Before generating an image, please read the section to understand how to create effective prompts. 250 | 251 | 252 | ## Prompt writing basics 253 | Description of the image to generate. Maximum prompt length is 480 tokens. A good prompt is descriptive and clear, and makes use of meaningful keywords and modifiers. Start by thinking of your subject, context, and style. 254 | Example Prompt: A sketch (style) of a modern apartment building (subject) surrounded by skyscrapers (context and background). 255 | 1. Subject: The first thing to think about with any prompt is the subject: the object, person, animal, or scenery you want an image of. 256 | 2. Context and background: Just as important is the background or context in which the subject will be placed. Try placing your subject in a variety of backgrounds. For example, a studio with a white background, outdoors, or indoor environments. 257 | 3. Style: Finally, add the style of image you want. Styles can be general (painting, photograph, sketches) or very specific (pastel painting, charcoal drawing, isometric 3D). You can also combine styles. 258 | After you write a first version of your prompt, refine your prompt by adding more details until you get to the image that you want. Iteration is important. Start by establishing your core idea, and then refine and expand upon that core idea until the generated image is close to your vision. 259 | Imagen 3 can transform your ideas into detailed images, whether your prompts are short or long and detailed. Refine your vision through iterative prompting, adding details until you achieve the perfect result. 260 | Example Prompt: close-up photo of a woman in her 20s, street photography, movie still, muted orange warm tones 261 | Example Prompt: captivating photo of a woman in her 20s utilizing a street photography style. The image should look like a movie still with muted orange warm tones. 262 | Additional advice for Imagen prompt writing: 263 | - Use descriptive language: Employ detailed adjectives and adverbs to paint a clear picture for Imagen 3. 264 | - Provide context: If necessary, include background information to aid the AI's understanding. 265 | - Reference specific artists or styles: If you have a particular aesthetic in mind, referencing specific artists or art movements can be helpful. 266 | - Use prompt engineering tools: Consider exploring prompt engineering tools or resources to help you refine your prompts and achieve optimal results. 267 | - Enhancing the facial details in your personal and group images: Specify facial details as a focus of the photo (for example, use the word "portrait" in the prompt). 268 | ## Generate text in images 269 | Imagen can add text into images, opening up more creative image generation possibilities. Use the following guidance to get the most out of this feature: 270 | - Iterate with confidence: You might have to regenerate images until you achieve the look you want. Imagen's text integration is still evolving, and sometimes multiple attempts yield the best results. 271 | - Keep it short: Limit text to 25 characters or less for optimal generation. 272 | - Multiple phrases: Experiment with two or three distinct phrases to provide additional information. Avoid exceeding three phrases for cleaner compositions. 273 | Example Prompt: A poster with the text "Summerland" in bold font as a title, underneath this text is the slogan "Summer never felt so good" 274 | - Guide Placement: While Imagen can attempt to position text as directed, expect occasional variations. This feature is continually improving. 275 | - Inspire font style: Specify a general font style to subtly influence Imagen's choices. Don't rely on precise font replication, but expect creative interpretations. 276 | - Font size: Specify a font size or a general indication of size (for example, small, medium, large) to influence the font size generation. 277 | ## Advanced prompt writing techniques 278 | Use the following examples to create more specific prompts based on attributes like photography descriptors, shapes and materials, historical art movements, and image quality modifiers. 279 | ### Photography 280 | - Prompt includes: "A photo of..." 281 | To use this style, start with using keywords that clearly tell Imagen that you're looking for a photograph. Start your prompts with "A photo of. . .". For example: 282 | Example Prompt: A photo of coffee beans in a kitchen on a wooden surface 283 | Example Prompt: A photo of a chocolate bar on a kitchen counter 284 | Example Prompt: A photo of a modern building with water in the background 285 | #### Photography modifiers 286 | In the following examples, you can see several photography-specific modifiers and parameters. You can combine multiple modifiers for more precise control. 287 | 1. Camera Proximity - Close up, taken from far away 288 | Example Prompt: A close-up photo of coffee beans 289 | Example Prompt: A zoomed out photo of a small bag of coffee beans in a messy kitchen 290 | 2. Camera Position - aerial, from below 291 | Example Prompt: aerial photo of urban city with skyscrapers 292 | Example Prompt: A photo of a forest canopy with blue skies from below 293 | 3. Lighting - natural, dramatic, warm, cold 294 | Example Prompt: studio photo of a modern arm chair, natural lighting 295 | Example Prompt: studio photo of a modern arm chair, dramatic lighting 296 | 4. Camera Settings - motion blur, soft focus, bokeh, portrait 297 | Example Prompt: photo of a city with skyscrapers from the inside of a car with motion blur 298 | Example Prompt: soft focus photograph of a bridge in an urban city at night 299 | 5. Lens types - 35mm, 50mm, fisheye, wide angle, macro 300 | Example Prompt: photo of a leaf, macro lens 301 | Example Prompt: street photography, new york city, fisheye lens 302 | 6. Film types - black and white, polaroid 303 | Example Prompt: a polaroid portrait of a dog wearing sunglasses 304 | Example Prompt: black and white photo of a dog wearing sunglasses 305 | ### Illustration and art 306 | - Prompt includes: "A painting of...", "A sketch of..." 307 | Art styles vary from monochrome styles like pencil sketches, to hyper-realistic digital art. For example, the following images use the same prompt with different styles: 308 | "An [art style or creation technique] of an angular sporty electric sedan with skyscrapers in the background" 309 | Example Prompt: A technical pencil drawing of an angular... 310 | Example Prompt: A charcoal drawing of an angular... 311 | Example Prompt: A color pencil drawing of an angular... 312 | Example Prompt: A pastel painting of an angular... 313 | Example Prompt: A digital art of an angular... 314 | Example Prompt: An art deco (poster) of an angular... 315 | #### Shapes and materials 316 | - Prompt includes: "...made of...", "...in the shape of..." 317 | One of the strengths of this technology is that you can create imagery that is otherwise difficult or impossible. For example, you can recreate your company logo in different materials and textures. 318 | Example Prompt: a duffle bag made of cheese 319 | Example Prompt: neon tubes in the shape of a bird 320 | Example Prompt: an armchair made of paper, studio photo, origami style 321 | #### Historical art references 322 | - Prompt includes: "...in the style of..." 323 | Certain styles have become iconic over the years. The following are some ideas of historical painting or art styles that you can try. 324 | "generate an image in the style of [art period or movement] : a wind farm" 325 | Example Prompt: generate an image in the style of an impressionist painting: a wind farm 326 | Example Prompt: generate an image in the style of a renaissance painting: a wind farm 327 | Example Prompt: generate an image in the style of pop art: a wind farm 328 | ### Image quality modifiers 329 | Certain keywords can let the model know that you're looking for a high-quality asset. Examples of quality modifiers include the following: 330 | - General Modifiers - high-quality, beautiful, stylized 331 | - Photos - 4K, HDR, Studio Photo 332 | - Art, Illustration - by a professional, detailed 333 | The following are a few examples of prompts without quality modifiers and the same prompt with quality modifiers. 334 | Example Prompt: (no quality modifiers): a photo of a corn stalk 335 | Example Prompt: (with quality modifiers): 4k HDR beautiful photo of a corn stalk taken by a professional photographer 336 | ### Aspect ratios 337 | Imagen 3 image generation lets you set five distinct image aspect ratios. 338 | 1. Square (1:1, default) - A standard square photo. Common uses for this aspect ratio include social media posts. 339 | 2. Fullscreen (4:3) - This aspect ratio is commonly used in media or film. It is also the dimensions of most old (non-widescreen) TVs and medium format cameras. It captures more of the scene horizontally (compared to 1:1), making it a preferred aspect ratio for photography. 340 | Example Prompt: close up of a musician's fingers playing the piano, black and white film, vintage (4:3 aspect ratio) 341 | Example Prompt: A professional studio photo of french fries for a high end restaurant, in the style of a food magazine (4:3 aspect ratio) 342 | 3. Portrait full screen (3:4) - This is the fullscreen aspect ratio rotated 90 degrees. This lets to capture more of the scene vertically compared to the 1:1 aspect ratio. 343 | Example Prompt: a woman hiking, close of her boots reflected in a puddle, large mountains in the background, in the style of an advertisement, dramatic angles (3:4 aspect ratio) 344 | Example Prompt: aerial shot of a river flowing up a mystical valley (3:4 aspect ratio) 345 | 4. Widescreen (16:9) - This ratio has replaced 4:3 and is now the most common aspect ratio for TVs, monitors, and mobile phone screens (landscape). Use this aspect ratio when you want to capture more of the background (for example, scenic landscapes). 346 | Example Prompt: a man wearing all white clothing sitting on the beach, close up, golden hour lighting (16:9 aspect ratio) 347 | 5. Portrait (9:16) - This ratio is widescreen but rotated. This a relatively new aspect ratio that has been popularized by short form video apps (for example, YouTube shorts). Use this for tall objects with strong vertical orientations such as buildings, trees, waterfalls, or other similar objects. 348 | Example Prompt: a digital render of a massive skyscraper, modern, grand, epic with a beautiful sunset in the background (9:16 aspect ratio) 349 | ### Photorealistic images 350 | Different versions of the image generation model might offer a mix of artistic and photorealistic output. Use the following wording in prompts to generate more photorealistic output, based on the subject you want to generate. 351 | Note: Take these keywords as general guidance when you try to create photorealistic images. They aren't required to achieve your goal. 352 | | Use case | Lens type | Focal lengths | Additional details | 353 | | --- | --- | --- | --- | 354 | | People (portraits) | Prime, zoom | 24-35mm | black and white film, Film noir, Depth of field, duotone (mention two colors) | 355 | | Food, insects, plants (objects, still life) | Macro | 60-105mm | High detail, precise focusing, controlled lighting | 356 | | Sports, wildlife (motion) | Telephoto zoom | 100-400mm | Fast shutter speed, Action or movement tracking | 357 | | Astronomical, landscape (wide-angle) | Wide-angle | 10-24mm | Long exposure times, sharp focus, long exposure, smooth water or clouds | 358 | #### Portraits 359 | | Use case | Lens type | Focal lengths | Additional details | 360 | | --- | --- | --- | --- | 361 | | People (portraits) | Prime, zoom | 24-35mm | black and white film, Film noir, Depth of field, duotone (mention two colors) | 362 | Using several keywords from the table, Imagen can generate the following portraits: 363 | Example Prompt: A woman, 35mm portrait, blue and grey duotones 364 | Example Prompt: A woman, 35mm portrait, film noir 365 | #### Objects: 366 | | Use case | Lens type | Focal lengths | Additional details | 367 | | --- | --- | --- | --- | 368 | | Food, insects, plants (objects, still life) | Macro | 60-105mm | High detail, precise focusing, controlled lighting | 369 | Using several keywords from the table, Imagen can generate the following object images: 370 | Example Prompt: leaf of a prayer plant, macro lens, 60mm 371 | Example Prompt: a plate of pasta, 100mm Macro lens 372 | #### Motion 373 | | Use case | Lens type | Focal lengths | Additional details | 374 | | --- | --- | --- | --- | 375 | | Sports, wildlife (motion) | Telephoto zoom | 100-400mm | Fast shutter speed, Action or movement tracking | 376 | Using several keywords from the table, Imagen can generate the following motion images: 377 | Example Prompt: a winning touchdown, fast shutter speed, movement tracking 378 | Example Prompt: A deer running in the forest, fast shutter speed, movement tracking 379 | #### Wide-angle 380 | | Use case | Lens type | Focal lengths | Additional details | 381 | | --- | --- | --- | --- | 382 | | Astronomical, landscape (wide-angle) | Wide-angle | 10-24mm | Long exposure times, sharp focus, long exposure, smooth water or clouds | 383 | Using several keywords from the table, Imagen can generate the following wide-angle images: 384 | Example Prompt: an expansive mountain range, landscape wide angle 10mm 385 | Example Prompt: a photo of the moon, astro photography, wide angle 10mm 386 | 387 | "#.trim().into()), 388 | capabilities: ServerCapabilities::builder() 389 | .enable_tools() 390 | .build(), 391 | ..Default::default() 392 | } 393 | } 394 | } 395 | 396 | // Create resources directory if it doesn't exist using cross-platform approach 397 | async fn ensure_resources_dir() -> std::io::Result { 398 | // Get application data directory in a cross-platform way 399 | let project_dirs = ProjectDirs::from("cn", "hamflx", "imagen3-mcp").ok_or_else(|| { 400 | std::io::Error::new( 401 | std::io::ErrorKind::NotFound, 402 | "Could not determine application data directory", 403 | ) 404 | })?; 405 | 406 | // Use data_local_dir for Windows (AppData\Local), data_dir for macOS/Linux 407 | let base_dir = project_dirs.data_local_dir(); 408 | 409 | // Create full path to resources directory 410 | let resources_path = base_dir.join("artifacts"); 411 | let images_dir = resources_path.join("images"); 412 | 413 | // Create directories if they don't exist 414 | if !resources_path.exists() { 415 | tokio::fs::create_dir_all(&resources_path).await?; 416 | info!(path = %resources_path.display(), "Created resources directory."); 417 | } 418 | 419 | if !images_dir.exists() { 420 | tokio::fs::create_dir(&images_dir).await?; 421 | info!(path = %images_dir.display(), "Created images directory."); 422 | } 423 | 424 | Ok(resources_path) 425 | } 426 | 427 | // Function to ensure the log directory exists 428 | async fn ensure_log_dir() -> std::io::Result { 429 | let project_dirs = ProjectDirs::from("cn", "hamflx", "imagen3-mcp").ok_or_else(|| { 430 | std::io::Error::new( 431 | std::io::ErrorKind::NotFound, 432 | "Could not determine application data directory", 433 | ) 434 | })?; 435 | let base_dir = project_dirs.data_local_dir(); 436 | let log_dir = base_dir.join("logs"); 437 | 438 | if !log_dir.exists() { 439 | tokio::fs::create_dir_all(&log_dir).await?; 440 | // Can't log here yet as tracing isn't initialized 441 | } 442 | Ok(log_dir) 443 | } 444 | 445 | // Handler to list images in the images directory 446 | async fn list_images(resources_path: PathBuf) -> Result, std::io::Error> { 447 | let images_dir = resources_path.join("images"); 448 | let mut images = Vec::new(); 449 | 450 | let mut entries = tokio::fs::read_dir(images_dir).await?; 451 | while let Some(entry) = entries.next_entry().await? { 452 | let path = entry.path(); 453 | if path.is_file() { 454 | if let Some(filename) = path.file_name() { 455 | if let Some(filename_str) = filename.to_str() { 456 | images.push(filename_str.to_string()); 457 | } 458 | } 459 | } 460 | } 461 | 462 | Ok(images) 463 | } 464 | 465 | #[tokio::main] 466 | async fn main() -> Result<(), Box> { 467 | // --- Tracing Setup --- 468 | let log_dir = ensure_log_dir() 469 | .await 470 | .expect("Failed to ensure log directory exists"); 471 | let log_file_prefix = "imagen3-mcp.log"; 472 | let file_appender = tracing_appender::rolling::daily(log_dir.clone(), log_file_prefix); 473 | let (non_blocking_writer, _guard) = tracing_appender::non_blocking(file_appender); 474 | 475 | // Build subscriber layers 476 | let file_layer = fmt::layer() 477 | .with_writer(non_blocking_writer) 478 | .with_ansi(false); // No ANSI colors in files 479 | // Optionally add .json() for structured JSON logs in the file 480 | 481 | let console_layer = fmt::layer().with_writer(std::io::stdout); // Log to stdout 482 | 483 | // Use RUST_LOG environment variable for log level filtering (e.g., RUST_LOG=info,imagen3_mcp=debug) 484 | // Defaults to "info" if RUST_LOG is not set. 485 | let env_filter = EnvFilter::try_from_default_env().unwrap_or_else(|_| EnvFilter::new("info")); 486 | 487 | // Combine layers and set global subscriber 488 | tracing_subscriber::registry() 489 | .with(env_filter) 490 | .with(file_layer) 491 | .with(console_layer) // Add console layer 492 | .init(); 493 | 494 | info!( 495 | "Tracing initialized. Logging to console and {}/{}", 496 | log_dir.display(), 497 | log_file_prefix 498 | ); 499 | // --- End Tracing Setup --- 500 | 501 | // Ensure resources directories exist and get the path 502 | let resources_path = match ensure_resources_dir().await { 503 | Ok(path) => path, 504 | Err(e) => { 505 | error!("Failed to ensure resources directory: {}", e); 506 | return Err(e.into()); 507 | } 508 | }; 509 | 510 | // Read configuration from environment variables 511 | let image_resource_server_addr = 512 | env::var("IMAGE_RESOURCE_SERVER_ADDR").unwrap_or_else(|_| "127.0.0.1".to_string()); 513 | let server_port_str = env::var("SERVER_PORT").unwrap_or_else(|_| "9981".to_string()); 514 | let server_port: u16 = server_port_str 515 | .parse() 516 | .map_err(|e| format!("Invalid SERVER_PORT: {}", e))?; 517 | let listen_addr_str = 518 | env::var("SERVER_LISTEN_ADDR").unwrap_or_else(|_| "127.0.0.1".to_string()); 519 | 520 | // Create service for MCP 521 | let service = ImageGenerationServer { 522 | resources_path: resources_path.clone(), 523 | image_resource_server_addr: image_resource_server_addr.clone(), // Clone for info log 524 | server_port, 525 | }; 526 | info!( 527 | ?image_resource_server_addr, 528 | server_port, "Image server configured." 529 | ); 530 | 531 | // Check if GEMINI_API_KEY is set 532 | if env::var("GEMINI_API_KEY").is_err() { 533 | error!("GEMINI_API_KEY environment variable is not set. Image generation will fail."); 534 | std::process::exit(1); 535 | } else { 536 | info!("GEMINI_API_KEY found."); 537 | } 538 | 539 | // Set up static file server with warp 540 | let images_path = resources_path.join("images"); 541 | let resources_path_clone = resources_path.clone(); 542 | 543 | // Route for serving images 544 | let images_route = warp::path("images") 545 | .and(warp::fs::dir(images_path.clone())) // Clone for info log 546 | .with(warp::cors().allow_any_origin()); 547 | info!(path = %images_path.display(), "Serving images from directory"); 548 | 549 | // Route for listing available images 550 | let list_images_route = warp::path("list-images").and_then(move || { 551 | let path = resources_path_clone.clone(); 552 | info!("Received request to list images."); // Added info log 553 | async move { 554 | match list_images(path).await { 555 | Ok(images) => Ok(warp::reply::json(&images)), 556 | Err(e) => { 557 | error!("Failed to list images: {}", e); // Added error log 558 | Err(warp::reject::not_found()) 559 | } 560 | } 561 | } 562 | }); 563 | 564 | // Combine all routes 565 | let routes = images_route.or(list_images_route); 566 | 567 | // Parse server listen address 568 | let listen_addr: SocketAddr = format!("{}:{}", listen_addr_str, server_port) 569 | .parse() 570 | .map_err(|e| format!("Invalid SERVER_LISTEN_ADDR or SERVER_PORT: {}", e))?; 571 | 572 | // Start HTTP server in a separate task 573 | info!(address = %listen_addr, "Starting HTTP server for image resources."); 574 | let http_server = warp::serve(routes).run(listen_addr); 575 | 576 | let http_handle = tokio::spawn(async move { 577 | http_server.await; 578 | info!("HTTP server shut down."); 579 | }); 580 | 581 | // Start MCP server in the main task 582 | info!("Starting MCP server..."); 583 | let mcp_future = ServiceExt::serve(service, (tokio::io::stdin(), tokio::io::stdout())) 584 | .await? 585 | .waiting(); 586 | 587 | // Run MCP server to completion 588 | mcp_future.await?; 589 | info!("MCP server shut down."); 590 | 591 | // If we get here, the MCP server has shut down, so cancel the HTTP server 592 | http_handle.abort(); 593 | info!("Aborted HTTP server task."); 594 | 595 | Ok(()) 596 | } 597 | --------------------------------------------------------------------------------