diff --git a/frameworks/Rust/rama/.gitignore b/frameworks/Rust/rama/.gitignore new file mode 100644 index 00000000000..b7f7b51783c --- /dev/null +++ b/frameworks/Rust/rama/.gitignore @@ -0,0 +1,2 @@ +.env +target/ diff --git a/frameworks/Rust/rama/Cargo.lock b/frameworks/Rust/rama/Cargo.lock new file mode 100644 index 00000000000..87560fe249d --- /dev/null +++ b/frameworks/Rust/rama/Cargo.lock @@ -0,0 +1,4523 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "addr2line" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" + +[[package]] +name = "ahash" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "getrandom 0.2.15", + "once_cell", + "version_check", + "zerocopy 0.7.35", +] + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "alloc-no-stdlib" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" + +[[package]] +name = "alloc-stdlib" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" +dependencies = [ + "alloc-no-stdlib", +] + +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "annotate-snippets" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccaf7e9dfbb6ab22c82e473cd1a8a7bd313c19a5b7e40970f3d89ef5a5c9e81e" +dependencies = [ + "unicode-width", + "yansi-term", +] + +[[package]] +name = "async-compression" +version = "0.4.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59a194f9d963d8099596278594b3107448656ba73831c9d8c783e613ce86da64" +dependencies = [ + "brotli", + "flate2", + "futures-core", + "memchr", + "pin-project-lite", + "tokio", + "zstd 0.13.3", + "zstd-safe 7.2.1", +] + +[[package]] +name = "async-recursion" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.91", +] + +[[package]] +name = "async-stream" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" +dependencies = [ + "async-stream-impl", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-stream-impl" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.91", +] + +[[package]] +name = "async-trait" +version = "0.1.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.91", +] + +[[package]] +name = "atoi" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f28d99ec8bfea296261ca1af174f24225171fea9664ba9003cbebee704810528" +dependencies = [ + "num-traits", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "autocfg" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" + +[[package]] +name = "backtrace" +version = "0.3.74" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" +dependencies = [ + "addr2line", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", + "windows-targets 0.52.6", +] + +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" +dependencies = [ + "serde", +] + +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "borsh" +version = "1.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad8646f98db542e39fc66e68a20b2144f6a732636df7c2354e74645faaa433ce" +dependencies = [ + "cfg_aliases", +] + +[[package]] +name = "brotli" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc97b8f16f944bba54f0433f07e30be199b6dc2bd25937444bbad560bcea29bd" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", + "brotli-decompressor", +] + +[[package]] +name = "brotli-decompressor" +version = "4.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74fa05ad7d803d413eb8380983b092cbbaf9a85f151b871360e7b00cd7060b37" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", +] + +[[package]] +name = "bson" +version = "2.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af8113ff51309e2779e8785a246c10fb783e8c2452f134d6257fd71cc03ccd6c" +dependencies = [ + "ahash", + "base64 0.22.1", + "bitvec", + "getrandom 0.2.15", + "getrandom 0.3.2", + "hex", + "indexmap 2.7.0", + "js-sys", + "once_cell", + "rand 0.9.0", + "serde", + "serde_bytes", + "serde_json", + "time", + "uuid", +] + +[[package]] +name = "bumpalo" +version = "3.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" + +[[package]] +name = "cc" +version = "1.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c31a0499c1dc64f458ad13872de75c0eb7e3fdb0e67964610c914b034fc5956e" +dependencies = [ + "jobserver", + "libc", + "shlex", +] + +[[package]] +name = "cfg-if" +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.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "num-traits", + "serde", + "windows-targets 0.52.6", +] + +[[package]] +name = "concurrent-queue" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "const-oid" +version = "0.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 = "const_format" +version = "0.2.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "126f97965c8ad46d6d9163268ff28432e8f6a1196a55578867832e3049df63dd" +dependencies = [ + "const_format_proc_macros", +] + +[[package]] +name = "const_format_proc_macros" +version = "0.2.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d57c2eccfb16dbac1f4e61e206105db5820c9d26c3c472bc17c774259ef7744" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + +[[package]] +name = "convert_case" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "cpufeatures" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" +dependencies = [ + "libc", +] + +[[package]] +name = "crc" +version = "3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69e6e4d7b33a94f0991c26729976b10ebde1d34c3ee82408fb536164fa10d636" +dependencies = [ + "crc-catalog", +] + +[[package]] +name = "crc-catalog" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" + +[[package]] +name = "crc32fast" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "critical-section" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b" + +[[package]] +name = "crossbeam-channel" +version = "0.5.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-queue" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f58bbc28f91df819d0aa2a2c00cd19754769c2fad90579b3592b1c9ba7a3115" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" + +[[package]] +name = "crunchy" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43da5946c66ffcc7745f48db692ffbb10a83bfe0afd96235c5c2a4fb23994929" + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "csv" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acdc4883a9c96732e4733212c01447ebd805833b7275a73ca3ee080fd77afdaf" +dependencies = [ + "csv-core", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "csv-core" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d02f3b0da4c6504f86e9cd789d8dbafab48c2321be74e9987593de5a894d93d" +dependencies = [ + "memchr", +] + +[[package]] +name = "darling" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.91", +] + +[[package]] +name = "darling_macro" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.91", +] + +[[package]] +name = "data-encoding" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" + +[[package]] +name = "deadpool" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ed5957ff93768adf7a65ab167a17835c3d2c3c50d084fe305174c112f468e2f" +dependencies = [ + "deadpool-runtime", + "num_cpus", + "serde", + "tokio", +] + +[[package]] +name = "deadpool-postgres" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d697d376cbfa018c23eb4caab1fd1883dd9c906a8c034e8d9a3cb06a7e0bef9" +dependencies = [ + "async-trait", + "deadpool", + "getrandom 0.2.15", + "serde", + "tokio", + "tokio-postgres", + "tracing", +] + +[[package]] +name = "deadpool-runtime" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "092966b41edc516079bdf31ec78a2e0588d1d0c08f78b91d8307215928642b2b" +dependencies = [ + "tokio", +] + +[[package]] +name = "der" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" +dependencies = [ + "const-oid", + "pem-rfc7468", + "zeroize", +] + +[[package]] +name = "deranged" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +dependencies = [ + "powerfmt", + "serde", +] + +[[package]] +name = "derive-syn-parse" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d65d7ce8132b7c0e54497a4d9a55a1c2a0912a0d786cf894472ba818fba45762" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.91", +] + +[[package]] +name = "derive-where" +version = "1.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62d671cc41a825ebabc75757b62d3d168c577f9149b2d49ece1dad1f72119d25" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.91", +] + +[[package]] +name = "derive_more" +version = "0.99.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" +dependencies = [ + "convert_case", + "proc-macro2", + "quote", + "rustc_version", + "syn 2.0.91", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "const-oid", + "crypto-common", + "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 2.0.91", +] + +[[package]] +name = "dotenv" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" + +[[package]] +name = "dotenvy" +version = "0.15.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" + +[[package]] +name = "dtoa" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653" + +[[package]] +name = "either" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" +dependencies = [ + "serde", +] + +[[package]] +name = "enum-as-inner" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1e6a265c649f3f5979b601d26f1d05ada116434c87741c9493cb56218f76cbc" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 2.0.91", +] + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + +[[package]] +name = "etcetera" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "136d1b5283a1ab77bd9257427ffd09d8667ced0570b6f938942bc7568ed5b943" +dependencies = [ + "cfg-if", + "home", + "windows-sys 0.48.0", +] + +[[package]] +name = "event-listener" +version = "5.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "fallible-iterator" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" + +[[package]] +name = "fastrand" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" + +[[package]] +name = "flate2" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ced92e76e966ca2fd84c8f7aa01a4aea65b0eb6648d72f7c8f3e2764a67fece" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + +[[package]] +name = "float-cmp" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b09cf3155332e944990140d967ff5eceb70df778b34f77d8075db46e4704e6d8" +dependencies = [ + "num-traits", +] + +[[package]] +name = "flume" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da0e4dd2a88388a1f4ccc7c9ce104604dab68d9f408dc34cd45823d5a9069095" +dependencies = [ + "futures-core", + "futures-sink", + "nanorand", + "spin", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + +[[package]] +name = "futures" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-executor" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-intrusive" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d930c203dd0b6ff06e0201a4a2fe9149b43c684fd4420555b26d21b1a02956f" +dependencies = [ + "futures-core", + "lock_api", + "parking_lot", +] + +[[package]] +name = "futures-io" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" + +[[package]] +name = "futures-lite" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5edaec856126859abb19ed65f39e90fea3a9574b9707f13539acf4abf7eb532" +dependencies = [ + "fastrand", + "futures-core", + "futures-io", + "parking", + "pin-project-lite", +] + +[[package]] +name = "futures-macro" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.91", +] + +[[package]] +name = "futures-sink" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" + +[[package]] +name = "futures-task" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" + +[[package]] +name = "futures-util" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "generator" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc6bd114ceda131d3b1d665eba35788690ad37f5916457286b32ab6fd3c438dd" +dependencies = [ + "cfg-if", + "libc", + "log", + "rustversion", + "windows", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.2.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.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "r-efi", + "wasi 0.14.2+wasi-0.2.4", + "wasm-bindgen", +] + +[[package]] +name = "gimli" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" + +[[package]] +name = "h2" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccae279728d634d083c00f6099cb58f01cc99c145b84b8be2f6c74618d79922e" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http", + "indexmap 2.7.0", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "halfbrown" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2c385c6df70fd180bbb673d93039dbd2cd34e41d782600bdf6e1ca7bce39aa" +dependencies = [ + "hashbrown 0.15.2", + "serde", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[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.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7382cf6263419f2d8df38c55d7da83da5c18aef87fc7a7fc1fb1e344edfe14c1" +dependencies = [ + "hashbrown 0.15.2", +] + +[[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", + "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", +] + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hickory-proto" +version = "0.24.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ad3d6d98c648ed628df039541a5577bee1a7c83e9e16fe3dbedeea4cdfeb971" +dependencies = [ + "async-trait", + "cfg-if", + "data-encoding", + "enum-as-inner", + "futures-channel", + "futures-io", + "futures-util", + "idna", + "ipnet", + "once_cell", + "rand 0.8.5", + "thiserror 1.0.69", + "tinyvec", + "tokio", + "tracing", + "url", +] + +[[package]] +name = "hickory-proto" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d844af74f7b799e41c78221be863bade11c430d46042c3b49ca8ae0c6d27287" +dependencies = [ + "async-recursion", + "async-trait", + "cfg-if", + "critical-section", + "data-encoding", + "enum-as-inner", + "futures-channel", + "futures-io", + "futures-util", + "idna", + "ipnet", + "once_cell", + "rand 0.9.0", + "ring", + "thiserror 2.0.12", + "tinyvec", + "tokio", + "tracing", + "url", +] + +[[package]] +name = "hickory-resolver" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a2e2aba9c389ce5267d31cf1e4dace82390ae276b0b364ea55630b1fa1b44b4" +dependencies = [ + "cfg-if", + "futures-util", + "hickory-proto 0.24.3", + "ipconfig", + "lru-cache", + "once_cell", + "parking_lot", + "rand 0.8.5", + "resolv-conf", + "smallvec", + "thiserror 1.0.69", + "tokio", + "tracing", +] + +[[package]] +name = "hickory-resolver" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a128410b38d6f931fcc6ca5c107a3b02cabd6c05967841269a4ad65d23c44331" +dependencies = [ + "cfg-if", + "futures-util", + "hickory-proto 0.25.1", + "moka", + "once_cell", + "parking_lot", + "rand 0.9.0", + "smallvec", + "thiserror 2.0.12", + "tokio", + "tracing", +] + +[[package]] +name = "hkdf" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" +dependencies = [ + "hmac", +] + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest", +] + +[[package]] +name = "home" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" +dependencies = [ + "windows-sys 0.59.0", +] + +[[package]] +name = "hostname" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867" +dependencies = [ + "libc", + "match_cfg", + "winapi", +] + +[[package]] +name = "http" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" +dependencies = [ + "bytes", + "futures-util", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "http-range-header" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9171a2ea8a68358193d15dd5d70c1c10a2afc3e7e4c5bc92bc9f025cebd7359c" + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "iana-time-zone" +version = "0.1.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows-core 0.52.0", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "icu_collections" +version = "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 2.0.91", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +dependencies = [ + "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]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", + "serde", +] + +[[package]] +name = "indexmap" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" +dependencies = [ + "equivalent", + "hashbrown 0.15.2", + "serde", +] + +[[package]] +name = "ipconfig" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" +dependencies = [ + "socket2", + "widestring", + "windows-sys 0.48.0", + "winreg", +] + +[[package]] +name = "ipnet" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" + +[[package]] +name = "iri-string" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbc5ebe9c3a1a7a5127f920a418f7585e9e758e911d0466ed004f393b0e380b2" +dependencies = [ + "memchr", + "serde", +] + +[[package]] +name = "itertools" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" + +[[package]] +name = "jobserver" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" +dependencies = [ + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.77" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" +dependencies = [ + "once_cell", + "wasm-bindgen", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +dependencies = [ + "spin", +] + +[[package]] +name = "libc" +version = "0.2.171" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6" + +[[package]] +name = "libm" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" + +[[package]] +name = "libmimalloc-sys" +version = "0.1.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b20daca3a4ac14dbdc753c5e90fc7b490a48a9131daed3c9a9ced7b2defd37b" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "libsqlite3-sys" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e99fb7a497b1e3339bc746195567ed8d3e24945ecd636e3619d20b9de9e9149" +dependencies = [ + "pkg-config", + "vcpkg", +] + +[[package]] +name = "linked-hash-map" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" + +[[package]] +name = "linux-raw-sys" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" + +[[package]] +name = "litemap" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" + +[[package]] +name = "lock_api" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" + +[[package]] +name = "loom" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "419e0dc8046cb947daa77eb95ae174acfbddb7673b4151f56d1eed8e93fbfaca" +dependencies = [ + "cfg-if", + "generator", + "pin-utils", + "scoped-tls", + "serde", + "serde_json", + "tracing", + "tracing-subscriber", +] + +[[package]] +name = "lru-cache" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c" +dependencies = [ + "linked-hash-map", +] + +[[package]] +name = "macro_magic" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc33f9f0351468d26fbc53d9ce00a096c8522ecb42f19b50f34f2c422f76d21d" +dependencies = [ + "macro_magic_core", + "macro_magic_macros", + "quote", + "syn 2.0.91", +] + +[[package]] +name = "macro_magic_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1687dc887e42f352865a393acae7cf79d98fab6351cde1f58e9e057da89bf150" +dependencies = [ + "const-random", + "derive-syn-parse", + "macro_magic_core_macros", + "proc-macro2", + "quote", + "syn 2.0.91", +] + +[[package]] +name = "macro_magic_core_macros" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b02abfe41815b5bd98dbd4260173db2c116dda171dc0fe7838cb206333b83308" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.91", +] + +[[package]] +name = "macro_magic_macros" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ea28ee64b88876bf45277ed9a5817c1817df061a74f2b988971a12570e5869" +dependencies = [ + "macro_magic_core", + "quote", + "syn 2.0.91", +] + +[[package]] +name = "match_cfg" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" + +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] + +[[package]] +name = "matchit" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" + +[[package]] +name = "md-5" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" +dependencies = [ + "cfg-if", + "digest", +] + +[[package]] +name = "md5" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771" + +[[package]] +name = "memchr" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + +[[package]] +name = "mimalloc" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03cb1f88093fe50061ca1195d336ffec131347c7b833db31f9ab62a2d1b7925f" +dependencies = [ + "libmimalloc-sys", +] + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "mime_guess" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" +dependencies = [ + "mime", + "unicase", +] + +[[package]] +name = "miniz_oxide" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3be647b768db090acb35d5ec5db2b0e1f1de11133ca123b9eacf5137868f892a" +dependencies = [ + "adler2", +] + +[[package]] +name = "mio" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" +dependencies = [ + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.52.0", +] + +[[package]] +name = "moka" +version = "0.12.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9321642ca94a4282428e6ea4af8cc2ca4eac48ac7a6a4ea8f33f76d0ce70926" +dependencies = [ + "crossbeam-channel", + "crossbeam-epoch", + "crossbeam-utils", + "loom", + "parking_lot", + "portable-atomic", + "rustc_version", + "smallvec", + "tagptr", + "thiserror 1.0.69", + "uuid", +] + +[[package]] +name = "mongodb" +version = "3.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdf4261933e5113914caec01c4bb16a7502bdaa9cf80fd87191765e7d9ff16b2" +dependencies = [ + "async-trait", + "base64 0.13.1", + "bitflags 1.3.2", + "bson", + "chrono", + "derive-where", + "derive_more", + "flate2", + "futures-core", + "futures-executor", + "futures-io", + "futures-util", + "hex", + "hickory-proto 0.24.3", + "hickory-resolver 0.24.2", + "hmac", + "macro_magic", + "md-5", + "mongodb-internal-macros", + "once_cell", + "pbkdf2", + "percent-encoding", + "rand 0.8.5", + "rustc_version_runtime", + "rustls 0.21.12", + "rustls-pemfile 1.0.4", + "serde", + "serde_bytes", + "serde_with", + "sha-1", + "sha2", + "snap", + "socket2", + "stringprep", + "strsim", + "take_mut", + "thiserror 1.0.69", + "tokio", + "tokio-rustls", + "tokio-util", + "typed-builder", + "uuid", + "webpki-roots 0.25.4", + "zstd 0.11.2+zstd.1.5.2", +] + +[[package]] +name = "mongodb-internal-macros" +version = "3.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "619176c99deef0d50be51ce3193e9efd6a56ab0f4e6a38d5fd614880d148c7ae" +dependencies = [ + "macro_magic", + "proc-macro2", + "quote", + "syn 2.0.91", +] + +[[package]] +name = "nanoid" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ffa00dec017b5b1a8b7cf5e2c008bfda1aa7e0697ac1508b491fdf2622fb4d8" +dependencies = [ + "rand 0.8.5", +] + +[[package]] +name = "nanorand" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3" +dependencies = [ + "getrandom 0.2.15", +] + +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + +[[package]] +name = "num-bigint-dig" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc84195820f291c7697304f3cbdadd1cb7199c0efc917ff5eafd71225c136151" +dependencies = [ + "byteorder", + "lazy_static", + "libm", + "num-integer", + "num-iter", + "num-traits", + "rand 0.8.5", + "smallvec", + "zeroize", +] + +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-iter" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", + "libm", +] + +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "object" +version = "0.36.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" +dependencies = [ + "critical-section", + "portable-atomic", +] + +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + +[[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.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets 0.52.6", +] + +[[package]] +name = "pbkdf2" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +dependencies = [ + "digest", +] + +[[package]] +name = "pem-rfc7468" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" +dependencies = [ + "base64ct", +] + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "phf" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" +dependencies = [ + "phf_shared", +] + +[[package]] +name = "phf_shared" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" +dependencies = [ + "siphasher", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkcs1" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f" +dependencies = [ + "der", + "pkcs8", + "spki", +] + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + +[[package]] +name = "pkg-config" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" + +[[package]] +name = "portable-atomic" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "350e9b48cbc6b0e028b0473b114454c6316e57336ee184ceab6e53f72c178b3e" + +[[package]] +name = "postgres-protocol" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76ff0abab4a9b844b93ef7b81f1efc0a366062aaef2cd702c76256b5dc075c54" +dependencies = [ + "base64 0.22.1", + "byteorder", + "bytes", + "fallible-iterator", + "hmac", + "md-5", + "memchr", + "rand 0.9.0", + "sha2", + "stringprep", +] + +[[package]] +name = "postgres-types" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613283563cd90e1dfc3518d548caee47e0e725455ed619881f5cf21f36de4b48" +dependencies = [ + "bytes", + "fallible-iterator", + "postgres-protocol", +] + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy 0.7.35", +] + +[[package]] +name = "prettyplease" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8646e95016a7a6c4adea95bafa8a16baab64b583356217f2c85db4a39d9a86" +dependencies = [ + "proc-macro2", + "syn 1.0.109", +] + +[[package]] +name = "proc-macro2" +version = "1.0.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "psl" +version = "2.1.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70295efe3fd3db60e81f452e2eacc407b4e6c2e1ff7f763424ae6e16105cee26" +dependencies = [ + "psl-types", +] + +[[package]] +name = "psl-types" +version = "2.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33cb294fe86a74cbcf50d4445b37da762029549ebeea341421c7c70370f86cac" + +[[package]] +name = "quick-error" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" + +[[package]] +name = "quick_cache" +version = "0.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f8ed0655cbaf18a26966142ad23b95d8ab47221c50c4f73a1db7d0d2d6e3da8" +dependencies = [ + "ahash", + "equivalent", + "hashbrown 0.15.2", + "parking_lot", +] + +[[package]] +name = "quote" +version = "1.0.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" + +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + +[[package]] +name = "rama" +version = "0.2.0-alpha.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9873ebb37d9d1e396d84ad0821c066f5c56fda2d72124cbdde33193d233f209" +dependencies = [ + "rama-core", + "rama-dns", + "rama-http", + "rama-http-backend", + "rama-http-core", + "rama-net", + "rama-tcp", + "rama-tls", + "rama-ua", + "rama-utils", + "rustversion", +] + +[[package]] +name = "rama-core" +version = "0.2.0-alpha.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "870d2a5a1510eb16662848328373670dc5fa479315c895c280630b9902d9c132" +dependencies = [ + "futures-lite", + "parking_lot", + "rama-error", + "rama-macros", + "rama-utils", + "tokio", + "tokio-graceful", + "tracing", +] + +[[package]] +name = "rama-dns" +version = "0.2.0-alpha.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "944e2de33b5b5d0ed102beb9955893da2a1e9b4e71b7568eee7e8482408e97ba" +dependencies = [ + "hickory-resolver 0.25.1", + "rama-core", + "rama-net", + "rama-utils", + "serde", + "tokio", +] + +[[package]] +name = "rama-error" +version = "0.2.0-alpha.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "619de7c9954ff02305f9749c62aedf1374cd7716cefc66a0d59dec4544d9179b" + +[[package]] +name = "rama-http" +version = "0.2.0-alpha.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27bf643d8b008a39023ad14b66ad047dd6a92c9ef82c74844753f74be89c216f" +dependencies = [ + "async-compression", + "base64 0.22.1", + "bitflags 2.9.0", + "bytes", + "const_format", + "csv", + "futures-lite", + "http-range-header", + "httpdate", + "iri-string", + "matchit", + "mime", + "mime_guess", + "nanoid", + "percent-encoding", + "pin-project-lite", + "rama-core", + "rama-http-types", + "rama-macros", + "rama-net", + "rama-ua", + "rama-utils", + "regex", + "serde", + "serde_html_form", + "serde_json", + "smol_str", + "tokio", + "tokio-util", + "tracing", + "uuid", +] + +[[package]] +name = "rama-http-backend" +version = "0.2.0-alpha.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28473f8acf125aef82cb00e2739369f34db1aeb057b3132cf699e69fb9a7318d" +dependencies = [ + "const_format", + "futures", + "h2", + "rama-core", + "rama-http-core", + "rama-http-types", + "rama-net", + "rama-tcp", + "rama-utils", + "tokio", + "tracing", +] + +[[package]] +name = "rama-http-core" +version = "0.2.0-alpha.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e00de69a60643d473641ee8fa4768316f5c9a8b303eed2888de885068ced1947" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-channel", + "futures-core", + "futures-sink", + "futures-util", + "httparse", + "httpdate", + "indexmap 2.7.0", + "itoa", + "pin-project-lite", + "rama-core", + "rama-http-types", + "rama-utils", + "slab", + "smallvec", + "tokio", + "tokio-test", + "tokio-util", + "tracing", + "want", +] + +[[package]] +name = "rama-http-types" +version = "0.2.0-alpha.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "908aa9d8a0309438df16db698ec24aeaaabde5b03ea52404704f3b841e4c46e5" +dependencies = [ + "bytes", + "const_format", + "csv", + "futures-core", + "futures-lite", + "headers", + "http", + "http-body", + "http-body-util", + "mime", + "mime_guess", + "pin-project-lite", + "rama-core", + "rama-error", + "rama-macros", + "rama-utils", + "serde", + "serde_html_form", + "serde_json", + "smallvec", + "sync_wrapper", + "tracing", +] + +[[package]] +name = "rama-macros" +version = "0.2.0-alpha.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ef8f1996c1b7b4c1bb1b42dff1d864a91a597b012c0c1819ae3e98c8ef4d9c0" + +[[package]] +name = "rama-net" +version = "0.2.0-alpha.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c6ee75afa01308a12a6ac4b0844bcea13c6a912615520644cec9c90c540eb30" +dependencies = [ + "base64 0.22.1", + "bytes", + "const_format", + "flume", + "futures-lite", + "headers", + "hex", + "ipnet", + "itertools", + "md5", + "parking_lot", + "pin-project-lite", + "psl", + "rama-core", + "rama-http-types", + "rama-macros", + "rama-utils", + "serde", + "sha2", + "smol_str", + "socket2", + "tokio", + "tracing", +] + +[[package]] +name = "rama-tcp" +version = "0.2.0-alpha.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45f9cc81d98da859f768ce0268a8547a08a76b9cb4a4378a7cc670a2a899ca5d" +dependencies = [ + "rama-core", + "rama-dns", + "rama-http-types", + "rama-net", + "rama-utils", + "tokio", + "tracing", +] + +[[package]] +name = "rama-techempower" +version = "0.2.0" +dependencies = [ + "bytes", + "deadpool", + "deadpool-postgres", + "dotenv", + "futures", + "futures-util", + "mimalloc", + "mime", + "mongodb", + "num_cpus", + "quick_cache", + "rama", + "rand 0.9.0", + "serde", + "serde_json", + "serde_path_to_error", + "simd-json", + "sqlx", + "tokio", + "tokio-pg-mapper", + "tokio-pg-mapper-derive", + "tokio-postgres", + "yarte", +] + +[[package]] +name = "rama-tls" +version = "0.2.0-alpha.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0606fa4d075eeeadf9118c2b847d17ff42b08d2a882a31bf7748524bc609b864" +dependencies = [ + "brotli", + "flate2", + "flume", + "itertools", + "parking_lot", + "pin-project-lite", + "rama-core", + "rama-net", + "rama-utils", + "tokio", + "tracing", +] + +[[package]] +name = "rama-ua" +version = "0.2.0-alpha.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3aae90d38623252c831e3ca99d64762bd4fdb773c6f22b3f8b305c3a85e37dd" +dependencies = [ + "itertools", + "rama-core", + "rama-http-types", + "rama-net", + "rama-utils", + "rand 0.9.0", + "serde", + "serde_json", + "tracing", +] + +[[package]] +name = "rama-utils" +version = "0.2.0-alpha.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab5a10484221deae52ae76b83982dfb52f8db21514a0a033b48f0599740cfd76" +dependencies = [ + "parking_lot", + "pin-project-lite", + "rama-macros", + "serde", + "tokio", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3779b94aeb87e8bd4e834cee3650289ee9e0d5677f976ecdb6d219e5f4f6cd94" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.3", + "zerocopy 0.8.24", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.3", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.15", +] + +[[package]] +name = "rand_core" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" +dependencies = [ + "getrandom 0.3.2", +] + +[[package]] +name = "redox_syscall" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" +dependencies = [ + "bitflags 2.9.0", +] + +[[package]] +name = "ref-cast" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf0a6f84d5f1d581da8b41b47ec8600871962f2a528115b542b362d4b744931" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcc303e793d3734489387d205e9b186fac9c6cfacedd98cbb2e8a5943595f3e6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.91", +] + +[[package]] +name = "regex" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata 0.4.9", + "regex-syntax 0.8.5", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax 0.6.29", +] + +[[package]] +name = "regex-automata" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.8.5", +] + +[[package]] +name = "regex-syntax" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + +[[package]] +name = "regex-syntax" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" + +[[package]] +name = "resolv-conf" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52e44394d2086d010551b14b53b1f24e31647570cd1deb0379e2c21b329aba00" +dependencies = [ + "hostname", + "quick-error", +] + +[[package]] +name = "ring" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.15", + "libc", + "spin", + "untrusted", + "windows-sys 0.52.0", +] + +[[package]] +name = "rsa" +version = "0.9.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47c75d7c5c6b673e58bf54d8544a9f432e3a925b0e80f7cd3602ab5c50c55519" +dependencies = [ + "const-oid", + "digest", + "num-bigint-dig", + "num-integer", + "num-traits", + "pkcs1", + "pkcs8", + "rand_core 0.6.4", + "signature", + "spki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + +[[package]] +name = "rustc_version_runtime" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dd18cd2bae1820af0b6ad5e54f4a51d0f3fcc53b05f845675074efcc7af071d" +dependencies = [ + "rustc_version", + "semver", +] + +[[package]] +name = "rustix" +version = "0.38.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f93dc38ecbab2eb790ff964bb77fa94faf256fd3e73285fd7ba0903b76bedb85" +dependencies = [ + "bitflags 2.9.0", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.59.0", +] + +[[package]] +name = "rustls" +version = "0.21.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" +dependencies = [ + "log", + "ring", + "rustls-webpki 0.101.7", + "sct", +] + +[[package]] +name = "rustls" +version = "0.23.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5065c3f250cbd332cd894be57c40fa52387247659b14a2d6041d121547903b1b" +dependencies = [ + "once_cell", + "ring", + "rustls-pki-types", + "rustls-webpki 0.102.8", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +dependencies = [ + "base64 0.21.7", +] + +[[package]] +name = "rustls-pemfile" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "rustls-pki-types" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2bf47e6ff922db3825eb750c4e2ff784c6ff8fb9e13046ef6a1d1c5401b0b37" + +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "rustls-webpki" +version = "0.102.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] + +[[package]] +name = "rustversion" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" + +[[package]] +name = "ryu" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" + +[[package]] +name = "scoped-tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "sct" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "semver" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cb6eb87a131f756572d7fb904f6e7b68633f09cca868c5df1c4b8d1a694bbba" + +[[package]] +name = "serde" +version = "1.0.219" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_bytes" +version = "0.11.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "387cc504cb06bb40a96c8e04e951fe01854cf6bc921053c954e4a606d9675c6a" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_derive" +version = "1.0.219" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.91", +] + +[[package]] +name = "serde_html_form" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d2de91cf02bbc07cde38891769ccd5d4f073d22a40683aa4bc7a95781aaa2c4" +dependencies = [ + "form_urlencoded", + "indexmap 2.7.0", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_json" +version = "1.0.140" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" +dependencies = [ + "indexmap 2.7.0", + "itoa", + "memchr", + "ryu", + "serde", +] + +[[package]] +name = "serde_path_to_error" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59fab13f937fa393d08645bf3a84bdfe86e296747b506ada67bb15f10f218b2a" +dependencies = [ + "itoa", + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_with" +version = "3.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e28bdad6db2b8340e449f7108f020b3b092e8583a9e3fb82713e1d4e71fe817" +dependencies = [ + "base64 0.22.1", + "chrono", + "hex", + "indexmap 1.9.3", + "indexmap 2.7.0", + "serde", + "serde_derive", + "serde_json", + "serde_with_macros", + "time", +] + +[[package]] +name = "serde_with_macros" +version = "3.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d846214a9854ef724f3da161b426242d8de7c1fc7de2f89bb1efcb154dca79d" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.91", +] + +[[package]] +name = "sha-1" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5058ada175748e33390e40e872bd0fe59a19f265d0158daa551c5a88a76009c" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "signal-hook-registry" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" +dependencies = [ + "libc", +] + +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest", + "rand_core 0.6.4", +] + +[[package]] +name = "simd-json" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10b5602e4f1f7d358956f94cac1eff59220f34cf9e26d49f5fde5acef851cbed" +dependencies = [ + "getrandom 0.3.2", + "halfbrown", + "ref-cast", + "serde", + "serde_json", + "simdutf8", + "value-trait", +] + +[[package]] +name = "simdutf8" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" + +[[package]] +name = "siphasher" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8917285742e9f3e1683f0a9c4e6b57960b7314d0b08d30d1ecd426713ee2eee9" +dependencies = [ + "serde", +] + +[[package]] +name = "smol_str" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9676b89cd56310a87b93dec47b11af744f34d5fc9f367b829474eec0a891350d" +dependencies = [ + "borsh", + "serde", +] + +[[package]] +name = "snap" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b6b67fb9a61334225b5b790716f609cd58395f895b3fe8b328786812a40bc3b" + +[[package]] +name = "socket2" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f5fd57c80058a56cf5c777ab8a126398ece8e442983605d280a44ce79d0edef" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +dependencies = [ + "lock_api", +] + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "sqlx" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4410e73b3c0d8442c5f99b425d7a435b5ee0ae4167b3196771dd3f7a01be745f" +dependencies = [ + "sqlx-core", + "sqlx-macros", + "sqlx-mysql", + "sqlx-postgres", + "sqlx-sqlite", +] + +[[package]] +name = "sqlx-core" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a007b6936676aa9ab40207cde35daab0a04b823be8ae004368c0793b96a61e0" +dependencies = [ + "bytes", + "crc", + "crossbeam-queue", + "either", + "event-listener", + "futures-core", + "futures-intrusive", + "futures-io", + "futures-util", + "hashbrown 0.15.2", + "hashlink", + "indexmap 2.7.0", + "log", + "memchr", + "once_cell", + "percent-encoding", + "rustls 0.23.20", + "rustls-pemfile 2.2.0", + "serde", + "serde_json", + "sha2", + "smallvec", + "thiserror 2.0.12", + "tokio", + "tokio-stream", + "tracing", + "url", + "webpki-roots 0.26.7", +] + +[[package]] +name = "sqlx-macros" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3112e2ad78643fef903618d78cf0aec1cb3134b019730edb039b69eaf531f310" +dependencies = [ + "proc-macro2", + "quote", + "sqlx-core", + "sqlx-macros-core", + "syn 2.0.91", +] + +[[package]] +name = "sqlx-macros-core" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e9f90acc5ab146a99bf5061a7eb4976b573f560bc898ef3bf8435448dd5e7ad" +dependencies = [ + "dotenvy", + "either", + "heck", + "hex", + "once_cell", + "proc-macro2", + "quote", + "serde", + "serde_json", + "sha2", + "sqlx-core", + "sqlx-mysql", + "sqlx-postgres", + "sqlx-sqlite", + "syn 2.0.91", + "tempfile", + "tokio", + "url", +] + +[[package]] +name = "sqlx-mysql" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4560278f0e00ce64938540546f59f590d60beee33fffbd3b9cd47851e5fff233" +dependencies = [ + "atoi", + "base64 0.22.1", + "bitflags 2.9.0", + "byteorder", + "bytes", + "crc", + "digest", + "dotenvy", + "either", + "futures-channel", + "futures-core", + "futures-io", + "futures-util", + "generic-array", + "hex", + "hkdf", + "hmac", + "itoa", + "log", + "md-5", + "memchr", + "once_cell", + "percent-encoding", + "rand 0.8.5", + "rsa", + "serde", + "sha1", + "sha2", + "smallvec", + "sqlx-core", + "stringprep", + "thiserror 2.0.12", + "tracing", + "whoami", +] + +[[package]] +name = "sqlx-postgres" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5b98a57f363ed6764d5b3a12bfedf62f07aa16e1856a7ddc2a0bb190a959613" +dependencies = [ + "atoi", + "base64 0.22.1", + "bitflags 2.9.0", + "byteorder", + "crc", + "dotenvy", + "etcetera", + "futures-channel", + "futures-core", + "futures-util", + "hex", + "hkdf", + "hmac", + "home", + "itoa", + "log", + "md-5", + "memchr", + "once_cell", + "rand 0.8.5", + "serde", + "serde_json", + "sha2", + "smallvec", + "sqlx-core", + "stringprep", + "thiserror 2.0.12", + "tracing", + "whoami", +] + +[[package]] +name = "sqlx-sqlite" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f85ca71d3a5b24e64e1d08dd8fe36c6c95c339a896cc33068148906784620540" +dependencies = [ + "atoi", + "flume", + "futures-channel", + "futures-core", + "futures-executor", + "futures-intrusive", + "futures-util", + "libsqlite3-sys", + "log", + "percent-encoding", + "serde", + "serde_urlencoded", + "sqlx-core", + "tracing", + "url", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "stringprep" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b4df3d392d81bd458a8a621b8bffbd2302a12ffe288a9d931670948749463b1" +dependencies = [ + "unicode-bidi", + "unicode-normalization", + "unicode-properties", +] + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.91" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d53cbcb5a243bd33b7858b1d7f4aca2153490815872d86d955d6ea29f743c035" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" + +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.91", +] + +[[package]] +name = "tagptr" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b2093cf4c8eb1e67749a6762251bc9cd836b6fc171623bd0a9d324d37af2417" + +[[package]] +name = "take_mut" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60" + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "tempfile" +version = "3.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" +dependencies = [ + "cfg-if", + "fastrand", + "once_cell", + "rustix", + "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 = "2.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" +dependencies = [ + "thiserror-impl 2.0.12", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.91", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.91", +] + +[[package]] +name = "thread_local" +version = "1.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +dependencies = [ + "cfg-if", + "once_cell", +] + +[[package]] +name = "time" +version = "0.3.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21" +dependencies = [ + "deranged", + "itoa", + "num-conv", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" + +[[package]] +name = "time-macros" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +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.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "022db8904dfa342efe721985167e9fcd16c29b226db4397ed752a761cfce81e8" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.44.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6b88822cbe49de4185e3a4cbf8321dd487cf5fe0c5c65695fef6346371e9c48" +dependencies = [ + "backtrace", + "bytes", + "libc", + "mio", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys 0.52.0", +] + +[[package]] +name = "tokio-graceful" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45740b38b48641855471cd402922e89156bdfbd97b69b45eeff170369cc18c7d" +dependencies = [ + "loom", + "pin-project-lite", + "slab", + "tokio", + "tracing", +] + +[[package]] +name = "tokio-macros" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.91", +] + +[[package]] +name = "tokio-pg-mapper" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93f2b78f3566383ffabc553c72bbb2f129962a54886c5c4d8e8c706f84eceab8" +dependencies = [ + "tokio-postgres", +] + +[[package]] +name = "tokio-pg-mapper-derive" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8548f756cd6eb4069c5af0fb0cec57001fb42bd1fb7330d8f24067ee3fa62608" +dependencies = [ + "quote", + "syn 1.0.109", + "tokio-postgres", +] + +[[package]] +name = "tokio-postgres" +version = "0.7.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c95d533c83082bb6490e0189acaa0bbeef9084e60471b696ca6988cd0541fb0" +dependencies = [ + "async-trait", + "byteorder", + "bytes", + "fallible-iterator", + "futures-channel", + "futures-util", + "log", + "parking_lot", + "percent-encoding", + "phf", + "pin-project-lite", + "postgres-protocol", + "postgres-types", + "rand 0.9.0", + "socket2", + "tokio", + "tokio-util", + "whoami", +] + +[[package]] +name = "tokio-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +dependencies = [ + "rustls 0.21.12", + "tokio", +] + +[[package]] +name = "tokio-stream" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tokio-test" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2468baabc3311435b55dd935f702f42cd1b8abb7e754fb7dfb16bd36aa88f9f7" +dependencies = [ + "async-stream", + "bytes", + "futures-core", + "tokio", + "tokio-stream", +] + +[[package]] +name = "tokio-util" +version = "0.7.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7fcaa8d55a2bdd6b83ace262b016eca0d79ee02818c5c1bcdf0305114081078" +dependencies = [ + "bytes", + "futures-core", + "futures-io", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "toml" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +dependencies = [ + "serde", +] + +[[package]] +name = "tracing" +version = "0.1.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +dependencies = [ + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.91", +] + +[[package]] +name = "tracing-core" +version = "0.1.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "typed-builder" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89851716b67b937e393b3daa8423e67ddfc4bbbf1654bcf05488e95e0828db0c" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "unicase" +version = "2.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" + +[[package]] +name = "unicode-bidi" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" + +[[package]] +name = "unicode-ident" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" + +[[package]] +name = "unicode-normalization" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-properties" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e70f2a8b45122e719eb623c01822704c4e0907e7e426a05927e1a1cfff5b75d0" + +[[package]] +name = "unicode-width" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "url" +version = "2.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[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 = "uuid" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "458f7a779bf54acc9f347480ac654f68407d3aab21269a6e3c9f922acd9e2da9" +dependencies = [ + "getrandom 0.3.2", + "js-sys", + "serde", + "wasm-bindgen", +] + +[[package]] +name = "v_eval" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dd8b599d797eb038d0dde9a3860aacb6bbba3bffa4ac64f807c8673820cc9d9" +dependencies = [ + "regex", + "syn 1.0.109", +] + +[[package]] +name = "v_htmlescape" +version = "0.15.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e8257fbc510f0a46eb602c10215901938b5c2a7d5e70fc11483b1d3c9b5b18c" + +[[package]] +name = "valuable" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" + +[[package]] +name = "value-trait" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0508fce11ad19e0aab49ce20b6bec7f8f82902ded31df1c9fc61b90f0eb396b8" +dependencies = [ + "float-cmp", + "halfbrown", + "itoa", + "ryu", +] + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasi" +version = "0.14.2+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" +dependencies = [ + "wit-bindgen-rt", +] + +[[package]] +name = "wasite" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" + +[[package]] +name = "wasm-bindgen" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" +dependencies = [ + "bumpalo", + "log", + "proc-macro2", + "quote", + "syn 2.0.91", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.91", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "web-sys" +version = "0.3.77" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki-roots" +version = "0.25.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" + +[[package]] +name = "webpki-roots" +version = "0.26.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d642ff16b7e79272ae451b7322067cdc17cadf68c23264be9d94a32319efe7e" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "whoami" +version = "1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "372d5b87f58ec45c384ba03563b03544dc5fadc3983e434b286913f5b4a9bb6d" +dependencies = [ + "redox_syscall", + "wasite", + "web-sys", +] + +[[package]] +name = "widestring" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311" + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" +dependencies = [ + "windows-core 0.58.0", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-core" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-result", + "windows-strings", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-implement" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.91", +] + +[[package]] +name = "windows-interface" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.91", +] + +[[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]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "winreg" +version = "0.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "wit-bindgen-rt" +version = "0.39.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" +dependencies = [ + "bitflags 2.9.0", +] + +[[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 = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + +[[package]] +name = "yansi-term" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe5c30ade05e61656247b2e334a031dfd0cc466fadef865bdcdea8d537951bf1" +dependencies = [ + "winapi", +] + +[[package]] +name = "yarte" +version = "0.15.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfce1df93f3b16e5272221a559e60bbbaaa71dbc042a43996d223e51a690aab2" +dependencies = [ + "yarte_derive", + "yarte_helpers", +] + +[[package]] +name = "yarte_codegen" +version = "0.15.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a79312078b97a195de91a8c1457c2e0d7abd97e6e605f3cdeb01b3c105d2cff" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", + "yarte_helpers", + "yarte_hir", +] + +[[package]] +name = "yarte_derive" +version = "0.15.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b296edd7e1a81717b6f794baa2de8dfe89646050847161550b2d963b3ca6fe80" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", + "yarte_codegen", + "yarte_helpers", + "yarte_hir", + "yarte_parser", +] + +[[package]] +name = "yarte_helpers" +version = "0.15.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0d1076f8cee9541ea5ffbecd9102f751252c91f085e7d30a18a3ce805ebd3ee" +dependencies = [ + "dtoa", + "itoa", + "prettyplease", + "serde", + "syn 1.0.109", + "toml", + "v_htmlescape", +] + +[[package]] +name = "yarte_hir" +version = "0.15.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dee42d2f704a3b1d8bc111d47a705d1302a0943d85e4c230f4e8300ee0dde4a6" +dependencies = [ + "derive_more", + "proc-macro2", + "quote", + "syn 1.0.109", + "v_eval", + "v_htmlescape", + "yarte_helpers", + "yarte_parser", +] + +[[package]] +name = "yarte_parser" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "538f72049cf7104e12d5c444048d112cb8fc788a31308afd912442a381ba860c" +dependencies = [ + "annotate-snippets", + "derive_more", + "proc-macro2", + "quote", + "serde", + "syn 1.0.109", + "unicode-xid", + "yarte_helpers", +] + +[[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 2.0.91", + "synstructure", +] + +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "byteorder", + "zerocopy-derive 0.7.35", +] + +[[package]] +name = "zerocopy" +version = "0.8.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2586fea28e186957ef732a5f8b3be2da217d65c5969d4b1e17f973ebbe876879" +dependencies = [ + "zerocopy-derive 0.8.24", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.91", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a996a8f63c5c4448cd959ac1bab0aaa3306ccfd060472f85943ee0750f0169be" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.91", +] + +[[package]] +name = "zerofrom" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.91", + "synstructure", +] + +[[package]] +name = "zeroize" +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 = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.91", +] + +[[package]] +name = "zstd" +version = "0.11.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" +dependencies = [ + "zstd-safe 5.0.2+zstd.1.5.2", +] + +[[package]] +name = "zstd" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e91ee311a569c327171651566e07972200e76fcfe2242a4fa446149a3881c08a" +dependencies = [ + "zstd-safe 7.2.1", +] + +[[package]] +name = "zstd-safe" +version = "5.0.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" +dependencies = [ + "libc", + "zstd-sys", +] + +[[package]] +name = "zstd-safe" +version = "7.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54a3ab4db68cea366acc5c897c7b4d4d1b8994a9cd6e6f841f8964566a419059" +dependencies = [ + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.13+zstd.1.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" +dependencies = [ + "cc", + "pkg-config", +] diff --git a/frameworks/Rust/rama/Cargo.toml b/frameworks/Rust/rama/Cargo.toml new file mode 100644 index 00000000000..342eb6ac85a --- /dev/null +++ b/frameworks/Rust/rama/Cargo.toml @@ -0,0 +1,76 @@ +[package] +name = "rama-techempower" +version = "0.2.0" +authors = ["Glen Henri J. De Cauwsemaecker "] +edition = "2024" + +[[bin]] +name = "rama" +path = "src/main.rs" + +[[bin]] +name = "rama-sqlx" +path = "src/main_sqlx.rs" + +[[bin]] +name = "rama-pg-pool" +path = "src/main_pg_pool.rs" + +[[bin]] +name = "rama-mongo" +path = "src/main_mongo.rs" + +[[bin]] +name = "rama-mongo-raw" +path = "src/main_mongo_raw.rs" + +[[bin]] +name = "rama-pg" +path = "src/main_pg.rs" + +[features] +default = [] +simd-json = ["dep:simd-json", "dep:mime", "dep:serde_path_to_error"] + +[dependencies] +rama = { version = "0.2.0-alpha.11", default-features = false, features = [ + "http-full", +] } +deadpool = { version = "0.12", features = ["rt_tokio_1", "serde", "managed"] } +deadpool-postgres = { version = "0.14", features = ["rt_tokio_1", "serde"] } +dotenv = "0.15" +futures = "0.3" +futures-util = "0.3" +mongodb = { version = "3.2", features = [ + "zstd-compression", + "snappy-compression", + "zlib-compression", +] } +num_cpus = "1.16" +rand = { version = "0.9", features = ["small_rng"] } +serde = { version = "1", features = ["derive"] } +serde_json = "1" +sqlx = { version = "0.8", features = [ + "postgres", + "macros", + "runtime-tokio", + "tls-rustls", +] } +tokio = { version = "1.44", features = ["full"] } +tokio-pg-mapper = { version = "0.2" } +tokio-pg-mapper-derive = { version = "0.2" } +tokio-postgres = { version = "0.7" } +yarte = "0.15" +simd-json = { version = "0.15", optional = true } +mime = { version = "0.3", optional = true } +bytes = { version = "1.10" } +serde_path_to_error = { version = "0.1", optional = true } +quick_cache = "0.6" +mimalloc = "0.1" + + +[profile.release] +lto = "fat" +codegen-units = 1 +strip = true +opt-level = 3 diff --git a/frameworks/Rust/rama/README.md b/frameworks/Rust/rama/README.md new file mode 100755 index 00000000000..a3a50725739 --- /dev/null +++ b/frameworks/Rust/rama/README.md @@ -0,0 +1,43 @@ +# [Rama](https://github.com/plabayo/rama) + +## Description + +Rama (ラマ) is a modular service framework for the Rust language +to move and transform your network packets. + +- [User Guide](https://ramaproxy.org/book/preface.html) +- [API Documentation](https://docs.rs/rama/latest/rama/) +- [Cargo Package (`rama`)](https://crates.io/crates/rama) + +## Variants + +- PostgreSQL using `SQLx`, `tokio_postgres`, and `deadpool`. +- MongoDB with `mongodb`. + +## Test URLs + +- Plaintext: http://localhost:8000/plaintext +- JSON Encoding: http://localhost:8000/json +- Single Row Query: http://localhost:8000/db +- Multi Row Query: http://localhost:8000/queries?q=20 +- Fortunes: http://localhost:8000/fortunes +- Update Query: http://localhost:8000/updates?q=20 +- Cached Query: http://localhost:8000/cached-queries?q=20 + +## Notable Points (both performance and build) + +- Use of `async`. +- Use of the most recent versions of Rust, `rama` and dependencies. +- (Disabled by default) Compile-time swap-in of `simd-json` instead of `serde_json` for faster JSON serialization. +- Release binaries are stripped and compiled with CPU native. +- Sockets configured with `TCP_NODELAY` and to support an increased number of pending connections. +- For very simple benchmarks, use of a separate, single-threaded Tokio runtime for each thread. +- Server configured to serve HTTP/1 only, with no need for websockets. +- Separation of build and deployment containers using multi-stage builds. +- Deployment into Google's minimal `distroless-cc` container. +- Use of pipelined database queries (where supported). +- Streaming database queries (where supported). +- Use of PostgreSQL prepared statements cache (where supported). +- Use of PostgreSQL arrays to execute multi-row database updates with a single `UPDATE` query. + - This is permitted by the [test requirements](https://github.com/TechEmpower/FrameworkBenchmarks/wiki/Project-Information-Framework-Tests-Overview#database-updates), step (ix). +- Use of a fast PRNG diff --git a/frameworks/Rust/rama/benchmark_config.json b/frameworks/Rust/rama/benchmark_config.json new file mode 100755 index 00000000000..8b196c76997 --- /dev/null +++ b/frameworks/Rust/rama/benchmark_config.json @@ -0,0 +1,141 @@ +{ + "framework": "rama", + "tests": [ + { + "default": { + "dockerfile": "rama.dockerfile", + "docker_cmd": "/app/rama", + "json_url": "/json", + "plaintext_url": "/plaintext", + "port": 8000, + "approach": "Realistic", + "classification": "Platform", + "database": "none", + "framework": "Rama", + "language": "Rust", + "flavor": "None", + "orm": "Raw", + "platform": "Rust", + "webserver": "Rama", + "os": "Linux", + "database_os": "Linux", + "display_name": "Rama", + "notes": "", + "versus": "None" + }, + "sqlx": { + "dockerfile": "rama.dockerfile", + "docker_cmd": "/app/rama-sqlx", + "db_url": "/db", + "fortune_url": "/fortunes", + "cached_query_url": "/cached-queries?q=", + "port": 8000, + "approach": "Realistic", + "classification": "Fullstack", + "database": "postgres", + "framework": "Rama", + "language": "Rust", + "flavor": "None", + "orm": "Raw", + "platform": "Rust", + "webserver": "Rama", + "os": "Linux", + "database_os": "Linux", + "display_name": "Rama [Postgresql - sqlx]", + "notes": "", + "versus": "None" + }, + "pg": { + "dockerfile": "rama.dockerfile", + "docker_cmd": "/app/rama-pg", + "db_url": "/db", + "fortune_url": "/fortunes", + "query_url": "/queries?q=", + "update_url": "/updates?q=", + "port": 8000, + "approach": "Realistic", + "classification": "Fullstack", + "database": "postgres", + "framework": "Rama", + "language": "Rust", + "flavor": "None", + "orm": "Raw", + "platform": "Rust", + "webserver": "Rama", + "os": "Linux", + "database_os": "Linux", + "display_name": "Rama [Postgresql]", + "notes": "", + "versus": "None" + }, + "pg-pool": { + "dockerfile": "rama.dockerfile", + "docker_cmd": "/app/rama-pg-pool", + "db_url": "/db", + "query_url": "/queries?q=", + "update_url": "/updates?q=", + "fortune_url": "/fortunes", + "port": 8000, + "approach": "Realistic", + "classification": "Fullstack", + "database": "postgres", + "framework": "Rama", + "language": "Rust", + "flavor": "None", + "orm": "Raw", + "platform": "Rust", + "webserver": "Rama", + "os": "Linux", + "database_os": "Linux", + "display_name": "Rama [Postgresql - deadpool]", + "notes": "", + "versus": "None" + }, + "mongo": { + "dockerfile": "rama.dockerfile", + "docker_cmd": "/app/rama-mongo", + "db_url": "/db", + "query_url": "/queries?q=", + "fortune_url": "/fortunes", + "update_url": "/updates?q=", + "port": 8000, + "approach": "Realistic", + "classification": "Fullstack", + "database": "mongodb", + "framework": "Rama", + "language": "Rust", + "flavor": "None", + "orm": "Raw", + "platform": "Rust", + "webserver": "Rama", + "os": "Linux", + "database_os": "Linux", + "display_name": "Rama [Mongodb]", + "notes": "", + "versus": "None" + }, + "mongo-raw": { + "dockerfile": "rama.dockerfile", + "docker_cmd": "/app/rama-mongo-raw", + "db_url": "/db", + "query_url": "/queries?q=", + "update_url": "/updates?q=", + "port": 8000, + "approach": "Realistic", + "classification": "Fullstack", + "database": "mongodb", + "framework": "Rama", + "language": "Rust", + "flavor": "None", + "orm": "Raw", + "platform": "Rust", + "webserver": "Rama", + "os": "Linux", + "database_os": "Linux", + "display_name": "Rama [Mongodb raw]", + "notes": "", + "versus": "None" + } + } + ] +} diff --git a/frameworks/Rust/rama/config.toml b/frameworks/Rust/rama/config.toml new file mode 100644 index 00000000000..8216c65bea2 --- /dev/null +++ b/frameworks/Rust/rama/config.toml @@ -0,0 +1,20 @@ +[framework] +name = "rama" + +[main] +urls.plaintext = "/plaintext" +urls.json = "/json" +urls.db = "/db" +urls.query = "/queries?q=" +urls.update = "/updates?q=" +urls.fortune = "/fortunes" +urls.cached_query = "/cached-queries?q=" +approach = "Realistic" +classification = "Fullstack" +database = "Postgres" +database_os = "Linux" +os = "Linux" +orm = "Raw" +platform = "Rust" +webserver = "Rama" +versus = "None" diff --git a/frameworks/Rust/rama/rama.dockerfile b/frameworks/Rust/rama/rama.dockerfile new file mode 100644 index 00000000000..c61848fb9fb --- /dev/null +++ b/frameworks/Rust/rama/rama.dockerfile @@ -0,0 +1,24 @@ +FROM docker.io/rust:1.86-slim-bookworm AS builder + +RUN apt-get update && apt-get install -y --no-install-recommends \ + pkg-config libssl-dev \ + && rm -rf /var/lib/apt/lists/* + +WORKDIR /build +COPY ./Cargo.toml ./Cargo.lock /build/ +RUN cargo fetch +COPY ./templates/ /build/templates +COPY ./src/ /build/src +ENV RUSTFLAGS "-C target-cpu=native" +RUN cargo build --release + +FROM gcr.io/distroless/cc-debian12 +ENV POSTGRES_URL=postgres://benchmarkdbuser:benchmarkdbpass@tfb-database/hello_world +ENV POSTGRES_MIN_POOL_SIZE=56 +ENV POSTGRES_MAX_POOL_SIZE=56 +ENV MONGODB_URL=mongodb://tfb-database:27017 +ENV MONGODB_MIN_POOL_SIZE=28 +ENV MONGODB_MAX_POOL_SIZE=28 +COPY --from=builder /build/target/release/rama* /app/ +EXPOSE 8000 +CMD ["/app/rama"] diff --git a/frameworks/Rust/rama/run.sh b/frameworks/Rust/rama/run.sh new file mode 100644 index 00000000000..9d90dcd73be --- /dev/null +++ b/frameworks/Rust/rama/run.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +./target/release/rama-techempower diff --git a/frameworks/Rust/rama/rustfmt.toml b/frameworks/Rust/rama/rustfmt.toml new file mode 100644 index 00000000000..94bd11d51d7 --- /dev/null +++ b/frameworks/Rust/rama/rustfmt.toml @@ -0,0 +1,2 @@ +max_width = 89 +reorder_imports = true diff --git a/frameworks/Rust/rama/src/common/mod.rs b/frameworks/Rust/rama/src/common/mod.rs new file mode 100644 index 00000000000..f3488fbab9b --- /dev/null +++ b/frameworks/Rust/rama/src/common/mod.rs @@ -0,0 +1,49 @@ +use std::{env, str::FromStr}; + +use core::fmt::Debug; +use rand::{distr::Uniform, rngs::SmallRng, Rng, RngCore}; +pub mod models; +pub mod utils; + +#[cfg(feature = "simd-json")] +pub mod simd_json; + +#[allow(dead_code)] +pub const SELECT_ALL_FORTUNES: &str = "SELECT * FROM fortune"; +#[allow(dead_code)] +pub const SELECT_WORLD_BY_ID: &str = + "SELECT id, randomnumber FROM world WHERE id = $1 LIMIT 1"; +#[allow(dead_code)] +pub const SELECT_ALL_CACHED_WORLDS: &str = + "SELECT id, randomnumber FROM world ORDER BY id"; +#[allow(dead_code)] +pub const UPDATE_WORLDS: &str = r#"UPDATE world SET randomnumber = new.rnum FROM + (SELECT * FROM UNNEST($1::int[], $2::int[]) AS v(id, rnum) ORDER BY 1) AS new +WHERE world.id = new.id"#; + +/// Return the value of an environment variable. +#[allow(dead_code)] +pub fn get_env(key: &str) -> T +where + ::Err: Debug, +{ + env::var(key) + .unwrap_or_else(|_| panic!("{key} environment variable was not set")) + .parse::() + .unwrap_or_else(|_| panic!("could not parse {key}")) +} + +/// Generate a single integer in the range 1 to 10,000 (inclusive) +#[allow(dead_code)] +#[inline(always)] +pub fn random_id(rng: &mut impl RngCore) -> i32 { + rng.random_range(1..=10_000) +} + +/// Generate an iterator of integers in the range 1 to 10,000 (inclusive) +#[allow(dead_code)] +#[inline(always)] +pub fn random_ids(rng: &mut SmallRng, count: usize) -> impl Iterator + use<'_> { + rng.sample_iter(Uniform::new_inclusive(1, 10_000).unwrap()) + .take(count) +} \ No newline at end of file diff --git a/frameworks/Rust/rama/src/common/models.rs b/frameworks/Rust/rama/src/common/models.rs new file mode 100644 index 00000000000..1644447c3cd --- /dev/null +++ b/frameworks/Rust/rama/src/common/models.rs @@ -0,0 +1,25 @@ +use serde::{Deserialize, Serialize}; + +#[derive(Serialize)] +pub struct Message { + pub message: &'static str, +} + +#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] +pub struct Fortune { + pub id: i32, + pub message: String, +} + +#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] +pub struct FortuneInfo { + pub id: i32, + pub message: String, +} + +#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] +pub struct World { + pub id: i32, + #[serde(rename = "randomNumber")] + pub random_number: i32, +} diff --git a/frameworks/Rust/rama/src/common/simd_json.rs b/frameworks/Rust/rama/src/common/simd_json.rs new file mode 100644 index 00000000000..1edc869aa1e --- /dev/null +++ b/frameworks/Rust/rama/src/common/simd_json.rs @@ -0,0 +1,150 @@ +#![allow(dead_code)] + +use bytes::{BufMut, BytesMut}; +use rama::http::{ + HeaderMap, HeaderValue, IntoResponse, Request, Response, StatusCode, header, + service::web::extract::{ + Bytes, FromRequest, + body::{BytesRejection, InvalidJsonContentType, JsonRejection}, + }, +}; +use serde::{Serialize, de::DeserializeOwned}; +use simd_json; + +#[derive(Debug, Clone, Copy, Default)] +pub struct Json(pub T); + +pub enum SimdJsonRejection { + Json(JsonRejection), + Bytes(BytesRejection), + Simd(String), +} + +impl IntoResponse for SimdJsonRejection { + fn into_response(self) -> Response { + todo!() + } +} + +impl From for SimdJsonRejection { + fn from(err: JsonRejection) -> Self { + SimdJsonRejection::Json(err) + } +} + +impl From for SimdJsonRejection { + fn from(err: BytesRejection) -> Self { + SimdJsonRejection::Bytes(err) + } +} + +impl From for SimdJsonRejection { + fn from(err: simd_json::Error) -> Self { + SimdJsonRejection::Simd(err.to_string()) + } +} + +impl FromRequest for Json +where + T: DeserializeOwned + Send + Sync + 'static, +{ + type Rejection = SimdJsonRejection; + + async fn from_request(req: Request) -> Result { + if json_content_type(req.headers()) { + let bytes = Bytes::from_request(req).await?; + Self::from_bytes(&bytes) + } else { + Err(SimdJsonRejection::Json( + InvalidJsonContentType::default().into(), + )) + } + } +} + +fn json_content_type(headers: &HeaderMap) -> bool { + let content_type = if let Some(content_type) = headers.get(header::CONTENT_TYPE) { + content_type + } else { + return false; + }; + + let content_type = if let Ok(content_type) = content_type.to_str() { + content_type + } else { + return false; + }; + + let mime = if let Ok(mime) = content_type.parse::() { + mime + } else { + return false; + }; + + let is_json_content_type = mime.type_() == "application" + && (mime.subtype() == "json" + || mime.suffix().map_or(false, |name| name == "json")); + + is_json_content_type +} + +rama::utils::macros::impl_deref!(Json); + +impl From for Json { + fn from(inner: T) -> Self { + Self(inner) + } +} + +impl Json +where + T: DeserializeOwned, +{ + /// Construct a `Json` from a byte slice. Most users should prefer to use the `FromRequest` impl + /// but special cases may require first extracting a `Request` into `Bytes` then optionally + /// constructing a `Json`. + pub fn from_bytes(bytes: &[u8]) -> Result { + let body = &mut bytes.to_owned(); + let deserializer = simd_json::from_slice::(body); + + let value = match deserializer { + Ok(v) => v, + Err(err) => { + let rejection = { SimdJsonRejection::from(err) }; + return Err(rejection); + } + }; + + Ok(Json(value)) + } +} + +impl IntoResponse for Json +where + T: Serialize, +{ + fn into_response(self) -> Response { + // Use a small initial capacity of 128 bytes like serde_json::to_vec + // https://docs.rs/serde_json/1.0.82/src/serde_json/ser.rs.html#2189 + let mut buf = BytesMut::with_capacity(128).writer(); + match simd_json::to_writer(&mut buf, &self.0) { + Ok(()) => ( + [( + header::CONTENT_TYPE, + HeaderValue::from_static(mime::APPLICATION_JSON.as_ref()), + )], + buf.into_inner().freeze(), + ) + .into_response(), + Err(err) => ( + StatusCode::INTERNAL_SERVER_ERROR, + [( + header::CONTENT_TYPE, + HeaderValue::from_static(mime::TEXT_PLAIN_UTF_8.as_ref()), + )], + err.to_string(), + ) + .into_response(), + } + } +} diff --git a/frameworks/Rust/rama/src/common/utils.rs b/frameworks/Rust/rama/src/common/utils.rs new file mode 100644 index 00000000000..17c333d210b --- /dev/null +++ b/frameworks/Rust/rama/src/common/utils.rs @@ -0,0 +1,51 @@ +use bytes::Bytes; +use rama::http::{HeaderValue, IntoResponse, Response, StatusCode, header}; +use serde::Deserialize; + +#[derive(Debug, Deserialize)] +pub struct Params { + q: Option, +} + +#[allow(dead_code)] +#[inline(always)] +pub fn parse_params(params: Params) -> usize { + params + .q + .and_then(|q| q.parse().ok()) + .unwrap_or(1) + .clamp(1, 500) +} + +/// Utility function for mapping any error into a `500 Internal Server Error` +/// response. +#[allow(dead_code)] +pub fn internal_error(err: E) -> (StatusCode, String) +where + E: std::error::Error, +{ + (StatusCode::INTERNAL_SERVER_ERROR, err.to_string()) +} + +#[derive(Clone, Copy, Debug)] +pub struct Utf8Html(pub T); + +impl IntoResponse for Utf8Html +where + T: Into, +{ + fn into_response(self) -> Response { + let mut res = (StatusCode::OK, self.0.into()).into_response(); + res.headers_mut().insert( + header::CONTENT_TYPE, + HeaderValue::from_static("text/html; charset=utf-8"), + ); + res + } +} + +impl From for Utf8Html { + fn from(inner: T) -> Self { + Self(inner) + } +} diff --git a/frameworks/Rust/rama/src/main.rs b/frameworks/Rust/rama/src/main.rs new file mode 100644 index 00000000000..7114b892a93 --- /dev/null +++ b/frameworks/Rust/rama/src/main.rs @@ -0,0 +1,44 @@ +mod common; +mod server; + +use common::models::Message; +use dotenv::dotenv; +use mimalloc::MiMalloc; + +#[global_allocator] +static GLOBAL: MiMalloc = MiMalloc; + +#[cfg(feature = "simd-json")] +use common::simd_json::Json; +#[cfg(not(feature = "simd-json"))] +use rama::http::response::Json; +use rama::http::{IntoResponse, StatusCode, service::web::Router}; + +/// Return a plaintext static string. +#[inline(always)] +pub async fn plaintext() -> &'static str { + "Hello, World!" +} + +/// Return a JSON message. +#[inline(always)] +pub async fn json() -> impl IntoResponse { + let message = Message { + message: "Hello, World!", + }; + + (StatusCode::OK, Json(message)) +} + +fn main() { + dotenv().ok(); + server::start_tokio(serve_app) +} + +async fn serve_app() { + let app = Router::new() + .get("/plaintext", plaintext) + .get("/json", json); + + server::serve((), app, Some(8000)).await; +} diff --git a/frameworks/Rust/rama/src/main_mongo.rs b/frameworks/Rust/rama/src/main_mongo.rs new file mode 100644 index 00000000000..3323c68a64c --- /dev/null +++ b/frameworks/Rust/rama/src/main_mongo.rs @@ -0,0 +1,151 @@ +mod common; +mod mongo; +mod server; + +use std::time::Duration; + +#[cfg(feature = "simd-json")] +use common::simd_json::Json; +use common::{ + models::{FortuneInfo, World}, + random_id, +}; +use dotenv::dotenv; +use mimalloc::MiMalloc; +use mongodb::{ + Client, + options::{ClientOptions, Compressor}, +}; +#[cfg(not(feature = "simd-json"))] +use rama::http::response::Json; +use rama::http::{ + IntoResponse, StatusCode, + service::web::{Router, extract::Query}, +}; +use rand::{SeedableRng, rng, rngs::SmallRng}; +use yarte::Template; + +#[global_allocator] +static GLOBAL: MiMalloc = MiMalloc; + +use common::{ + get_env, + utils::{Params, Utf8Html, parse_params}, +}; +use mongo::database::{ + DatabaseConnection, fetch_fortunes, find_world_by_id, find_worlds, update_worlds, +}; + +#[derive(Template)] +#[template(path = "fortunes.html.hbs")] +pub struct FortunesTemplate<'a> { + pub fortunes: &'a Vec, +} + +async fn db(DatabaseConnection(db): DatabaseConnection) -> impl IntoResponse { + let random_id = random_id(&mut rng()); + + let world = find_world_by_id(db, random_id) + .await + .expect("world could not be found"); + + (StatusCode::OK, Json(world)) +} + +async fn queries( + DatabaseConnection(db): DatabaseConnection, + Query(params): Query, +) -> impl IntoResponse { + let q = parse_params(params); + + let mut rng = SmallRng::from_rng(&mut rng()); + let worlds = find_worlds(db, &mut rng, q).await; + let results = worlds.expect("worlds could not be retrieved"); + + (StatusCode::OK, Json(results)) +} + +async fn updates( + DatabaseConnection(db): DatabaseConnection, + Query(params): Query, +) -> impl IntoResponse { + let q = parse_params(params); + + let mut rng = SmallRng::from_rng(&mut rng()); + + let worlds = find_worlds(db.clone(), &mut rng, q) + .await + .expect("worlds could not be retrieved"); + let mut updated_worlds: Vec = Vec::with_capacity(q); + + for mut world in worlds { + world.random_number = random_id(&mut rng); + updated_worlds.push(world); + } + + update_worlds(db.clone(), updated_worlds.clone()) + .await + .expect("could not update worlds"); + + (StatusCode::OK, Json(updated_worlds.clone())) +} + +async fn fortunes(DatabaseConnection(db): DatabaseConnection) -> impl IntoResponse { + let fortunes = fetch_fortunes(db).await.expect("could not fetch fortunes"); + + let fortune_infos: Vec = fortunes + .iter() + .map(|f| FortuneInfo { + id: f.id, + message: f.message.clone(), + }) + .collect(); + + Utf8Html( + FortunesTemplate { + fortunes: &fortune_infos, + } + .call() + .expect("error rendering template"), + ) +} + +fn main() { + dotenv().ok(); + server::start_tokio(serve_app) +} + +async fn serve_app() { + let database_url: String = get_env("MONGODB_URL"); + let max_pool_size: u32 = get_env("MONGODB_MAX_POOL_SIZE"); + let min_pool_size: u32 = get_env("MONGODB_MIN_POOL_SIZE"); + + let mut client_options = ClientOptions::parse(database_url).await.unwrap(); + + // setup connection pool + client_options.max_pool_size = Some(max_pool_size); + client_options.min_pool_size = Some(min_pool_size); + client_options.connect_timeout = Some(Duration::from_millis(200)); + + // the server will select the algorithm it supports from the list provided by the driver + client_options.compressors = Some(vec![ + Compressor::Snappy, + Compressor::Zlib { + level: Default::default(), + }, + Compressor::Zstd { + level: Default::default(), + }, + ]); + + let client = Client::with_options(client_options).unwrap(); + let database = client.database("hello_world"); + + let app = Router::new() + .get("/fortunes", fortunes) + .get("/db", db) + .get("/queries", queries) + .get("/updates", updates); + + server::serve(database, app, Some(8000)).await; +} diff --git a/frameworks/Rust/rama/src/main_mongo_raw.rs b/frameworks/Rust/rama/src/main_mongo_raw.rs new file mode 100644 index 00000000000..da7fa5f99d3 --- /dev/null +++ b/frameworks/Rust/rama/src/main_mongo_raw.rs @@ -0,0 +1,122 @@ +mod common; +mod mongo_raw; +mod server; + +use common::{models::World, random_id}; +use mongo_raw::database::{ + DatabaseConnection, find_world_by_id, find_worlds, update_worlds, +}; + +use common::{ + get_env, + utils::{Params, parse_params}, +}; +use rama::http::{ + IntoResponse, StatusCode, + service::web::{Router, extract::Query}, +}; +use std::time::Duration; + +use mimalloc::MiMalloc; + +#[global_allocator] +static GLOBAL: MiMalloc = MiMalloc; + +#[cfg(feature = "simd-json")] +use common::simd_json::Json; +#[cfg(not(feature = "simd-json"))] +use rama::http::response::Json; + +use dotenv::dotenv; +use mongodb::{ + Client, + options::{ClientOptions, Compressor}, +}; +use rand::{SeedableRng, rng, rngs::SmallRng}; + +async fn db(DatabaseConnection(db): DatabaseConnection) -> impl IntoResponse { + let random_id = random_id(&mut rng()); + + let world = find_world_by_id(db, random_id) + .await + .expect("world could not be found"); + + (StatusCode::OK, Json(world)) +} + +async fn queries( + DatabaseConnection(db): DatabaseConnection, + Query(params): Query, +) -> impl IntoResponse { + let q = parse_params(params); + + let mut rng = SmallRng::from_rng(&mut rng()); + let worlds = find_worlds(db, &mut rng, q).await; + let results = worlds.expect("worlds could not be retrieved"); + + (StatusCode::OK, Json(results)) +} + +async fn updates( + DatabaseConnection(db): DatabaseConnection, + Query(params): Query, +) -> impl IntoResponse { + let q = parse_params(params); + + let mut rng = SmallRng::from_rng(&mut rng()); + + let worlds = find_worlds(db.clone(), &mut rng, q) + .await + .expect("worlds could not be retrieved"); + let mut updated_worlds: Vec = Vec::with_capacity(q); + + for mut world in worlds { + world.random_number = random_id(&mut rng); + updated_worlds.push(world); + } + + update_worlds(db.clone(), updated_worlds.clone()) + .await + .expect("could not update worlds"); + + (StatusCode::OK, Json(updated_worlds.clone())) +} + +fn main() { + dotenv().ok(); + server::start_tokio(serve_app) +} + +async fn serve_app() { + let database_url: String = get_env("MONGODB_URL"); + let max_pool_size: u32 = get_env("MONGODB_MAX_POOL_SIZE"); + let min_pool_size: u32 = get_env("MONGODB_MIN_POOL_SIZE"); + + let mut client_options = ClientOptions::parse(database_url).await.unwrap(); + + // setup connection pool + client_options.max_pool_size = Some(max_pool_size); + client_options.min_pool_size = Some(min_pool_size); + client_options.connect_timeout = Some(Duration::from_millis(200)); + + // the server will select the algorithm it supports from the list provided by the driver + client_options.compressors = Some(vec![ + Compressor::Snappy, + Compressor::Zlib { + level: Default::default(), + }, + Compressor::Zstd { + level: Default::default(), + }, + ]); + + let client = Client::with_options(client_options).unwrap(); + let database = client.database("hello_world"); + + let app = Router::new() + .get("/db", db) + .get("/queries", queries) + .get("/updates", updates); + + server::serve(database, app, Some(8000)).await; +} diff --git a/frameworks/Rust/rama/src/main_pg.rs b/frameworks/Rust/rama/src/main_pg.rs new file mode 100644 index 00000000000..79c7ecdf9bc --- /dev/null +++ b/frameworks/Rust/rama/src/main_pg.rs @@ -0,0 +1,103 @@ +mod common; +mod pg; + +use dotenv::dotenv; +use mimalloc::MiMalloc; +use rama::http::{ + IntoResponse, StatusCode, + service::web::{Router, extract::Query}, +}; +use rand::rng; +use yarte::Template; + +#[global_allocator] +static GLOBAL: MiMalloc = MiMalloc; + +#[cfg(feature = "simd-json")] +use common::simd_json::Json; +#[cfg(not(feature = "simd-json"))] +use rama::http::response::Json; + +mod server; + +use common::{ + get_env, random_id, + utils::{Params, Utf8Html, parse_params}, +}; +use pg::database::{DatabaseConnection, PgConnection}; +use pg::models::Fortune; + +#[derive(Template)] +#[template(path = "fortunes.html.hbs")] +pub struct FortunesTemplate<'a> { + pub fortunes: &'a Vec, +} + +async fn db(DatabaseConnection(conn): DatabaseConnection) -> impl IntoResponse { + let id = random_id(&mut rng()); + let world = conn + .fetch_world_by_id(id) + .await + .expect("error loading world"); + + (StatusCode::OK, Json(world)) +} + +async fn queries( + DatabaseConnection(conn): DatabaseConnection, + Query(params): Query, +) -> impl IntoResponse { + let q = parse_params(params); + + let results = conn + .fetch_random_worlds(q) + .await + .expect("error loading worlds"); + + (StatusCode::OK, Json(results)) +} + +async fn fortunes(DatabaseConnection(conn): DatabaseConnection) -> impl IntoResponse { + let fortunes: Vec = conn + .fetch_all_fortunes() + .await + .expect("error loading fortunes"); + + Utf8Html( + FortunesTemplate { + fortunes: &fortunes, + } + .call() + .expect("error rendering template"), + ) +} + +async fn updates( + DatabaseConnection(conn): DatabaseConnection, + Query(params): Query, +) -> impl IntoResponse { + let q = parse_params(params); + let worlds = conn.update_worlds(q).await.expect("error updating worlds"); + + (StatusCode::OK, Json(worlds)) +} + +fn main() { + dotenv().ok(); + server::start_tokio(serve_app) +} + +async fn serve_app() { + let database_url: String = get_env("POSTGRES_URL"); + + // Create shared database connection + let pg_connection = PgConnection::connect(database_url).await; + + let app = Router::new() + .get("/fortunes", fortunes) + .get("/db", db) + .get("/queries", queries) + .get("/updates", updates); + + server::serve(pg_connection, app, Some(8000)).await; +} diff --git a/frameworks/Rust/rama/src/main_pg_pool.rs b/frameworks/Rust/rama/src/main_pg_pool.rs new file mode 100644 index 00000000000..907ca1cd792 --- /dev/null +++ b/frameworks/Rust/rama/src/main_pg_pool.rs @@ -0,0 +1,145 @@ +mod common; +mod pg_pool; + +#[cfg(feature = "simd-json")] +use common::simd_json::Json; +#[cfg(not(feature = "simd-json"))] +use rama::http::response::Json; + +use common::{SELECT_ALL_FORTUNES, SELECT_WORLD_BY_ID, UPDATE_WORLDS, random_ids}; +use dotenv::dotenv; +use futures_util::{TryStreamExt, stream::FuturesUnordered}; +use mimalloc::MiMalloc; +use rama::http::{ + IntoResponse, StatusCode, + service::web::{Router, extract::Query}, +}; +use rand::{SeedableRng, rng, rngs::SmallRng}; +use yarte::Template; + +#[global_allocator] +static GLOBAL: MiMalloc = MiMalloc; + +mod server; + +use common::{ + get_env, random_id, + utils::{Params, Utf8Html, parse_params}, +}; +use pg_pool::database::{ + DatabaseClient, PgError, create_pool, fetch_all_fortunes, fetch_world_by_id, +}; +use pg_pool::models::{Fortune, World}; + +#[derive(Template)] +#[template(path = "fortunes.html.hbs")] +pub struct FortunesTemplate<'a> { + pub fortunes: &'a Vec, +} + +async fn db(DatabaseClient(client): DatabaseClient) -> impl IntoResponse { + let random_id = random_id(&mut rng()); + + let select = &client.prepare_cached(SELECT_WORLD_BY_ID).await.unwrap(); + let world = fetch_world_by_id(&client, random_id, select) + .await + .expect("could not fetch world"); + + (StatusCode::OK, Json(world)) +} + +async fn queries( + DatabaseClient(client): DatabaseClient, + Query(params): Query, +) -> impl IntoResponse { + let q = parse_params(params); + + let mut rng = SmallRng::from_rng(&mut rng()); + let select = &client.prepare_cached(SELECT_WORLD_BY_ID).await.unwrap(); + let future_worlds = FuturesUnordered::new(); + + for id in random_ids(&mut rng, q) { + future_worlds.push(fetch_world_by_id(&client, id, select)); + } + + let worlds: Result, PgError> = future_worlds.try_collect().await; + let results = worlds.expect("worlds could not be retrieved"); + + (StatusCode::OK, Json(results)) +} + +async fn fortunes(DatabaseClient(client): DatabaseClient) -> impl IntoResponse { + let select = &client.prepare_cached(SELECT_ALL_FORTUNES).await.unwrap(); + + let mut fortunes = fetch_all_fortunes(client, select) + .await + .expect("could not fetch fortunes"); + + fortunes.push(Fortune { + id: 0, + message: "Additional fortune added at request time.".to_string(), + }); + + fortunes.sort_by(|a, b| a.message.cmp(&b.message)); + + Utf8Html( + FortunesTemplate { + fortunes: &fortunes, + } + .call() + .expect("error rendering template"), + ) +} + +async fn updates( + DatabaseClient(client): DatabaseClient, + Query(params): Query, +) -> impl IntoResponse { + let q = parse_params(params); + + let mut rng = SmallRng::from_rng(&mut rng()); + let select = &client.prepare_cached(SELECT_WORLD_BY_ID).await.unwrap(); + let update = &client.prepare_cached(UPDATE_WORLDS).await.unwrap(); + + // Select the random worlds. + let future_worlds = FuturesUnordered::new(); + for id in random_ids(&mut rng, q) { + future_worlds.push(fetch_world_by_id(&client, id, select)); + } + let worlds: Vec = future_worlds.try_collect().await.unwrap(); + + let mut ids = Vec::with_capacity(q); + let mut nids = Vec::with_capacity(q); + let worlds: Vec = worlds + .into_iter() + .map(|mut w| { + w.randomnumber = random_id(&mut rng); + ids.push(w.id); + nids.push(w.randomnumber); + w + }) + .collect(); + + // Update the random worlds in the database. + client.execute(update, &[&ids, &nids]).await.unwrap(); + + (StatusCode::OK, Json(worlds)) +} + +#[tokio::main] +async fn main() { + dotenv().ok(); + + let database_url: String = get_env("POSTGRES_URL"); + let max_pool_size: u32 = get_env("POSTGRES_MAX_POOL_SIZE"); + + let pool = create_pool(database_url, max_pool_size).await; + + let app = Router::new() + .get("/fortunes", fortunes) + .get("/db", db) + .get("/queries", queries) + .get("/updates", updates); + + server::serve(pool, app, Some(8000)).await; +} diff --git a/frameworks/Rust/rama/src/main_sqlx.rs b/frameworks/Rust/rama/src/main_sqlx.rs new file mode 100644 index 00000000000..a5365c34018 --- /dev/null +++ b/frameworks/Rust/rama/src/main_sqlx.rs @@ -0,0 +1,160 @@ +mod common; +mod sqlx; + +use std::sync::Arc; + +use ::sqlx::PgPool; +use dotenv::dotenv; +use mimalloc::MiMalloc; +use quick_cache::sync::Cache; +use rama::{ + Context, + http::{ + IntoResponse, StatusCode, + service::web::{Router, extract::Query}, + }, +}; +use rand::{SeedableRng, rng, rngs::SmallRng}; +use sqlx::models::World; +use yarte::Template; + +#[global_allocator] +static GLOBAL: MiMalloc = MiMalloc; + +#[cfg(not(feature = "simd-json"))] +use rama::http::response::Json; +#[cfg(feature = "simd-json")] +use rama::http::response::Json; + +mod server; + +use common::{ + get_env, random_id, random_ids, + utils::{Params, Utf8Html, parse_params}, +}; +use sqlx::database::create_pool; +use sqlx::models::Fortune; + +#[derive(Template)] +#[template(path = "fortunes.html.hbs")] +pub struct FortunesTemplate<'a> { + pub fortunes: &'a Vec, +} + +async fn db(ctx: Context) -> impl IntoResponse { + let db = ctx.state().db.clone(); + + let id = random_id(&mut rng()); + let world: World = ::sqlx::query_as(common::SELECT_WORLD_BY_ID) + .bind(id) + .fetch_one(&mut *db.acquire().await.unwrap()) + .await + .expect("error loading world"); + + (StatusCode::OK, Json(world)) +} + +async fn queries( + Query(params): Query, + ctx: Context, +) -> impl IntoResponse { + let db = ctx.state().db.clone(); + + let mut rng = SmallRng::from_rng(&mut rng()); + let count = parse_params(params); + let mut worlds: Vec = Vec::with_capacity(count); + + for id in random_ids(&mut rng, count) { + let world: World = ::sqlx::query_as(common::SELECT_WORLD_BY_ID) + .bind(id) + .fetch_one(&mut *db.acquire().await.unwrap()) + .await + .expect("error loading world"); + worlds.push(world); + } + + (StatusCode::OK, Json(worlds)) +} + +async fn fortunes(ctx: Context) -> impl IntoResponse { + let db = ctx.state().db.clone(); + + let mut fortunes: Vec = ::sqlx::query_as(common::SELECT_ALL_FORTUNES) + .fetch_all(&mut *db.acquire().await.unwrap()) + .await + .expect("error loading Fortunes"); + + fortunes.push(Fortune { + id: 0, + message: "Additional fortune added at request time.".to_string(), + }); + + fortunes.sort_by(|a, b| a.message.cmp(&b.message)); + + Utf8Html( + FortunesTemplate { + fortunes: &fortunes, + } + .call() + .expect("error rendering template"), + ) +} + +async fn cache( + Query(params): Query, + ctx: Context, +) -> impl IntoResponse { + let count = parse_params(params); + let mut rng = SmallRng::from_rng(&mut rng()); + let mut worlds: Vec> = Vec::with_capacity(count); + + for id in random_ids(&mut rng, count) { + worlds.push(ctx.state().cache.get(&id)); + } + + (StatusCode::OK, Json(worlds)) +} + +/// Pre-load the cache with all worlds. +async fn preload_cache(AppState { db, cache }: &AppState) { + let worlds: Vec = ::sqlx::query_as(common::SELECT_ALL_CACHED_WORLDS) + .fetch_all(&mut *db.acquire().await.unwrap()) + .await + .expect("error loading worlds"); + + for world in worlds { + cache.insert(world.id, world); + } +} + +/// Application state +#[derive(Clone)] +struct AppState { + db: PgPool, + cache: Arc>, +} + +#[tokio::main] +async fn main() { + dotenv().ok(); + + let database_url: String = get_env("POSTGRES_URL"); + let max_pool_size: u32 = get_env("POSTGRES_MAX_POOL_SIZE"); + let min_pool_size: u32 = get_env("POSTGRES_MIN_POOL_SIZE"); + + let state = AppState { + db: create_pool(database_url, max_pool_size, min_pool_size).await, + cache: Arc::new(Cache::new(10_000)), + }; + + // Prime the cache with CachedWorld objects + preload_cache(&state).await; + + let app = Router::new() + .get("/fortunes", fortunes) + .get("/db", db) + .get("/queries", queries) + .get("/cached-queries", cache); + + server::serve(state, app, Some(8000)).await; +} diff --git a/frameworks/Rust/rama/src/mongo/database.rs b/frameworks/Rust/rama/src/mongo/database.rs new file mode 100644 index 00000000000..f072046fa95 --- /dev/null +++ b/frameworks/Rust/rama/src/mongo/database.rs @@ -0,0 +1,116 @@ +use std::{convert::Infallible, io}; + +use futures_util::{StreamExt, TryStreamExt, stream::FuturesUnordered}; +use mongodb::{Database, bson::doc}; +use rama::{ + Context, + http::{dep::http::request, service::web::extract::FromRequestContextRefPair}, +}; +use rand::rngs::SmallRng; + +use crate::common::{ + models::{Fortune, World}, + random_ids, +}; + +pub struct DatabaseConnection(pub Database); + +impl FromRequestContextRefPair for DatabaseConnection { + type Rejection = Infallible; + + async fn from_request_context_ref_pair( + ctx: &Context, + _parts: &request::Parts, + ) -> Result { + Ok(Self(ctx.state_clone())) + } +} + +#[derive(Debug)] +#[allow(dead_code)] +pub enum MongoError { + Io(io::Error), + Mongo(mongodb::error::Error), +} + +impl From for MongoError { + fn from(err: io::Error) -> Self { + MongoError::Io(err) + } +} + +impl From for MongoError { + fn from(err: mongodb::error::Error) -> Self { + MongoError::Mongo(err) + } +} + +pub async fn find_world_by_id(db: Database, id: i32) -> Result { + let world_collection = db.collection::("world"); + + let filter = doc! { "_id": id as f32 }; + + let world: World = world_collection + .find_one(filter) + .await + .unwrap() + .expect("expected world, found none"); + Ok(world) +} + +pub async fn find_worlds( + db: Database, + rng: &mut SmallRng, + count: usize, +) -> Result, MongoError> { + let future_worlds = FuturesUnordered::new(); + + for id in random_ids(rng, count) { + future_worlds.push(find_world_by_id(db.clone(), id)); + } + + let worlds: Result, MongoError> = future_worlds.try_collect().await; + worlds +} + +pub async fn fetch_fortunes(db: Database) -> Result, MongoError> { + let fortune_collection = db.collection::("fortune"); + + let mut fortune_cursor = fortune_collection + .find(doc! {}) + .await + .expect("fortunes could not be loaded"); + + let mut fortunes: Vec = Vec::new(); + + while let Some(doc) = fortune_cursor.next().await { + fortunes.push(doc.expect("could not load fortune")); + } + + fortunes.push(Fortune { + id: 0, + message: "Additional fortune added at request time.".to_string(), + }); + + fortunes.sort_by(|a, b| a.message.cmp(&b.message)); + Ok(fortunes) +} + +pub async fn update_worlds( + db: Database, + worlds: Vec, +) -> Result { + let mut updates = Vec::new(); + + for world in worlds { + updates.push(doc! { + "q": { "id": world.id }, "u": { "$set": { "randomNumber": world.random_number }} + }); + } + + db.run_command(doc! {"update": "world", "updates": updates, "ordered": false}) + .await + .expect("could not update worlds"); + + Ok(true) +} diff --git a/frameworks/Rust/rama/src/mongo/mod.rs b/frameworks/Rust/rama/src/mongo/mod.rs new file mode 100644 index 00000000000..8fd0a6be869 --- /dev/null +++ b/frameworks/Rust/rama/src/mongo/mod.rs @@ -0,0 +1 @@ +pub mod database; diff --git a/frameworks/Rust/rama/src/mongo_raw/database.rs b/frameworks/Rust/rama/src/mongo_raw/database.rs new file mode 100644 index 00000000000..60625b063d4 --- /dev/null +++ b/frameworks/Rust/rama/src/mongo_raw/database.rs @@ -0,0 +1,107 @@ +use std::{convert::Infallible, io}; + +use futures_util::{TryStreamExt, stream::FuturesUnordered}; +use mongodb::{ + Database, + bson::{RawDocumentBuf, doc}, +}; +use rama::{ + Context, + http::{dep::http::request, service::web::extract::FromRequestContextRefPair}, +}; +use rand::rngs::SmallRng; + +use crate::common::{models::World, random_ids}; + +pub struct DatabaseConnection(pub Database); + +impl FromRequestContextRefPair for DatabaseConnection { + type Rejection = Infallible; + + async fn from_request_context_ref_pair( + ctx: &Context, + _parts: &request::Parts, + ) -> Result { + Ok(Self(ctx.state_clone())) + } +} + +#[derive(Debug)] +#[allow(dead_code)] +pub enum MongoError { + Io(io::Error), + Mongo(mongodb::error::Error), +} + +impl From for MongoError { + fn from(err: io::Error) -> Self { + MongoError::Io(err) + } +} + +impl From for MongoError { + fn from(err: mongodb::error::Error) -> Self { + MongoError::Mongo(err) + } +} + +pub async fn find_world_by_id(db: Database, id: i32) -> Result { + let world_collection = db.collection::("world"); + + let filter = doc! { "_id": id as f32 }; + + let raw: RawDocumentBuf = world_collection + .find_one(filter) + .await + .unwrap() + .expect("expected world, found none"); + + Ok(World { + id: raw + .get("id") + .expect("expected to parse world id") + .expect("could not get world id") + .as_i32() + .expect("could not extract world id"), + random_number: raw + .get("id") + .expect("expected to parse world id") + .expect("could not get world id") + .as_i32() + .expect("could not extract world id"), + }) +} + +pub async fn find_worlds( + db: Database, + rng: &mut SmallRng, + count: usize, +) -> Result, MongoError> { + let future_worlds = FuturesUnordered::new(); + + for id in random_ids(rng, count) { + future_worlds.push(find_world_by_id(db.clone(), id)); + } + + let worlds: Result, MongoError> = future_worlds.try_collect().await; + worlds +} + +pub async fn update_worlds( + db: Database, + worlds: Vec, +) -> Result { + let mut updates = Vec::new(); + + for world in worlds { + updates.push(doc! { + "q": { "id": world.id }, "u": { "$set": { "randomNumber": world.random_number }} + }); + } + + db.run_command(doc! {"update": "world", "updates": updates, "ordered": false}) + .await + .expect("could not update worlds"); + + Ok(true) +} diff --git a/frameworks/Rust/rama/src/mongo_raw/mod.rs b/frameworks/Rust/rama/src/mongo_raw/mod.rs new file mode 100644 index 00000000000..8fd0a6be869 --- /dev/null +++ b/frameworks/Rust/rama/src/mongo_raw/mod.rs @@ -0,0 +1 @@ +pub mod database; diff --git a/frameworks/Rust/rama/src/pg/database.rs b/frameworks/Rust/rama/src/pg/database.rs new file mode 100644 index 00000000000..ea4a90b257d --- /dev/null +++ b/frameworks/Rust/rama/src/pg/database.rs @@ -0,0 +1,154 @@ +use std::{convert::Infallible, io, sync::Arc}; + +use futures::{StreamExt, TryStreamExt, stream::futures_unordered::FuturesUnordered}; +use rama::{ + Context, + http::{dep::http::request, service::web::extract::FromRequestContextRefPair}, +}; +use rand::{SeedableRng, rng, rngs::SmallRng}; +use tokio::pin; +use tokio_postgres::{Client, NoTls, Statement, connect}; + +use crate::common::{self, random_id, random_ids}; + +use super::models::{Fortune, World}; + +#[derive(Debug)] +#[allow(dead_code)] +pub enum PgError { + Io(io::Error), + Pg(tokio_postgres::Error), +} + +impl From for PgError { + fn from(err: io::Error) -> Self { + PgError::Io(err) + } +} + +impl From for PgError { + fn from(err: tokio_postgres::Error) -> Self { + PgError::Pg(err) + } +} + +/// Postgres interface +pub struct PgConnection { + client: Client, + fortune: Statement, + world: Statement, + updates: Statement, +} + +impl PgConnection { + pub async fn connect(db_url: String) -> Arc { + let (cl, conn) = connect(&db_url, NoTls) + .await + .expect("cannot connect to postgresql."); + + // Spawn connection + tokio::spawn(async move { + if let Err(error) = conn.await { + eprintln!("database connection error: {error}"); + } + }); + + // Prepare statements for the connection. + let fortune = cl.prepare(common::SELECT_ALL_FORTUNES).await.unwrap(); + let world = cl.prepare(common::SELECT_WORLD_BY_ID).await.unwrap(); + let updates = cl.prepare(common::UPDATE_WORLDS).await.unwrap(); + + Arc::new(PgConnection { + client: cl, + fortune, + world, + updates, + }) + } +} + +impl PgConnection { + pub async fn fetch_world_by_id(&self, id: i32) -> Result { + self.client + .query_one(&self.world, &[&id]) + .await + .map(|row| { + Ok(World { + id: row.get(0), + randomnumber: row.get(1), + }) + })? + } + + pub async fn fetch_random_worlds(&self, num: usize) -> Result, PgError> { + let mut rng = SmallRng::from_rng(&mut rng()); + + let futures = FuturesUnordered::new(); + + for id in random_ids(&mut rng, num) { + futures.push(self.fetch_world_by_id(id)); + } + + futures.try_collect().await + } + + pub async fn update_worlds(&self, num: usize) -> Result, PgError> { + let mut worlds = self.fetch_random_worlds(num).await?; + + // Update the worlds with new random numbers + let mut rng = SmallRng::from_rng(&mut rng()); + let mut ids = Vec::with_capacity(num); + let mut nids = Vec::with_capacity(num); + + for w in &mut worlds { + w.randomnumber = random_id(&mut rng); + ids.push(w.id); + nids.push(w.randomnumber); + } + + // Update the random worlds in the database. + self.client + .execute(&self.updates, &[&ids, &nids]) + .await + .unwrap(); + + Ok(worlds) + } + + pub async fn fetch_all_fortunes(&self) -> Result, PgError> { + let mut fortunes = vec![Fortune { + id: 0, + message: "Additional fortune added at request time.".parse().unwrap(), + }]; + + let rows = self + .client + .query_raw::<_, _, &[i32; 0]>(&self.fortune, &[]) + .await?; + + pin!(rows); + + while let Some(row) = rows.next().await.transpose()? { + fortunes.push(Fortune { + id: row.get(0), + message: row.get(1), + }); + } + + fortunes.sort_by(|it, next| it.message.cmp(&next.message)); + Ok(fortunes) + } +} + +pub struct DatabaseConnection(pub Arc); + +impl FromRequestContextRefPair> for DatabaseConnection { + type Rejection = Infallible; + + async fn from_request_context_ref_pair( + ctx: &Context>, + _parts: &request::Parts, + ) -> Result { + Ok(Self(ctx.state_clone())) + } +} diff --git a/frameworks/Rust/rama/src/pg/mod.rs b/frameworks/Rust/rama/src/pg/mod.rs new file mode 100644 index 00000000000..c51e02d23d3 --- /dev/null +++ b/frameworks/Rust/rama/src/pg/mod.rs @@ -0,0 +1,2 @@ +pub mod database; +pub mod models; diff --git a/frameworks/Rust/rama/src/pg/models.rs b/frameworks/Rust/rama/src/pg/models.rs new file mode 100644 index 00000000000..0c0df6536f4 --- /dev/null +++ b/frameworks/Rust/rama/src/pg/models.rs @@ -0,0 +1,16 @@ +use serde::{Deserialize, Serialize}; + +#[allow(non_snake_case)] +#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] +pub struct Fortune { + pub id: i32, + pub message: String, +} + +#[allow(non_snake_case)] +#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] +pub struct World { + pub id: i32, + #[serde(rename = "randomNumber")] + pub randomnumber: i32, +} diff --git a/frameworks/Rust/rama/src/pg_pool/database.rs b/frameworks/Rust/rama/src/pg_pool/database.rs new file mode 100644 index 00000000000..df3af5a7eba --- /dev/null +++ b/frameworks/Rust/rama/src/pg_pool/database.rs @@ -0,0 +1,95 @@ +use std::io; + +use crate::{ + common::utils::internal_error, + pg_pool::models::{Fortune, World}, +}; +use deadpool_postgres::{Client, Manager, ManagerConfig, RecyclingMethod}; +use futures_util::StreamExt; +use rama::{ + Context, + http::{ + StatusCode, dep::http::request, service::web::extract::FromRequestContextRefPair, + }, +}; +use tokio::pin; +use tokio_pg_mapper::FromTokioPostgresRow; +use tokio_postgres::{NoTls, Row, Statement}; + +#[derive(Debug)] +#[allow(dead_code)] +pub enum PgError { + Io(io::Error), + Pg(tokio_postgres::Error), +} + +impl From for PgError { + fn from(err: io::Error) -> Self { + PgError::Io(err) + } +} + +impl From for PgError { + fn from(err: tokio_postgres::Error) -> Self { + PgError::Pg(err) + } +} + +pub async fn create_pool( + database_url: String, + max_pool_size: u32, +) -> deadpool_postgres::Pool { + let pg_config: tokio_postgres::Config = + database_url.parse().expect("invalid database url"); + + let mgr_config = ManagerConfig { + recycling_method: RecyclingMethod::Fast, + }; + let mgr = Manager::from_config(pg_config, NoTls, mgr_config); + let pool: deadpool_postgres::Pool = deadpool_postgres::Pool::builder(mgr) + .max_size(max_pool_size as usize) + .build() + .unwrap(); + + pool +} + +pub struct DatabaseClient(pub Client); + +impl FromRequestContextRefPair for DatabaseClient { + type Rejection = (StatusCode, String); + + async fn from_request_context_ref_pair( + ctx: &Context, + _parts: &request::Parts, + ) -> Result { + let conn = ctx.state().get().await.map_err(internal_error)?; + Ok(Self(conn)) + } +} + +pub async fn fetch_world_by_id( + client: &Client, + id: i32, + select: &Statement, +) -> Result { + let row: Row = client.query_one(select, &[&id]).await.unwrap(); + + Ok(World::from_row(row).unwrap()) +} + +pub async fn fetch_all_fortunes( + client: Client, + select: &Statement, +) -> Result, PgError> { + let mut fortunes: Vec = Vec::new(); + let rows = client.query_raw::<_, _, &[i32; 0]>(select, &[]).await?; + pin!(rows); + + while let Some(row) = rows.next().await.transpose()? { + fortunes + .push(Fortune::from_row(row).expect("could not convert row to fortune.")); + } + + Ok(fortunes) +} diff --git a/frameworks/Rust/rama/src/pg_pool/mod.rs b/frameworks/Rust/rama/src/pg_pool/mod.rs new file mode 100644 index 00000000000..c51e02d23d3 --- /dev/null +++ b/frameworks/Rust/rama/src/pg_pool/mod.rs @@ -0,0 +1,2 @@ +pub mod database; +pub mod models; diff --git a/frameworks/Rust/rama/src/pg_pool/models.rs b/frameworks/Rust/rama/src/pg_pool/models.rs new file mode 100644 index 00000000000..7dce3021eed --- /dev/null +++ b/frameworks/Rust/rama/src/pg_pool/models.rs @@ -0,0 +1,19 @@ +use serde::{Deserialize, Serialize}; +use tokio_pg_mapper_derive::PostgresMapper; + +#[allow(non_snake_case)] +#[derive(Clone, Debug, PartialEq, Deserialize, Serialize, PostgresMapper)] +#[pg_mapper(table = "Fortune")] +pub struct Fortune { + pub id: i32, + pub message: String, +} + +#[allow(non_snake_case)] +#[derive(Clone, Debug, PartialEq, Deserialize, Serialize, PostgresMapper)] +#[pg_mapper(table = "World")] +pub struct World { + pub id: i32, + #[serde(rename = "randomNumber")] + pub randomnumber: i32, +} diff --git a/frameworks/Rust/rama/src/server.rs b/frameworks/Rust/rama/src/server.rs new file mode 100644 index 00000000000..013656e6307 --- /dev/null +++ b/frameworks/Rust/rama/src/server.rs @@ -0,0 +1,77 @@ +use std::{ + future::Future, + io, + net::{Ipv4Addr, SocketAddr}, +}; + +use rama::{ + Layer, + http::{ + layer::required_header::AddRequiredResponseHeadersLayer, server::HttpServer, + service::web::Router, + }, + net::socket::{Domain, Socket, Type}, + rt::Executor, + tcp::server::TcpListener, +}; + +/// Reuse an existing listener, ensuring that the socket `backlog` +/// is set to enable a higher number of pending connections. +fn set_socket_options(addr: SocketAddr) -> io::Result> { + let socket = match addr { + SocketAddr::V4(_) => Socket::new(Domain::IPV4, Type::STREAM, None)?, + SocketAddr::V6(_) => Socket::new(Domain::IPV6, Type::STREAM, None)?, + }; + + socket.set_reuse_port(true)?; + socket.set_reuse_address(true)?; + socket.set_nonblocking(true)?; + socket.set_nodelay(true)?; + socket.bind(&addr.into())?; + socket.listen(4096)?; + + socket.try_into() +} + +/// Build a Rama server with consistent configuration, using the high-level API exposed +/// by rama 0.2. This is intended for convenience and intentionally does not provide much +/// customisability. +#[allow(dead_code)] +pub async fn serve( + state: State, + app: Router, + port: Option, +) { + let port = port.unwrap_or(8000); + let addr = SocketAddr::from((Ipv4Addr::UNSPECIFIED, port)); + let listener = set_socket_options(addr).expect("couldn't bind to address"); + println!("started rama server on port: {port}"); + + let app = AddRequiredResponseHeadersLayer::default().layer(app); + let http_service = HttpServer::auto(Executor::default()).service(app); + + listener.with_state(state).serve(http_service).await; +} + +/// Start a single-threaded tokio runtime on multiple threads. +#[allow(dead_code)] +pub fn start_tokio(f: fn() -> Fut) +where + Fut: Future + 'static, +{ + let rt = tokio::runtime::Builder::new_current_thread() + .enable_all() + .build() + .unwrap(); + + for _ in 1..num_cpus::get() { + std::thread::spawn(move || { + let rt = tokio::runtime::Builder::new_current_thread() + .enable_all() + .build() + .unwrap(); + rt.block_on(f()); + }); + } + rt.block_on(f()); +} diff --git a/frameworks/Rust/rama/src/sqlx/database.rs b/frameworks/Rust/rama/src/sqlx/database.rs new file mode 100644 index 00000000000..1d824144696 --- /dev/null +++ b/frameworks/Rust/rama/src/sqlx/database.rs @@ -0,0 +1,36 @@ +use std::io; + +use sqlx::{postgres::PgPoolOptions, PgPool}; + +#[derive(Debug)] +#[allow(dead_code)] +pub enum PgError { + Io(io::Error), + Pg(sqlx::Error), +} + +impl From for PgError { + fn from(err: io::Error) -> Self { + PgError::Io(err) + } +} + +impl From for PgError { + fn from(err: sqlx::Error) -> Self { + PgError::Pg(err) + } +} + +pub async fn create_pool( + database_url: String, + max_pool_size: u32, + min_pool_size: u32, +) -> PgPool { + PgPoolOptions::new() + .max_connections(max_pool_size) + .min_connections(min_pool_size) + .test_before_acquire(false) + .connect(&database_url) + .await + .unwrap() +} diff --git a/frameworks/Rust/rama/src/sqlx/mod.rs b/frameworks/Rust/rama/src/sqlx/mod.rs new file mode 100644 index 00000000000..c51e02d23d3 --- /dev/null +++ b/frameworks/Rust/rama/src/sqlx/mod.rs @@ -0,0 +1,2 @@ +pub mod database; +pub mod models; diff --git a/frameworks/Rust/rama/src/sqlx/models.rs b/frameworks/Rust/rama/src/sqlx/models.rs new file mode 100644 index 00000000000..270fe941b17 --- /dev/null +++ b/frameworks/Rust/rama/src/sqlx/models.rs @@ -0,0 +1,16 @@ +use serde::{Deserialize, Serialize}; +use sqlx::FromRow; + +#[derive(Clone, Debug, PartialEq, Deserialize, Serialize, FromRow)] +pub struct Fortune { + pub id: i32, + pub message: String, +} + +#[derive(Clone, Debug, PartialEq, Deserialize, Serialize, FromRow)] +pub struct World { + pub id: i32, + #[sqlx(rename = "randomnumber")] + #[serde(rename = "randomNumber")] + pub random_number: i32, +} diff --git a/frameworks/Rust/rama/templates/fortunes.html.hbs b/frameworks/Rust/rama/templates/fortunes.html.hbs new file mode 100644 index 00000000000..b9e25a52a8e --- /dev/null +++ b/frameworks/Rust/rama/templates/fortunes.html.hbs @@ -0,0 +1,5 @@ +Fortunes + {{~# each fortunes ~}} + + {{~/each ~}} +
idmessage
{{id}}{{message}}