diff --git a/Cargo.lock b/Cargo.lock index e51d380..f5ab24d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -197,6 +197,33 @@ dependencies = [ "tracing", ] +[[package]] +name = "axum-extra" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0be6ea09c9b96cb5076af0de2e383bd2bc0c18f827cf1967bdd353e0b910d733" +dependencies = [ + "axum", + "axum-core", + "axum-macros", + "bytes", + "form_urlencoded", + "futures-util", + "headers", + "http 1.1.0", + "http-body", + "http-body-util", + "mime", + "percent-encoding", + "pin-project-lite", + "prost", + "serde", + "serde_html_form", + "tower", + "tower-layer", + "tower-service", +] + [[package]] name = "axum-macros" version = "0.4.1" @@ -209,6 +236,25 @@ dependencies = [ "syn 2.0.73", ] +[[package]] +name = "axum-serde" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4fd3f9717ec9e59c458f3a7e63c5068fdc2cd34be8a8adf86c345f119a66eba" +dependencies = [ + "async-trait", + "axum", + "axum-core", + "bytes", + "mime", + "quick-xml 0.31.0", + "rmp-serde", + "serde", + "serde_yaml", + "thiserror", + "toml", +] + [[package]] name = "axum-test" version = "14.10.0" @@ -245,8 +291,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f28155728a17999a7cda3246bc8a9bbaa53c946c8b83a0e910a01038b6283472" dependencies = [ "axum", + "axum-extra", + "axum-serde", "axum_typed_multipart", "garde", + "serde", ] [[package]] @@ -626,6 +675,15 @@ dependencies = [ "libm", ] +[[package]] +name = "cpufeatures" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" +dependencies = [ + "libc", +] + [[package]] name = "crc32fast" version = "1.4.2" @@ -1203,6 +1261,30 @@ dependencies = [ "url", ] +[[package]] +name = "headers" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "322106e6bd0cba2d5ead589ddb8150a13d7c4217cf80d7c4f682ca994ccc6aa9" +dependencies = [ + "base64 0.21.7", + "bytes", + "headers-core", + "http 1.1.0", + "httpdate", + "mime", + "sha1", +] + +[[package]] +name = "headers-core" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54b4a22553d4242c49fddb9ba998a99962b5cc6f22cb5a3482bec22522403ce4" +dependencies = [ + "http 1.1.0", +] + [[package]] name = "heck" version = "0.4.1" @@ -2265,6 +2347,29 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "prost" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" +dependencies = [ + "bytes", + "prost-derive", +] + +[[package]] +name = "prost-derive" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" +dependencies = [ + "anyhow", + "itertools", + "proc-macro2", + "quote", + "syn 2.0.73", +] + [[package]] name = "psm" version = "0.1.21" @@ -2587,6 +2692,28 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "rmp" +version = "0.8.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "228ed7c16fa39782c3b3468e974aec2795e9089153cd08ee2e9aefb3613334c4" +dependencies = [ + "byteorder", + "num-traits", + "paste", +] + +[[package]] +name = "rmp-serde" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52e599a477cf9840e92f2cde9a7189e67b42c57532749bf90aea6ec10facd4db" +dependencies = [ + "byteorder", + "rmp", + "serde", +] + [[package]] name = "roxmltree" version = "0.19.0" @@ -2744,6 +2871,19 @@ dependencies = [ "syn 2.0.73", ] +[[package]] +name = "serde_html_form" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de514ef58196f1fc96dcaef80fe6170a1ce6215df9687a93fe8300e773fefc5" +dependencies = [ + "form_urlencoded", + "indexmap", + "itoa", + "ryu", + "serde", +] + [[package]] name = "serde_json" version = "1.0.122" @@ -2800,6 +2940,17 @@ dependencies = [ "unsafe-libyaml", ] +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + [[package]] name = "sharded-slab" version = "0.1.7" diff --git a/Cargo.toml b/Cargo.toml index b18667f..96cf0e0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ system_fonts = ["dep:fontdb"] axum = { version = "0.7.4", features = ["macros", "multipart"] } axum-valid = { version = "0.14.0", features = [ "basic", - "garde", + "full_garde", "typed_multipart", ], default-features = false } axum_typed_multipart = "0.11.0"