diff --git a/.env b/.env index debc382..8486623 100644 --- a/.env +++ b/.env @@ -6,10 +6,10 @@ APP_PORT=8484 DB_USER=postgres DB_PASSWORD=password DB_HOST=localhost -DB_PORT=5432 +DB_PORT=5433 DB_NAME=ogcapi -DATABASE_URL=postgresql://postgres:password@localhost:5432/ogcapi +DATABASE_URL=postgresql://postgres:password@localhost:5433/ogcapi AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 317d361..d0c3557 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,11 +2,7 @@ name: CI on: push: - branches: - - main pull_request: - branches: - - main env: CARGO_TERM_COLOR: always @@ -17,17 +13,23 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout repository - uses: actions/checkout@v3 + - name: Dependencies + run: sudo apt-get install -y build-essential pkg-config libclang-dev libgdal-dev + + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup + run: docker compose up db minio minio-mc -d - - name: Setup compose - run: docker-compose up -d + - name: Build + run: rustup update stable && rustup default stable && cargo build --workspace --all-targets - name: Format - run: docker exec -i ogcapi cargo fmt --all -- --check + run: cargo fmt --all -- --check - name: Clippy - run: docker exec -i ogcapi cargo clippy --workspace --all-features --tests -- -D warnings + run: cargo clippy --workspace --all-features --all-targets -- -D warnings - name: Test - run: docker exec -i ogcapi cargo test --workspace --all-features + run: cargo test --workspace --all-features --all-targets diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..aa18237 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,56 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +### Added + +- This change log. +- Badges for `docs.rs` and `crates.io`. +- Categories and keywords. + +### Changed + +- Update dependencies. +- Use top level `README.md` for `ogcapi` crate. +- Rework features to represent modules and standards in an orthogonal fashion. +- Convert CLI to example crates. +- Align `OGCAPI - Processes` with released core standard. +- Refactor `processes`. + +## [0.2.0] - 2024-05-19 + +### Added +* Propagated `stac` feature to `ogcapi-client` by [@metasim](https://github.com/metasim) in (#11). +* Updated client `README.md` to work with latest APIs by [@metasim](https://github.com/metasim) in (#12). +* Updated workspace manifests to use relative paths to sibling packages by [@metasim](https://github.com/metasim) in (#14). +* Swap println with log::debug. by [@metasim](https://github.com/metasim) in (#17). +* Changes for usage in tile-grid by [@pka](https://github.com/pka) in (#18). + + +### Changed +- Various additions and fixes for types +- Reworked database schema +- Updated dependencies + +## [0.1.0] - 2022-08-05 + +### Added + +- Types for various OGC API standards and the SpatioTemporal Asset Catalog (STAC) specification +- SpatioTemporal Asset Catalog (STAC) features +- Server & Client implementation +- Add async traits for drivers (data sources) +- GDAL and Geojson importer +- Proof of concept for STAC / OGC API - Features service +- License as MIT/Apache-2.0 +- Basic CI + + +[unreleased]: https://github.com/georust/ogcapi/compare/v1.1.1...HEAD +[0.2.0]: https://github.com/georust/ogcapi/compare/v0.1.0...v0.2.0 +[0.1.0]: https://github.com/georust/ogcapi/releases/tag/v0.1.0 \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index a8cd880..98ad888 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,21 +1,21 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "addr2line" -version = "0.21.0" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ "gimli", ] [[package]] -name = "adler" -version = "1.0.2" +name = "adler2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" [[package]] name = "ahash" @@ -24,7 +24,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", - "getrandom", + "const-random", + "getrandom 0.2.15", "once_cell", "version_check", "zerocopy", @@ -41,9 +42,9 @@ dependencies = [ [[package]] name = "allocator-api2" -version = "0.2.18" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" [[package]] name = "android-tzdata" @@ -62,9 +63,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.14" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" dependencies = [ "anstyle", "anstyle-parse", @@ -77,43 +78,44 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.7" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" [[package]] name = "anstyle-parse" -version = "0.2.4" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.3" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a64c907d4e79225ac72e2a354c9ce84d50ebb4586dee56c82b3ee73004f537f5" +checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.3" +version = "3.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e" dependencies = [ "anstyle", - "windows-sys 0.52.0", + "once_cell", + "windows-sys 0.59.0", ] [[package]] name = "anyhow" -version = "1.0.86" +version = "1.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +checksum = "6b964d184e89d9b6b67dd2715bc8e74cf3107fb2b529990c90cf517326150bf4" [[package]] name = "approx" @@ -124,11 +126,189 @@ dependencies = [ "num-traits", ] +[[package]] +name = "arrow" +version = "54.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc208515aa0151028e464cc94a692156e945ce5126abd3537bb7fd6ba2143ed1" +dependencies = [ + "arrow-arith", + "arrow-array", + "arrow-buffer", + "arrow-cast", + "arrow-data", + "arrow-json", + "arrow-ord", + "arrow-row", + "arrow-schema", + "arrow-select", + "arrow-string", +] + +[[package]] +name = "arrow-arith" +version = "54.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e07e726e2b3f7816a85c6a45b6ec118eeeabf0b2a8c208122ad949437181f49a" +dependencies = [ + "arrow-array", + "arrow-buffer", + "arrow-data", + "arrow-schema", + "chrono", + "num", +] + +[[package]] +name = "arrow-array" +version = "54.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2262eba4f16c78496adfd559a29fe4b24df6088efc9985a873d58e92be022d5" +dependencies = [ + "ahash", + "arrow-buffer", + "arrow-data", + "arrow-schema", + "chrono", + "half", + "hashbrown 0.15.2", + "num", +] + +[[package]] +name = "arrow-buffer" +version = "54.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e899dade2c3b7f5642eb8366cfd898958bcca099cde6dfea543c7e8d3ad88d4" +dependencies = [ + "bytes", + "half", + "num", +] + +[[package]] +name = "arrow-cast" +version = "54.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4103d88c5b441525ed4ac23153be7458494c2b0c9a11115848fdb9b81f6f886a" +dependencies = [ + "arrow-array", + "arrow-buffer", + "arrow-data", + "arrow-schema", + "arrow-select", + "atoi", + "base64 0.22.1", + "chrono", + "half", + "lexical-core", + "num", + "ryu", +] + +[[package]] +name = "arrow-data" +version = "54.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a329fb064477c9ec5f0870d2f5130966f91055c7c5bce2b3a084f116bc28c3b" +dependencies = [ + "arrow-buffer", + "arrow-schema", + "half", + "num", +] + +[[package]] +name = "arrow-json" +version = "54.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d03b9340013413eb84868682ace00a1098c81a5ebc96d279f7ebf9a4cac3c0fd" +dependencies = [ + "arrow-array", + "arrow-buffer", + "arrow-cast", + "arrow-data", + "arrow-schema", + "chrono", + "half", + "indexmap 2.7.1", + "lexical-core", + "num", + "serde", + "serde_json", +] + +[[package]] +name = "arrow-ord" +version = "54.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f841bfcc1997ef6ac48ee0305c4dfceb1f7c786fe31e67c1186edf775e1f1160" +dependencies = [ + "arrow-array", + "arrow-buffer", + "arrow-data", + "arrow-schema", + "arrow-select", +] + +[[package]] +name = "arrow-row" +version = "54.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1eeb55b0a0a83851aa01f2ca5ee5648f607e8506ba6802577afdda9d75cdedcd" +dependencies = [ + "arrow-array", + "arrow-buffer", + "arrow-data", + "arrow-schema", + "half", +] + +[[package]] +name = "arrow-schema" +version = "54.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85934a9d0261e0fa5d4e2a5295107d743b543a6e0484a835d4b8db2da15306f9" +dependencies = [ + "bitflags", +] + +[[package]] +name = "arrow-select" +version = "54.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e2932aece2d0c869dd2125feb9bd1709ef5c445daa3838ac4112dcfa0fda52c" +dependencies = [ + "ahash", + "arrow-array", + "arrow-buffer", + "arrow-data", + "arrow-schema", + "num", +] + +[[package]] +name = "arrow-string" +version = "54.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "912e38bd6a7a7714c1d9b61df80315685553b7455e8a6045c27531d8ecd5b458" +dependencies = [ + "arrow-array", + "arrow-buffer", + "arrow-data", + "arrow-schema", + "arrow-select", + "memchr", + "num", + "regex", + "regex-syntax 0.8.5", +] + [[package]] name = "async-compression" -version = "0.4.10" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c90a406b4495d129f00461241616194cb8a032c8d1c53c657f0961d5f8e0498" +checksum = "310c9bcae737a48ef5cdee3174184e6d548b292739ede61a1f955ef76a738861" dependencies = [ "flate2", "futures-core", @@ -139,13 +319,13 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.80" +version = "0.1.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" +checksum = "644dd749086bf3771a2fbc5f256fdb982d53f011c7d5d560304eafeecebce79d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.64", + "syn", ] [[package]] @@ -165,15 +345,15 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "aws-config" -version = "1.4.0" +version = "1.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ddbfb5db93d62521f47b3f223da0884a2f02741ff54cb9cda192a0e73ba08b" +checksum = "490aa7465ee685b2ced076bb87ef654a47724a7844e2c7d3af4e749ce5b875dd" dependencies = [ "aws-credential-types", "aws-runtime", @@ -191,7 +371,6 @@ dependencies = [ "fastrand", "hex", "http 0.2.12", - "hyper 0.14.28", "ring", "time", "tokio", @@ -202,9 +381,9 @@ dependencies = [ [[package]] name = "aws-credential-types" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e16838e6c9e12125face1c1eff1343c75e3ff540de98ff7ebd61874a89bcfeb9" +checksum = "60e8f6b615cb5fc60a98132268508ad104310f0cfb25a1c22eee76efdf9154da" dependencies = [ "aws-smithy-async", "aws-smithy-runtime-api", @@ -214,15 +393,16 @@ dependencies = [ [[package]] name = "aws-runtime" -version = "1.2.2" +version = "1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75588e7ee5e8496eed939adac2035a6dbab9f7eb2acdd9ab2d31856dab6f3955" +checksum = "76dd04d39cc12844c0994f2c9c5a6f5184c22e9188ec1ff723de41910a21dcad" dependencies = [ "aws-credential-types", "aws-sigv4", "aws-smithy-async", "aws-smithy-eventstream", "aws-smithy-http", + "aws-smithy-runtime", "aws-smithy-runtime-api", "aws-smithy-types", "aws-types", @@ -230,6 +410,7 @@ dependencies = [ "fastrand", "http 0.2.12", "http-body 0.4.6", + "once_cell", "percent-encoding", "pin-project-lite", "tracing", @@ -238,11 +419,10 @@ dependencies = [ [[package]] name = "aws-sdk-s3" -version = "1.29.0" +version = "1.77.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "966646a69665bb0427460d78747204317f6639bdf5ec61305c4c5195af3dc086" +checksum = "34e87342432a3de0e94e82c99a7cbd9042f99de029ae1f4e368160f9e9929264" dependencies = [ - "ahash", "aws-credential-types", "aws-runtime", "aws-sigv4", @@ -273,9 +453,9 @@ dependencies = [ [[package]] name = "aws-sdk-sso" -version = "1.25.0" +version = "1.60.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fef2d9ca2b43051224ed326ed9960a85e277b7d554a2cd0397e57c0553d86e64" +checksum = "60186fab60b24376d3e33b9ff0a43485f99efd470e3b75a9160c849741d63d56" dependencies = [ "aws-credential-types", "aws-runtime", @@ -295,9 +475,9 @@ dependencies = [ [[package]] name = "aws-sdk-ssooidc" -version = "1.26.0" +version = "1.61.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c869d1f5c4ee7437b79c3c1664ddbf7a60231e893960cf82b2b299a5ccf2cc5d" +checksum = "7033130ce1ee13e6018905b7b976c915963755aef299c1521897679d6cd4f8ef" dependencies = [ "aws-credential-types", "aws-runtime", @@ -317,9 +497,9 @@ dependencies = [ [[package]] name = "aws-sdk-sts" -version = "1.25.0" +version = "1.61.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e2b4a632a59e4fab7abf1db0d94a3136ad7871aba46bebd1fdb95c7054afcdb" +checksum = "c5c1cac7677179d622b4448b0d31bcb359185295dc6fca891920cfb17e2b5156" dependencies = [ "aws-credential-types", "aws-runtime", @@ -340,9 +520,9 @@ dependencies = [ [[package]] name = "aws-sigv4" -version = "1.2.1" +version = "1.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58b56f1cbe6fd4d0c2573df72868f20ab1c125ca9c9dbce17927a463433a2e57" +checksum = "9bfe75fad52793ce6dec0dc3d4b1f388f038b5eb866c8d4d7f3a8e21b5ea5051" dependencies = [ "aws-credential-types", "aws-smithy-eventstream", @@ -355,7 +535,7 @@ dependencies = [ "hex", "hmac", "http 0.2.12", - "http 1.1.0", + "http 1.2.0", "once_cell", "p256", "percent-encoding", @@ -369,9 +549,9 @@ dependencies = [ [[package]] name = "aws-smithy-async" -version = "1.2.1" +version = "1.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62220bc6e97f946ddd51b5f1361f78996e704677afc518a4ff66b7a72ea1378c" +checksum = "fa59d1327d8b5053c54bf2eaae63bf629ba9e904434d0835a28ed3c0ed0a614e" dependencies = [ "futures-util", "pin-project-lite", @@ -380,15 +560,16 @@ dependencies = [ [[package]] name = "aws-smithy-checksums" -version = "0.60.7" +version = "0.63.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83fa43bc04a6b2441968faeab56e68da3812f978a670a5db32accbdcafddd12f" +checksum = "db2dc8d842d872529355c72632de49ef8c5a2949a4472f10e802f28cf925770c" dependencies = [ "aws-smithy-http", "aws-smithy-types", "bytes", "crc32c", "crc32fast", + "crc64fast-nvme", "hex", "http 0.2.12", "http-body 0.4.6", @@ -401,9 +582,9 @@ dependencies = [ [[package]] name = "aws-smithy-eventstream" -version = "0.60.4" +version = "0.60.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6363078f927f612b970edf9d1903ef5cef9a64d1e8423525ebb1f0a1633c858" +checksum = "8b18559a41e0c909b77625adf2b8c50de480a8041e5e4a3f5f7d177db70abc5a" dependencies = [ "aws-smithy-types", "bytes", @@ -412,9 +593,9 @@ dependencies = [ [[package]] name = "aws-smithy-http" -version = "0.60.8" +version = "0.60.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a7de001a1b9a25601016d8057ea16e31a45fdca3751304c8edf4ad72e706c08" +checksum = "7809c27ad8da6a6a68c454e651d4962479e81472aa19ae99e59f9aba1f9713cc" dependencies = [ "aws-smithy-eventstream", "aws-smithy-runtime-api", @@ -433,9 +614,9 @@ dependencies = [ [[package]] name = "aws-smithy-json" -version = "0.60.7" +version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4683df9469ef09468dad3473d129960119a0d3593617542b7d52086c8486f2d6" +checksum = "623a51127f24c30776c8b374295f2df78d92517386f77ba30773f15a30ce1422" dependencies = [ "aws-smithy-types", ] @@ -452,9 +633,9 @@ dependencies = [ [[package]] name = "aws-smithy-runtime" -version = "1.5.0" +version = "1.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9ac79e9f3a4d576f3cd4a470a0275b138d9e7b11b1cd514a6858ae0a79dd5bb" +checksum = "d526a12d9ed61fadefda24abe2e682892ba288c2018bcb38b1b4c111d13f6d92" dependencies = [ "aws-smithy-async", "aws-smithy-http", @@ -465,8 +646,9 @@ dependencies = [ "h2 0.3.26", "http 0.2.12", "http-body 0.4.6", - "http-body 1.0.0", - "hyper 0.14.28", + "http-body 1.0.1", + "httparse", + "hyper 0.14.32", "hyper-rustls 0.24.2", "once_cell", "pin-project-lite", @@ -478,15 +660,15 @@ dependencies = [ [[package]] name = "aws-smithy-runtime-api" -version = "1.6.0" +version = "1.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04ec42c2f5c0e7796a2848dde4d9f3bf8ce12ccbb3d5aa40c52fa0cdd61a1c47" +checksum = "92165296a47a812b267b4f41032ff8069ab7ff783696d217f0994a0d7ab585cd" dependencies = [ "aws-smithy-async", "aws-smithy-types", "bytes", "http 0.2.12", - "http 1.1.0", + "http 1.2.0", "pin-project-lite", "tokio", "tracing", @@ -495,18 +677,18 @@ dependencies = [ [[package]] name = "aws-smithy-types" -version = "1.1.9" +version = "1.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf98d97bba6ddaba180f1b1147e202d8fe04940403a95a3f826c790f931bbd1" +checksum = "c7b8a53819e42f10d0821f56da995e1470b199686a1809168db6ca485665f042" dependencies = [ "base64-simd", "bytes", "bytes-utils", "futures-core", "http 0.2.12", - "http 1.1.0", + "http 1.2.0", "http-body 0.4.6", - "http-body 1.0.0", + "http-body 1.0.1", "http-body-util", "itoa", "num-integer", @@ -521,42 +703,41 @@ dependencies = [ [[package]] name = "aws-smithy-xml" -version = "0.60.8" +version = "0.60.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d123fbc2a4adc3c301652ba8e149bf4bc1d1725affb9784eb20c953ace06bf55" +checksum = "ab0b0166827aa700d3dc519f72f8b3a91c35d0b8d042dc5d643a91e6f80648fc" dependencies = [ "xmlparser", ] [[package]] name = "aws-types" -version = "1.2.1" +version = "1.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a807d90cd50a969b3d95e4e7ad1491fcae13c6e83948d8728363ecc09d66343a" +checksum = "dfbd0a668309ec1f66c0f6bda4840dd6d4796ae26d699ebc266d7cc95c6d040f" dependencies = [ "aws-credential-types", "aws-smithy-async", "aws-smithy-runtime-api", "aws-smithy-types", - "http 0.2.12", "rustc_version", "tracing", ] [[package]] name = "axum" -version = "0.7.5" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a6c9af12842a67734c9a2e355436e5d03b22383ed60cf13cd0c18fbfe3dcbcf" +checksum = "6d6fd624c75e18b3b4c6b9caf42b1afe24437daaee904069137d8bab077be8b8" dependencies = [ - "async-trait", "axum-core", "bytes", + "form_urlencoded", "futures-util", - "http 1.1.0", - "http-body 1.0.0", + "http 1.2.0", + "http-body 1.0.1", "http-body-util", - "hyper 1.3.1", + "hyper 1.6.0", "hyper-util", "itoa", "matchit", @@ -570,7 +751,7 @@ dependencies = [ "serde_json", "serde_path_to_error", "serde_urlencoded", - "sync_wrapper 1.0.1", + "sync_wrapper", "tokio", "tower", "tower-layer", @@ -580,38 +761,58 @@ dependencies = [ [[package]] name = "axum-core" -version = "0.4.3" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3" +checksum = "df1362f362fd16024ae199c1970ce98f9661bf5ef94b9808fee734bc3698b733" dependencies = [ - "async-trait", "bytes", "futures-util", - "http 1.1.0", - "http-body 1.0.0", + "http 1.2.0", + "http-body 1.0.1", "http-body-util", "mime", "pin-project-lite", "rustversion", - "sync_wrapper 0.1.2", + "sync_wrapper", "tower-layer", "tower-service", "tracing", ] +[[package]] +name = "axum-extra" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "460fc6f625a1f7705c6cf62d0d070794e94668988b1c38111baeec177c715f7b" +dependencies = [ + "axum", + "axum-core", + "bytes", + "futures-util", + "http 1.2.0", + "http-body 1.0.1", + "http-body-util", + "mime", + "pin-project-lite", + "serde", + "tower", + "tower-layer", + "tower-service", +] + [[package]] name = "backtrace" -version = "0.3.71" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", "miniz_oxide", "object", "rustc-demangle", + "windows-targets 0.52.6", ] [[package]] @@ -650,38 +851,32 @@ checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" [[package]] name = "bindgen" -version = "0.66.1" +version = "0.69.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2b84e06fc203107bfbad243f4aba2af864eb7db3b1cf46ea0a023b0b433d2a7" +checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088" dependencies = [ - "bitflags 2.5.0", + "bitflags", "cexpr", "clang-sys", + "itertools 0.12.1", "lazy_static", "lazycell", "log", - "peeking_take_while", "prettyplease", "proc-macro2", "quote", "regex", - "rustc-hash", + "rustc-hash 1.1.0", "shlex", - "syn 2.0.64", + "syn", "which", ] [[package]] name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.5.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" dependencies = [ "serde", ] @@ -697,9 +892,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.16.0" +version = "3.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" +checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" [[package]] name = "byteorder" @@ -709,9 +904,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "f61dac84819c6588b558454b194026eb1f09c293b9036ae9b159e74e73ab6cf9" [[package]] name = "bytes-utils" @@ -725,9 +920,12 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.98" +version = "1.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41c270e7540d725e65ac7f1b212ac8ce349719624d7bcff99f8e2e488e8cf03f" +checksum = "be714c154be609ec7f5dad223a33bf1482fff90472de28f7362806e6d4832b8c" +dependencies = [ + "shlex", +] [[package]] name = "cexpr" @@ -744,11 +942,17 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + [[package]] name = "chrono" -version = "0.4.38" +version = "0.4.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825" dependencies = [ "android-tzdata", "iana-time-zone", @@ -756,7 +960,7 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -780,9 +984,9 @@ dependencies = [ [[package]] name = "clang-sys" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" dependencies = [ "glob", "libc", @@ -791,9 +995,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.4" +version = "4.5.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" +checksum = "027bb0d98429ae334a8698531da7077bdf906419543a35a55c2cb1b66437d767" dependencies = [ "clap_builder", "clap_derive", @@ -801,9 +1005,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.2" +version = "4.5.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" +checksum = "5589e0cba072e0f3d23791efac0fd8627b49c829c196a492e88168e6a669d863" dependencies = [ "anstream", "anstyle", @@ -813,27 +1017,36 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.4" +version = "4.5.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" +checksum = "bf4ced95c6f4a675af3da73304b9ac4ed991640c36374e4b46795c49e17cf1ed" dependencies = [ - "heck 0.5.0", + "heck", "proc-macro2", "quote", - "syn 2.0.64", + "syn", ] [[package]] name = "clap_lex" -version = "0.7.0" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" +checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" [[package]] name = "colorchoice" -version = "1.0.1" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" + +[[package]] +name = "concurrent-queue" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +dependencies = [ + "crossbeam-utils", +] [[package]] name = "const-oid" @@ -841,6 +1054,26 @@ version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" +[[package]] +name = "const-random" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87e00182fe74b066627d63b85fd550ac2998d4b0bd86bfed477a0ae4c7c71359" +dependencies = [ + "const-random-macro", +] + +[[package]] +name = "const-random-macro" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" +dependencies = [ + "getrandom 0.2.15", + "once_cell", + "tiny-keccak", +] + [[package]] name = "core-foundation" version = "0.9.4" @@ -853,15 +1086,15 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" dependencies = [ "libc", ] @@ -883,36 +1116,70 @@ checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" [[package]] name = "crc32c" -version = "0.6.5" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89254598aa9b9fa608de44b3ae54c810f0f06d755e24c50177f1f8f31ff50ce2" +checksum = "3a47af21622d091a8f0fb295b88bc886ac74efcc613efc19f5d0b21de5c89e47" dependencies = [ "rustc_version", ] [[package]] name = "crc32fast" -version = "1.4.0" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ "cfg-if", ] +[[package]] +name = "crc64fast-nvme" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4955638f00a809894c947f85a024020a20815b65a5eea633798ea7924edab2b3" +dependencies = [ + "crc", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "crossbeam-queue" -version = "0.3.11" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" +checksum = "0f58bbc28f91df819d0aa2a2c00cd19754769c2fad90579b3592b1c9ba7a3115" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-utils" -version = "0.8.19" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" + +[[package]] +name = "crunchy" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "43da5946c66ffcc7745f48db692ffbb10a83bfe0afd96235c5c2a4fb23994929" [[package]] name = "crypto-bigint" @@ -948,9 +1215,9 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.9" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83b2eb4d90d12bdda5ed17de686c2acb4c57914f8f921b8da7e112b5a36f3fe1" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" dependencies = [ "darling_core", "darling_macro", @@ -958,27 +1225,61 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.9" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622687fe0bac72a04e5599029151f5796111b90f1baaa9b544d807a5e31cd120" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim 0.11.1", - "syn 2.0.64", + "syn", ] [[package]] name = "darling_macro" -version = "0.20.9" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "733cabb43482b1a1b53eee8583c2b9e8684d592215ea83efd305dd31bc2f0178" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.64", + "syn", +] + +[[package]] +name = "data-loader" +version = "0.1.0" +dependencies = [ + "anyhow", + "arrow", + "clap", + "dotenvy", + "gdal", + "geo", + "geojson", + "ogcapi", + "osmpbfreader", + "serde_json", + "sqlx", + "tokio", + "tracing", + "tracing-subscriber", + "url", + "wkb", +] + +[[package]] +name = "demo-service" +version = "0.1.0" +dependencies = [ + "clap", + "dotenvy", + "ogcapi", + "tokio", + "tracing", + "tracing-subscriber", ] [[package]] @@ -1024,6 +1325,17 @@ dependencies = [ "subtle", ] +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "dotenvy" version = "0.15.7" @@ -1032,9 +1344,9 @@ checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" [[package]] name = "dyn-clone" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" +checksum = "feeef44e73baff3a26d371801df019877a9866a8c493d315ab00177843314f35" [[package]] name = "earcutr" @@ -1060,9 +1372,9 @@ dependencies = [ [[package]] name = "either" -version = "1.12.0" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" +checksum = "b7914353092ddf589ad78f25c5c1c21b7f80b0ff8621e7c814c3485b5306da9d" dependencies = [ "serde", ] @@ -1089,27 +1401,27 @@ dependencies = [ [[package]] name = "encoding_rs" -version = "0.8.34" +version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" dependencies = [ "cfg-if", ] [[package]] name = "equivalent" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "errno" -version = "0.3.9" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -1125,15 +1437,20 @@ dependencies = [ [[package]] name = "event-listener" -version = "2.5.3" +version = "5.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" +checksum = "3492acde4c3fc54c845eaab3eed8bd00c7a7d881f78bfc801e43a93dec1331ae" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] [[package]] name = "fastrand" -version = "2.1.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] name = "ff" @@ -1145,12 +1462,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "finl_unicode" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fcfdc7a0362c9f4444381a9e697c79d435fe65b52a37466fc2c1184cee9edc6" - [[package]] name = "flat_map" version = "0.0.10" @@ -1163,9 +1474,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.30" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" +checksum = "11faaf5a5236997af9848be0bef4db95824b1d534ebc64d0f0c6cf3e67bd38dc" dependencies = [ "crc32fast", "miniz_oxide", @@ -1179,13 +1490,13 @@ checksum = "8bf7cc16383c4b8d58b9905a8509f02926ce3058053c056376248d958c9df1e8" [[package]] name = "flume" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181" +checksum = "da0e4dd2a88388a1f4ccc7c9ce104604dab68d9f408dc34cd45823d5a9069095" dependencies = [ "futures-core", "futures-sink", - "spin 0.9.8", + "spin", ] [[package]] @@ -1194,6 +1505,12 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foldhash" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0d2fde1f7b3d48b8395d5f2de76c18a528bd6a9cdde438df747bfcba3e05d6f" + [[package]] name = "form_urlencoded" version = "1.2.1" @@ -1211,9 +1528,9 @@ checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -1221,9 +1538,9 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-cpupool" @@ -1237,9 +1554,9 @@ dependencies = [ [[package]] name = "futures-executor" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", @@ -1259,27 +1576,27 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-core", "futures-io", @@ -1293,25 +1610,25 @@ dependencies = [ [[package]] name = "gdal" -version = "0.16.0" +version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6639365794fa1f35f36f8cd3e2ea21c94c9b04aa8d9ee0d0f3324621efeb0800" +checksum = "82ab834e8be6b54fee3d0141fce5e776ad405add1f9d0da054281926e0d35a9f" dependencies = [ - "bitflags 2.5.0", + "bitflags", "chrono", "gdal-sys", "geo-types", "libc", "once_cell", "semver", - "thiserror", + "thiserror 1.0.69", ] [[package]] name = "gdal-sys" -version = "0.9.1" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab73a6c9d0d620fb5b07e02ffbb8ae08f053299cbe5db0c1bbe1d58cb33e3f38" +checksum = "18ad5d608ee6726efcf6e1d91261eb6dec7da3ee7db6bda984cdfb8a7d65ebf9" dependencies = [ "bindgen", "libc", @@ -1331,14 +1648,15 @@ dependencies = [ [[package]] name = "geo" -version = "0.28.0" +version = "0.29.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f811f663912a69249fa620dcd2a005db7254529da2d8a0b23942e81f47084501" +checksum = "34f0e6e028c581e82e6822a68869514e94c25e7f8ea669a2d8595bdf7461ccc5" dependencies = [ "earcutr", "float_next_after", "geo-types", "geographiclib-rs", + "i_overlay", "log", "num-traits", "robust", @@ -1347,13 +1665,23 @@ dependencies = [ ] [[package]] -name = "geo-types" -version = "0.7.13" +name = "geo-traits" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ff16065e5720f376fbced200a5ae0f47ace85fd70b7e54269790281353b6d61" +checksum = "b018fc19fa58202b03f1c809aebe654f7d70fd3887dace34c3d05c11aeb474b5" +dependencies = [ + "geo-types", +] + +[[package]] +name = "geo-types" +version = "0.7.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bd1157f0f936bf0cd68dec91e8f7c311afe60295574d62b70d4861a1bfdf2d9" dependencies = [ "approx", "num-traits", + "rayon", "rstar", "serde", ] @@ -1369,15 +1697,15 @@ dependencies = [ [[package]] name = "geojson" -version = "0.24.1" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5d728c1df1fbf328d74151efe6cb0586f79ee813346ea981add69bd22c9241b" +checksum = "e26f3c45b36fccc9cf2805e61d4da6bc4bbd5a3a9589b01afa3a40eff703bd79" dependencies = [ "geo-types", "log", "serde", "serde_json", - "thiserror", + "thiserror 2.0.11", ] [[package]] @@ -1385,23 +1713,37 @@ name = "getrandom" version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8" dependencies = [ "cfg-if", "libc", - "wasi", + "wasi 0.13.3+wasi-0.2.2", + "windows-targets 0.52.6", ] [[package]] name = "gimli" -version = "0.28.1" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "glob" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" [[package]] name = "group" @@ -1426,7 +1768,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.2.6", + "indexmap 2.7.1", "slab", "tokio", "tokio-util", @@ -1435,23 +1777,34 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.5" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab" +checksum = "5017294ff4bb30944501348f6f8e42e6ad28f42c8bbef7a74029aff064a4e3c2" dependencies = [ "atomic-waker", "bytes", "fnv", "futures-core", "futures-sink", - "http 1.1.0", - "indexmap 2.2.6", + "http 1.2.0", + "indexmap 2.7.1", "slab", "tokio", "tokio-util", "tracing", ] +[[package]] +name = "half" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" +dependencies = [ + "cfg-if", + "crunchy", + "num-traits", +] + [[package]] name = "hash32" version = "0.3.1" @@ -1477,13 +1830,24 @@ dependencies = [ "allocator-api2", ] +[[package]] +name = "hashbrown" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash", +] + [[package]] name = "hashlink" -version = "0.8.4" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" +checksum = "7382cf6263419f2d8df38c55d7da83da5c18aef87fc7a7fc1fb1e344edfe14c1" dependencies = [ - "hashbrown 0.14.5", + "hashbrown 0.15.2", ] [[package]] @@ -1496,15 +1860,6 @@ dependencies = [ "stable_deref_trait", ] -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" -dependencies = [ - "unicode-segmentation", -] - [[package]] name = "heck" version = "0.5.0" @@ -1543,11 +1898,11 @@ dependencies = [ [[package]] name = "home" -version = "0.5.9" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -1563,9 +1918,9 @@ dependencies = [ [[package]] name = "http" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea" dependencies = [ "bytes", "fnv", @@ -1585,32 +1940,32 @@ dependencies = [ [[package]] name = "http-body" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", - "http 1.1.0", + "http 1.2.0", ] [[package]] name = "http-body-util" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0475f8b2ac86659c21b64320d5d653f9efe42acd2a4e560073ec61a155a34f1d" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" dependencies = [ "bytes", - "futures-core", - "http 1.1.0", - "http-body 1.0.0", + "futures-util", + "http 1.2.0", + "http-body 1.0.1", "pin-project-lite", ] [[package]] name = "httparse" -version = "1.8.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "f2d708df4e7140240a16cd6ab0ab65c972d7433ab77819ea693fde9c43811e2a" [[package]] name = "httpdate" @@ -1620,9 +1975,9 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" -version = "0.14.28" +version = "0.14.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" dependencies = [ "bytes", "futures-channel", @@ -1644,16 +1999,16 @@ dependencies = [ [[package]] name = "hyper" -version = "1.3.1" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe575dd17d0862a9a33781c8c4696a55c320909004a67a00fb286ba8b1bc496d" +checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" dependencies = [ "bytes", "futures-channel", "futures-util", - "h2 0.4.5", - "http 1.1.0", - "http-body 1.0.0", + "h2 0.4.8", + "http 1.2.0", + "http-body 1.0.1", "httparse", "httpdate", "itoa", @@ -1671,7 +2026,7 @@ checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", "http 0.2.12", - "hyper 0.14.28", + "hyper 0.14.32", "log", "rustls 0.21.12", "rustls-native-certs", @@ -1681,46 +2036,90 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.26.0" +version = "0.27.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0bea761b46ae2b24eb4aef630d8d1c398157b6fc29e6350ecf090a0b70c952c" +checksum = "2d191583f3da1305256f22463b9bb0471acad48a4e534a5218b9963e9c1f59b2" dependencies = [ "futures-util", - "http 1.1.0", - "hyper 1.3.1", + "http 1.2.0", + "hyper 1.6.0", "hyper-util", - "rustls 0.22.4", + "rustls 0.23.23", "rustls-pki-types", "tokio", - "tokio-rustls 0.25.0", + "tokio-rustls 0.26.2", "tower-service", + "webpki-roots", ] [[package]] name = "hyper-util" -version = "0.1.3" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca38ef113da30126bbff9cd1705f9273e15d45498615d138b0c20279ac7a76aa" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ "bytes", "futures-channel", "futures-util", - "http 1.1.0", - "http-body 1.0.0", - "hyper 1.3.1", + "http 1.2.0", + "http-body 1.0.1", + "hyper 1.6.0", "pin-project-lite", "socket2", "tokio", - "tower", "tower-service", "tracing", ] +[[package]] +name = "i_float" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "775f9961a8d2f879725da8aff789bb20a3ddf297473e0c90af75e69313919490" +dependencies = [ + "serde", +] + +[[package]] +name = "i_key_sort" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "347c253b4748a1a28baf94c9ce133b6b166f08573157e05afe718812bc599fcd" + +[[package]] +name = "i_overlay" +version = "1.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01882ce5ed786bf6e8f5167f171a4026cd129ce17d9ff5cbf1e6749b98628ece" +dependencies = [ + "i_float", + "i_key_sort", + "i_shape", + "i_tree", + "rayon", +] + +[[package]] +name = "i_shape" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27dbe9e5238d6b9c694c08415bf00fb370b089949bd818ab01f41f8927b8774c" +dependencies = [ + "i_float", + "serde", +] + +[[package]] +name = "i_tree" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "155181bc97d770181cf9477da51218a19ee92a8e5be642e796661aee2b601139" + [[package]] name = "iana-time-zone" -version = "0.1.60" +version = "0.1.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -1739,6 +2138,124 @@ dependencies = [ "cc", ] +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "ident_case" version = "1.0.1" @@ -1747,12 +2264,23 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.5.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +dependencies = [ + "icu_normalizer", + "icu_properties", ] [[package]] @@ -1768,26 +2296,26 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.6" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "8c9c992b02b5b4c94ea26e32fe5bccb7aa7d9f390ab5c1221ff895bc7ea8b652" dependencies = [ "equivalent", - "hashbrown 0.14.5", + "hashbrown 0.15.2", "serde", ] [[package]] name = "ipnet" -version = "2.9.0" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" [[package]] name = "is_terminal_polyfill" -version = "1.70.0" +version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "itertools" @@ -1809,26 +2337,27 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.11" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" dependencies = [ + "once_cell", "wasm-bindgen", ] [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" dependencies = [ - "spin 0.5.2", + "spin", ] [[package]] @@ -1837,44 +2366,113 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" +[[package]] +name = "lexical-core" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b765c31809609075565a70b4b71402281283aeda7ecaf4818ac14a7b2ade8958" +dependencies = [ + "lexical-parse-float", + "lexical-parse-integer", + "lexical-util", + "lexical-write-float", + "lexical-write-integer", +] + +[[package]] +name = "lexical-parse-float" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de6f9cb01fb0b08060209a057c048fcbab8717b4c1ecd2eac66ebfe39a65b0f2" +dependencies = [ + "lexical-parse-integer", + "lexical-util", + "static_assertions", +] + +[[package]] +name = "lexical-parse-integer" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72207aae22fc0a121ba7b6d479e42cbfea549af1479c3f3a4f12c70dd66df12e" +dependencies = [ + "lexical-util", + "static_assertions", +] + +[[package]] +name = "lexical-util" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a82e24bf537fd24c177ffbbdc6ebcc8d54732c35b50a3f28cc3f4e4c949a0b3" +dependencies = [ + "static_assertions", +] + +[[package]] +name = "lexical-write-float" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5afc668a27f460fb45a81a757b6bf2f43c2d7e30cb5a2dcd3abf294c78d62bd" +dependencies = [ + "lexical-util", + "lexical-write-integer", + "static_assertions", +] + +[[package]] +name = "lexical-write-integer" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "629ddff1a914a836fb245616a7888b62903aae58fa771e1d83943035efa0f978" +dependencies = [ + "lexical-util", + "static_assertions", +] + [[package]] name = "libc" -version = "0.2.155" +version = "0.2.170" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +checksum = "875b3680cb2f8f71bdcf9a30f38d48282f5d3c95cbf9b3fa57269bb5d5c06828" [[package]] name = "libloading" -version = "0.8.3" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" +checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" dependencies = [ "cfg-if", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] name = "libm" -version = "0.2.8" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" +checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" [[package]] name = "libsqlite3-sys" -version = "0.27.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4e226dcd58b4be396f7bd3c20da8fdee2911400705297ba7d2d7cc2c30f716" +checksum = "2e99fb7a497b1e3339bc746195567ed8d3e24945ecd636e3619d20b9de9e9149" dependencies = [ - "cc", "pkg-config", "vcpkg", ] [[package]] name = "linux-raw-sys" -version = "0.4.14" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" + +[[package]] +name = "litemap" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +checksum = "23fb14cb19457329c82206317a5663005a4d404783dc74f4252769b0d5f42856" [[package]] name = "lock_api" @@ -1888,17 +2486,17 @@ dependencies = [ [[package]] name = "log" -version = "0.4.21" +version = "0.4.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "30bde2b3dc3671ae49d8e2e9f044c7c005836e7a023ee57cffa25ab82764bb9e" [[package]] name = "lru" -version = "0.12.3" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3262e75e648fce39813cb56ac41f3c3e3f65217ebf3844d818d1f9398cfb0dc" +checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" dependencies = [ - "hashbrown 0.14.5", + "hashbrown 0.15.2", ] [[package]] @@ -1912,9 +2510,9 @@ dependencies = [ [[package]] name = "matchit" -version = "0.7.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" +checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" [[package]] name = "md-5" @@ -1928,9 +2526,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.2" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "mime" @@ -1946,22 +2544,22 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87dfd01fe195c66b572b37921ad8803d010623c0aca821bea2302239d155cdae" +checksum = "8e3e04debbb59698c15bacbb6d93584a8c0ca9cc3213cb423d31f760d8843ce5" dependencies = [ - "adler", + "adler2", ] [[package]] name = "mio" -version = "0.8.11" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" dependencies = [ "libc", - "wasi", - "windows-sys 0.48.0", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.52.0", ] [[package]] @@ -1973,11 +2571,11 @@ dependencies = [ "bytes", "encoding_rs", "futures-util", - "http 1.1.0", + "http 1.2.0", "httparse", "memchr", "mime", - "spin 0.9.8", + "spin", "version_check", ] @@ -2001,11 +2599,25 @@ dependencies = [ "winapi", ] +[[package]] +name = "num" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" +dependencies = [ + "num-bigint", + "num-complex", + "num-integer", + "num-iter", + "num-rational", + "num-traits", +] + [[package]] name = "num-bigint" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" dependencies = [ "num-integer", "num-traits", @@ -2029,6 +2641,15 @@ dependencies = [ "zeroize", ] +[[package]] +name = "num-complex" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" +dependencies = [ + "num-traits", +] + [[package]] name = "num-conv" version = "0.1.0" @@ -2087,11 +2708,32 @@ dependencies = [ "libc", ] +[[package]] +name = "num_enum" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" +dependencies = [ + "num_enum_derive", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "object" -version = "0.32.2" +version = "0.36.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" dependencies = [ "memchr", ] @@ -2100,25 +2742,11 @@ dependencies = [ name = "ogcapi" version = "0.2.0" dependencies = [ - "anyhow", - "clap", - "dotenvy", - "gdal", - "geo", - "geojson", "ogcapi-client", "ogcapi-drivers", + "ogcapi-processes", "ogcapi-services", "ogcapi-types", - "osmpbfreader", - "serde", - "serde_json", - "sqlx", - "tokio", - "tracing", - "tracing-subscriber", - "url", - "wkb", ] [[package]] @@ -2132,7 +2760,7 @@ dependencies = [ "serde", "serde_json", "serde_qs", - "thiserror", + "thiserror 2.0.11", "url", ] @@ -2144,13 +2772,35 @@ dependencies = [ "async-trait", "aws-config", "aws-sdk-s3", - "http 1.1.0", + "http 1.2.0", "ogcapi-types", "rink-core", "serde_json", "sqlx", + "url", +] + +[[package]] +name = "ogcapi-processes" +version = "0.2.0" +dependencies = [ + "anyhow", + "arrow", + "async-trait", + "dyn-clone", + "gdal", + "geo", + "geojson", + "http-body 1.0.1", + "ogcapi-drivers", + "ogcapi-types", + "schemars", + "serde", + "serde_json", + "sqlx", "tokio", "url", + "wkb", ] [[package]] @@ -2159,15 +2809,17 @@ version = "0.2.0" dependencies = [ "anyhow", "axum", + "axum-extra", "clap", + "data-loader", "dotenvy", "dyn-clone", "geojson", "http-body-util", - "hyper 1.3.1", + "hyper 1.6.0", "hyper-util", - "ogcapi", "ogcapi-drivers", + "ogcapi-processes", "ogcapi-types", "openapiv3", "schemars", @@ -2175,7 +2827,7 @@ dependencies = [ "serde_json", "serde_qs", "serde_yaml", - "thiserror", + "thiserror 2.0.11", "tokio", "tower", "tower-http", @@ -2201,9 +2853,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "945462a4b81e43c4e3ba96bd7b49d834c6f61198356aa858733bc4acf3cbe62e" [[package]] name = "openapiv3" @@ -2211,29 +2863,29 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc02deea53ffe807708244e5914f6b099ad7015a207ee24317c22112e17d9c5c" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.7.1", "serde", "serde_json", ] [[package]] name = "openssl-probe" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" [[package]] name = "osmpbfreader" -version = "0.16.1" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31a9a5652ee5d1ac97f64960117f9165d2d185034c5ccf22f6fadd3fcb78ccb2" +checksum = "38e9c16f77106ccd0f85602ff6b2237375b1f331ef950f59c35bdd6eff37cb64" dependencies = [ "byteorder", "flat_map", "flate2", "par-map", "protobuf", - "protobuf-codegen-pure", + "protobuf-codegen", "pub-iterator-type", "self_cell", "serde", @@ -2242,9 +2894,9 @@ dependencies = [ [[package]] name = "outref" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4030760ffd992bef45b0ae3f10ce1aba99e33464c90d14dd7c039884963ddc7a" +checksum = "1a80800c0488c3a21695ea981a54918fbb37abf04f4d0720c453632255e2ff0e" [[package]] name = "overload" @@ -2275,11 +2927,17 @@ dependencies = [ "pub-iterator-type", ] +[[package]] +name = "parking" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" + [[package]] name = "parking_lot" -version = "0.12.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e4af0ca4f6caed20e900d564c242b8e5d4903fdacf31d3daf527b66fe6f42fb" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", "parking_lot_core", @@ -2293,9 +2951,9 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.1", + "redox_syscall", "smallvec", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -2307,18 +2965,6 @@ dependencies = [ "regex", ] -[[package]] -name = "paste" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" - -[[package]] -name = "peeking_take_while" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" - [[package]] name = "pem-rfc7468" version = "0.7.0" @@ -2334,31 +2980,11 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" -[[package]] -name = "pin-project" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.64", -] - [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" [[package]] name = "pin-utils" @@ -2399,9 +3025,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "powerfmt" @@ -2411,52 +3037,90 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] [[package]] name = "prettyplease" -version = "0.2.20" +version = "0.2.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" +checksum = "6924ced06e1f7dfe3fa48d57b9f74f55d8915f5036121bef647ef4b204895fac" dependencies = [ "proc-macro2", - "syn 2.0.64", + "syn", +] + +[[package]] +name = "proc-macro-crate" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" +dependencies = [ + "toml_edit", ] [[package]] name = "proc-macro2" -version = "1.0.82" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ad3d49ab951a01fbaafe34f2ec74122942fe18a3f9814c3268f1bb72042131b" +checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99" dependencies = [ "unicode-ident", ] [[package]] name = "protobuf" -version = "2.28.0" +version = "3.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "106dd99e98437432fed6519dedecfade6a06a73bb7b2a1e019fdd2bee5778d94" +checksum = "a3a7c64d9bf75b1b8d981124c14c179074e8caa7dfe7b6a12e6222ddcd0c8f72" +dependencies = [ + "once_cell", + "protobuf-support", + "thiserror 1.0.69", +] [[package]] name = "protobuf-codegen" -version = "2.28.0" +version = "3.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "033460afb75cf755fcfc16dfaed20b86468082a2ea24e05ac35ab4a099a017d6" +checksum = "e26b833f144769a30e04b1db0146b2aaa53fd2fd83acf10a6b5f996606c18144" dependencies = [ + "anyhow", + "once_cell", "protobuf", + "protobuf-parse", + "regex", + "tempfile", + "thiserror 1.0.69", ] [[package]] -name = "protobuf-codegen-pure" -version = "2.28.0" +name = "protobuf-parse" +version = "3.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a29399fc94bcd3eeaa951c715f7bea69409b2445356b00519740bcd6ddd865" +checksum = "322330e133eab455718444b4e033ebfac7c6528972c784fcde28d2cc783c6257" dependencies = [ + "anyhow", + "indexmap 2.7.1", + "log", "protobuf", - "protobuf-codegen", + "protobuf-support", + "tempfile", + "thiserror 1.0.69", + "which", +] + +[[package]] +name = "protobuf-support" +version = "3.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b088fd20b938a875ea00843b6faf48579462630015c3788d397ad6a786663252" +dependencies = [ + "thiserror 1.0.69", ] [[package]] @@ -2465,11 +3129,63 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "858afdbecdce657c6e32031348cf7326da7700c869c368a136d31565972f7018" +[[package]] +name = "quinn" +version = "0.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62e96808277ec6f97351a2380e6c25114bc9e67037775464979f3037c92d05ef" +dependencies = [ + "bytes", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash 2.1.1", + "rustls 0.23.23", + "socket2", + "thiserror 2.0.11", + "tokio", + "tracing", +] + +[[package]] +name = "quinn-proto" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2fe5ef3495d7d2e377ff17b1a8ce2ee2ec2a18cde8b6ad6619d65d0701c135d" +dependencies = [ + "bytes", + "getrandom 0.2.15", + "rand", + "ring", + "rustc-hash 2.1.1", + "rustls 0.23.23", + "rustls-pki-types", + "slab", + "thiserror 2.0.11", + "tinyvec", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-udp" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e46f3055866785f6b92bc6164b76be02ca8f2eb4b002c0354b28cf4c119e5944" +dependencies = [ + "cfg_aliases", + "libc", + "once_cell", + "socket2", + "tracing", + "windows-sys 0.59.0", +] + [[package]] name = "quote" -version = "1.0.36" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" dependencies = [ "proc-macro2", ] @@ -2501,37 +3217,48 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom", + "getrandom 0.2.15", ] [[package]] -name = "redox_syscall" -version = "0.4.1" +name = "rayon" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" dependencies = [ - "bitflags 1.3.2", + "crossbeam-deque", + "crossbeam-utils", ] [[package]] name = "redox_syscall" -version = "0.5.1" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" +checksum = "82b568323e98e49e2a0899dcee453dd679fae22d69adf9b11dd508d1549b7e2f" dependencies = [ - "bitflags 2.5.0", + "bitflags", ] [[package]] name = "regex" -version = "1.10.4" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.6", - "regex-syntax 0.8.3", + "regex-automata 0.4.9", + "regex-syntax 0.8.5", ] [[package]] @@ -2545,20 +3272,20 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.3", + "regex-syntax 0.8.5", ] [[package]] name = "regex-lite" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b661b2f27137bdbc16f00eda72866a92bb28af1753ffbd56744fb6e2e9cd8e" +checksum = "53a49587ad06b26609c52e423de037e7f57f20d53535d66e08c695f347df952a" [[package]] name = "regex-syntax" @@ -2568,26 +3295,26 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" -version = "0.12.4" +version = "0.12.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "566cafdd92868e0939d3fb961bd0dc25fcfaaed179291093b3d43e6b3150ea10" +checksum = "43e734407157c3c2034e0258f5e4473ddb361b1e85f95a66690d67264d7cd1da" dependencies = [ "base64 0.22.1", "bytes", "futures-channel", "futures-core", "futures-util", - "http 1.1.0", - "http-body 1.0.0", + "http 1.2.0", + "http-body 1.0.1", "http-body-util", - "hyper 1.3.1", - "hyper-rustls 0.26.0", + "hyper 1.6.0", + "hyper-rustls 0.27.5", "hyper-util", "ipnet", "js-sys", @@ -2596,22 +3323,24 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls 0.22.4", - "rustls-pemfile 2.1.2", + "quinn", + "rustls 0.23.23", + "rustls-pemfile 2.2.0", "rustls-pki-types", "serde", "serde_json", "serde_urlencoded", - "sync_wrapper 0.1.2", + "sync_wrapper", "tokio", - "tokio-rustls 0.25.0", + "tokio-rustls 0.26.2", + "tower", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots 0.26.1", - "winreg", + "webpki-roots", + "windows-registry", ] [[package]] @@ -2627,15 +3356,14 @@ dependencies = [ [[package]] name = "ring" -version = "0.17.8" +version = "0.17.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +checksum = "da5349ae27d3887ca812fb375b45a4fbb36d8d12d2df394968cd86e35683fe73" dependencies = [ "cc", "cfg-if", - "getrandom", + "getrandom 0.2.15", "libc", - "spin 0.9.8", "untrusted", "windows-sys 0.52.0", ] @@ -2649,7 +3377,7 @@ dependencies = [ "chrono", "chrono-humanize", "chrono-tz", - "indexmap 2.2.6", + "indexmap 2.7.1", "num-bigint", "num-rational", "num-traits", @@ -2666,9 +3394,9 @@ checksum = "cbf4a6aa5f6d6888f39e980649f3ad6b666acdce1d78e95b8a2cb076e687ae30" [[package]] name = "rsa" -version = "0.9.6" +version = "0.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d0e5124fcb30e76a7e79bfee683a2746db83784b86289f6251b54b7950a0dfc" +checksum = "47c75d7c5c6b673e58bf54d8544a9f432e3a925b0e80f7cd3602ab5c50c55519" dependencies = [ "const-oid", "digest", @@ -2686,9 +3414,9 @@ dependencies = [ [[package]] name = "rstar" -version = "0.12.0" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "133315eb94c7b1e8d0cb097e5a710d850263372fd028fff18969de708afc7008" +checksum = "421400d13ccfd26dfa5858199c30a5d76f9c54e0dba7575273025b43c5175dbb" dependencies = [ "heapless", "num-traits", @@ -2707,26 +3435,32 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +[[package]] +name = "rustc-hash" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" + [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver", ] [[package]] name = "rustix" -version = "0.38.34" +version = "0.38.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ - "bitflags 2.5.0", + "bitflags", "errno", "libc", "linux-raw-sys", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2743,14 +3477,14 @@ dependencies = [ [[package]] name = "rustls" -version = "0.22.4" +version = "0.23.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" +checksum = "47796c98c480fce5406ef69d1c76378375492c3b0a0de587be0c1d9feb12f395" dependencies = [ - "log", + "once_cell", "ring", "rustls-pki-types", - "rustls-webpki 0.102.4", + "rustls-webpki 0.102.8", "subtle", "zeroize", ] @@ -2778,19 +3512,21 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "2.1.2" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" dependencies = [ - "base64 0.22.1", "rustls-pki-types", ] [[package]] name = "rustls-pki-types" -version = "1.7.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" +checksum = "917ce264624a4b4db1c364dcc35bfca9ded014d0a958cd47ad3e960e988ea51c" +dependencies = [ + "web-time", +] [[package]] name = "rustls-webpki" @@ -2804,9 +3540,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.102.4" +version = "0.102.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff448f7e92e913c4b7d4c6d8e4540a1724b319b4152b8aef6d4cf8339712b33e" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" dependencies = [ "ring", "rustls-pki-types", @@ -2815,30 +3551,30 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.17" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" +checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" [[package]] name = "ryu" -version = "1.0.18" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" +checksum = "6ea1a2d0a644769cc99faa24c3ad26b379b786fe7c36fd3c546254801650e6dd" [[package]] name = "schannel" -version = "0.1.23" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "schemars" -version = "0.8.20" +version = "0.8.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0218ceea14babe24a4a5836f86ade86c1effbc198164e619194cb5069187e29" +checksum = "3fbf2ae1b8bc8e02df939598064d22402220cd5bbcca1c76f7d6a310974d5615" dependencies = [ "dyn-clone", "schemars_derive", @@ -2848,14 +3584,14 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.20" +version = "0.8.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed5a1ccce8ff962e31a165d41f6e2a2dd1245099dc4d594f5574a86cd90f4d3" +checksum = "32e265784ad618884abaea0600a9adf15393368d840e0222d101a072f3f7534d" dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.64", + "syn", ] [[package]] @@ -2890,11 +3626,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.11.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.5.0", + "bitflags", "core-foundation", "core-foundation-sys", "libc", @@ -2903,9 +3639,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.0" +version = "2.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" +checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" dependencies = [ "core-foundation-sys", "libc", @@ -2913,34 +3649,34 @@ dependencies = [ [[package]] name = "self_cell" -version = "1.0.4" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d369a96f978623eb3dc28807c4852d6cc617fed53da5d3c400feff1ef34a714a" +checksum = "c2fdfc24bc566f839a2da4c4295b82db7d25a24253867d5c64355abb5799bdbe" [[package]] name = "semver" -version = "1.0.23" +version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +checksum = "f79dfe2d285b0488816f30e700a7438c5a73d816b5b7d3ac72fbc48b0d185e03" [[package]] name = "serde" -version = "1.0.202" +version = "1.0.218" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "226b61a0d411b2ba5ff6d7f73a476ac4f8bb900373459cd00fab8512828ba395" +checksum = "e8dfc9d19bdbf6d17e22319da49161d5d0108e4188e8b680aef6299eed22df60" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.202" +version = "1.0.218" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6048858004bcff69094cd972ed40a32500f153bd3be9f716b2eed2e8217c4838" +checksum = "f09503e191f4e797cb8aac08e9a4a4695c5edf6a2e70e376d961ddd5c969f82b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.64", + "syn", ] [[package]] @@ -2951,16 +3687,17 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.64", + "syn", ] [[package]] name = "serde_json" -version = "1.0.117" +version = "1.0.139" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" +checksum = "44f86c3acccc9c65b153fe1b85a3be07fe5515274ec9f0653b4a0875731c72a6" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] @@ -2983,7 +3720,7 @@ checksum = "cd34f36fe4c5ba9654417139a9b3a20d2e1de6012ee678ad14d240c22c78d8d6" dependencies = [ "percent-encoding", "serde", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -2994,7 +3731,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.64", + "syn", ] [[package]] @@ -3011,15 +3748,15 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.8.1" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ad483d2ab0149d5a5ebcd9972a3852711e0153d863bf5a5d0391d28883c4a20" +checksum = "d6b6f7f2fcb69f747921f79f3926bd1e203fce4fef62c268dd3abfb6d86029aa" dependencies = [ "base64 0.22.1", "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.2.6", + "indexmap 2.7.1", "serde", "serde_derive", "serde_json", @@ -3029,14 +3766,14 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.8.1" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65569b702f41443e8bc8bbb1c5779bd0450bbe723b56198980e80ec45780bce2" +checksum = "8d00caa5193a3c8362ac2b73be6b9e768aa5a4b2f721d8f4b339600c3cb51f8e" dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.64", + "syn", ] [[package]] @@ -3045,7 +3782,7 @@ version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.7.1", "itoa", "ryu", "serde", @@ -3129,9 +3866,12 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.13.2" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd" +dependencies = [ + "serde", +] [[package]] name = "smartstring" @@ -3147,9 +3887,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" dependencies = [ "libc", "windows-sys 0.52.0", @@ -3157,9 +3897,9 @@ dependencies = [ [[package]] name = "spade" -version = "2.7.0" +version = "2.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68330712eea6ce4123e2a732769ed19bba1f007fd2636cbdc6e6be2af8b606a4" +checksum = "8a7f89cb9a80ac939dedb9ad42720cbe112424b6f6597a2a2e9c5e5b684cd4f7" dependencies = [ "hashbrown 0.14.5", "num-traits", @@ -3167,12 +3907,6 @@ dependencies = [ "smallvec", ] -[[package]] -name = "spin" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" - [[package]] name = "spin" version = "0.9.8" @@ -3202,22 +3936,11 @@ dependencies = [ "der 0.7.9", ] -[[package]] -name = "sqlformat" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce81b7bd7c4493975347ef60d8c7e8b742d4694f4c49f93e0a12ea263938176c" -dependencies = [ - "itertools 0.12.1", - "nom", - "unicode_categories", -] - [[package]] name = "sqlx" -version = "0.7.4" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9a2ccff1a000a5a59cd33da541d9f2fdcd9e6e8229cc200565942bff36d0aaa" +checksum = "4410e73b3c0d8442c5f99b425d7a435b5ee0ae4167b3196771dd3f7a01be745f" dependencies = [ "sqlx-core", "sqlx-macros", @@ -3228,68 +3951,62 @@ dependencies = [ [[package]] name = "sqlx-core" -version = "0.7.4" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24ba59a9342a3d9bab6c56c118be528b27c9b60e490080e9711a04dccac83ef6" +checksum = "6a007b6936676aa9ab40207cde35daab0a04b823be8ae004368c0793b96a61e0" dependencies = [ - "ahash", - "atoi", - "byteorder", "bytes", "crc", "crossbeam-queue", "either", "event-listener", - "futures-channel", "futures-core", "futures-intrusive", "futures-io", "futures-util", + "hashbrown 0.15.2", "hashlink", - "hex", - "indexmap 2.2.6", + "indexmap 2.7.1", "log", "memchr", "once_cell", - "paste", "percent-encoding", - "rustls 0.21.12", - "rustls-pemfile 1.0.4", + "rustls 0.23.23", + "rustls-pemfile 2.2.0", "serde", "serde_json", "sha2", "smallvec", - "sqlformat", - "thiserror", + "thiserror 2.0.11", "tokio", "tokio-stream", "tracing", "url", - "webpki-roots 0.25.4", + "webpki-roots", ] [[package]] name = "sqlx-macros" -version = "0.7.4" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ea40e2345eb2faa9e1e5e326db8c34711317d2b5e08d0d5741619048a803127" +checksum = "3112e2ad78643fef903618d78cf0aec1cb3134b019730edb039b69eaf531f310" dependencies = [ "proc-macro2", "quote", "sqlx-core", "sqlx-macros-core", - "syn 1.0.109", + "syn", ] [[package]] name = "sqlx-macros-core" -version = "0.7.4" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5833ef53aaa16d860e92123292f1f6a3d53c34ba8b1969f152ef1a7bb803f3c8" +checksum = "4e9f90acc5ab146a99bf5061a7eb4976b573f560bc898ef3bf8435448dd5e7ad" dependencies = [ "dotenvy", "either", - "heck 0.4.1", + "heck", "hex", "once_cell", "proc-macro2", @@ -3301,7 +4018,7 @@ dependencies = [ "sqlx-mysql", "sqlx-postgres", "sqlx-sqlite", - "syn 1.0.109", + "syn", "tempfile", "tokio", "url", @@ -3309,13 +4026,13 @@ dependencies = [ [[package]] name = "sqlx-mysql" -version = "0.7.4" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ed31390216d20e538e447a7a9b959e06ed9fc51c37b514b46eb758016ecd418" +checksum = "4560278f0e00ce64938540546f59f590d60beee33fffbd3b9cd47851e5fff233" dependencies = [ "atoi", - "base64 0.21.7", - "bitflags 2.5.0", + "base64 0.22.1", + "bitflags", "byteorder", "bytes", "crc", @@ -3344,27 +4061,26 @@ dependencies = [ "smallvec", "sqlx-core", "stringprep", - "thiserror", + "thiserror 2.0.11", "tracing", "whoami", ] [[package]] name = "sqlx-postgres" -version = "0.7.4" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c824eb80b894f926f89a0b9da0c7f435d27cdd35b8c655b114e58223918577e" +checksum = "c5b98a57f363ed6764d5b3a12bfedf62f07aa16e1856a7ddc2a0bb190a959613" dependencies = [ "atoi", - "base64 0.21.7", - "bitflags 2.5.0", + "base64 0.22.1", + "bitflags", "byteorder", "crc", "dotenvy", "etcetera", "futures-channel", "futures-core", - "futures-io", "futures-util", "hex", "hkdf", @@ -3382,16 +4098,16 @@ dependencies = [ "smallvec", "sqlx-core", "stringprep", - "thiserror", + "thiserror 2.0.11", "tracing", "whoami", ] [[package]] name = "sqlx-sqlite" -version = "0.7.4" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b244ef0a8414da0bed4bb1910426e890b19e5e9bccc27ada6b797d05c55ae0aa" +checksum = "f85ca71d3a5b24e64e1d08dd8fe36c6c95c339a896cc33068148906784620540" dependencies = [ "atoi", "flume", @@ -3404,10 +4120,10 @@ dependencies = [ "log", "percent-encoding", "serde", + "serde_urlencoded", "sqlx-core", "tracing", "url", - "urlencoding", ] [[package]] @@ -3424,13 +4140,13 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "stringprep" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb41d74e231a107a1b4ee36bd1214b11285b77768d2e3824aedafa988fd36ee6" +checksum = "7b4df3d392d81bd458a8a621b8bffbd2302a12ffe288a9d931670948749463b1" dependencies = [ - "finl_unicode", "unicode-bidi", "unicode-normalization", + "unicode-properties", ] [[package]] @@ -3447,15 +4163,15 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "subtle" -version = "2.5.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" -version = "1.0.109" +version = "2.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +checksum = "36147f1a48ae0ec2b5b3bc5b537d267457555a10dc06f3dbc8cb11ba3006d3b1" dependencies = [ "proc-macro2", "quote", @@ -3463,58 +4179,77 @@ dependencies = [ ] [[package]] -name = "syn" -version = "2.0.64" +name = "sync_wrapper" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ad3dee41f36859875573074334c200d1add8e4a87bb37113ebd31d926b7b11f" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", + "futures-core", ] [[package]] -name = "sync_wrapper" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" - -[[package]] -name = "sync_wrapper" -version = "1.0.1" +name = "synstructure" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] [[package]] name = "tempfile" -version = "3.10.1" +version = "3.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "22e5a0acb1f3f55f65cc4a866c361b2fb2a0ff6366785ae6fbb5f85df07ba230" dependencies = [ "cfg-if", "fastrand", + "getrandom 0.3.1", + "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.59.0", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", ] [[package]] name = "thiserror" -version = "1.0.61" +version = "2.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d452f284b73e6d76dd36758a0c8684b1d5be31f92b89d07fd5822175732206fc" +dependencies = [ + "thiserror-impl 2.0.11", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ - "thiserror-impl", + "proc-macro2", + "quote", + "syn", ] [[package]] name = "thiserror-impl" -version = "1.0.61" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" +checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.64", + "syn", ] [[package]] @@ -3529,9 +4264,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.36" +version = "0.3.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21" dependencies = [ "deranged", "itoa", @@ -3550,19 +4285,38 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +checksum = "2834e6017e3e5e4b9834939793b282bc03b37a3336245fa820e35e233e2a85de" dependencies = [ "num-conv", "time-core", ] +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + [[package]] name = "tinyvec" -version = "1.6.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "022db8904dfa342efe721985167e9fcd16c29b226db4397ed752a761cfce81e8" dependencies = [ "tinyvec_macros", ] @@ -3575,32 +4329,31 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.37.0" +version = "1.43.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" +checksum = "3d61fa4ffa3de412bfea335c6ecff681de2b609ba3c77ef3e00e521813a9ed9e" dependencies = [ "backtrace", "bytes", "libc", "mio", - "num_cpus", "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2", "tokio-macros", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "tokio-macros" -version = "2.2.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.64", + "syn", ] [[package]] @@ -3615,20 +4368,19 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.25.0" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" +checksum = "8e727b36a1a0e8b74c376ac2211e40c2c8af09fb4013c60d910495810f008e9b" dependencies = [ - "rustls 0.22.4", - "rustls-pki-types", + "rustls 0.23.23", "tokio", ] [[package]] name = "tokio-stream" -version = "0.1.15" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" +checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" dependencies = [ "futures-core", "pin-project-lite", @@ -3637,9 +4389,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.11" +version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +checksum = "d7fcaa8d55a2bdd6b83ace262b016eca0d79ee02818c5c1bcdf0305114081078" dependencies = [ "bytes", "futures-core", @@ -3648,16 +4400,33 @@ dependencies = [ "tokio", ] +[[package]] +name = "toml_datetime" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" + +[[package]] +name = "toml_edit" +version = "0.22.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17b4795ff5edd201c7cd6dca065ae59972ce77d1b80fa0a84d94950ece7d1474" +dependencies = [ + "indexmap 2.7.1", + "toml_datetime", + "winnow", +] + [[package]] name = "tower" -version = "0.4.13" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" dependencies = [ "futures-core", "futures-util", - "pin-project", "pin-project-lite", + "sync_wrapper", "tokio", "tower-layer", "tower-service", @@ -3666,17 +4435,17 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.5.2" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e9cd434a998747dd2c4276bc96ee2e0c7a2eadf3cae88e52be55a05fa9053f5" +checksum = "403fa3b783d4b626a8ad51d766ab03cb6d2dbfc46b1c5d4448395e6628dc9697" dependencies = [ "async-compression", - "bitflags 2.5.0", + "bitflags", "bytes", "futures-core", "futures-util", - "http 1.1.0", - "http-body 1.0.0", + "http 1.2.0", + "http-body 1.0.1", "http-body-util", "pin-project-lite", "tokio", @@ -3690,21 +4459,21 @@ dependencies = [ [[package]] name = "tower-layer" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" -version = "0.1.40" +version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ "log", "pin-project-lite", @@ -3714,20 +4483,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.27" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.64", + "syn", ] [[package]] name = "tracing-core" -version = "0.1.32" +version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" dependencies = [ "once_cell", "valuable", @@ -3746,9 +4515,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.18" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" dependencies = [ "matchers", "nu-ansi-term", @@ -3770,42 +4539,36 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "typenum" -version = "1.17.0" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" [[package]] name = "unicode-bidi" -version = "0.3.15" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" +checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "00e2473a93778eb0bad35909dff6a10d28e63f792f16ed15e404fca9d5eeedbe" [[package]] name = "unicode-normalization" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" dependencies = [ "tinyvec", ] [[package]] -name = "unicode-segmentation" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" - -[[package]] -name = "unicode_categories" -version = "0.1.1" +name = "unicode-properties" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" +checksum = "e70f2a8b45122e719eb623c01822704c4e0907e7e426a05927e1a1cfff5b75d0" [[package]] name = "unsafe-libyaml" @@ -3821,9 +4584,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.0" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" dependencies = [ "form_urlencoded", "idna", @@ -3837,27 +4600,39 @@ version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "utf8parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.8.0" +version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" +checksum = "e0f540e3240398cce6128b64ba83fdbdd86129c16a3aa1a3a252efd66eb3d587" dependencies = [ - "getrandom", + "getrandom 0.3.1", "serde", ] [[package]] name = "valuable" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" [[package]] name = "vcpkg" @@ -3867,9 +4642,9 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "vsimd" @@ -3892,6 +4667,15 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasi" +version = "0.13.3+wasi-0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26816d2e1a4a36a2940b96c5296ce403917633dff8f3440e9b236ed6f6bacad2" +dependencies = [ + "wit-bindgen-rt", +] + [[package]] name = "wasite" version = "0.1.0" @@ -3900,46 +4684,48 @@ checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" dependencies = [ "cfg-if", + "once_cell", + "rustversion", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" dependencies = [ "bumpalo", "log", - "once_cell", "proc-macro2", "quote", - "syn 2.0.64", + "syn", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" dependencies = [ "cfg-if", "js-sys", + "once_cell", "wasm-bindgen", "web-sys", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3947,44 +4733,51 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn 2.0.64", + "syn", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" dependencies = [ "js-sys", "wasm-bindgen", ] [[package]] -name = "webpki-roots" -version = "0.25.4" +name = "web-time" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] [[package]] name = "webpki-roots" -version = "0.26.1" +version = "0.26.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3de34ae270483955a94f4b21bdaaeb83d508bb84a01435f393818edb0012009" +checksum = "2210b291f7ea53617fbafcc4939f10914214ec15aace5ba62293a668f322c5c9" dependencies = [ "rustls-pki-types", ] @@ -4003,11 +4796,11 @@ dependencies = [ [[package]] name = "whoami" -version = "1.5.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44ab49fad634e88f55bf8f9bb3abd2f27d7204172a112c7c9987e01c1c94ea9" +checksum = "372d5b87f58ec45c384ba03563b03544dc5fadc3983e434b286913f5b4a9bb6d" dependencies = [ - "redox_syscall 0.4.1", + "redox_syscall", "wasite", ] @@ -4039,7 +4832,37 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-registry" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" +dependencies = [ + "windows-result", + "windows-strings", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result", + "windows-targets 0.52.6", ] [[package]] @@ -4057,7 +4880,16 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] @@ -4077,18 +4909,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -4099,9 +4931,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -4111,9 +4943,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -4123,15 +4955,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -4141,9 +4973,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -4153,9 +4985,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -4165,9 +4997,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -4177,58 +5009,148 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] -name = "winreg" -version = "0.52.0" +name = "winnow" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" +checksum = "0e7f4ea97f6f78012141bcdb6a216b2609f0979ada50b20ca5b52dde2eac2bb1" dependencies = [ - "cfg-if", - "windows-sys 0.48.0", + "memchr", +] + +[[package]] +name = "wit-bindgen-rt" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c" +dependencies = [ + "bitflags", ] [[package]] name = "wkb" -version = "0.7.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66c806dac841607a62b0e8babf620fea51429f6ea005545491198fcbfd9004a2" +checksum = "b1e2c084338d6407d24c5a43208aca32128a5d62107eab5ca18314395c4aa3f0" dependencies = [ - "geo-types", - "num-traits", + "byteorder", + "geo-traits", + "num_enum", + "thiserror 1.0.69", ] +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + [[package]] name = "xmlparser" version = "0.13.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "66fee0b777b0f5ac1c69bb06d361268faafa61cd4682ae064a171c16c433e9e4" +[[package]] +name = "yoke" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + [[package]] name = "zerocopy" -version = "0.7.34" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ + "byteorder", "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.34" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zerofrom" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", - "syn 2.0.64", + "syn", + "synstructure", ] [[package]] name = "zeroize" -version = "1.7.0" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] diff --git a/Cargo.toml b/Cargo.toml index 9511d07..f3de743 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,22 +5,27 @@ members = [ "ogcapi", "ogcapi-client", "ogcapi-drivers", + "ogcapi-processes", "ogcapi-services", "ogcapi-types", + "examples/*", ] +exclude = ["examples/*"] default-members = ["ogcapi"] [workspace.package] license = "MIT OR Apache-2.0" repository = "https://github.com/georust/ogcapi" -edition = "2021" +edition = "2024" +categories = ["science::geospatial"] +keywords = ["geography", "geo", "geospatial", "gis", "api"] [workspace.dependencies] anyhow = "1.0" -geojson = "0.24.1" -log = "0.4.21" +geojson = "0.24.2" +log = "0.4.26" serde = "1.0" serde_json = "1.0" serde_qs = "0.13.0" -thiserror = "1.0" +thiserror = "2.0" url = "2.5" diff --git a/README.md b/README.md index 6c349e9..2063ad8 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,10 @@ -# `ogcapi` +# ogcapi + +[![Documentation](https://docs.rs/ogcapi/badge.svg)](https://docs.rs/ogcapi) +[![Crate](https://img.shields.io/crates/v/ogcapi.svg)](https://crates.io/crates/ogcapi) + +The `ogcapi` crate provides various [OGC API](https://ogcapi.ogc.org/) building blocks implemented in [Rust](https://www.rust-lang.org/). -[OGC API](https://ogcapi.ogc.org/) building blocks implemented in [Rust](https://www.rust-lang.org/) ## Project Outline @@ -13,7 +17,7 @@ The code is organized in four modules, respectively crates: | `ogcapi-services` | Server implementation of various OGC API services based on `axum`. | | `ogcapi-drivers` | Drivers for different data provider backends, currently mainly PostgreSQL with PostGIS through `sqlx`. | -These modules are reexported within the `ogcapi` crate. +These modules are reexported within the `ogcapi` crate. ## Quick Start @@ -21,15 +25,13 @@ This will take a while and use quite some disk space ```bash # Setup the database -docker compose up +docker compose up --build # Import administrative bounaries -docker exec -ti ogcapi cargo run -- import \ - --input data/ne_110m_admin_0_countries.geojson \ - --collection countries +docker exec -ti ogcapi cargo run -p data-loader -- --input data/ne_110m_admin_0_countries.geojson --collection countries # Run app -docker exec -ti ogcapi cargo run -- serve +docker exec -ti ogcapi cargo run -p demo-service ``` Open were you will find the `Landing Page`. @@ -54,10 +56,10 @@ cargo install sqlx-cli --no-default-features --features postgres,rustls docker compose up db minio minio-mc -d # Import administrative bounaries -cargo run -- import --input data/ne_110m_admin_0_countries.geojson --collection countries +cargo run -p data-loader -- --input data/ne_110m_admin_0_countries.geojson --collection countries # Start service -cargo run -- serve +cargo run -p demo-service # Run tests cargo test --workspace --all-features @@ -73,7 +75,7 @@ cargo doc --workspace --all-features --no-deps --open cargo fmt # Clippy -cargo clippy --workspace --all-features --tests +cargo clippy --workspace --all-features --examples --tests ``` ### Teamengine diff --git a/examples/data-loader/Cargo.toml b/examples/data-loader/Cargo.toml new file mode 100644 index 0000000..705216a --- /dev/null +++ b/examples/data-loader/Cargo.toml @@ -0,0 +1,39 @@ +[package] +name = "data-loader" +version = "0.1.0" +edition.workspace = true +publish = false + +[features] +default = ["geojson"] + +geojson = ["dep:geo", "dep:geojson", "dep:wkb"] +ogr = ["dep:gdal", "dep:arrow", "arrow/ffi"] +osm = ["dep:geo", "dep:osmpbfreader", "dep:wkb"] + +stac = ["ogcapi/stac"] + +[dependencies] +anyhow = { workspace = true } +arrow = { version = "54.2.1", optional = true, default-features = false } +clap = { version = "4.5", features = ["derive", "env"] } +dotenvy = "0.15.7" +gdal = { version = "0.17.1", optional = true, features = ["bindgen"] } +geo = { version = "0.29.3", optional = true } +geojson = { workspace = true, optional = true, features = ["geo-types"] } +osmpbfreader = { version = "0.17.0", optional = true } +serde_json = { workspace = true } +sqlx = { version = "0.8.3", features = ["runtime-tokio-rustls", "postgres"] } +tokio = { version = "1.43", features = ["full"] } +tracing = "0.1.41" +tracing-subscriber = { version = "0.3.19", features = ["env-filter"] } +url = { workspace = true, features = ["serde"] } +wkb = { version = "0.8.0", optional = true } + + +ogcapi = { path = "../../ogcapi", version = "0.2", features = [ + "common", + "types", + "drivers", + "postgres", +] } diff --git a/ogcapi/src/import/args.rs b/examples/data-loader/src/args.rs similarity index 89% rename from ogcapi/src/import/args.rs rename to examples/data-loader/src/args.rs index 8e62f91..4961fee 100644 --- a/ogcapi/src/import/args.rs +++ b/examples/data-loader/src/args.rs @@ -16,10 +16,6 @@ pub struct Args { #[clap(long)] pub s_srs: Option, - /// Target storage crs of the collection - #[clap(long)] - pub t_srs: Option, - /// Postgres database url #[clap(long, env, hide_env_values = true, value_parser)] pub database_url: url::Url, @@ -36,7 +32,6 @@ impl Args { collection: collection.to_string(), filter: None, s_srs: None, - t_srs: None, database_url: database_url.to_owned(), } } diff --git a/examples/data-loader/src/asset.rs b/examples/data-loader/src/asset.rs new file mode 100644 index 0000000..fc1f30d --- /dev/null +++ b/examples/data-loader/src/asset.rs @@ -0,0 +1,36 @@ +use std::collections::HashMap; + +use ogcapi::{ + drivers::s3::{ByteStream, S3}, + types::{common::media_type::GEO_JSON, stac::Asset}, +}; + +pub async fn load_asset_from_path( + path: &std::path::PathBuf, +) -> anyhow::Result> { + // Setup S3 driver + let s3 = S3::new().await; + + let stream = ByteStream::from_path(&path).await?; + + // Upload asset + let filename = path.file_name().unwrap().to_str().unwrap(); + + let key = format!("assets/{filename}"); + let bucket = std::env::var("AWS_S3_BUCKET_NAME")?; + + s3.client + .put_object() + .bucket(&bucket) + .key(&key) + .body(stream) + .content_type(GEO_JSON) + .send() + .await?; + + let asset = Asset::new(key); + + let file_stem = path.file_stem().unwrap().to_str().unwrap(); + + Ok(HashMap::from([(file_stem.to_string(), asset)])) +} diff --git a/ogcapi/src/import/boundaries.rs b/examples/data-loader/src/boundaries.rs similarity index 96% rename from ogcapi/src/import/boundaries.rs rename to examples/data-loader/src/boundaries.rs index d39fe9f..eec0a5e 100644 --- a/ogcapi/src/import/boundaries.rs +++ b/examples/data-loader/src/boundaries.rs @@ -1,5 +1,4 @@ -use std::borrow::Borrow; -use std::collections::BTreeMap; +use std::{borrow::Borrow, collections::BTreeMap}; use geo::{Coord, LineString, MultiPolygon, Point, Polygon}; @@ -204,7 +203,8 @@ pub fn build_boundary_parts>( } } if !added_part { - use geo::haversine_distance::HaversineDistance; + use geo::{Distance, Haversine}; + let p = |n: &osmpbfreader::Node| { Point(Coord { x: n.lon(), @@ -213,8 +213,10 @@ pub fn build_boundary_parts>( }; if added_nodes.len() > 1 { - let distance = p(added_nodes.first().unwrap()) - .haversine_distance(&p(added_nodes.last().unwrap())); + let distance = Haversine::distance( + p(added_nodes.first().unwrap()), + p(added_nodes.last().unwrap()), + ); if distance < WARN_UNCLOSED_RING_MAX_DISTANCE { // warn!( // "boundary: relation/{} ({}): unclosed polygon, dist({:?}, {:?}) = {}", diff --git a/examples/data-loader/src/geojson.rs b/examples/data-loader/src/geojson.rs new file mode 100644 index 0000000..54fae16 --- /dev/null +++ b/examples/data-loader/src/geojson.rs @@ -0,0 +1,103 @@ +use std::{convert::TryInto, io::Cursor, time::Instant}; + +use geo::Geometry; +use geojson::{FeatureCollection, feature::Id}; +use sqlx::types::Json; +use wkb::Endianness; + +use ogcapi::{ + drivers::{CollectionTransactions, postgres::Db}, + types::common::{Collection, Crs, Extent, SpatialExtent}, +}; + +use super::Args; + +pub async fn load(args: Args) -> anyhow::Result<()> { + let now = Instant::now(); + + // Setup driver + let db = Db::setup(&args.database_url).await?; + + // Extract data + let geojson_str = std::fs::read_to_string(&args.input)?; + let geojson = geojson_str.parse::()?; + + // Create collection + let collection = Collection { + id: args.collection.to_owned(), + item_type: Some("Feature".to_string()), + extent: geojson + .bbox + .map(|bbox| Extent { + spatial: Some(SpatialExtent { + bbox: vec![ + bbox.as_slice() + .try_into() + .unwrap_or_else(|_| [-180.0, -90.0, 180.0, 90.0].into()), + ], + crs: Crs::default(), + }), + ..Default::default() + }) + .or_else(|| Some(Extent::default())), + crs: vec![Crs::default(), Crs::from_epsg(3857), Crs::from_epsg(2056)], + storage_crs: Some(Crs::default()), + #[cfg(feature = "stac")] + assets: crate::asset::load_asset_from_path(&args.input).await?, + ..Default::default() + }; + + db.delete_collection(&collection.id).await?; + db.create_collection(&collection).await?; + + // Load features + let count = geojson.features.len(); + + let mut ids = Vec::with_capacity(count); + let mut properties = Vec::with_capacity(count); + let mut geoms = Vec::with_capacity(count); + + for (i, feature) in geojson.features.iter().enumerate() { + // id + let id = if let Some(id) = &feature.id { + match id { + Id::String(id) => id.to_owned(), + Id::Number(id) => id.to_string(), + } + } else { + i.to_string() + }; + ids.push(id); + + // properties + properties.push(feature.properties.to_owned().map(Json)); + + // geometry + let geom = Geometry::try_from(feature.geometry.to_owned().unwrap().value)?; + let mut wkb = Cursor::new(Vec::new()); + wkb::writer::write_geometry(&mut wkb, &geom, Endianness::LittleEndian).unwrap(); + geoms.push(wkb.into_inner()); + } + + sqlx::query(&format!( + r#" + INSERT INTO items."{}" (id, properties, geom) + SELECT * FROM UNNEST($1::text[], $2::jsonb[], $3::bytea[]) + "#, + collection.id + )) + .bind(ids) + .bind(properties) + .bind(geoms) + .execute(&db.pool) + .await?; + + // stats + let elapsed = now.elapsed().as_millis() as f64 / 1000.0; + tracing::info!( + "Loaded {count} features in {elapsed} seconds ({:.2}/s)", + count as f64 / elapsed + ); + + Ok(()) +} diff --git a/examples/data-loader/src/lib.rs b/examples/data-loader/src/lib.rs new file mode 100644 index 0000000..6040ceb --- /dev/null +++ b/examples/data-loader/src/lib.rs @@ -0,0 +1,13 @@ +mod args; +pub use args::Args; + +#[cfg(feature = "stac")] +mod asset; +#[cfg(feature = "osm")] +mod boundaries; +#[cfg(feature = "geojson")] +pub mod geojson; +#[cfg(feature = "ogr")] +pub mod ogr; +#[cfg(feature = "osm")] +pub mod osm; diff --git a/examples/data-loader/src/main.rs b/examples/data-loader/src/main.rs new file mode 100644 index 0000000..c799c8e --- /dev/null +++ b/examples/data-loader/src/main.rs @@ -0,0 +1,46 @@ +use clap::Parser; +use tracing_subscriber::{EnvFilter, prelude::*}; + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + // setup env + dotenvy::dotenv().ok(); + + // setup tracing + tracing_subscriber::registry() + .with(EnvFilter::new("data_loader=debug,ogcapi=debug,sqlx=warn")) + .with(tracing_subscriber::fmt::layer().pretty()) + .init(); + + // parse cli args + let args = data_loader::Args::parse(); + tracing::debug!("{args:#?}"); + + if let Some(extension) = args.input.extension() { + #[allow(unreachable_patterns)] + match extension.to_str() { + #[cfg(feature = "geojson")] + Some("geojson") => { + tracing::info!("Using geojson loader ..."); + data_loader::geojson::load(args).await? + } + #[cfg(feature = "osm")] + Some("pbf") => { + tracing::info!("Using osm loader ..."); + data_loader::osm::load(args).await? + } + #[cfg(feature = "ogr")] + _ => { + tracing::info!("Using gdal loader ..."); + data_loader::ogr::load(args).await? + } + x => { + tracing::warn!( + "No loader found for extension `{x:?}`! May need to activate additional features." + ); + } + } + } + + Ok(()) +} diff --git a/examples/data-loader/src/ogr.rs b/examples/data-loader/src/ogr.rs new file mode 100644 index 0000000..92528c8 --- /dev/null +++ b/examples/data-loader/src/ogr.rs @@ -0,0 +1,219 @@ +use std::{collections::HashSet, ffi::OsStr, path::PathBuf, time::Instant}; + +use arrow::{ + array::{Array, BinaryArray, RecordBatchReader, StringArray}, + compute::cast, + datatypes::DataType, + ffi_stream::{ArrowArrayStreamReader, FFI_ArrowArrayStream}, + json::ArrayWriter, +}; +use gdal::{ + ArrowArrayStream, Dataset, cpl::CslStringList, spatial_ref::SpatialRef, vector::LayerAccess, +}; + +use ogcapi::{ + drivers::{CollectionTransactions, postgres::Db}, + types::common::{Bbox, Collection, Crs, Extent, SpatialExtent}, +}; + +use super::Args; + +pub async fn load(mut args: Args) -> Result<(), anyhow::Error> { + let now = Instant::now(); + + // Setup a db connection pool + let db = Db::setup(&args.database_url).await?; + + // Handle http & zip + if args.input.starts_with("http") && args.input.extension() == Some(OsStr::new("zip")) { + args.input = PathBuf::from(format!( + "/vsizip//vsicurl/{}", + args.input.as_path().to_str().unwrap() + )) + } else if args.input.display().to_string().starts_with("http") { + args.input = PathBuf::from("/vsicurl/").join(args.input.as_path()) + } else if args.input.extension() == Some(OsStr::new("zip")) { + args.input = PathBuf::from("/vsizip/").join(args.input.as_path()) + } + + // Get vector layer + let dataset = Dataset::open(&args.input)?; + + let mut layer = if let Some(filter) = args.filter { + dataset.layer_by_name(&filter)? + } else if dataset.layer_count() > 1 { + tracing::warn!( + "Found multiple layers! Use the '--filter' option to specifiy one of:\n\t- {}", + dataset + .layers() + .map(|l| l.name()) + .collect::>() + .join("\n\t- ") + ); + return Ok(()); + } else { + dataset.layer(0).unwrap() + }; + + // Get coordinate reference system + let spatial_ref_src = match args.s_srs { + Some(epsg) => SpatialRef::from_epsg(epsg)?, + None => match layer.spatial_ref() { + Some(srs) => srs, + None => { + tracing::warn!("Unknown spatial reference, falling back to `4326`"); + SpatialRef::from_epsg(4326)? + } + }, + }; + + let storage_crs = Crs::from_srid(spatial_ref_src.auth_code()?); + + // Create collection (overwrite/delete existing) + let collection = Collection { + id: args.collection.to_owned(), + crs: Vec::from_iter(HashSet::from([ + Crs::default(), + storage_crs.clone(), + Crs::from_epsg(3857), + ])), + extent: layer.try_get_extent()?.map(|e| Extent { + spatial: Some(SpatialExtent { + bbox: vec![Bbox::Bbox2D([e.MinX, e.MinY, e.MaxX, e.MaxY])], + crs: storage_crs.to_owned(), + }), + temporal: None, + }), + storage_crs: Some(storage_crs.to_owned()), + #[cfg(feature = "stac")] + assets: crate::asset::load_asset_from_path(&args.input).await?, + ..Default::default() + }; + + db.delete_collection(&collection.id).await?; + db.create_collection(&collection).await?; + + // Set concrete geometry type if possible https://github.com/georust/gdal/blob/00adecc94361228a2197224205fc9260d14d7549/gdal-sys/prebuilt-bindings/gdal_3.4.rs#L3454 + if let Some((geometry_type, dimensions)) = + match layer.defn().geom_fields().next().unwrap().field_type() { + 0 => { + tracing::debug!("Unknown gemetry type."); + None + } + 1 => Some(("POINT", 2)), + 2 => Some(("LINESTRING", 2)), + 3 => Some(("POLYGON", 2)), + 4 => Some(("MULTIPOINT", 2)), + 5 => Some(("MULTILINESTRING", 2)), + 6 => Some(("MULTIPOLYGON", 2)), + 2147483653 => Some(("MULTILINESTRINGZ", 3)), + 2147483654 => Some(("MULTIPOLYGONZ", 3)), + i => { + tracing::warn!("Unmaped geometry type `{i}`"); + None + } + } + { + sqlx::query("SELECT DropGeometryColumn ('items', $1, 'geom')") + .bind(&collection.id) + .execute(&db.pool) + .await?; + sqlx::query("SELECT AddGeometryColumn ('items', $1, 'geom', $2, $3, $4)") + .bind(&collection.id) + .bind(storage_crs.as_srid()) + .bind(geometry_type) + .bind(dimensions) + .execute(&db.pool) + .await?; + sqlx::query(&format!( + r#"CREATE INDEX ON items."{}" USING gist (geom)"#, + collection.id + )) + .execute(&db.pool) + .await?; + } + + // Load features + let count = layer.feature_count(); + + // Instantiate an `ArrowArrayStream` for OGR to write into + let mut output_stream = FFI_ArrowArrayStream::empty(); + + // Take a pointer to it + let output_stream_ptr = &mut output_stream as *mut FFI_ArrowArrayStream; + + // GDAL includes its own copy of the ArrowArrayStream struct definition. These are guaranteed + // to be the same across implementations, but we need to manually cast between the two for Rust + // to allow it. + let gdal_pointer: *mut ArrowArrayStream = output_stream_ptr.cast(); + + // Read the layer's data into our provisioned pointer + unsafe { layer.read_arrow_stream(gdal_pointer, &CslStringList::new())? } + + let arrow_stream_reader = ArrowArrayStreamReader::try_new(output_stream)?; + let schema = arrow_stream_reader.schema(); + + // Get the index of the fid and geom column + let fid_column_index = schema.column_with_name("OGC_FID").unwrap().0; + let mut geom_column_index = schema.column_with_name("wkb_geometry").unwrap().0; + + // adjust for later column removal + if fid_column_index < geom_column_index { + geom_column_index -= 1; + } + + for result in arrow_stream_reader { + let mut batch = result?; + + // Get the id column + let fid_column = batch.remove_column(fid_column_index); + let fid_column = cast(&fid_column, &DataType::Utf8)?; + let fid_array = fid_column.as_any().downcast_ref::().unwrap(); + let mut fid_vec = Vec::with_capacity(fid_array.len()); + (0..fid_array.len()).for_each(|i| fid_vec.push(fid_array.value(i))); + + // Get the geometry column + let geom_column = batch.remove_column(geom_column_index); + let geom_array = geom_column.as_any().downcast_ref::().unwrap(); + let mut geom_vec = Vec::with_capacity(geom_array.len()); + (0..geom_array.len()).for_each(|i| geom_vec.push(geom_array.value(i))); + + // Get the properties + let buf = Vec::new(); + let mut writer = ArrayWriter::new(buf); + writer.write_batches(&[&batch])?; + writer.finish()?; + + let properties = String::from_utf8(writer.into_inner())?; + + sqlx::query(&format!( + r#" + INSERT INTO items."{}" (id, properties, geom) + SELECT * FROM UNNEST( + $1::text[], + (SELECT + array_agg(properties) + FROM ( + SELECT jsonb_array_elements($2::jsonb) AS properties + )), + $3::bytea[] + ) + "#, + collection.id + )) + .bind(fid_vec) + .bind(properties) + .bind(geom_vec) + .execute(&db.pool) + .await?; + } + + // stats + let elapsed = now.elapsed().as_millis() as f64 / 1000.0; + tracing::info!( + "Loaded {count} features in {elapsed} seconds ({:.2}/s)", + count as f64 / elapsed + ); + + Ok(()) +} diff --git a/ogcapi/src/import/osm.rs b/examples/data-loader/src/osm.rs similarity index 91% rename from ogcapi/src/import/osm.rs rename to examples/data-loader/src/osm.rs index 0b13cbd..f36e6ed 100644 --- a/ogcapi/src/import/osm.rs +++ b/examples/data-loader/src/osm.rs @@ -1,11 +1,14 @@ -use std::{collections::BTreeMap, fs::File}; +use std::{collections::BTreeMap, fs::File, io::Cursor}; use geo::{Coord, Geometry, GeometryCollection, LineString, MultiLineString, Point, Polygon}; use osmpbfreader::{NodeId, OsmId, OsmObj, OsmPbfReader}; use serde_json::{Map, Value}; +use wkb::Endianness; -use ogcapi_drivers::{postgres::Db, CollectionTransactions}; -use ogcapi_types::common::{Collection, Crs}; +use ogcapi::{ + drivers::{CollectionTransactions, postgres::Db}, + types::common::{Collection, Crs}, +}; use super::Args; @@ -62,9 +65,10 @@ pub async fn load(args: Args) -> Result<(), anyhow::Error> { } // build geometry - if let Some(geometry) = - geometry_from_obj(&obj, &objs).and_then(|g| wkb::geom_to_wkb(&g).ok()) - { + if let Some(geom) = geometry_from_obj(&obj, &objs) { + let mut wkt = Cursor::new(Vec::new()); + wkb::writer::write_geometry(&mut wkt, &geom, Endianness::LittleEndian).unwrap(); + sqlx::query(&format!( r#"INSERT INTO items.{} ( id, @@ -75,7 +79,7 @@ pub async fn load(args: Args) -> Result<(), anyhow::Error> { )) .bind(id.to_string()) .bind(Value::from(properties) as Value) - .bind(geometry as Vec) + .bind(wkt.into_inner()) .execute(&mut *tx) .await?; } @@ -100,7 +104,7 @@ fn geometry_from_obj(obj: &OsmObj, objs: &BTreeMap) -> Option RefIter<'a> { } } -impl<'a> Iterator for RefIter<'a> { +impl Iterator for RefIter<'_> { type Item = OsmId; fn next(&mut self) -> Option { diff --git a/examples/demo-service/Cargo.toml b/examples/demo-service/Cargo.toml new file mode 100644 index 0000000..1dc4ae2 --- /dev/null +++ b/examples/demo-service/Cargo.toml @@ -0,0 +1,25 @@ +[package] +name = "demo-service" +version = "0.1.0" +edition.workspace = true +publish = false + +[features] +stac = [] + +[dependencies] +clap = { version = "4.5", features = ["derive", "env"] } +dotenvy = "0.15.7" +tokio = { version = "1.43", features = ["full"] } +tracing = "0.1.41" +tracing-subscriber = { version = "0.3.19", features = ["env-filter"] } + +ogcapi = { path = "../../ogcapi", version = "0.2", features = [ + "services", + "common", + "features", + "processes", + "greeter", + "tiles", + "styles", +] } diff --git a/examples/demo-service/src/main.rs b/examples/demo-service/src/main.rs new file mode 100644 index 0000000..01f74c4 --- /dev/null +++ b/examples/demo-service/src/main.rs @@ -0,0 +1,31 @@ +use clap::Parser; +use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt}; + +use ogcapi::{ + processes::{geojson_loader::GeoJsonLoader, greeter::Greeter}, + services::{AppState, Config, Service}, +}; + +#[tokio::main] +async fn main() { + // setup env + dotenvy::dotenv().ok(); + + // setup tracing + tracing_subscriber::registry() + .with(tracing_subscriber::EnvFilter::from_default_env()) + .with(tracing_subscriber::fmt::layer().pretty()) + .init(); + + // Config + let config = Config::parse(); + + // Application state + let state = AppState::new_from(&config).await; + + // Register processes/processors + let state = state.processors(vec![Box::new(Greeter), Box::new(GeoJsonLoader)]); + + // Build & run with hyper + Service::new_with(&config, state).await.serve().await; +} diff --git a/ogcapi-client/Cargo.toml b/ogcapi-client/Cargo.toml index 3f07cb0..66836d3 100644 --- a/ogcapi-client/Cargo.toml +++ b/ogcapi-client/Cargo.toml @@ -5,15 +5,18 @@ description = "Client to access OGC API Feature and STAC endpoints." license.workspace = true repository.workspace = true edition.workspace = true +categories.workspace = true +keywords.workspace = true [features] -default = [] +default = ["features"] +features = ["ogcapi-types/features"] stac = ["ogcapi-types/stac"] [dependencies] geojson = { workspace = true } log = { workspace = true } -reqwest = { version = "0.12.4", default-features = false, features = ["json", "blocking", "rustls-tls"] } +reqwest = { version = "0.12.12", default-features = false, features = ["json", "blocking", "rustls-tls"] } serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true } serde_qs = { workspace = true } diff --git a/ogcapi-client/src/client.rs b/ogcapi-client/src/client.rs index 1ffc1b2..663cfbc 100644 --- a/ogcapi-client/src/client.rs +++ b/ogcapi-client/src/client.rs @@ -1,27 +1,27 @@ use std::cell::OnceCell; use reqwest::{ + Url, blocking::Client as ReqwestClient, header::{HeaderMap, HeaderValue, USER_AGENT}, - Url, }; #[cfg(not(feature = "stac"))] use ogcapi_types::features::Feature; -#[cfg(feature = "stac")] use ogcapi_types::{ common::{ - link_rel::{CHILD, ITEM, SELF}, - Link, + Collection, Conformance, LandingPage, Links, + link_rel::{CONFORMANCE, DATA, NEXT}, }, - stac::{Catalog, Item as Feature, SearchParams, StacEntity}, + features::FeatureCollection, }; +#[cfg(feature = "stac")] use ogcapi_types::{ common::{ - link_rel::{CONFORMANCE, DATA, NEXT}, - Collection, Conformance, LandingPage, Links, + Link, + link_rel::{CHILD, ITEM, SELF}, }, - features::FeatureCollection, + stac::{Catalog, Item as Feature, SearchParams, StacEntity}, }; use crate::Error; diff --git a/ogcapi-drivers/Cargo.toml b/ogcapi-drivers/Cargo.toml index 8c537c0..19e97bb 100644 --- a/ogcapi-drivers/Cargo.toml +++ b/ogcapi-drivers/Cargo.toml @@ -5,24 +5,44 @@ description = "Driver traits and implementations" license.workspace = true repository.workspace = true edition.workspace = true +categories.workspace = true +keywords.workspace = true include = ["/src", "/migrations"] [features] -s3 = ["aws-config", "aws-sdk-s3"] -stac = ["ogcapi-types/stac"] +default = [] + postgres = ["sqlx", "rink-core", "url"] +s3 = ["aws-config", "aws-sdk-s3"] + +# standards +common = ["ogcapi-types/common"] +edr = ["common", "ogcapi-types/edr"] +features = ["common", "ogcapi-types/features"] +processes = ["common", "ogcapi-types/processes"] +stac = ["features", "ogcapi-types/stac", "s3"] +styles = ["ogcapi-types/styles"] +tiles = ["common", "ogcapi-types/tiles"] [dependencies] anyhow = { workspace = true } -aws-config = { version = "1.4.0", optional = true, features = ["behavior-version-latest"] } -aws-sdk-s3 = { version = "1.29.0", optional = true, features = ["behavior-version-latest"] } -async-trait = "0.1.80" -http = "1.1" +aws-config = { version = "1.5.17", optional = true, features = [ + "behavior-version-latest", +] } +aws-sdk-s3 = { version = "1.77.0", optional = true, features = [ + "behavior-version-latest", +] } +async-trait = "0.1.86" +http = "1.2" rink-core = { version = "0.8.0", optional = true, features = ["bundle-files"] } serde_json = { workspace = true } -sqlx = { version = "0.7.4", optional = true, features = ["runtime-tokio-rustls", "postgres", "json", "migrate"] } -tokio = { version = "1.37", features = ["full"] } +sqlx = { version = "0.8.3", optional = true, features = [ + "runtime-tokio-rustls", + "postgres", + "json", + "migrate", +] } url = { workspace = true, optional = true } -ogcapi-types = { path = "../ogcapi-types", version = "0.2"} +ogcapi-types = { path = "../ogcapi-types", version = "0.2" } diff --git a/ogcapi-drivers/src/lib.rs b/ogcapi-drivers/src/lib.rs index b74282f..662efc3 100644 --- a/ogcapi-drivers/src/lib.rs +++ b/ogcapi-drivers/src/lib.rs @@ -3,18 +3,29 @@ pub mod postgres; #[cfg(feature = "s3")] pub mod s3; +#[cfg(feature = "common")] +use ogcapi_types::common::{Collection, Collections, Query as CollectionQuery}; +#[cfg(feature = "edr")] +use ogcapi_types::edr::{Query as EdrQuery, QueryType}; +#[cfg(feature = "processes")] +use ogcapi_types::processes::{Results, StatusInfo}; #[cfg(feature = "stac")] use ogcapi_types::stac::SearchParams; +#[cfg(feature = "styles")] +use ogcapi_types::styles::Styles; +#[cfg(feature = "tiles")] +use ogcapi_types::tiles::TileMatrixSet; +#[cfg(feature = "features")] use ogcapi_types::{ - common::{Collection, Collections, Crs, Query as CollectionQuery}, - edr::{Query as EdrQuery, QueryType}, - features::{Feature, FeatureCollection, Query as FeatureQuery}, - processes::{Results, StatusInfo}, - styles::Styles, - tiles::TileMatrixSet, + common::Crs, + features::{Feature, Query as FeatureQuery}, }; +#[cfg(any(feature = "features", feature = "stac", feature = "edr"))] +use ogcapi_types::features::FeatureCollection; + /// Trait for `Collection` transactions +#[cfg(feature = "common")] #[async_trait::async_trait] pub trait CollectionTransactions: Send + Sync { async fn create_collection(&self, collection: &Collection) -> anyhow::Result; @@ -29,6 +40,7 @@ pub trait CollectionTransactions: Send + Sync { } /// Trait for `Feature` transactions +#[cfg(feature = "features")] #[async_trait::async_trait] pub trait FeatureTransactions: Send + Sync { async fn create_feature(&self, feature: &Feature) -> anyhow::Result; @@ -58,6 +70,7 @@ pub trait StacSeach: Send + Sync { } /// Trait for `EDR` queries +#[cfg(feature = "edr")] #[async_trait::async_trait] pub trait EdrQuerier: Send + Sync { async fn query( @@ -69,6 +82,7 @@ pub trait EdrQuerier: Send + Sync { } /// Trait for `Processes` jobs +#[cfg(feature = "processes")] #[async_trait::async_trait] pub trait JobHandler: Send + Sync { async fn register(&self, job: &StatusInfo) -> anyhow::Result; @@ -81,6 +95,7 @@ pub trait JobHandler: Send + Sync { } /// Trait for `Style` transactions +#[cfg(feature = "styles")] #[async_trait::async_trait] pub trait StyleTransactions: Send + Sync { async fn list_styles(&self) -> anyhow::Result; @@ -89,6 +104,7 @@ pub trait StyleTransactions: Send + Sync { } /// Trait for `Tile` transacions +#[cfg(feature = "tiles")] #[async_trait::async_trait] pub trait TileTransactions: Send + Sync { async fn tile( diff --git a/ogcapi-drivers/src/postgres/collection.rs b/ogcapi-drivers/src/postgres/collection.rs index b0d760e..d938632 100644 --- a/ogcapi-drivers/src/postgres/collection.rs +++ b/ogcapi-drivers/src/postgres/collection.rs @@ -107,15 +107,27 @@ impl CollectionTransactions for Db { } async fn list_collections(&self, _query: &Query) -> anyhow::Result { - let collections: Option>> = sqlx::query_scalar( - r#" - SELECT array_to_json(array_agg(collection)) - FROM meta.collections - WHERE collection ->> 'type' = 'Collection' - "#, - ) - .fetch_one(&self.pool) - .await?; + println!("Query collections"); + let collections: Option>> = if cfg!(feature = "stac") { + sqlx::query_scalar( + r#" + SELECT array_to_json(array_agg(collection)) + FROM meta.collections + WHERE collection ->> 'type' = 'Collection' + "#, + ) + .fetch_one(&self.pool) + .await? + } else { + sqlx::query_scalar( + r#" + SELECT array_to_json(array_agg(collection)) + FROM meta.collections + "#, + ) + .fetch_one(&self.pool) + .await? + }; let collections = collections.map(|c| c.0).unwrap_or_default(); let mut collections = Collections::new(collections); diff --git a/ogcapi-drivers/src/postgres/edr.rs b/ogcapi-drivers/src/postgres/edr.rs index 96113e9..33c7aa8 100644 --- a/ogcapi-drivers/src/postgres/edr.rs +++ b/ogcapi-drivers/src/postgres/edr.rs @@ -61,9 +61,9 @@ impl EdrQuerier for Db { ) } else { format!( - "ST_DWithin(ST_Transform(geom, 4326)::geography, ST_Transform(ST_GeomFromEWKT('SRID={};{}'), 4326)::geography, {}, false)", - srid, query.coords, distance - ) + "ST_DWithin(ST_Transform(geom, 4326)::geography, ST_Transform(ST_GeomFromEWKT('SRID={};{}'), 4326)::geography, {}, false)", + srid, query.coords, distance + ) } } QueryType::Cube => { diff --git a/ogcapi-drivers/src/postgres/feature.rs b/ogcapi-drivers/src/postgres/feature.rs index 1bd9405..97faab7 100644 --- a/ogcapi-drivers/src/postgres/feature.rs +++ b/ogcapi-drivers/src/postgres/feature.rs @@ -13,7 +13,7 @@ items.id, items.collection, properties, ST_AsGeoJSON(ST_Transform(geom, $1))::jsonb AS geometry, -links, +links "; #[cfg(feature = "stac")] diff --git a/ogcapi-drivers/src/postgres/mod.rs b/ogcapi-drivers/src/postgres/mod.rs index 1eaf51b..1c56d67 100644 --- a/ogcapi-drivers/src/postgres/mod.rs +++ b/ogcapi-drivers/src/postgres/mod.rs @@ -1,16 +1,22 @@ +#[cfg(feature = "common")] mod collection; +#[cfg(feature = "edr")] mod edr; +#[cfg(feature = "features")] mod feature; +#[cfg(feature = "processes")] mod job; #[cfg(feature = "stac")] mod stac; +#[cfg(feature = "styles")] mod style; +#[cfg(feature = "tiles")] mod tile; use sqlx::{ + Postgres, migrate::MigrateDatabase, postgres::{PgConnectOptions, PgPool, PgPoolOptions}, - Postgres, }; use url::Url; diff --git a/ogcapi-drivers/src/s3/collection.rs b/ogcapi-drivers/src/s3/collection.rs index 8c3e164..63af779 100644 --- a/ogcapi-drivers/src/s3/collection.rs +++ b/ogcapi-drivers/src/s3/collection.rs @@ -1,6 +1,6 @@ use aws_sdk_s3::{error::SdkError, operation::get_object::GetObjectError}; -use ogcapi_types::common::{media_type::JSON, Collection, Collections, Query}; +use ogcapi_types::common::{Collection, Collections, Query, media_type::JSON}; use crate::CollectionTransactions; diff --git a/ogcapi-drivers/src/s3/feature.rs b/ogcapi-drivers/src/s3/feature.rs index c1c124a..5892607 100644 --- a/ogcapi-drivers/src/s3/feature.rs +++ b/ogcapi-drivers/src/s3/feature.rs @@ -1,7 +1,7 @@ use aws_sdk_s3::{error::SdkError, operation::get_object::GetObjectError}; use ogcapi_types::{ - common::{media_type::GEO_JSON, Crs}, + common::{Crs, media_type::GEO_JSON}, features::{Feature, FeatureCollection, Query}, }; diff --git a/ogcapi-drivers/src/s3/mod.rs b/ogcapi-drivers/src/s3/mod.rs index 71b2443..5972515 100644 --- a/ogcapi-drivers/src/s3/mod.rs +++ b/ogcapi-drivers/src/s3/mod.rs @@ -2,13 +2,13 @@ mod collection; mod feature; use aws_sdk_s3::{ + Client, Config, error::SdkError, operation::{ delete_object::{DeleteObjectError, DeleteObjectOutput}, get_object::{GetObjectError, GetObjectOutput}, put_object::{PutObjectError, PutObjectOutput}, }, - Client, Config, }; pub use aws_sdk_s3::primitives::ByteStream; diff --git a/ogcapi-drivers/tests/job.rs b/ogcapi-drivers/tests/job.rs index e6fbe37..1b40bc3 100644 --- a/ogcapi-drivers/tests/job.rs +++ b/ogcapi-drivers/tests/job.rs @@ -1,6 +1,6 @@ -#[cfg(feature = "postgres")] +#[cfg(feature = "processes")] mod postgres { - use ogcapi_drivers::{postgres::Db, JobHandler}; + use ogcapi_drivers::{JobHandler, postgres::Db}; use ogcapi_types::processes::{StatusCode, StatusInfo}; #[sqlx::test] diff --git a/ogcapi-processes/Cargo.toml b/ogcapi-processes/Cargo.toml new file mode 100644 index 0000000..09a7d40 --- /dev/null +++ b/ogcapi-processes/Cargo.toml @@ -0,0 +1,35 @@ +[package] +name = "ogcapi-processes" +version = "0.2.0" +license.workspace = true +repository.workspace = true +edition.workspace = true +categories.workspace = true +keywords.workspace = true + +[features] +default = ["greeter", "geojson-loader", "gdal-loader"] +greeter = [] +geojson-loader = ["dep:geojson", "dep:geo", "dep:wkb", "dep:sqlx", "dep:ogcapi-drivers"] +gdal-loader = ["dep:arrow", "arrow/ffi", "arrow/json", "dep:gdal", "dep:geo", "dep:wkb", "dep:sqlx", "dep:ogcapi-drivers"] + +[dependencies] +anyhow = "1.0" +arrow ={ version = "54.2.1", optional = true, default-features = false } +async-trait = "0.1.86" +dyn-clone = "1.0.18" +gdal = { version = "0.17.1", optional = true, features = ["bindgen"] } +geo = { version = "0.29.3", optional = true, default-features = false } +geojson = { workspace = true, optional = true, features = ["geo-types"]} +http-body = "1.0" +schemars = "0.8.22" +serde = { workspace = true } +serde_json = { workspace = true } +tokio = { version = "1.43", default-features = false, features = ["rt-multi-thread", "macros"] } +url = { workspace = true } + +sqlx = { version = "0.8.3", optional = true } +wkb = { version = "0.8.0", optional = true } + +ogcapi-types = { path = "../ogcapi-types", version = "0.2", features = ["processes"] } +ogcapi-drivers = { path = "../ogcapi-drivers", version = "0.2", optional = true, features = ["postgres", "common"] } diff --git a/ogcapi-processes/README.md b/ogcapi-processes/README.md new file mode 100644 index 0000000..9161c70 --- /dev/null +++ b/ogcapi-processes/README.md @@ -0,0 +1,10 @@ +# Processes + +The `ogcapi-processes` crate contains the [`Processor`](./src/processor.rs) trait and implementations. Have a look at the [`Greeter`](./src/greeter.rs) for starters. + +## Examples + +| Process | Feature | Description | +| ------- | -------- | ----------- | +| Greeter | - | The *"Hello, World!"* process. Expects a `name` as input and returns `Hello, {name}!` | +| Loader | `loader` | Load vector data to PostgreSQL. | diff --git a/ogcapi-processes/src/gdal_loader.rs b/ogcapi-processes/src/gdal_loader.rs new file mode 100644 index 0000000..b3e679f --- /dev/null +++ b/ogcapi-processes/src/gdal_loader.rs @@ -0,0 +1,414 @@ +use std::{ + collections::{HashMap, HashSet}, + rc::Rc, + sync::Mutex, +}; + +use anyhow::Result; +use arrow::{ + array::{Array, BinaryArray, RecordBatchReader, StringArray}, + compute::cast, + datatypes::DataType, + ffi_stream::{ArrowArrayStreamReader, FFI_ArrowArrayStream}, + json::ArrayWriter, +}; +use gdal::{ + ArrowArrayStream, Dataset, cpl::CslStringList, spatial_ref::SpatialRef, vector::LayerAccess, +}; +use schemars::{JsonSchema, schema_for}; +use serde::Deserialize; +use url::Url; + +use ogcapi_drivers::{CollectionTransactions, postgres::Db}; +use ogcapi_types::{ + common::{Bbox, Collection, Crs, Exception, Extent, SpatialExtent}, + processes::{Execute, InlineOrRefData, Input, InputValueNoObject, Process}, +}; + +use crate::{ProcessResponseBody, Processor}; + +/// GDAL loader `Processor` +/// +/// Process to load vector data. +#[derive(Clone)] +pub struct GdalLoader; + +/// Inputs for the `gdal-loader` process +#[derive(Deserialize, Debug, JsonSchema)] +pub struct GdalLoaderInputs { + /// Input file + pub input: String, + + /// Set the collection name, defaults to layer name or `osm` + pub collection: String, + + /// Filter input by layer name, imports all if not present + pub filter: Option, + + /// Source srs, if omitted tries to derive from the input layer + pub s_srs: Option, + + /// Postgres database url + pub database_url: String, +} + +impl GdalLoaderInputs { + pub fn execute_input(&self) -> HashMap { + let mut input = HashMap::from_iter([ + ( + "input".to_string(), + Input::InlineOrRefData(InlineOrRefData::InputValueNoObject( + InputValueNoObject::String(self.input.to_owned()), + )), + ), + ( + "collection".to_string(), + Input::InlineOrRefData(InlineOrRefData::InputValueNoObject( + InputValueNoObject::String(self.collection.to_owned()), + )), + ), + ( + "database_url".to_string(), + Input::InlineOrRefData(InlineOrRefData::InputValueNoObject( + InputValueNoObject::String(self.database_url.to_owned()), + )), + ), + ]); + + if let Some(filter) = &self.filter { + input.insert( + "filter".to_owned(), + Input::InlineOrRefData(InlineOrRefData::InputValueNoObject( + InputValueNoObject::String(filter.to_owned()), + )), + ); + } + + if let Some(s_srs) = &self.s_srs { + input.insert( + "s_srs".to_owned(), + Input::InlineOrRefData(InlineOrRefData::InputValueNoObject( + InputValueNoObject::Integer(*s_srs as i64), + )), + ); + } + + input + } +} + +/// Outputs for the `gdal-loader` process +#[derive(Clone, Debug, JsonSchema)] +pub struct GdalLoaderOutputs { + pub collection: String, +} + +impl TryFrom for GdalLoaderOutputs { + type Error = Exception; + + fn try_from(value: ProcessResponseBody) -> Result { + if let ProcessResponseBody::Requested(buf) = value { + Ok(GdalLoaderOutputs { + collection: String::from_utf8(buf).unwrap(), + }) + } else { + Err(Exception::new("500")) + } + } +} + +#[async_trait::async_trait] +impl Processor for GdalLoader { + fn id(&self) -> &'static str { + "gdal-loader" + } + + fn version(&self) -> &'static str { + "0.1.0" + } + + fn process(&self) -> Result { + Process::try_new( + self.id(), + self.version(), + &schema_for!(GdalLoaderInputs).schema, + &schema_for!(GdalLoaderOutputs).schema, + ) + .map_err(Into::into) + } + + async fn execute(&self, execute: Execute) -> Result { + let value = serde_json::to_value(execute.inputs)?; + let mut inputs: GdalLoaderInputs = serde_json::from_value(value)?; + + // Setup driver + let db = Db::setup(&Url::parse(&inputs.database_url)?).await?; + + // Handle http & zip + if inputs.input.to_lowercase().starts_with("http") { + inputs.input = format!("/vsicurl/{}", inputs.input); + } + if inputs.input.to_lowercase().ends_with("zip") { + inputs.input = format!("/vsizip/{}", inputs.input); + } + + // Get vector layer + let dataset = Dataset::open(&inputs.input)?; + + let layer = if let Some(filter) = inputs.filter { + Rc::new(Mutex::new(dataset.layer_by_name(&filter)?)) + } else if dataset.layer_count() > 1 { + return Err(Exception::new(format!( + "Found multiple layers! Use the '--filter' option to specifiy one of:\n\t- {}", + dataset + .layers() + .map(|l| l.name()) + .collect::>() + .join("\n\t- ") + )) + .into()); + } else { + Rc::new(Mutex::new(dataset.layer(0)?)) + }; + + // Get coordinate reference system + let spatial_ref_src = match inputs.s_srs { + Some(epsg) => Rc::new(Mutex::new(SpatialRef::from_epsg(epsg)?)), + None => match layer.lock().unwrap().spatial_ref() { + Some(srs) => Rc::new(Mutex::new(srs)), + None => { + println!("Unknown spatial reference, falling back to `4326`"); + Rc::new(Mutex::new(SpatialRef::from_epsg(4326)?)) + } + }, + }; + + let storage_crs = Crs::from_srid(spatial_ref_src.lock().unwrap().auth_code()?); + + // Create collection (overwrite/delete existing) + let collection = Collection { + id: inputs.collection.to_owned(), + crs: Vec::from_iter(HashSet::from([ + Crs::default(), + storage_crs.clone(), + Crs::from_epsg(3857), + ])), + extent: layer.lock().unwrap().try_get_extent()?.map(|e| Extent { + spatial: Some(SpatialExtent { + bbox: vec![Bbox::Bbox2D([e.MinX, e.MinY, e.MaxX, e.MaxY])], + crs: storage_crs.to_owned(), + }), + temporal: None, + }), + storage_crs: Some(storage_crs.to_owned()), + ..Default::default() + }; + + let handle = tokio::runtime::Handle::current(); + + let db2 = db.clone(); + let id = collection.id.clone(); + handle.spawn_blocking(async move || { + db2.delete_collection(&id).await.unwrap(); + }); + let db2 = db.clone(); + let collection2 = collection.clone(); + handle.spawn_blocking(async move || { + db2.create_collection(&collection2).await.unwrap(); + }); + + // Set concrete geometry type if possible https://github.com/georust/gdal/blob/00adecc94361228a2197224205fc9260d14d7549/gdal-sys/prebuilt-bindings/gdal_3.4.rs#L3454 + if let Some((geometry_type, dimensions)) = match layer + .lock() + .unwrap() + .defn() + .geom_fields() + .next() + .unwrap() + .field_type() + { + 0 => { + panic!("Unknown gemetry type.") + } + 1 => Some(("POINT", 2)), + 2 => Some(("LINESTRING", 2)), + 3 => Some(("POLYGON", 2)), + 4 => Some(("MULTIPOINT", 2)), + 5 => Some(("MULTILINESTRING", 2)), + 6 => Some(("MULTIPOLYGON", 2)), + 2147483653 => Some(("MULTILINESTRINGZ", 3)), + 2147483654 => Some(("MULTIPOLYGONZ", 3)), + i => { + panic!("Unmaped geometry type `{i}`"); + } + } { + let pool = db.pool.clone(); + let collection2 = collection.clone(); + + handle.spawn_blocking(async move || { + sqlx::query("SELECT DropGeometryColumn ('items', $1, 'geom')") + .bind(&collection2.id) + .execute(&pool) + .await + .unwrap(); + + sqlx::query("SELECT AddGeometryColumn ('items', $1, 'geom', $2, $3, $4)") + .bind(&collection2.id) + .bind(storage_crs.as_srid()) + .bind(geometry_type) + .bind(dimensions) + .execute(&pool) + .await + .unwrap(); + + sqlx::query(&format!( + r#"CREATE INDEX ON items."{}" USING gist (geom)"#, + collection2.id + )) + .execute(&pool) + .await + .unwrap(); + }); + } + + // Load features + let _count = layer.lock().unwrap().feature_count(); + + // Instantiate an `ArrowArrayStream` for OGR to write into + let mut output_stream = FFI_ArrowArrayStream::empty(); + + // Take a pointer to it + let output_stream_ptr = &mut output_stream as *mut FFI_ArrowArrayStream; + + // GDAL includes its own copy of the ArrowArrayStream struct definition. These are guaranteed + // to be the same across implementations, but we need to manually cast between the two for Rust + // to allow it. + let gdal_pointer: *mut ArrowArrayStream = output_stream_ptr.cast(); + + // Read the layer's data into our provisioned pointer + unsafe { + layer + .lock() + .unwrap() + .read_arrow_stream(gdal_pointer, &CslStringList::new())? + } + + let arrow_stream_reader = ArrowArrayStreamReader::try_new(output_stream)?; + let schema = arrow_stream_reader.schema(); + + // Get the index of the fid and geom column + let fid_column_index = schema.column_with_name("OGC_FID").unwrap().0; + let mut geom_column_index = schema.column_with_name("wkb_geometry").unwrap().0; + + // adjust for later column removal + if fid_column_index < geom_column_index { + geom_column_index -= 1; + } + + for result in arrow_stream_reader { + let mut batch = result?; + + // Get the id column + let fid_column = batch.remove_column(fid_column_index); + let fid_column = cast(&fid_column, &DataType::Utf8)?; + let fid_array = fid_column.as_any().downcast_ref::().unwrap(); + let mut fid_vec = Vec::with_capacity(fid_array.len()); + (0..fid_array.len()).for_each(|i| fid_vec.push(fid_array.value(i).to_owned())); + + // Get the geometry column + let geom_column = batch.remove_column(geom_column_index); + let geom_array = geom_column.as_any().downcast_ref::().unwrap(); + let mut geom_vec = Vec::with_capacity(geom_array.len()); + (0..geom_array.len()).for_each(|i| geom_vec.push(geom_array.value(i).to_owned())); + + // Get the properties + let buf = Vec::new(); + let mut writer = ArrayWriter::new(buf); + writer.write_batches(&[&batch])?; + writer.finish()?; + + let properties = String::from_utf8(writer.into_inner())?; + + let id = collection.id.clone(); + let pool = db.pool.clone(); + + handle.spawn_blocking(async move || { + sqlx::query(&format!( + r#" + INSERT INTO items."{}" (id, properties, geom) + SELECT * FROM UNNEST( + $1::text[], + (SELECT + array_agg(properties) + FROM ( + SELECT jsonb_array_elements($2::jsonb) AS properties + )), + $3::bytea[] + ) + "#, + id + )) + .bind(fid_vec) + .bind(properties) + .bind(geom_vec) + .execute(&pool) + .await + .unwrap() + }); + } + Ok(ProcessResponseBody::Requested( + // inputs.collection.as_bytes().to_owned(), + vec![1_u8], + )) + } +} + +#[cfg(test)] +mod tests { + use std::{collections::HashMap, time::Instant}; + + use ogcapi_types::processes::Execute; + + use crate::{ + Processor, + gdal_loader::{GdalLoader, GdalLoaderInputs, GdalLoaderOutputs}, + }; + + #[tokio::test] + async fn test_loader() { + let loader = GdalLoader; + assert_eq!(loader.id(), "gdal-loader"); + + println!( + "Process:\n{}", + serde_json::to_string_pretty(&loader.process().unwrap()).unwrap() + ); + + let input = GdalLoaderInputs { + input: "../data/ne_10m_railroads_north_america.geojson".to_owned(), + collection: "streets".to_string(), + filter: None, + s_srs: None, + database_url: "postgresql://postgres:password@localhost:5433/ogcapi".to_string(), + }; + + let execute = Execute { + inputs: input.execute_input(), + outputs: HashMap::new(), + subscriber: None, + }; + + let now = Instant::now(); + + let output: GdalLoaderOutputs = loader.execute(execute).await.unwrap().try_into().unwrap(); + println!("{}", output.collection); + + // stats + let count = 121895; + let elapsed = now.elapsed().as_secs_f64(); + println!( + "Loaded {count} features in {elapsed:.3} seconds ({:.2}/s)", + count as f64 / elapsed + ); + } +} diff --git a/ogcapi-processes/src/geojson_loader.rs b/ogcapi-processes/src/geojson_loader.rs new file mode 100644 index 0000000..a6e39fe --- /dev/null +++ b/ogcapi-processes/src/geojson_loader.rs @@ -0,0 +1,266 @@ +use std::{collections::HashMap, io::Cursor}; + +use anyhow::Result; +use geo::Geometry; +use geojson::FeatureCollection; + +use schemars::{JsonSchema, schema_for}; +use serde::Deserialize; +use sqlx::types::Json; +use url::Url; + +use ogcapi_drivers::{CollectionTransactions, postgres::Db}; +use ogcapi_types::{ + common::{Collection, Crs, Exception, Extent, SpatialExtent}, + processes::{Execute, InlineOrRefData, Input, InputValueNoObject, Process}, +}; +use wkb::Endianness; + +use crate::{ProcessResponseBody, Processor}; + +/// GeoJson loader `Processor` +/// +/// Process to load vector data. +#[derive(Clone)] +pub struct GeoJsonLoader; + +/// Inputs for the `geojson-loader` process +#[derive(Deserialize, Debug, JsonSchema)] +pub struct GeoJsonLoaderInputs { + /// Input file + pub input: String, + + /// Set the collection name + pub collection: String, + + /// Source srs, if omitted tries to derive from the input layer + pub s_srs: Option, + + /// Postgres database url + pub database_url: String, +} + +impl GeoJsonLoaderInputs { + pub fn execute_input(&self) -> HashMap { + let mut input = HashMap::from_iter([ + ( + "input".to_string(), + Input::InlineOrRefData(InlineOrRefData::InputValueNoObject( + InputValueNoObject::String(self.input.to_owned()), + )), + ), + ( + "collection".to_string(), + Input::InlineOrRefData(InlineOrRefData::InputValueNoObject( + InputValueNoObject::String(self.collection.to_owned()), + )), + ), + ( + "database_url".to_string(), + Input::InlineOrRefData(InlineOrRefData::InputValueNoObject( + InputValueNoObject::String(self.database_url.to_owned()), + )), + ), + ]); + + if let Some(s_srs) = &self.s_srs { + input.insert( + "s_srs".to_owned(), + Input::InlineOrRefData(InlineOrRefData::InputValueNoObject( + InputValueNoObject::Integer(*s_srs as i64), + )), + ); + } + + input + } +} + +/// Outputs for the `gdal-loader` process +#[derive(Clone, Debug, JsonSchema)] +pub struct GeoJsonLoaderOutputs { + pub collection: String, +} + +impl TryFrom for GeoJsonLoaderOutputs { + type Error = Exception; + + fn try_from(value: ProcessResponseBody) -> Result { + if let ProcessResponseBody::Requested(buf) = value { + Ok(GeoJsonLoaderOutputs { + collection: String::from_utf8(buf).unwrap(), + }) + } else { + Err(Exception::new("500")) + } + } +} + +#[async_trait::async_trait] +impl Processor for GeoJsonLoader { + fn id(&self) -> &'static str { + "geojson-loader" + } + + fn version(&self) -> &'static str { + "0.1.0" + } + + fn process(&self) -> Result { + Process::try_new( + self.id(), + self.version(), + &schema_for!(GeoJsonLoaderInputs).schema, + &schema_for!(GeoJsonLoaderOutputs).schema, + ) + .map_err(Into::into) + } + + async fn execute(&self, execute: Execute) -> Result { + let value = serde_json::to_value(execute.inputs)?; + let inputs: GeoJsonLoaderInputs = serde_json::from_value(value)?; + + // Setup driver + let db = Db::setup(&Url::parse(&inputs.database_url).unwrap()).await?; + + // Extract data + let geojson_str = std::fs::read_to_string(&inputs.input)?; + let geojson = geojson_str.parse::()?; + + // Create collection + let collection = Collection { + id: inputs.collection.to_owned(), + item_type: Some("Feature".to_string()), + extent: geojson + .bbox + .map(|bbox| Extent { + spatial: Some(SpatialExtent { + bbox: vec![ + bbox.as_slice() + .try_into() + .unwrap_or_else(|_| [-180.0, -90.0, 180.0, 90.0].into()), + ], + crs: Crs::default(), + }), + ..Default::default() + }) + .or_else(|| Some(Extent::default())), + crs: vec![Crs::default(), Crs::from_epsg(3857), Crs::from_epsg(2056)], + storage_crs: Some(Crs::default()), + // #[cfg(feature = "stac")] + // assets: crate::asset::load_asset_from_path(&args.input).await?, + ..Default::default() + }; + + db.delete_collection(&collection.id).await?; + db.create_collection(&collection).await?; + + // Load features + let chunk_size = 1000; + let chunks: Vec<_> = geojson + .features + .chunks(chunk_size) + .enumerate() + .map(|(i, chunk)| { + let mut ids = Vec::with_capacity(chunk_size); + let mut properties = Vec::with_capacity(chunk_size); + let mut geoms = Vec::with_capacity(chunk_size); + + for (ii, feature) in chunk.iter().enumerate() { + // id + let id = if let Some(id) = &feature.id { + match id { + geojson::feature::Id::String(s) => s.to_owned(), + geojson::feature::Id::Number(n) => n.to_string(), + } + } else { + ((i * chunk_size) + ii).to_string() + }; + ids.push(id); + + // properties + let props = feature.properties.to_owned().map(Json); + properties.push(props); + + // geometry + let geom = + Geometry::try_from(feature.geometry.to_owned().unwrap().value).unwrap(); + + let mut wkb = Cursor::new(Vec::new()); + wkb::writer::write_geometry(&mut wkb, &geom, Endianness::LittleEndian).unwrap(); + geoms.push(wkb.into_inner()); + } + + (ids, properties, geoms) + }) + .collect(); + + for (ids, properties, geoms) in chunks { + sqlx::query(&format!( + r#" + INSERT INTO items."{}" (id, properties, geom) + SELECT * FROM UNNEST($1::text[], $2::jsonb[], $3::bytea[]) + "#, + collection.id + )) + .bind(ids) + .bind(properties) + .bind(geoms) + .execute(&db.pool) + .await?; + } + Ok(ProcessResponseBody::Requested( + inputs.collection.as_bytes().to_owned(), + )) + } +} + +#[cfg(test)] +mod tests { + use std::{collections::HashMap, time::Instant}; + + use ogcapi_types::processes::Execute; + + use crate::{ + Processor, + geojson_loader::{GeoJsonLoader, GeoJsonLoaderInputs, GeoJsonLoaderOutputs}, + }; + + #[tokio::test] + async fn test_loader() { + let loader = GeoJsonLoader; + assert_eq!(loader.id(), "geojson-loader"); + + println!( + "Process:\n{}", + serde_json::to_string_pretty(&loader.process().unwrap()).unwrap() + ); + + let input = GeoJsonLoaderInputs { + input: "../data/ne_10m_railroads_north_america.geojson".to_owned(), + collection: "streets".to_string(), + s_srs: None, + database_url: "postgresql://postgres:password@localhost:5433/ogcapi".to_string(), + }; + + let execute = Execute { + inputs: input.execute_input(), + outputs: HashMap::new(), + subscriber: None, + }; + + let now = Instant::now(); + + let output: GeoJsonLoaderOutputs = + loader.execute(execute).await.unwrap().try_into().unwrap(); + println!("{}", output.collection); + + // stats + let count = 121895; + let elapsed = now.elapsed().as_secs_f64(); + println!( + "Loaded {count} features in {elapsed:.3} seconds ({:.2}/s)", + count as f64 / elapsed + ); + } +} diff --git a/ogcapi-processes/src/greeter.rs b/ogcapi-processes/src/greeter.rs new file mode 100644 index 0000000..24702d6 --- /dev/null +++ b/ogcapi-processes/src/greeter.rs @@ -0,0 +1,129 @@ +use std::collections::HashMap; + +use anyhow::Result; +use schemars::{JsonSchema, schema_for}; +use serde::Deserialize; + +use ogcapi_types::{ + common::Exception, + processes::{Execute, InlineOrRefData, Input, InputValueNoObject, Process}, +}; + +use crate::{ProcessResponseBody, Processor}; + +/// Greeter `Processor` +/// +/// Example processor that takes a name as input and returns a greeting. +/// +/// # Usage +/// +/// ```bash +/// curl http://localhost:8484/processes/greet/execution \ +/// -H 'Content-Type: application/json' \ +/// -d '{ "inputs": { "name": "World" } }' +/// ``` +#[derive(Clone)] +pub struct Greeter; + +/// Inputs for the `greet` process +#[derive(Deserialize, Debug, JsonSchema)] +pub struct GreeterInputs { + /// Name to be greeted + pub name: String, +} + +impl GreeterInputs { + pub fn execute_input(&self) -> HashMap { + HashMap::from([( + "name".to_string(), + Input::InlineOrRefData(InlineOrRefData::InputValueNoObject( + InputValueNoObject::String(self.name.to_owned()), + )), + )]) + } +} + +/// Outputs for the `greet` process +#[derive(Clone, Debug, JsonSchema)] +pub struct GreeterOutputs { + pub greeting: String, +} + +impl TryFrom for GreeterOutputs { + type Error = Exception; + + fn try_from(value: ProcessResponseBody) -> Result { + if let ProcessResponseBody::Requested(buf) = value { + Ok(GreeterOutputs { + greeting: String::from_utf8(buf).unwrap(), + }) + } else { + Err(Exception::new("500")) + } + } +} + +#[async_trait::async_trait] +impl Processor for Greeter { + fn id(&self) -> &'static str { + "greet" + } + + fn version(&self) -> &'static str { + "0.1.0" + } + + fn process(&self) -> Result { + Process::try_new( + self.id(), + self.version(), + &schema_for!(GreeterInputs).schema, + &schema_for!(GreeterOutputs).schema, + ) + .map_err(Into::into) + } + + async fn execute(&self, execute: Execute) -> Result { + let value = serde_json::to_value(execute.inputs).unwrap(); + let inputs: GreeterInputs = serde_json::from_value(value).unwrap(); + Ok(ProcessResponseBody::Requested( + format!("Hello, {}!\n", inputs.name).as_bytes().to_owned(), + )) + } +} + +#[cfg(test)] +mod tests { + use std::collections::HashMap; + + use ogcapi_types::processes::Execute; + + use crate::{ + Processor, + greeter::{Greeter, GreeterInputs, GreeterOutputs}, + }; + + #[tokio::test] + async fn test_greeter() { + let greeter = Greeter; + assert_eq!(greeter.id(), "greet"); + + println!( + "Process:\n{}", + serde_json::to_string_pretty(&greeter.process().unwrap()).unwrap() + ); + + let input = GreeterInputs { + name: "Greeter".to_string(), + }; + + let execute = Execute { + inputs: input.execute_input(), + outputs: HashMap::new(), + subscriber: None, + }; + + let output: GreeterOutputs = greeter.execute(execute).await.unwrap().try_into().unwrap(); + assert_eq!(output.greeting, "Hello, Greeter!\n"); + } +} diff --git a/ogcapi-processes/src/lib.rs b/ogcapi-processes/src/lib.rs new file mode 100644 index 0000000..7c88e22 --- /dev/null +++ b/ogcapi-processes/src/lib.rs @@ -0,0 +1,11 @@ +#[cfg(feature = "greeter")] +pub mod greeter; + +#[cfg(feature = "gdal-loader")] +pub mod gdal_loader; + +#[cfg(feature = "geojson-loader")] +pub mod geojson_loader; + +mod processor; +pub use processor::*; diff --git a/ogcapi-processes/src/processor.rs b/ogcapi-processes/src/processor.rs new file mode 100644 index 0000000..ca7b156 --- /dev/null +++ b/ogcapi-processes/src/processor.rs @@ -0,0 +1,34 @@ +use anyhow::Result; +use dyn_clone::DynClone; + +use ogcapi_types::processes::{Execute, Process, Results, StatusInfo}; + +/// Trait for defining and executing a [Process] +#[async_trait::async_trait] +pub trait Processor: Send + Sync + DynClone { + /// Returns the process id (must be unique) + fn id(&self) -> &'static str; + + /// Returns the process version + fn version(&self) -> &'static str; + + /// Returns the Process description + fn process(&self) -> Result; + + /// Executes the Process and returns [Results] + async fn execute( + &self, + execute: Execute, + // state: &AppState, + // url: &Url, + ) -> Result; +} + +dyn_clone::clone_trait_object!(Processor); + +pub enum ProcessResponseBody { + Requested(Vec), + Results(Results), + Empty, + StatusInfo(StatusInfo), +} diff --git a/ogcapi-services/Cargo.toml b/ogcapi-services/Cargo.toml index 343b8bd..557aac4 100644 --- a/ogcapi-services/Cargo.toml +++ b/ogcapi-services/Cargo.toml @@ -5,51 +5,56 @@ description = "Server implementation of several OGC API Standards." license.workspace = true repository.workspace = true edition.workspace = true +categories.workspace = true +keywords.workspace = true include = ["/src", "/assets"] [features] default = ["common"] -full = ["default", "features", "edr", "processes", "styles", "tiles", "stac"] -common = [] -features = [] -edr = ["ogcapi-types/edr"] -processes = ["dyn-clone", "schemars"] -styles = [] -tiles = [] +common = ["ogcapi-types/common", "ogcapi-drivers/common"] +features = ["ogcapi-types/features", "ogcapi-drivers/features"] +edr = ["ogcapi-types/edr", "ogcapi-drivers/edr"] +processes = ["ogcapi-types/processes", "ogcapi-drivers/processes", "dyn-clone", "schemars", "ogcapi-processes"] +stac = ["ogcapi-types/stac", "ogcapi-drivers/stac"] +styles = ["ogcapi-types/styles", "ogcapi-drivers/styles"] +tiles = ["ogcapi-types/tiles", "ogcapi-drivers/tiles"] -stac = ["ogcapi-types/stac", "ogcapi-drivers/stac", "ogcapi-drivers/s3"] +# processes +greeter = ["processes"] [dependencies] anyhow = { workspace = true } -axum = { version = "0.7.5", features = ["multipart"] } +axum = { version = "0.8.1", features = ["multipart"] } +axum-extra = { version = "0.10.0" } clap = { version = "4.5", features = ["derive", "env"] } dyn-clone = { version = "1.0", optional = true } dotenvy = "0.15.7" -hyper = { version = "1.3.1", features = ["full"] } +hyper = { version = "1.6", features = ["full"] } openapiv3 = "2.0" -schemars = { version = "0.8.20", optional = true } +schemars = { version = "0.8.22", optional = true } serde = { workspace = true } serde_json = { workspace = true } serde_yaml = "0.9.33" serde_qs = { workspace = true } thiserror = { workspace = true } -tokio = { version = "1.37", features = ["full"] } -tower = "0.4.13" -tower-http = { version = "0.5.2", features = ["compression-gzip", "catch-panic", "cors", "request-id", "sensitive-headers", "trace", "util"] } -tracing = "0.1.40" -tracing-subscriber = { version="0.3.18", features = ["env-filter"] } +tokio = { version = "1.43", features = ["full"] } +tower = "0.5.2" +tower-http = { version = "0.6.2", features = ["compression-gzip", "catch-panic", "cors", "request-id", "sensitive-headers", "trace", "util"] } +tracing = "0.1.41" +tracing-subscriber = { version="0.3.19", features = ["env-filter"] } url = { workspace = true, features = ["serde"] } ogcapi-types = { path = "../ogcapi-types", version = "0.2" } ogcapi-drivers = { path = "../ogcapi-drivers", version = "0.2", features = ["postgres"] } +ogcapi-processes = { path = "../ogcapi-processes", version = "0.2", optional = true} [dev-dependencies] geojson = { workspace = true } -hyper-util = { version = "0.1.3", features = ["client"] } -http-body-util = "0.1.1" -uuid = { version = "1.8", features = ["serde", "v4"] } +hyper-util = { version = "0.1.10", features = ["client-legacy"] } +http-body-util = "0.1.2" +uuid = { version = "1.15", features = ["serde", "v4"] } -ogcapi = { path = "../ogcapi", version = "<0.3, >=0.1", default_features = false, features = ["import"] } +data-loader = { path = "../examples/data-loader" } diff --git a/ogcapi-services/src/error.rs b/ogcapi-services/src/error.rs index e136628..257526b 100644 --- a/ogcapi-services/src/error.rs +++ b/ogcapi-services/src/error.rs @@ -1,21 +1,20 @@ use axum::{ - http::{header::CONTENT_TYPE, StatusCode}, - response::{IntoResponse, Response}, Json, + http::{StatusCode, header::CONTENT_TYPE}, + response::{IntoResponse, Response}, }; use hyper::HeaderMap; -use ogcapi_types::common::{media_type::PROBLEM_JSON, Exception}; +use ogcapi_types::common::{Exception, media_type::PROBLEM_JSON}; /// A common error type that can be used throughout the API. /// /// Can be returned in a `Result` from an API handler function. #[derive(thiserror::Error, Debug)] pub enum Error { - /// Automatically return `500 Internal Server Error` on a `sqlx::Error`. + // /// Automatically return `500 Internal Server Error` on a `sqlx::Error`. // #[error("an error occurred with the database")] // Sqlx(#[from] sqlx::Error), - /// Return `404 Not Found` #[error("not found")] NotFound, diff --git a/ogcapi-services/src/extractors.rs b/ogcapi-services/src/extractors.rs index 1ddcbef..5806bed 100644 --- a/ogcapi-services/src/extractors.rs +++ b/ogcapi-services/src/extractors.rs @@ -1,8 +1,9 @@ use anyhow::Context; use axum::{ - extract::{FromRequestParts, Host, OriginalUri}, - http::{request::Parts, StatusCode}, + extract::{FromRequestParts, OriginalUri}, + http::{StatusCode, request::Parts}, }; +use axum_extra::extract::Host; use url::Url; use crate::Error; @@ -10,7 +11,6 @@ use crate::Error; /// Extractor for the remote URL pub(crate) struct RemoteUrl(pub Url); -#[axum::async_trait] impl FromRequestParts for RemoteUrl where S: Send + Sync, @@ -18,9 +18,7 @@ where type Rejection = Error; async fn from_request_parts(parts: &mut Parts, state: &S) -> Result { - let uri = OriginalUri::from_request_parts(parts, state) - .await - .expect("Infalllible, hence this should never fail"); + let uri = OriginalUri::from_request_parts(parts, state).await.unwrap(); let url = if uri.0.scheme().is_some() { uri.0.to_string() @@ -45,7 +43,6 @@ where /// Extractor that deserializes query strings into some type `T` with [`serde_qs`] pub(crate) struct Qs(pub(crate) T); -#[axum::async_trait] impl FromRequestParts for Qs where S: Send + Sync, diff --git a/ogcapi-services/src/lib.rs b/ogcapi-services/src/lib.rs index 6e56f8b..2b0d4f4 100644 --- a/ogcapi-services/src/lib.rs +++ b/ogcapi-services/src/lib.rs @@ -3,7 +3,7 @@ mod error; mod extractors; mod openapi; #[cfg(feature = "processes")] -mod processor; +mod processes; mod routes; mod service; mod state; @@ -15,9 +15,6 @@ pub use openapi::OpenAPI; pub use service::Service; pub use state::AppState; -#[cfg(feature = "processes")] -pub use processor::{Greeter, Processor}; - #[doc(hidden)] pub use clap::Parser as ConfigParser; diff --git a/ogcapi-services/src/processes.rs b/ogcapi-services/src/processes.rs new file mode 100644 index 0000000..13cc96f --- /dev/null +++ b/ogcapi-services/src/processes.rs @@ -0,0 +1,31 @@ +use axum::{ + body::Body, + http::StatusCode, + response::{IntoResponse, Response}, +}; +use ogcapi_processes::ProcessResponseBody; + +pub(crate) struct ProcessResponse(pub(crate) ProcessResponseBody); + +impl IntoResponse for ProcessResponse { + fn into_response(self) -> Response { + match self.0 { + ProcessResponseBody::Requested(body) => Response::new(body.into()), + ProcessResponseBody::Results(results) => Response::builder() + .status(StatusCode::OK) + .header("Content-Type", "application/json") + .body(Body::from(serde_json::to_vec(&results).unwrap())) + .unwrap(), + ProcessResponseBody::Empty => Response::builder() + .status(StatusCode::NO_CONTENT) + .body(Body::empty()) + .unwrap(), + ProcessResponseBody::StatusInfo(status_info) => Response::builder() + .status(StatusCode::CREATED) + .header("Content-Type", "application/json") + .header("Location", &format!("../../jobs/{}", status_info.job_id)) + .body(Body::from(serde_json::to_vec(&status_info).unwrap())) + .unwrap(), + } + } +} diff --git a/ogcapi-services/src/processor.rs b/ogcapi-services/src/processor.rs deleted file mode 100644 index 8a5acbb..0000000 --- a/ogcapi-services/src/processor.rs +++ /dev/null @@ -1,68 +0,0 @@ -use axum::response::{IntoResponse, Response}; -use dyn_clone::DynClone; -use schemars::{schema_for, JsonSchema}; -use serde::Deserialize; -use url::Url; - -use ogcapi_types::processes::{Execute, Process}; - -use crate::{AppState, Result}; - -#[axum::async_trait] -/// Trait for defining and executing a [Process] -pub trait Processor: Send + Sync + DynClone { - /// Returns the process id (must be unique) - fn id(&self) -> String; - - /// Returns the Process description - fn process(&self) -> Process; - - /// Executes the Process and returns a response - async fn execute(&self, execute: Execute, state: &AppState, url: &Url) -> Result; -} - -dyn_clone::clone_trait_object!(Processor); - -/// Example Processor -/// -/// ```bash -/// curl http://localhost:8484/processes/greet/execution \ -/// -u 'user:password' \ -/// -H 'Content-Type: application/json' \ -/// -d '{"inputs": { "name": "World" } }' -/// ``` -#[derive(Clone)] -pub struct Greeter; - -/// Inputs for the `greet` process -#[derive(Deserialize, Debug, JsonSchema)] -struct GreeterInputs { - /// Name to be greeted - name: String, -} - -/// Outputs for the `greet` process -#[allow(dead_code)] -#[derive(JsonSchema)] -struct GreeterOutputs(String); - -#[axum::async_trait] -impl Processor for Greeter { - fn id(&self) -> String { - "greet".to_string() - } - fn process(&self) -> Process { - Process::new( - self.id(), - "0.1.0", - &serde_json::to_value(&schema_for!(GreeterInputs).schema).unwrap(), - &serde_json::to_value(&schema_for!(GreeterOutputs).schema).unwrap(), - ) - } - - async fn execute(&self, execute: Execute, _state: &AppState, _url: &Url) -> Result { - let value = serde_json::to_value(execute.inputs).unwrap(); - let inputs: GreeterInputs = serde_json::from_value(value).unwrap(); - Ok(format!("Hello, {}!\n", inputs.name).into_response()) - } -} diff --git a/ogcapi-services/src/routes/api.rs b/ogcapi-services/src/routes/api.rs index ce9e226..f8627c1 100644 --- a/ogcapi-services/src/routes/api.rs +++ b/ogcapi-services/src/routes/api.rs @@ -1,4 +1,4 @@ -use axum::{extract::State, http::header::CONTENT_TYPE, response::Html, Json}; +use axum::{Json, extract::State, http::header::CONTENT_TYPE, response::Html}; use hyper::HeaderMap; use openapiv3::OpenAPI; @@ -50,11 +50,11 @@ pub(crate) async fn swagger() -> Result> { SwaggerUI - +
- +