From f3f24c85ea01d2ba4a3352113df658b810b15714 Mon Sep 17 00:00:00 2001 From: eternal-flame-AD Date: Sat, 16 Nov 2024 04:51:29 -0600 Subject: [PATCH] init Signed-off-by: eternal-flame-AD --- .gitignore | 1 + Cargo.lock | 2943 ++++++++++++++++++++++++++++++++++++++++ Cargo.toml | 31 + README.md | 61 + data/config.json | 42 + src/config.rs | 68 + src/git/mod.rs | 0 src/http/misskey.rs | 327 +++++ src/http/mod.rs | 115 ++ src/lib.rs | 196 +++ src/logic/analysis.rs | 77 ++ src/logic/discovery.rs | 38 + src/logic/mod.rs | 2 + src/main.rs | 20 + src/model.rs | 342 +++++ 15 files changed, 4263 insertions(+) create mode 100644 .gitignore create mode 100644 Cargo.lock create mode 100644 Cargo.toml create mode 100644 README.md create mode 100644 data/config.json create mode 100644 src/config.rs create mode 100644 src/git/mod.rs create mode 100644 src/http/misskey.rs create mode 100644 src/http/mod.rs create mode 100644 src/lib.rs create mode 100644 src/logic/analysis.rs create mode 100644 src/logic/discovery.rs create mode 100644 src/logic/mod.rs create mode 100644 src/main.rs create mode 100644 src/model.rs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/target diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..8643ddf --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,2943 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[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", + "const-random", + "getrandom", + "once_cell", + "version_check", + "zerocopy", +] + +[[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 = "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 = "anstream" +version = "0.6.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23a1e53f0f5d86382dafe1cf314783b2044280f406e7e1506368220ad11b1338" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8365de52b16c035ff4fcafe0092ba9390540e3e352870ac09933bebcaa2c8c56" + +[[package]] +name = "anstyle-parse" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" +dependencies = [ + "windows-sys 0.59.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125" +dependencies = [ + "anstyle", + "windows-sys 0.59.0", +] + +[[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", +] + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "bitflags" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" + +[[package]] +name = "brotli" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d640d25bc63c50fb1f0b545ffd80207d2e10a4c965530809b40ba3386825c391" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", + "brotli-decompressor", +] + +[[package]] +name = "brotli-decompressor" +version = "2.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e2e4afe60d7dd600fdd3de8d0f08c2b7ec039712e3b6137ff98b7004e82de4f" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", +] + +[[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.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" + +[[package]] +name = "castaway" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0abae9be0aaf9ea96a3b1b8b1b55c602ca751eba1b1500220cea4ecbafe7c0d5" +dependencies = [ + "rustversion", +] + +[[package]] +name = "cc" +version = "1.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f" +dependencies = [ + "shlex", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "chrono" +version = "0.4.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "js-sys", + "num-traits", + "serde", + "wasm-bindgen", + "windows-targets", +] + +[[package]] +name = "clap" +version = "4.5.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.5.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "clap_lex" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" + +[[package]] +name = "colorchoice" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" + +[[package]] +name = "compact_str" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f86b9c4c00838774a6d902ef931eff7470720c51d90c2e32cfe15dc304737b3f" +dependencies = [ + "castaway", + "cfg-if", + "itoa", + "ryu", + "static_assertions", +] + +[[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", + "once_cell", + "tiny-keccak", +] + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "crossbeam-deque" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[package]] +name = "dashmap" +version = "6.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" +dependencies = [ + "cfg-if", + "crossbeam-utils", + "hashbrown 0.14.5", + "lock_api", + "once_cell", + "parking_lot_core", +] + +[[package]] +name = "derive_more" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "either" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" + +[[package]] +name = "encoding_rs" +version = "0.8.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "env_filter" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f2c92ceda6ceec50f43169f9ee8424fe2db276791afde7b2cd8bc084cb376ab" +dependencies = [ + "log", + "regex", +] + +[[package]] +name = "env_logger" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d" +dependencies = [ + "anstream", + "anstyle", + "env_filter", + "humantime", + "log", +] + +[[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.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "fastrand" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[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 = "fraction" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59a78dd758a47a7305478e0e054f9fde4e983b9f9eccda162bf7ca03b79e9d40" +dependencies = [ + "lazy_static", + "num", +] + +[[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-io" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" + +[[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", +] + +[[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-timer" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" + +[[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 = "getrandom" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "gimli" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" + +[[package]] +name = "governor" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0746aa765db78b521451ef74221663b57ba595bf83f75d0ce23cc09447c8139f" +dependencies = [ + "cfg-if", + "dashmap", + "futures-sink", + "futures-timer", + "futures-util", + "no-std-compat", + "nonzero_ext", + "parking_lot", + "portable-atomic", + "quanta", + "rand", + "smallvec", + "spinning_top", +] + +[[package]] +name = "h2" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" + +[[package]] +name = "hashbrown" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" + +[[package]] +name = "http" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +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 = "httparse" +version = "1.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" + +[[package]] +name = "humantime" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" + +[[package]] +name = "hyper" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbbff0a806a4728c99295b254c8838933b5b082d75e3cb70c8dab21fdfbcfa9a" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" +dependencies = [ + "futures-util", + "http", + "hyper", + "hyper-util", + "rustls", + "rustls-pki-types", + "tokio", + "tokio-rustls", + "tower-service", +] + +[[package]] +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes", + "http-body-util", + "hyper", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "hyper", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", +] + +[[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", +] + +[[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 = "idna" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "include_dir" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "923d117408f1e49d914f1a379a309cffe4f18c05cf4e3d12e613a15fc81bd0dd" +dependencies = [ + "include_dir_macros", +] + +[[package]] +name = "include_dir_macros" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cab85a7ed0bd5f0e76d93846e0147172bed2e2d3f859bcc33a8d9699cad1a75" +dependencies = [ + "proc-macro2", + "quote", +] + +[[package]] +name = "indexmap" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" +dependencies = [ + "equivalent", + "hashbrown 0.15.0", +] + +[[package]] +name = "ipnet" +version = "2.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" + +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" + +[[package]] +name = "js-sys" +version = "0.3.72" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[package]] +name = "libc" +version = "0.2.161" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" + +[[package]] +name = "lingua" +version = "1.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d109aef84956f04b8b5866db17e59f964152411915ad27b6e291b262d63a442c" +dependencies = [ + "ahash", + "brotli", + "compact_str", + "fraction", + "include_dir", + "itertools", + "lingua-afrikaans-language-model", + "lingua-albanian-language-model", + "lingua-arabic-language-model", + "lingua-armenian-language-model", + "lingua-azerbaijani-language-model", + "lingua-basque-language-model", + "lingua-belarusian-language-model", + "lingua-bengali-language-model", + "lingua-bokmal-language-model", + "lingua-bosnian-language-model", + "lingua-bulgarian-language-model", + "lingua-catalan-language-model", + "lingua-chinese-language-model", + "lingua-croatian-language-model", + "lingua-czech-language-model", + "lingua-danish-language-model", + "lingua-dutch-language-model", + "lingua-english-language-model", + "lingua-esperanto-language-model", + "lingua-estonian-language-model", + "lingua-finnish-language-model", + "lingua-french-language-model", + "lingua-ganda-language-model", + "lingua-georgian-language-model", + "lingua-german-language-model", + "lingua-greek-language-model", + "lingua-gujarati-language-model", + "lingua-hebrew-language-model", + "lingua-hindi-language-model", + "lingua-hungarian-language-model", + "lingua-icelandic-language-model", + "lingua-indonesian-language-model", + "lingua-irish-language-model", + "lingua-italian-language-model", + "lingua-japanese-language-model", + "lingua-kazakh-language-model", + "lingua-korean-language-model", + "lingua-latin-language-model", + "lingua-latvian-language-model", + "lingua-lithuanian-language-model", + "lingua-macedonian-language-model", + "lingua-malay-language-model", + "lingua-maori-language-model", + "lingua-marathi-language-model", + "lingua-mongolian-language-model", + "lingua-nynorsk-language-model", + "lingua-persian-language-model", + "lingua-polish-language-model", + "lingua-portuguese-language-model", + "lingua-punjabi-language-model", + "lingua-romanian-language-model", + "lingua-russian-language-model", + "lingua-serbian-language-model", + "lingua-shona-language-model", + "lingua-slovak-language-model", + "lingua-slovene-language-model", + "lingua-somali-language-model", + "lingua-sotho-language-model", + "lingua-spanish-language-model", + "lingua-swahili-language-model", + "lingua-swedish-language-model", + "lingua-tagalog-language-model", + "lingua-tamil-language-model", + "lingua-telugu-language-model", + "lingua-thai-language-model", + "lingua-tsonga-language-model", + "lingua-tswana-language-model", + "lingua-turkish-language-model", + "lingua-ukrainian-language-model", + "lingua-urdu-language-model", + "lingua-vietnamese-language-model", + "lingua-welsh-language-model", + "lingua-xhosa-language-model", + "lingua-yoruba-language-model", + "lingua-zulu-language-model", + "maplit", + "once_cell", + "rayon", + "regex", + "serde", + "serde-wasm-bindgen", + "serde_json", + "strum", + "strum_macros", + "wasm-bindgen", +] + +[[package]] +name = "lingua-afrikaans-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a97df3a7cd698a09753cb32c0f403cf9f698fa0ae1b081fc1b14fc4707301392" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-albanian-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1f78f0468f3337d53bd1cdc481e0f1c445e33ce43650d654d8b56037daa1996" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-arabic-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ada75100728990b05bacaec7693efebf0c8b911599ac0c082cb4ed576bf494d" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-armenian-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d126f4182866345c5df9cef2e0a3ca64891d7bf0325c31f99df360c00c72bc0f" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-azerbaijani-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "962742b8bed5483adb31cfd12b4ee79fc8dccfa602bb4c25a240579236394892" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-basque-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "710aa0c4203d3c019b624601233b0035723087ba2cb9de8572632cb8c5ac97a4" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-belarusian-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5b76ec320c7646f0c8849371530ba5332d64f640fc170c14d63102bd27580f5" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-bengali-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecf9f1c7b00c78984eee240f2188f1781a69a08b87bfb1aabd3e3cc50c0d279d" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-bokmal-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a9215ee6bbe6d37222dc5dbd9d1577389810011cb8afbef6155e71a11fa5cb9" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-bosnian-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98f836f559334e2d9c0e1876c87e72431b25412b164efd194a840a13b49d8c3b" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-bulgarian-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6639397b34419af35835a594178f93dd84edb3a146938f0f1d7013c1a48a5a1" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-catalan-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0d9acd43a1320961fe4cb8571ebc0e87d9809a0e9d6d71e5cbab86fab923201" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-chinese-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45a1e3a38a0920f6ddbd9b6a79a8c04cd927142713b595ba32be6b811603f7c6" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-croatian-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66eaa997d1fa477c42d2497beeb546b63576e04cc6057a60718daabe061c2344" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-czech-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed98f50055cb5c9b06c20da82029c8cfe204332ab3360349545cbc3d465cd1d1" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-danish-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0adc4abde17e94cf023a1ae4f3bcda3b13dcfecfc1f6421f59f17f904d5b5ed2" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-dutch-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30f3db5635a5e964d85190b5d32ca391d9f7630137630458a605c7ab33583db9" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-english-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbd066693abb10083bb5b5fc1c494dda357170265021ad873ef582211817b8a8" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-esperanto-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7877160b3346161f2714236c9ab1c667097821c0dbb31e5bce42f23c82a157c2" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-estonian-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a25c07d8a67c82a5c41d8cb2893a4032332d18abadd8d06d80a654f6a1b3c47" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-finnish-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d07e0f34931973ec268916cb4c183e06df880e8e43ee99124522ea8c767c9940" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-french-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba406de05309b212790036e576aee4b1a71ce62b77fbd084df5bc8d7c624866f" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-ganda-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9890e6f6b48bf7f2240da770020c5045a1885598c6cb6bc25df73e0182f4792" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-georgian-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7392be814065ff3ff71bae7dbb463a47039a68f90d45dd34f4ca7221c0c2f01" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-german-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dd4041d542b6512d415c0ea6979333e5e88698b966dda7b9bf06029bf690a13" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-greek-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e1f5a17634410f527a6360979209504072ff9e71e29a0578b18a4f57dcb611b" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-gujarati-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ee11b10ffdf8f4eb3d2078c9edec73fb51a36d061ddc6d6e847585a3b91909e" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-hebrew-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a13c9fa3f21bfb91ed3a9710add72c332d0e36234ea9b9d5ed3d6e2235051f6" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-hindi-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f63659e514fa8c706d2ed0d7a04b98adb05b8c8d4bc37e3d12edb9d35ce24fd0" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-hungarian-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "885525276c696b978c4a1aee8a2b3b9a822724e47348c260d05e9092ebd8c96e" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-icelandic-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b616e573df1aa0bc9881fcef4258d3445fc80f5efe3a71ab010c68eb97ab659d" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-indonesian-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc06b8937f6adaad76b28fd009cbfaa6f876ebe5fa887d96dccd1dff2d21d9ad" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-irish-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6258beb6627274163aac7da4dda1e6bcbcf7ff404efa603d0e59e8054f77199" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-italian-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c6e138047ac4d681e419e37ad9e383878652ac19e67056ff16085d4cc82e590" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-japanese-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b34b94aa96a1bc0838ddda2c7912d0ebd7256bb21e7a2974e4dd8b186df501a8" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-kazakh-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b64a848cc1a38dc3c4e7a5ad18b9f2ecbd6abf4c453a8898538d96e6a5c0da4" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-korean-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35c47aa5e5dc8d029967375081aabda462faf10b070aefc1a175ea7f42f5267c" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-latin-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d0922f27e68ae15397160ab1835aefb5a878bc14f0c0ce79b6d074ee828b4d7" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-latvian-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b6cc01bbfda64ccbfb00b5172d7ba9327053da8c38a85c0b71c969533cf8f08" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-lithuanian-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9b68e593c8f72e77b1fe823633baae744681bd8def2dce7d2830947b41c4b1e" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-macedonian-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e288bc4ec1776131580ed80d842de39bce0355bcc3cc59c519008e60f9276fe" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-malay-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "771c6b7ab2865e2563e1ce19bf06611aad674c3f0a180ec43c03a9883e49c8aa" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-maori-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d653a0c16c5cfaa088bdf75e362ba4f715cbd6dbca391f1637a6c49c1e8aff90" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-marathi-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1a141c8d9670ff22e541c064ccab3cfbbc2db2625ec20236d73d76dd98e8ba0" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-mongolian-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f53de502920af44b5d8ec7787895c0a81b0f5f43e3f3c2b80a240f2b605122c1" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-nynorsk-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db00b13561df244acb76927677200ff399b02d8c9b160d25a38320ef3361cfa9" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-persian-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "043ba9b4ac7df99acaa1cd9f5925d6fc9b0fe850d3891bbeb91b27ed94f266c4" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-polish-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f298b650531a5d85d3101ad7db7a5cbf3b671b71f01a775e97d4165eebc9ff75" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-portuguese-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9df0be307b3f5e24e10e76a7841302c0ff4a6ebf818a11d3a3c5c4cecfcfe58b" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-punjabi-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc529e58e6af7cca366af7fb964b4cad7a357d538d4b6a7eccde31ae4bd7604f" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-romanian-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0428c13d8e05e65929ec170e807c8508c2201c63c7802c7786de0c3b78e390b" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-russian-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dea97d6643e90ee4fc0043c728f0c06cdd9e69d4970fd1983e5c59b3448a676e" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-serbian-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7b181be3137969bf5a9e10d8773666d01223886a4d7454048fad99e7b0416db" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-shona-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "509772c502f2a47ec7cd5b50be1bc34b51dcb98cca1f5e30143c96de61a757bb" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-slovak-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44e1e99e6725e99659367ac80731efc24298a7a24190ff3d777209e86be3dc40" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-slovene-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49fc410d0acdf3068cc9c7ae493348d47a26be0d3d8c5c23603c807befd949c1" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-somali-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dde8a66f8901e7e5eac9af985ace066bd5ed3643815beaecb2d7a7b86645d0b3" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-sotho-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58084eb81faf32f62c922e8b3f3dfdcadacf5de934edfb7d3b1acb3759d89f04" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-spanish-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d45be9bede9b9d6d53b6e06047822a18dbd83e5d515736afecd85c1e71cc6070" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-swahili-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f251246905cf56e519af87095fd31264417c19de83fb9e2e0ade5e8c27af4fe3" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-swedish-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c0289dc7e5654aac497c829369b811ae1870eb9d5f76c6b82527bbe5470aa0d" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-tagalog-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc5cb889e86a8a62f56f06d0d9bd92d16f697151a9b3dcdefef0ba39624c5cb0" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-tamil-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "630d10fabcd5a289b5cd4b651df0c448692a3e55cc7e28334313a2d76d2916e5" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-telugu-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0501f9b52fc247ef4e1f4020fd44a90cccddf9914724977cb3440eced01cbe07" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-thai-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "194b09209fc63d986d8ef9505689756eff1935fa52fd91031b60e7d546ca3c76" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-tsonga-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aa10493e6bb3bfd8591254a5657eb98bad6be33334c4ebd791edb354fc83b07" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-tswana-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5db016128507f4eb48dbe96b05be134c9385f6752da7949c653a24e3c4661e37" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-turkish-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b517e12fe94ce80e7f8f380fdd2c0223bcfe351c0898c9a83f56f78b3afad81" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-ukrainian-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14ed035dd4b7ec5f76fe3b07e5f499d76c4cdb2a6d275459e4cdd3a3d21f131a" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-urdu-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9edb8e15e88004b5b89e80f1bf41237770c5536805494dcf627f7ec550eaf4" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-vietnamese-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07d08afaf263906aa3f2bfaffaf52eecd368992685e2468f1ba7f85f3e41fd49" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-welsh-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07c47a533b66772fdd7ece069359900b18824851464a4dd4fd8e4b29928d19b1" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-xhosa-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55a48851d35933a57c6f87a4fdc25d7eeba8eff98f1852b00d7c8c15b2a818fb" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-yoruba-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5bf6365215ffb772d22c18fbf55b1503ad292aa9a5e93d1249d9307117f6b0ef" +dependencies = [ + "include_dir", +] + +[[package]] +name = "lingua-zulu-language-model" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63f8b5c7f412d078f37ffd2874297afce76719c4b1b7c4856af0fa4e8f89abe2" +dependencies = [ + "include_dir", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" + +[[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 = "maplit" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" + +[[package]] +name = "memchr" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "miniz_oxide" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +dependencies = [ + "adler2", +] + +[[package]] +name = "mio" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" +dependencies = [ + "hermit-abi", + "libc", + "wasi", + "windows-sys 0.52.0", +] + +[[package]] +name = "native-tls" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" +dependencies = [ + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + +[[package]] +name = "no-std-compat" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b93853da6d84c2e3c7d730d6473e8817692dd89be387eb01b94d7f108ecb5b8c" + +[[package]] +name = "nonzero_ext" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38bf9645c8b145698bb0b18a4637dcacbc421ea49bef2317e4fd8065a387cf21" + +[[package]] +name = "num" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" +dependencies = [ + "num-bigint", + "num-complex", + "num-integer", + "num-iter", + "num-rational", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-complex" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-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-rational" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" +dependencies = [ + "num-bigint", + "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", +] + +[[package]] +name = "object" +version = "0.36.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" + +[[package]] +name = "openssl" +version = "0.10.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" +dependencies = [ + "bitflags", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "openssl-sys" +version = "0.9.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[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", +] + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[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 = "pkg-config" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" + +[[package]] +name = "portable-atomic" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" + +[[package]] +name = "ppv-lite86" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "proc-macro2" +version = "1.0.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quanta" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5167a477619228a0b284fac2674e3c388cba90631d7b7de620e6f1fcd08da5" +dependencies = [ + "crossbeam-utils", + "libc", + "once_cell", + "raw-cpuid", + "wasi", + "web-sys", + "winapi", +] + +[[package]] +name = "quote" +version = "1.0.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "raw-cpuid" +version = "11.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ab240315c661615f2ee9f0f2cd32d5a7343a84d5ebcccb99d46e6637565e7b0" +dependencies = [ + "bitflags", +] + +[[package]] +name = "rayon" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "redox_syscall" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" +dependencies = [ + "bitflags", +] + +[[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", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" + +[[package]] +name = "reqwest" +version = "0.12.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f" +dependencies = [ + "base64", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-rustls", + "hyper-tls", + "hyper-util", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls-pemfile", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "system-configuration", + "tokio", + "tokio-native-tls", + "tokio-util", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams", + "web-sys", + "windows-registry", +] + +[[package]] +name = "ring" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +dependencies = [ + "cc", + "cfg-if", + "getrandom", + "libc", + "spin", + "untrusted", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" + +[[package]] +name = "rustix" +version = "0.38.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa260229e6538e52293eeb577aabd09945a09d6d9cc0fc550ed7529056c2e32a" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustls" +version = "0.23.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eee87ff5d9b36712a58574e12e9f0ea80f915a5b0ac518d322b24a465617925e" +dependencies = [ + "once_cell", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[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.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" + +[[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 = "schannel" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01227be5826fa0690321a2ba6c5cd57a19cf3f6a09e76973b58e61de6ab9d1c1" +dependencies = [ + "windows-sys 0.59.0", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "security-framework" +version = "2.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" +dependencies = [ + "bitflags", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "serde" +version = "1.0.214" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f55c3193aca71c12ad7890f1785d2b73e1b9f63a0bbc353c08ef26fe03fc56b5" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde-wasm-bindgen" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8302e169f0eddcc139c70f139d19d6467353af16f9fce27e8c30158036a1e16b" +dependencies = [ + "js-sys", + "serde", + "wasm-bindgen", +] + +[[package]] +name = "serde_derive" +version = "1.0.214" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.132" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" +dependencies = [ + "itoa", + "memchr", + "ryu", + "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 = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[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.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "socket2" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +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" + +[[package]] +name = "spinning_top" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d96d2d1d716fb500937168cc09353ffdc7a012be8475ac7308e1bdf0e3923300" +dependencies = [ + "lock_api", +] + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "strum" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" + +[[package]] +name = "strum_macros" +version = "0.25.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" +dependencies = [ + "heck 0.4.1", + "proc-macro2", + "quote", + "rustversion", + "syn", +] + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "syn" +version = "2.0.85" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5023162dfcd14ef8f32034d8bcd4cc5ddc61ef7a247c024a33e24e1f24d21b56" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +dependencies = [ + "futures-core", +] + +[[package]] +name = "system-configuration" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" +dependencies = [ + "bitflags", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "tempfile" +version = "3.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" +dependencies = [ + "cfg-if", + "fastrand", + "once_cell", + "rustix", + "windows-sys 0.59.0", +] + +[[package]] +name = "thiserror" +version = "1.0.65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d11abd9594d9b38965ef50805c5e469ca9cc6f197f883f717e0269a3057b3d5" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae71770322cbd277e69d762a16c444af02aa0575ac0d174f0b9562d3b37f8602" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + +[[package]] +name = "tinyvec" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" +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.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "145f3413504347a2be84393cc8a7d2fb4d863b375909ea59f2158261aa258bbb" +dependencies = [ + "backtrace", + "bytes", + "libc", + "mio", + "pin-project-lite", + "socket2", + "tokio-macros", + "windows-sys 0.52.0", +] + +[[package]] +name = "tokio-macros" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" +dependencies = [ + "rustls", + "rustls-pki-types", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "pin-project-lite", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +dependencies = [ + "once_cell", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "unicode-bidi" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" + +[[package]] +name = "unicode-ident" +version = "1.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" + +[[package]] +name = "unicode-normalization" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" +dependencies = [ + "tinyvec", +] + +[[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.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + +[[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 = "wasm-bindgen" +version = "0.2.95" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" +dependencies = [ + "cfg-if", + "once_cell", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.95" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.95" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.95" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.95" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" + +[[package]] +name = "wasm-streams" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e072d4e72f700fb3443d8fe94a39315df013eef1104903cdb0a2abd322bbecd" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "web-sys" +version = "0.3.72" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[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-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-registry" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" +dependencies = [ + "windows-result", + "windows-strings", + "windows-targets", +] + +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets", +] + +[[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", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "yume-taishikan" +version = "0.1.0" +dependencies = [ + "chrono", + "clap", + "dashmap", + "derive_more", + "env_logger", + "futures", + "governor", + "lingua", + "log", + "regex", + "reqwest", + "serde", + "serde_json", + "thiserror", + "tokio", +] + +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "byteorder", + "zerocopy-derive", +] + +[[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", +] + +[[package]] +name = "zeroize" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..6ed6762 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,31 @@ +[package] +name = "yume-taishikan" +version = "0.1.0" +edition = "2021" + +[dependencies] +chrono = { version = "0.4.38", features = ["serde"] } +clap = { version = "4.5.20", features = ["derive"], optional = true } +dashmap = "6.1.0" +derive_more = { version = "1.0.0", features = ["deref"] } +env_logger = { version = "0.11.5", optional = true } +futures = "0.3.31" +governor = "0.7.0" +lingua = "1.6.2" +log = "0.4.22" +regex = "1.11.1" +reqwest = { version = "0.12.9", features = ["json", "stream"] } +serde = { version = "1.0.214", features = ["derive"] } +serde_json = "1.0.132" +thiserror = "1.0.65" +tokio = { version = "1.41.0", features = ["rt", "rt-multi-thread", "macros", "net", "io-util"] } + +[features] +bin = ["clap", "env_logger"] +clap = ["dep:clap"] +env_logger = ["dep:env_logger"] + +[[bin]] +name = "yume-taishikan" +path = "src/main.rs" +required-features = ["bin"] diff --git a/README.md b/README.md new file mode 100644 index 0000000..7a2dfd1 --- /dev/null +++ b/README.md @@ -0,0 +1,61 @@ +# Misskey Instances List + +A misskey instances listings generator compliant with the official Misskey Hub data format with adjusted score loadings and a focus on growing a diverse and healthy fediverse based on open-source software. + + +The following is a draft and WIP and has not been implemented yet. + +## Differences + +- Currently we will use the official Web UI but we may work on a custom one in the future. + +- Language detection now uses [lingua](https://crates.io/crates/lingua). + +- We respect no-bot tags when accessing instance and user history. + +- All instances with a misskey API will be considered a misskey instance. If the instance advertises "misskey" or other popular forks in the software field, it will be considered a misskey instance. + + Additionally, there are some fuzzy matching: we will probe `/api/endpoints` to check if it has the necessary endpoints to be considered if: + + - software field has "misskey" as substring + - software field starts with "miss" + - software field ends with "key" or "ski" or "fish" + +- `misskey.io` is no longer the "root" instance, instead we will use a list of instances whose owners has agreed to share their federation data with us. PRs are welcome to add your instance to the list if you found your instance or fediverse circle is not listed. + Requests per minute is customizable on a per-instance basis and we will not increase the limit without additional confirmation from the instance owner. + +- Instances that satisfy any of these conditions will be excluded: + + - Not advertising a valid source code repository (either the official Misskey repository or an URL pointing to a Git URL that we will clone). If the source repository is not the official Misskey repository, we must be able to clone it (skipping blobs) within 1 minute. + - Instances with an `/api/charts/notes` not consistent with `/api/stats`. + - `originalUsersCount` is greater than `originalNotesCount`. + - Any of `originalUsersCount`, `originalNotesCount` is not positive. + - The source repository has not been committed for more than 6 months or if the official Misskey repository is presented, the advertised version is NOT EXACTLY one within the last 6 months. + +## Loadings (testing) + +We redesigned the loadings for `value` (ranking) field to give small, growing and well-maintained instances a better chance to be listed. + +The new formula is: + +Base score (sum): + - log10(originalUsersCount) + - log2(originalNotesCount / originalUsersCount) + - log2(npd15) + - 2 * openRegistrations + - 0.4 * emailRequiredForSignUp + - 5 * (serverRules.length > 0) + +Adjustments (multipliers): + - 0.75 if (!icon) + - 0.5 if (lastUpdated < -45 days since last Misskey official release) (any push on source repository will count as an update) + +## Running + +You need: + +- Nightly Rust Toolchain +- Firejail with the usually-included "git" profile +- Git with filtered cloning support (should be included in most distributions) + + diff --git a/data/config.json b/data/config.json new file mode 100644 index 0000000..80c6505 --- /dev/null +++ b/data/config.json @@ -0,0 +1,42 @@ +{ + "blacklist": [ + "^.+\\.ngrok\\.io$", + "^.+\\.loca\\.lt$", + "^.+\\.serveo\\.net$", + "^.+\\.trycloudflare\\.com$", + "^.+\\.pagekite\\.(?:net|com|me)$", + "^.+\\.localtunnel\\.me$", + "^.+\\.tunnelto\\.dev$", + "^.+\\.local$", + "^.+\\.localdomain$", + "^.+\\.localhost$", + "^.+\\.test$", + "^.+\\.example$", + "^.+\\.invalid$", + "^.+\\.onion$", + "^.+\\.lan$", + "^.+\\.cn$", + "^.+\\.click$", + "^.+\\.download$" + ], + "instances": [ + { + "hostname": "", + "root": false, + "include_blocks": false, + "rpm": { + "general": 20, + "instance_list": 0 + } + }, + { + "hostname": "mi.yumechi.jp", + "root": true, + "include_blocks": true, + "rpm": { + "general": 40, + "instance_list": 100 + } + } + ] +} \ No newline at end of file diff --git a/src/config.rs b/src/config.rs new file mode 100644 index 0000000..d49fc86 --- /dev/null +++ b/src/config.rs @@ -0,0 +1,68 @@ +use derive_more::Deref; +use regex::Regex; +use serde::{Deserialize, Deserializer}; + +pub static DEFAULT_CONFIG_JSON: &str = include_str!("../data/config.json"); + +#[derive(Deserialize, Debug, Clone)] +pub struct Config { + pub blacklist: Vec, + pub instances: Vec, +} + +impl Config { + pub fn match_blacklist(&self, hostname: &str) -> bool { + self.blacklist.iter().any(|re| re.0.is_match(hostname)) + } +} + +#[derive(Deserialize, Debug, Clone)] +pub struct InstanceConfig { + pub hostname: String, + pub root: Option, + // whether to use this instance's block list to further filter instances + pub include_blocks: Option, + pub rpm: Option, +} + +#[derive(Deserialize, Debug, Clone, Copy)] +pub struct RequestPerMinute { + pub general: u32, + pub instance_list: u32, +} + +#[derive(Debug, Clone, Deref)] +#[repr(transparent)] +pub struct StrRegex(Regex); + +impl StrRegex { + pub fn into_inner(self) -> Regex { + self.0 + } +} + +impl<'de> Deserialize<'de> for StrRegex { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + let s = String::deserialize(deserializer)?; + #[allow(clippy::expect_used)] + Ok(StrRegex(Regex::new(&s).expect("Invalid regex"))) + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_deserialize_config() { + let config: Config = + serde_json::from_str(DEFAULT_CONFIG_JSON).expect("Failed to deserialize"); + + assert!(!config.blacklist.is_empty()); + + assert!(!config.instances.is_empty()); + } +} diff --git a/src/git/mod.rs b/src/git/mod.rs new file mode 100644 index 0000000..e69de29 diff --git a/src/http/misskey.rs b/src/http/misskey.rs new file mode 100644 index 0000000..287dbc8 --- /dev/null +++ b/src/http/misskey.rs @@ -0,0 +1,327 @@ +use std::{ + borrow::Cow, + collections::{HashMap, HashSet}, + fmt::Debug, + future::Future, + hash::{Hash, Hasher}, + sync::Arc, +}; + +use governor::{DefaultDirectRateLimiter, Quota}; +use reqwest::{Method, RequestBuilder}; +use serde::{de::DeserializeOwned, Deserialize, Serialize}; + +use crate::config::RequestPerMinute; + +use super::ResponseExt; + +pub trait DirectThrottler: Send + Sync + Clone { + type ThrottlerError: Debug; + fn throttle_general(&self) -> impl Future> + Send; + fn throttle_instance_list( + &self, + ) -> impl Future> + Send; +} + +pub struct MisskeyGovernor { + general: Option, + instance_list: Option, +} + +impl MisskeyGovernor { + pub fn new(quota: RequestPerMinute) -> Self { + let general_rpm = quota.general; + let instance_list_rpm = quota.instance_list; + + Self { + general: match general_rpm { + 0 => None, + _ => { + #[allow(clippy::unwrap_used)] + let quota = Quota::per_minute(general_rpm.try_into().unwrap()) + .allow_burst(1.try_into().unwrap()); + + Some(DefaultDirectRateLimiter::direct(quota)) + } + }, + instance_list: match instance_list_rpm { + 0 => None, + _ => { + #[allow(clippy::unwrap_used)] + let quota = Quota::per_minute(instance_list_rpm.try_into().unwrap()) + .allow_burst(1.try_into().unwrap()); + + Some(DefaultDirectRateLimiter::direct(quota)) + } + }, + } + } +} + +#[derive(Debug, thiserror::Error)] +pub enum MisskeyGovernorError { + #[error("Request denied by rate limiter")] + Denied, +} + +impl DirectThrottler for Arc { + type ThrottlerError = MisskeyGovernorError; + + fn throttle_general(&self) -> impl Future> + Send { + async move { + if let Some(ref limiter) = self.general { + limiter.until_ready().await; + + Ok(()) + } else { + Err(MisskeyGovernorError::Denied) + } + } + } + + fn throttle_instance_list( + &self, + ) -> impl Future> + Send { + async move { + if let Some(ref limiter) = self.instance_list { + limiter.until_ready().await; + + Ok(()) + } else { + Err(MisskeyGovernorError::Denied) + } + } + } +} + +#[derive(Debug, Clone)] +pub struct MisskeyClient<'a, T: DirectThrottler + Clone> { + pub client: reqwest::Client, + throttle: T, + base_url: Cow<'a, str>, + bearer: Option, +} + +#[derive(Deserialize, Debug, Clone)] +pub struct FederationInstance { + pub id: String, + pub host: String, + #[serde(rename = "firstRetrievedAt")] + pub first_retrieved_at: String, + #[serde(rename = "usersCount")] + pub users_count: u64, + #[serde(rename = "notesCount")] + pub notes_count: u64, + #[serde(rename = "isNotResponding")] + pub is_not_responding: bool, + #[serde(rename = "isSuspended")] + pub is_suspended: bool, + #[serde(rename = "isBlocked")] + pub is_blocked: bool, + #[serde(rename = "suspensionState")] + pub suspension_state: String, + #[serde(rename = "softwareName")] + pub software_name: Option, + pub name: Option, + pub description: Option, +} + +impl PartialEq for FederationInstance { + fn eq(&self, other: &Self) -> bool { + self.id == other.id + } +} + +impl Eq for FederationInstance {} + +impl Hash for FederationInstance { + fn hash(&self, state: &mut H) { + self.id.hash(state); + } +} + +#[derive(Serialize, Debug, Default, Clone)] +pub struct ListFederationInstancesOptions { + pub limit: Option, + pub offset: Option, + pub sort: Option, + pub blocked: Option, + pub suspended: Option, + pub silenced: Option, + pub federating: Option, + pub subscribing: Option, + pub publishing: Option, +} + +#[derive(Deserialize, Debug)] +pub struct InstanceMetadata { + version: String, + // rest of the fields are optional + #[serde(flatten)] + rest: HashMap, +} + +#[derive(Deserialize, Debug)] +pub struct InstanceStats { + #[serde(rename = "notesCount")] + notes_count: u64, + #[serde(rename = "originalNotesCount")] + original_notes_count: u64, + #[serde(rename = "usersCount")] + users_count: u64, + #[serde(rename = "originalUsersCount")] + original_users_count: u64, + instances: u64, + #[serde(rename = "driveUsageLocal")] + drive_usage_local: Option, + #[serde(rename = "driveUsageRemote")] + drive_usage_remote: Option, +} + +#[derive(Serialize, Debug, Clone, Copy)] +#[serde(rename_all = "lowercase")] +pub enum ChartSpan { + Day, + Hour, +} + +#[derive(Serialize, Debug)] +pub struct InstanceNoteChartOptions { + pub span: ChartSpan, + pub limit: Option, +} + +#[derive(Deserialize, Debug)] +pub struct InstanceChartData { + local: InstanceChartDataInner, + remote: InstanceChartDataInner, +} + +#[derive(Deserialize, Debug)] +pub struct InstanceChartDataInner { + total: Vec, + inc: Vec, + dec: Vec, + diffs: InstanceChartDataDiffs, +} + +#[derive(Deserialize, Debug)] +pub struct InstanceChartDataDiffs { + normal: Vec, + reply: Vec, + renote: Vec, + #[serde(rename = "withFile")] + with_file: Vec, +} + +pub(crate) static REQUIRED_ENDPOINTS: &[&str] = &["meta", "stats", "charts/notes"]; + +impl<'a, T: DirectThrottler> MisskeyClient<'a, T> { + pub fn new(client: reqwest::Client, throttle: T, base_url: impl Into>) -> Self { + Self { + client, + throttle, + base_url: base_url.into(), + bearer: None, + } + } + + pub fn base_url(&self) -> &str { + &self.base_url + } + + pub fn bearer(mut self, bearer: impl Into) -> Self { + self.bearer = Some(bearer.into()); + self + } + + pub(crate) fn base_request(&self, method: Method, url: &str) -> RequestBuilder { + let mut req = self + .client + .request( + method, + format!("{}/{}", self.base_url.trim_end_matches('/'), url), + ) + .header("Accept", "application/json; charset=utf-8") + .header("User-Agent", "YumeTaishiKan/0.1.0 JoinMisskey/alike"); // Included to respect existing block lists + if let Some(ref bearer) = self.bearer { + req = req.bearer_auth(bearer); + } + req + } + + pub(crate) fn base_request_json( + &self, + method: Method, + url: &str, + body: impl Serialize, + ) -> RequestBuilder { + self.base_request(method, url) + .header("Content-Type", "application/json") + .json(&body) + } + + pub(crate) async fn empty_post( + &self, + limit: usize, + url: &str, + ) -> Result { + self.base_request(Method::POST, url) + .send() + .await? + .check_status()? + .safe_json_decode(limit) + .await + } + + pub(crate) async fn json_post( + &self, + limit: usize, + url: &str, + body: P, + ) -> Result { + self.base_request_json(Method::POST, url, body) + .send() + .await? + .check_status()? + .safe_json_decode(limit) + .await + } + + pub async fn endpoints(&self) -> Result, super::JsonHTTPError> { + self.throttle + .throttle_general() + .await + .map_err(|_| super::JsonHTTPError::Throttled)?; + self.json_post(4 << 10, "/api/endpoints", serde_json::json!({"type": ""})) // for some reason very important.. + .await + } + + pub async fn federation_instances( + &self, + options: &ListFederationInstancesOptions, + ) -> Result, super::JsonHTTPError> { + self.throttle + .throttle_instance_list() + .await + .map_err(|_| super::JsonHTTPError::Throttled)?; + self.json_post(1 << 20, "/api/federation/instances", options) + .await + } + + pub async fn instance_metadata(&self) -> Result { + self.empty_post(64 << 10, "/api/meta").await + } + + pub async fn instance_stats(&self) -> Result { + self.empty_post(32 << 10, "/api/stats").await + } + + pub async fn instance_chart_data( + &self, + options: &InstanceNoteChartOptions, + ) -> Result { + self.json_post(128 << 10, "/api/charts/notes", options) + .await + } +} diff --git a/src/http/mod.rs b/src/http/mod.rs new file mode 100644 index 0000000..5d60c89 --- /dev/null +++ b/src/http/mod.rs @@ -0,0 +1,115 @@ +use std::{future::Future, hash::Hash, sync::Arc}; + +use dashmap::DashMap; +use futures::{StreamExt, TryFutureExt, TryStreamExt}; +use reqwest::{dns::Resolve, redirect::Policy}; +use serde::de::DeserializeOwned; + +pub mod misskey; + +pub struct ClientMap { + clients: DashMap, +} + +impl ClientMap { + pub fn new() -> Self { + Self { + clients: DashMap::new(), + } + } + + pub fn get_or_insert_with(&self, key: K, f: F) -> V + where + F: FnOnce() -> V, + { + self.clients.entry(key).or_insert_with(f).value().clone() + } +} + +/// A Safe DNS resolver that only resolves to global addresses unless the requester itself is local. +pub struct SafeResolver(); + +impl Resolve for SafeResolver { + fn resolve(&self, name: reqwest::dns::Name) -> reqwest::dns::Resolving { + Box::pin(async move { + match tokio::net::lookup_host(format!("{}:80", name.as_str())).await { + Ok(lookup) => Ok(Box::new(lookup.filter(|addr| match addr { + std::net::SocketAddr::V4(a) => a.ip().is_global(), + std::net::SocketAddr::V6(a) => a.ip().is_global(), + })) + as Box + Send>), + Err(e) => { + log::error!("Failed to resolve {}: {}", name.as_str(), e); + Err(e.into()) + } + } + }) + } +} + +/// A reqwest client safe for parallel use and not leaking connections to LAN addresses. +pub(crate) fn new_safe_client() -> reqwest::Result { + reqwest::Client::builder() + .dns_resolver(Arc::new(SafeResolver())) + .connect_timeout(std::time::Duration::from_secs(10)) + .timeout(std::time::Duration::from_secs(20)) + .redirect(Policy::limited(3)) + .tcp_keepalive(Some(std::time::Duration::from_secs(20))) + .build() +} + +#[derive(Debug, thiserror::Error)] +pub enum JsonHTTPError { + #[error("Governor rejected request")] + Throttled, + #[error("Unexpected HTTP status code: {0}")] + UnexpectedCode(reqwest::StatusCode), + #[error("HTTP error: {0}")] + Reqwest(#[from] reqwest::Error), + #[error("JSON error: {0}")] + Serde(#[from] serde_json::Error), + #[error("Response size limit exceeded")] + LimitExceeded, +} + +pub trait ResponseExt { + fn check_status(self) -> Result; + fn safe_json_decode( + self, + limit: usize, + ) -> impl Future> + Send; +} + +impl ResponseExt for reqwest::Response { + fn check_status(self) -> Result { + if self.status().is_success() { + Ok(self) + } else { + Err(JsonHTTPError::UnexpectedCode(self.status())) + } + } + fn safe_json_decode( + self, + limit: usize, + ) -> impl Future> + Send { + let mut remaining = limit; + self.bytes_stream() + .map(move |chunk| match chunk { + Ok(chunk) => { + if remaining < chunk.len() { + return Err(JsonHTTPError::LimitExceeded); + } + remaining -= chunk.len(); + Ok(chunk) + } + Err(e) => Err(e.into()), + }) + .try_fold(Vec::new(), |mut vec, chunk| async move { + vec.extend_from_slice(&chunk); + Ok(vec) + }) + .and_then(move |vec| { + futures::future::ready(serde_json::from_slice(&vec).map_err(Into::into)) + }) + } +} diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..054f9df --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,196 @@ +#![feature(ip)] +#![warn(clippy::unwrap_used, clippy::expect_used)] + +use std::{ + collections::HashMap, + fs::File, + io::{BufWriter, Write}, + path::PathBuf, + sync::Arc, +}; + +use dashmap::DashSet; +use futures::{ + stream::{self, select_all}, + StreamExt, TryStreamExt, +}; +use http::{misskey::MisskeyGovernor, ClientMap}; +use logic::{analysis::compute_instance_info, discovery::do_instance_discovery}; +use tokio::sync::Mutex; + +pub mod config; +pub mod git; +pub mod http; +pub mod logic; +pub mod model; + +#[derive(Debug, Clone, Default)] +pub struct RunOptions { + // only run the first N pages for each root instance, good for testing + pub limit_pages: Option, + // only run selected instances + pub only_instance: Option>, + + // use custom config file + pub config: Option, + + pub output: PathBuf, +} + +#[derive(Debug, thiserror::Error)] +pub enum Error {} + +pub async fn run(options: RunOptions) { + let config = options.config.unwrap_or_else(|| { + serde_json::from_str(config::DEFAULT_CONFIG_JSON).expect("Failed to parse default config") + }); + + log::debug!("Config: {:?}", config); + + let default_instance_config = config + .instances + .iter() + .find(|i| i.hostname.is_empty()) + .expect("No default instance config found"); + + let default_rpm = default_instance_config.rpm.expect("No default RPM found"); + + let instance_config_overrides: HashMap = config + .instances + .iter() + .filter(|i| !i.hostname.is_empty()) + .map(|i| (i.hostname.clone(), i.clone())) + .collect(); + + let cmap = ClientMap::new(); + + let root_instances = config.instances.iter().filter(|i| i.root.unwrap_or(false)); + let root_instances_block_list = root_instances + .clone() + .filter(|i| i.include_blocks.unwrap_or(false)); + + // find all blocked instances + let blocked = DashSet::new(); + + select_all(root_instances_block_list.map(|instance| { + let config = instance_config_overrides + .get(&instance.hostname) + .unwrap_or(default_instance_config); + + let client = cmap.get_or_insert_with(instance.hostname.clone(), || { + http::misskey::MisskeyClient::new( + http::new_safe_client().expect("Failed to create client"), + Arc::new(MisskeyGovernor::new(config.rpm.unwrap_or(default_rpm))), + instance.hostname.clone(), + ) + }); + + Box::pin(do_instance_discovery(client, true)) + })) + .try_for_each_concurrent(4, |instances| async { + for instance in instances { + blocked.insert(instance.host.clone()); + } + + Ok(()) + }) + .await + .expect("Failed to fetch blocked instances"); + + log::debug!( + "Blocked instances: {:?}", + blocked + .iter() + .map(|i| i.to_string().replace(".", "^")) + .collect::>() + ); + + let included = DashSet::new(); + + select_all(root_instances.map(|instance| { + let this_config = instance_config_overrides + .get(&instance.hostname) + .unwrap_or(default_instance_config); + + let client = cmap.get_or_insert_with(instance.hostname.clone(), || { + http::misskey::MisskeyClient::new( + http::new_safe_client().expect("Failed to create client"), + Arc::new(MisskeyGovernor::new(this_config.rpm.unwrap_or(default_rpm))), + instance.hostname.clone(), + ) + }); + + Box::pin( + do_instance_discovery(client, false) + .map_ok(|mut instances| { + instances + .retain(|i| !blocked.contains(&i.host) && !config.match_blacklist(&i.host)); + + instances + }) + .inspect_err(|e| { + log::error!("Failed to fetch instance {}: {:?}", instance.hostname, e) + }), + ) + })) + .try_for_each_concurrent(4, |instances| async { + for instance in instances { + included.insert(instance.clone()); + } + + Ok(()) + }) + .await + .expect("Failed to fetch instances"); + + log::info!("Found {} instances", included.len()); + + let mut output_file = File::create(options.output).expect("Failed to create output file"); + write!(output_file, "[").expect("Failed to write to output file"); + + let output_file = Mutex::new(BufWriter::new(output_file)); + let output_file_ref = &output_file; + + stream::iter(included) + .filter_map(|inst| async { + let host = inst.host.clone(); + + let this_config = instance_config_overrides + .get(&host) + .unwrap_or(default_instance_config); + + let client = cmap.get_or_insert_with(host.clone(), || { + http::misskey::MisskeyClient::new( + http::new_safe_client().expect("Failed to create client"), + Arc::new(MisskeyGovernor::new(this_config.rpm.unwrap_or(default_rpm))), + host.clone(), + ) + }); + + match compute_instance_info(client, inst).await { + Ok(info) => Some((host, info)), + Err(e) => { + log::error!("Instance {} is excluded: {:?}", host, e); + + None + } + } + }) + .for_each(|(host, mut info)| async move { + info.url = host; // prevent fake URLs + + let mut output_file = output_file_ref.lock().await; + + serde_json::to_writer(output_file.get_mut(), &info) + .expect("Failed to write to output file"); + }) + .await; + + let mut output_file = output_file.into_inner(); + + write!(output_file, "]").expect("Failed to write to output file"); + + output_file.flush().expect("Failed to flush output file"); + + log::info!("Done"); +} diff --git a/src/logic/analysis.rs b/src/logic/analysis.rs new file mode 100644 index 0000000..a7af6b3 --- /dev/null +++ b/src/logic/analysis.rs @@ -0,0 +1,77 @@ +use std::future::Future; + +use reqwest::StatusCode; + +use crate::{ + http::{ + misskey::{self, FederationInstance, MisskeyClient, REQUIRED_ENDPOINTS}, + JsonHTTPError, + }, + model::{ExcludeReason, InstanceInfo}, +}; + +fn has_nobot_tag(s: &str) -> bool { + s.split_whitespace().any(|w| { + w.eq_ignore_ascii_case("nobot") + || w.eq_ignore_ascii_case("#nobot") + || w.eq_ignore_ascii_case("no-bot") + || w.eq_ignore_ascii_case("#no-bot") + }) +} + +fn potentially_misskey(software_name: &str) -> bool { + software_name.starts_with("miss") + || software_name.ends_with("key") + || software_name.ends_with("ski") + || software_name.ends_with("fish") + || software_name.contains("misskey") +} + +pub fn compute_instance_info<'c, T: misskey::DirectThrottler + 'c>( + client: MisskeyClient<'c, T>, + master_info: FederationInstance, +) -> impl Future> + Send + 'c { + async move { + if master_info.name.as_deref().map_or(false, has_nobot_tag) + || master_info + .description + .as_deref() + .map_or(false, has_nobot_tag) + { + log::info!("Excluding instance {} due to no-bot tag", master_info.host); + return Err(ExcludeReason::NoBotIndicated); + } + + if !master_info + .software_name + .as_deref() + .map_or(false, potentially_misskey) + { + log::info!( + "Excluding instance {} due to non-Misskey software name", + master_info.host + ); + return Err(ExcludeReason::UnknownSoftwareName); + } + + // probe API + let endpoints = client.endpoints().await.map_err(|e| match e { + JsonHTTPError::UnexpectedCode(StatusCode::GONE) => ExcludeReason::InstanceGone, + JsonHTTPError::UnexpectedCode(_) => ExcludeReason::UnknownSoftwareName, + e => { + log::error!("Failed to probe instance {}: {:?}", master_info.host, e); + ExcludeReason::NetworkError + } + })?; + + if !REQUIRED_ENDPOINTS.iter().all(|&e| endpoints.contains(e)) { + log::info!( + "Excluding instance {} due to missing endpoints", + master_info.host + ); + return Err(ExcludeReason::APINotSupported); + } + + todo!() + } +} diff --git a/src/logic/discovery.rs b/src/logic/discovery.rs new file mode 100644 index 0000000..76a0b2e --- /dev/null +++ b/src/logic/discovery.rs @@ -0,0 +1,38 @@ +use futures::{stream, Stream, StreamExt}; + +use crate::http::{ + misskey::{self, FederationInstance, MisskeyClient}, + JsonHTTPError, +}; + +const PAGE_SIZE: u64 = 50; + +pub fn do_instance_discovery<'c, T: misskey::DirectThrottler + 'c>( + client: MisskeyClient<'c, T>, + blocked: bool, +) -> impl Stream, JsonHTTPError>> + 'c { + let base_url = client.base_url().to_string(); + stream::iter((0..).step_by(PAGE_SIZE as usize)) + .then(move |offset| { + let options = misskey::ListFederationInstancesOptions { + blocked: Some(blocked), + limit: Some(PAGE_SIZE), + offset: Some(offset), + ..Default::default() + }; + + let client = client.clone(); + async move { + let instances = client.federation_instances(&options).await?; + Ok(instances) + } + }) + .take_while(move |instances| match instances { + Ok(instances) => futures::future::ready(!instances.is_empty()), + Err(e) => { + log::error!("Failed to fetch instances from {}: {:?}", base_url, e); + + futures::future::ready(false) + } + }) +} diff --git a/src/logic/mod.rs b/src/logic/mod.rs new file mode 100644 index 0000000..7e72b3d --- /dev/null +++ b/src/logic/mod.rs @@ -0,0 +1,2 @@ +pub mod analysis; +pub mod discovery; diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..6a59bc8 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,20 @@ +use clap::Parser; +use yume_taishikan::RunOptions; + +#[derive(Parser)] +struct Opts { + #[clap(short, long)] + output: String, +} + +#[tokio::main] +async fn main() { + let opts = Opts::parse(); + + let runopts = RunOptions { + output: opts.output.into(), + ..Default::default() + }; + + yume_taishikan::run(runopts).await; +} diff --git a/src/model.rs b/src/model.rs new file mode 100644 index 0000000..f128ea1 --- /dev/null +++ b/src/model.rs @@ -0,0 +1,342 @@ +use chrono::{DateTime, Utc}; +use serde::{Deserialize, Serialize}; + +#[derive(Deserialize, Serialize, Debug)] +pub struct ETagged { + pub etag: Option, + pub data: T, +} + +#[derive(Deserialize, Serialize, Debug, Clone)] +pub enum ExcludeReason { + NoBotIndicated, + UnknownSoftwareName, + InstanceGone, + NetworkError, + APINotSupported, + SuspiciousStats, + // Vulnerable - not shown at all + // Blacklisted - not shown at all + MissingSourceUrl, + FailedLocatingSource, + SourceTooOld, +} + +#[derive(Deserialize, Serialize, Debug)] +#[serde(rename_all = "camelCase")] +pub struct YumeExtraInstanceInfo { + git_last_commit: DateTime, + last_reachable: DateTime, + + score_terms: ScoreTerms, +} + +#[derive(Deserialize, Serialize, Debug)] +#[serde(rename_all = "camelCase")] +pub struct ScoreTerms { + pub original_users_count: u64, + pub original_users_count_trans: f64, + pub original_notes_count: u64, + pub original_notes_over_users: f64, + pub original_notes_over_users_trans: f64, + pub npd15: f64, + pub npd15_trans: f64, + pub open_registrations: bool, + pub open_registrations_trans: f64, + pub email_required_for_signup: bool, + pub email_required_for_signup_trans: f64, + pub has_rules: bool, + pub has_rules_trans: f64, + + pub obsolete: bool, + pub obsolete_trans_mult: f64, + + pub missing_icon: bool, + pub missing_icon_trans_mult: f64, +} + +impl ScoreTerms { + pub fn new( + original_users_count: u64, + original_notes_count: u64, + npd15: f64, + open_registrations: bool, + email_required_for_signup: bool, + has_rules: bool, + obsolete: bool, + missing_icon: bool, + ) -> Self { + Self { + original_users_count, + original_users_count_trans: (original_users_count as f64).log10(), + original_notes_count, + original_notes_over_users: original_notes_count as f64 / original_users_count as f64, + original_notes_over_users_trans: (original_notes_count as f64 + / original_users_count as f64) + .log2(), + npd15, + npd15_trans: npd15.log2(), + open_registrations, + open_registrations_trans: if open_registrations { 2.0 } else { 0.0 }, + email_required_for_signup, + email_required_for_signup_trans: if email_required_for_signup { 0.4 } else { 0.0 }, + has_rules, + has_rules_trans: if has_rules { 5.0 } else { 0.0 }, + obsolete, + obsolete_trans_mult: if obsolete { 0.5 } else { 1.0 }, + missing_icon, + missing_icon_trans_mult: if missing_icon { 0.75 } else { 1.0 }, + } + } + + pub fn score(&self) -> f64 { + (self.original_users_count_trans + + self.original_notes_over_users_trans + + self.npd15_trans + + self.open_registrations_trans + + self.email_required_for_signup_trans + + self.has_rules_trans) + * self.obsolete_trans_mult + * self.missing_icon_trans_mult + } +} + +#[derive(Deserialize, Serialize, Debug)] +#[serde(rename_all = "camelCase")] +pub struct InstanceInfo { + pub yume_extra: YumeExtraInstanceInfo, + + pub url: String, + pub langs: Vec, + pub value: f64, + pub meta: InstanceMeta, + pub nodeinfo: NodeInfo, + pub stats: Stats, + pub npd15: f64, + pub name: String, + pub description: String, + pub is_alive: bool, + pub repo: String, + pub background: bool, + pub icon: bool, + pub banner: bool, +} + +#[derive(Deserialize, Serialize, Debug)] +#[serde(rename_all = "camelCase")] +pub struct Stats { + pub notes_count: i64, + pub original_notes_count: i64, + pub users_count: i64, + pub original_users_count: i64, + pub reactions_count: i64, + pub instances: i64, + pub drive_usage_local: i64, + pub drive_usage_remote: i64, +} + +#[derive(Deserialize, Serialize, Debug)] +pub struct NodeInfo { + pub version: String, + pub software: Software, + pub protocols: Vec, + pub services: Services, + #[serde(rename = "openRegistrations")] + pub open_registrations: bool, + pub usage: Usage, + pub metadata: NodeInfoMetadata, +} + +#[derive(Deserialize, Serialize, Debug)] +pub struct NodeInfoMetadata { + #[serde(rename = "nodeName")] + pub node_name: String, + #[serde(rename = "nodeDescription")] + pub node_description: String, + #[serde(rename = "nodeAdmins")] + pub node_admins: Vec, + pub maintainer: NodeInfoPerson, + pub langs: Vec, + #[serde(rename = "tosUrl")] + pub tos_url: String, + #[serde(rename = "privacyPolicyUrl")] + pub privacy_policy_url: Option, + #[serde(rename = "impressumUrl")] + pub impressum_url: Option, + #[serde(rename = "repositoryUrl")] + pub repository_url: String, + #[serde(rename = "feedbackUrl")] + pub feedback_url: String, + #[serde(rename = "disableRegistration")] + pub disable_registration: bool, + #[serde(rename = "disableLocalTimeline")] + pub disable_local_timeline: bool, + #[serde(rename = "disableGlobalTimeline")] + pub disable_global_timeline: bool, + #[serde(rename = "disableRegistrationReason")] + pub email_required_for_signup: bool, + #[serde(rename = "enableHcaptcha")] + pub enable_hcaptcha: bool, + #[serde(rename = "enableRecaptcha")] + pub enable_recaptcha: bool, + #[serde(rename = "enableMcaptcha")] + pub enable_mcaptcha: bool, + #[serde(rename = "enableTurnstile")] + pub enable_turnstile: bool, + #[serde(rename = "maxNoteTextLength")] + pub max_note_text_length: i64, + #[serde(rename = "enableEmail")] + pub enable_email: bool, + #[serde(rename = "enableServiceWorker")] + pub enable_service_worker: bool, + #[serde(rename = "proxyAccountName")] + pub proxy_account_name: String, + #[serde(rename = "themeColor")] + pub theme_color: String, +} + +#[derive(Deserialize, Serialize, Debug)] +pub struct NodeInfoPerson { + pub name: String, + pub email: Option, +} + +#[derive(Deserialize, Serialize, Debug)] +pub struct Software { + pub name: String, + pub version: Option, + pub homepage: Option, + pub repository: Option, +} + +#[derive(Deserialize, Serialize, Debug)] +pub struct Services { + pub inbound: Vec, + pub outbound: Vec, +} + +#[derive(Deserialize, Serialize, Debug)] +#[serde(rename_all = "camelCase")] +pub struct Usage { + pub users: Users, + pub local_posts: i64, + pub local_comments: i64, +} + +#[derive(Deserialize, Serialize, Debug)] +#[serde(rename_all = "camelCase")] +pub struct Users { + pub total: i64, + pub active_halfyear: Option, + pub active_month: Option, +} + +#[derive(Deserialize, Serialize, Debug)] +#[serde(rename_all = "camelCase")] +pub struct InstanceMeta { + pub maintainer_name: String, + pub version: String, + pub name: String, + pub short_name: Option, + pub uri: String, + pub description: String, + pub langs: Vec, + pub tos_url: String, + pub repository_url: String, + pub feedback_url: String, + pub impressum_url: Option, + pub privacy_policy_url: Option, + pub disable_registration: bool, + pub email_required_for_signup: bool, + pub mcaptcha_instance_url: Option, + pub sw_publickey: String, + pub theme_color: String, + pub mascot_image_url: String, + pub banner_url: String, + pub info_image_url: Option, + pub server_error_image_url: Option, + pub not_found_image_url: Option, + pub icon_url: Option, + pub background_image_url: Option, + pub logo_image_url: Option, + pub max_note_text_length: i64, + pub default_light_theme: Option, + pub default_dark_theme: Option, + pub well_known_websites: Vec, + pub notes_per_one_ad: i64, + pub enable_email: bool, + pub enable_service_worker: bool, + pub translator_available: bool, + pub server_rules: Vec, + pub policies: Policies, + pub media_proxy: String, + pub enable_url_preview: bool, + pub enable_skeb_status: bool, + pub cache_remote_files: bool, + pub cache_remote_sensitive_files: bool, + pub require_setup: bool, + pub proxy_account_name: String, + pub features: Features, +} + +#[derive(Deserialize, Serialize, Debug)] +#[serde(rename_all = "camelCase")] +pub struct Policies { + pub gtl_available: bool, + pub ltl_available: bool, + pub can_public_note: bool, + pub can_initiate_conversation: bool, + pub can_create_content: bool, + pub can_update_content: bool, + pub can_delete_content: bool, + pub can_purge_account: bool, + pub can_update_avatar: bool, + pub can_update_banner: bool, + pub mention_limit: i64, + pub can_invite: bool, + pub invite_limit: i64, + pub invite_limit_cycle: i64, + pub invite_expiration_time: i64, + pub can_manage_custom_emojis: bool, + pub can_manage_avatar_decorations: bool, + pub can_search_notes: bool, + pub can_use_translator: bool, + pub can_use_drive_file_in_sound_settings: bool, + pub can_use_reaction: bool, + pub can_hide_ads: bool, + pub drive_capacity_mb: i64, + pub always_mark_nsfw: bool, + pub skip_nsfw_detection: bool, + pub pin_limit: i64, + pub antenna_limit: i64, + pub antenna_notes_limit: i64, + pub word_mute_limit: i64, + pub webhook_limit: i64, + pub clip_limit: i64, + pub note_each_clips_limit: i64, + pub user_list_limit: i64, + pub user_each_user_lists_limit: i64, + pub rate_limit_factor: i64, + pub avatar_decoration_limit: i64, + pub mutual_link_section_limit: i64, + pub mutual_link_limit: i64, +} + +#[derive(Deserialize, Serialize, Debug)] +#[serde(rename_all = "camelCase")] +pub struct Features { + pub local_timeline: bool, + pub global_timeline: bool, + pub registration: bool, + pub email_required_for_signup: bool, + pub h_captcha: bool, + pub hcaptcha: bool, + pub m_captcha: bool, + pub mcaptcha: bool, + pub re_captcha: bool, + pub recaptcha: bool, + pub turnstile: bool, + pub object_storage: bool, + pub service_worker: bool, + pub miauth: bool, +}