diff --git a/.cargo/config b/.cargo/config index bff29e6e1..f6e10093d 100644 --- a/.cargo/config +++ b/.cargo/config @@ -1,2 +1,3 @@ [build] -rustflags = ["--cfg", "tokio_unstable"] +# these are necessary for building with embed-pictrs feature +rustflags = ["--cfg", "tokio_unstable", "--cfg", "uuid_unstable"] diff --git a/Cargo.lock b/Cargo.lock index 8d795b690..e86d861a4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -115,7 +115,7 @@ dependencies = [ "actix-service", "actix-tls", "actix-utils", - "ahash 0.8.6", + "ahash", "base64 0.21.5", "bitflags 2.4.1", "brotli", @@ -276,7 +276,7 @@ dependencies = [ "actix-tls", "actix-utils", "actix-web-codegen", - "ahash 0.8.6", + "ahash", "bytes", "bytestring", "cfg-if", @@ -343,17 +343,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" -[[package]] -name = "ahash" -version = "0.7.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" -dependencies = [ - "getrandom", - "once_cell", - "version_check", -] - [[package]] name = "ahash" version = "0.8.6" @@ -567,6 +556,12 @@ dependencies = [ "quick-xml 0.30.0", ] +[[package]] +name = "atomic" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c59bdb34bc650a32731b31bd8f0829cc15d24a708ee31559e0bb34f2bc320cba" + [[package]] name = "autocfg" version = "1.1.0" @@ -633,6 +628,12 @@ dependencies = [ "rustc-demangle", ] +[[package]] +name = "barrel" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad9e605929a6964efbec5ac0884bd0fe93f12a3b1eb271f52c251316640c68d9" + [[package]] name = "base32" version = "0.4.0" @@ -985,12 +986,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23738e11972c7643e4ec947840fc463b6a571afcd3e735bdfce7d03c7a784aca" dependencies = [ "async-trait", - "json5", "lazy_static", "nom", "pathdiff", "ron", - "rust-ini", "serde", "serde_json", "toml 0.5.11", @@ -1416,6 +1415,7 @@ dependencies = [ "itoa", "pq-sys", "serde_json", + "time", "uuid", ] @@ -1434,6 +1434,21 @@ dependencies = [ "tokio-postgres", ] +[[package]] +name = "diesel-async" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acada1517534c92d3f382217b485db8a8638f111b0e3f2a2a8e26165050f77be" +dependencies = [ + "async-trait", + "deadpool", + "diesel", + "futures-util", + "scoped-futures", + "tokio", + "tokio-postgres", +] + [[package]] name = "diesel-derive-enum" version = "2.1.0" @@ -1519,12 +1534,6 @@ dependencies = [ "chrono", ] -[[package]] -name = "dlv-list" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0688c2a7f92e427f44895cd63841bff7b29f8d7a1648b9e7e07a4a365b2e1257" - [[package]] name = "doku" version = "0.21.1" @@ -1768,7 +1777,7 @@ version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a88c69768c0a15262df21899142bc6df9b9b823546d4b4b9a7bc2d6c448ec6fd" dependencies = [ - "hashbrown 0.13.2", + "hashbrown 0.13.1", ] [[package]] @@ -1821,6 +1830,18 @@ dependencies = [ "miniz_oxide", ] +[[package]] +name = "flume" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181" +dependencies = [ + "futures-core", + "futures-sink", + "nanorand", + "spin 0.9.8", +] + [[package]] name = "fnv" version = "1.0.7" @@ -2043,17 +2064,14 @@ name = "hashbrown" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -dependencies = [ - "ahash 0.7.7", -] [[package]] name = "hashbrown" -version = "0.13.2" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +checksum = "33ff8ae62cd3a9102e5637afc8452c55acf3844001bd5374e0b0bd7b6616c038" dependencies = [ - "ahash 0.8.6", + "ahash", ] [[package]] @@ -2491,17 +2509,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "json5" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96b0db21af676c1ce64250b5f40f3ce2cf27e4e47cb91ed91eb6fe9350b430c1" -dependencies = [ - "pest", - "pest_derive", - "serde", -] - [[package]] name = "jsonwebtoken" version = "8.3.0" @@ -2657,7 +2664,7 @@ dependencies = [ "chrono", "deadpool", "diesel", - "diesel-async", + "diesel-async 0.3.2", "diesel-derive-enum", "diesel-derive-newtype", "diesel_ltree", @@ -2689,7 +2696,7 @@ version = "0.19.0-rc.7" dependencies = [ "actix-web", "diesel", - "diesel-async", + "diesel-async 0.3.2", "diesel_ltree", "lemmy_db_schema", "lemmy_utils", @@ -2707,7 +2714,7 @@ version = "0.19.0-rc.7" dependencies = [ "chrono", "diesel", - "diesel-async", + "diesel-async 0.3.2", "lemmy_db_schema", "serde", "serde_with", @@ -2723,7 +2730,7 @@ name = "lemmy_db_views_moderator" version = "0.19.0-rc.7" dependencies = [ "diesel", - "diesel-async", + "diesel-async 0.3.2", "lemmy_db_schema", "serde", "serde_with", @@ -2738,7 +2745,7 @@ dependencies = [ "anyhow", "chrono", "diesel", - "diesel-async", + "diesel-async 0.3.2", "futures", "lemmy_api_common", "lemmy_apub", @@ -2789,7 +2796,7 @@ dependencies = [ "clokwerk", "console-subscriber 0.1.10", "diesel", - "diesel-async", + "diesel-async 0.3.2", "futures-util", "lemmy_api", "lemmy_api_common", @@ -3096,6 +3103,60 @@ dependencies = [ "autocfg", ] +[[package]] +name = "metrics" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fde3af1a009ed76a778cb84fdef9e7dbbdf5775ae3e4cc1f434a6a307f6f76c5" +dependencies = [ + "ahash", + "metrics-macros", + "portable-atomic", +] + +[[package]] +name = "metrics-exporter-prometheus" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a4964177ddfdab1e3a2b37aec7cf320e14169abb0ed73999f558136409178d5" +dependencies = [ + "base64 0.21.5", + "hyper", + "indexmap 1.9.3", + "ipnet", + "metrics", + "metrics-util", + "quanta", + "thiserror", + "tokio", +] + +[[package]] +name = "metrics-macros" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddece26afd34c31585c74a4db0630c376df271c285d682d1e55012197830b6df" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "metrics-util" +version = "0.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4de2ed6e491ed114b40b732e4d1659a9d53992ebd87490c44a6ffe23739d973e" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", + "hashbrown 0.13.1", + "metrics", + "num_cpus", + "quanta", + "sketches-ddsketch", +] + [[package]] name = "migrations_internals" version = "2.1.0" @@ -3192,6 +3253,15 @@ version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d02c0b00610773bb7fc61d85e13d86c7858cbdf00e1a120bfc41bc055dbaa0e" +[[package]] +name = "nanorand" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3" +dependencies = [ + "getrandom", +] + [[package]] name = "native-tls" version = "0.2.11" @@ -3375,18 +3445,24 @@ version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f4b8347cc26099d3aeee044065ecc3ae11469796b4d65d065a23a584ed92a6f" dependencies = [ - "opentelemetry_api 0.19.0", + "opentelemetry_api", "opentelemetry_sdk 0.19.0", ] [[package]] name = "opentelemetry" -version = "0.20.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9591d937bc0e6d2feb6f71a559540ab300ea49955229c347a517a28d27784c54" +checksum = "1e32339a5dc40459130b3bd269e9892439f55b33e772d2a9d402a789baaf4e8a" dependencies = [ - "opentelemetry_api 0.20.0", - "opentelemetry_sdk 0.20.0", + "futures-core", + "futures-sink", + "indexmap 2.1.0", + "js-sys", + "once_cell", + "pin-project-lite", + "thiserror", + "urlencoding", ] [[package]] @@ -3409,17 +3485,17 @@ dependencies = [ [[package]] name = "opentelemetry-otlp" -version = "0.13.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e5e5a5c4135864099f3faafbe939eb4d7f9b80ebf68a8448da961b32a7c1275" +checksum = "f24cda83b20ed2433c68241f918d0f6fdec8b1d43b7a9590ab4420c5095ca930" dependencies = [ "async-trait", "futures-core", "http", - "opentelemetry-proto 0.3.0", + "opentelemetry 0.21.0", + "opentelemetry-proto 0.4.0", "opentelemetry-semantic-conventions", - "opentelemetry_api 0.20.0", - "opentelemetry_sdk 0.20.0", + "opentelemetry_sdk 0.21.1", "prost 0.11.9", "thiserror", "tokio", @@ -3441,23 +3517,23 @@ dependencies = [ [[package]] name = "opentelemetry-proto" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1e3f814aa9f8c905d0ee4bde026afd3b2577a97c10e1699912e3e44f0c4cbeb" +checksum = "a2e155ce5cc812ea3d1dffbd1539aed653de4bf4882d60e6e04dcf0901d674e1" dependencies = [ - "opentelemetry_api 0.20.0", - "opentelemetry_sdk 0.20.0", + "opentelemetry 0.21.0", + "opentelemetry_sdk 0.21.1", "prost 0.11.9", "tonic 0.9.2", ] [[package]] name = "opentelemetry-semantic-conventions" -version = "0.12.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73c9f9340ad135068800e7f1b24e9e09ed9e7143f5bf8518ded3d3ec69789269" +checksum = "f5774f1ef1f982ef2a447f6ee04ec383981a3ab99c8e77a1a7b30182e65bbc84" dependencies = [ - "opentelemetry 0.20.0", + "opentelemetry 0.21.0", ] [[package]] @@ -3476,22 +3552,6 @@ dependencies = [ "urlencoding", ] -[[package]] -name = "opentelemetry_api" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a81f725323db1b1206ca3da8bb19874bbd3f57c3bcd59471bfb04525b265b9b" -dependencies = [ - "futures-channel", - "futures-util", - "indexmap 1.9.3", - "js-sys", - "once_cell", - "pin-project-lite", - "thiserror", - "urlencoding", -] - [[package]] name = "opentelemetry_sdk" version = "0.19.0" @@ -3506,7 +3566,7 @@ dependencies = [ "futures-executor", "futures-util", "once_cell", - "opentelemetry_api 0.19.0", + "opentelemetry_api", "percent-encoding", "rand", "thiserror", @@ -3516,22 +3576,21 @@ dependencies = [ [[package]] name = "opentelemetry_sdk" -version = "0.20.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa8e705a0612d48139799fcbaba0d4a90f06277153e43dd2bdc16c6f0edd8026" +checksum = "968ba3f2ca03e90e5187f5e4f46c791ef7f2c163ae87789c8ce5f5ca3b7b7de5" dependencies = [ "async-trait", "crossbeam-channel", "futures-channel", "futures-executor", "futures-util", + "glob", "once_cell", - "opentelemetry_api 0.20.0", + "opentelemetry 0.21.0", "ordered-float", "percent-encoding", "rand", - "regex", - "serde_json", "thiserror", "tokio", "tokio-stream", @@ -3539,23 +3598,13 @@ dependencies = [ [[package]] name = "ordered-float" -version = "3.9.2" +version = "4.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1e1c390732d15f1d48471625cd92d154e66db2c56645e29a9cd26f4699f72dc" +checksum = "536900a8093134cf9ccf00a27deb3532421099e958d9dd431135d0c7543ca1e8" dependencies = [ "num-traits", ] -[[package]] -name = "ordered-multimap" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccd746e37177e1711c20dd619a1620f34f5c8b569c53590a72dedd5344d8924a" -dependencies = [ - "dlv-list", - "hashbrown 0.12.3", -] - [[package]] name = "overload" version = "0.1.1" @@ -3649,51 +3698,6 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" -[[package]] -name = "pest" -version = "2.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae9cee2a55a544be8b89dc6848072af97a20f2422603c10865be2a42b580fff5" -dependencies = [ - "memchr", - "thiserror", - "ucd-trie", -] - -[[package]] -name = "pest_derive" -version = "2.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81d78524685f5ef2a3b3bd1cafbc9fcabb036253d9b1463e726a91cd16e2dfc2" -dependencies = [ - "pest", - "pest_generator", -] - -[[package]] -name = "pest_generator" -version = "2.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68bd1206e71118b5356dae5ddc61c8b11e28b09ef6a31acbd15ea48a28e0c227" -dependencies = [ - "pest", - "pest_meta", - "proc-macro2", - "quote", - "syn 2.0.39", -] - -[[package]] -name = "pest_meta" -version = "2.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c747191d4ad9e4a4ab9c8798f1e82a39affe7ef9648390b7e5548d18e099de6" -dependencies = [ - "once_cell", - "pest", - "sha2", -] - [[package]] name = "phf" version = "0.10.1" @@ -3738,7 +3742,7 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" dependencies = [ - "siphasher", + "siphasher 0.3.11", ] [[package]] @@ -3747,59 +3751,66 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" dependencies = [ - "siphasher", + "siphasher 0.3.11", ] [[package]] name = "pict-rs" -version = "0.4.5" +version = "0.5.0-beta.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4abe9ff018542d54d486f8fe3ea05f7bb09dc172fdbaa08e945abf0e64b2495" +checksum = "9aee5f19113e9a0e221c4ed01eaa10830926aa8d3ab7330e8bc87911c776062c" dependencies = [ "actix-form-data", - "actix-rt", - "actix-server", "actix-web", "anyhow", "async-trait", + "barrel", "base64 0.21.5", "clap", "color-eyre", "config", "console-subscriber 0.2.0", "dashmap", - "futures-util", + "deadpool", + "diesel", + "diesel-async 0.4.1", + "diesel-derive-enum", + "flume", + "futures-core", "hex", "md-5", + "metrics", + "metrics-exporter-prometheus", "mime", - "num_cpus", - "once_cell", - "opentelemetry 0.20.0", - "opentelemetry-otlp 0.13.0", + "opentelemetry 0.21.0", + "opentelemetry-otlp 0.14.0", + "opentelemetry_sdk 0.21.1", "pin-project-lite", - "quick-xml 0.30.0", + "refinery", "reqwest", "reqwest-middleware", "reqwest-tracing", "rusty-s3", "serde", + "serde-tuple-vec-map", "serde_json", "serde_urlencoded", "sha2", "sled", "storage-path-generator", + "streem", "subtle", "thiserror", "time", "tokio", + "tokio-postgres", "tokio-util", "toml 0.8.8", "tracing", "tracing-actix-web", "tracing-error", - "tracing-futures", - "tracing-log 0.1.4", - "tracing-opentelemetry 0.21.0", + "tracing-log 0.2.0", + "tracing-opentelemetry 0.22.0", "tracing-subscriber", "url", "uuid", @@ -3886,6 +3897,26 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "portable-atomic" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bccab0e7fd7cc19f820a1c8c91720af652d0c88dc9664dd72aef2614f04af3b" + +[[package]] +name = "postgres" +version = "0.19.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7915b33ed60abc46040cbcaa25ffa1c7ec240668e0477c4f3070786f5916d451" +dependencies = [ + "bytes", + "fallible-iterator", + "futures-util", + "log", + "tokio", + "tokio-postgres", +] + [[package]] name = "postgres-protocol" version = "0.6.6" @@ -3913,6 +3944,10 @@ dependencies = [ "bytes", "fallible-iterator", "postgres-protocol", + "serde", + "serde_json", + "time", + "uuid", ] [[package]] @@ -4087,16 +4122,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "quick-xml" -version = "0.27.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc053f057dd768a56f62cd7e434c42c831d296968997e9ac1f76ea7c2d14c41" -dependencies = [ - "memchr", - "serde", -] - [[package]] name = "quick-xml" version = "0.30.0" @@ -4200,6 +4225,52 @@ dependencies = [ "bitflags 1.3.2", ] +[[package]] +name = "refinery" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "529664dbccc0a296947615c997a857912d72d1c44be1fafb7bae54ecfa7a8c24" +dependencies = [ + "refinery-core", + "refinery-macros", +] + +[[package]] +name = "refinery-core" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e895cb870cf06e92318cbbeb701f274d022d5ca87a16fa8244e291cd035ef954" +dependencies = [ + "async-trait", + "cfg-if", + "lazy_static", + "log", + "postgres", + "regex", + "serde", + "siphasher 1.0.0", + "thiserror", + "time", + "tokio", + "tokio-postgres", + "toml 0.7.8", + "url", + "walkdir", +] + +[[package]] +name = "refinery-macros" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "123e8b80f8010c3ae38330c81e76938fc7adf6cdbfbaad20295bb8c22718b4f1" +dependencies = [ + "proc-macro2", + "quote", + "refinery-core", + "regex", + "syn 2.0.39", +] + [[package]] name = "regex" version = "1.10.2" @@ -4423,16 +4494,6 @@ dependencies = [ "quick-xml 0.30.0", ] -[[package]] -name = "rust-ini" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6d5f2436026b4f6e79dc829837d467cc7e9a55ee40e750d716713540715a2df" -dependencies = [ - "cfg-if", - "ordered-multimap", -] - [[package]] name = "rustc-demangle" version = "0.1.23" @@ -4540,15 +4601,15 @@ checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "rusty-s3" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c92776b0db0fea6d7cc3abb9d0d745814c71124471a3bfd84b1265a28c06130" +checksum = "31aa883f1b986a5249641e574ca0e11ac4fb9970b009c6fbb96fedaf4fa78db8" dependencies = [ "base64 0.21.5", "hmac", "md-5", "percent-encoding", - "quick-xml 0.27.1", + "quick-xml 0.30.0", "serde", "serde_json", "sha2", @@ -4674,6 +4735,15 @@ dependencies = [ "serde_derive", ] +[[package]] +name = "serde-tuple-vec-map" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a04d0ebe0de77d7d445bb729a895dcb0a288854b267ca85f030ce51cdc578c82" +dependencies = [ + "serde", +] + [[package]] name = "serde_derive" version = "1.0.193" @@ -4845,6 +4915,12 @@ version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" +[[package]] +name = "siphasher" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54ac45299ccbd390721be55b412d41931911f654fa99e2cb8bfb57184b2061fe" + [[package]] name = "sitemap-rs" version = "0.2.0" @@ -4870,6 +4946,12 @@ dependencies = [ "walkdir", ] +[[package]] +name = "sketches-ddsketch" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68a406c1882ed7f29cd5e248c9848a80e7cb6ae0fea82346d2746f2f941c07e1" + [[package]] name = "slab" version = "0.4.9" @@ -4943,6 +5025,9 @@ name = "spin" version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +dependencies = [ + "lock_api", +] [[package]] name = "stacker" @@ -4963,6 +5048,16 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f11d35dae9818c4313649da4a97c8329e29357a7fe584526c1d78f5b63ef836" +[[package]] +name = "streem" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8b0c8184b0fe05b37dd75d66205195cd57563c6c87cb92134a025a34a6ab34" +dependencies = [ + "futures-core", + "pin-project-lite", +] + [[package]] name = "string_cache" version = "0.8.7" @@ -5595,10 +5690,10 @@ checksum = "1fe0d5feac3f4ca21ba33496bcb1ccab58cca6412b1405ae80f0581541e0ca78" dependencies = [ "actix-web", "mutually_exclusive_features", - "opentelemetry 0.20.0", + "opentelemetry 0.21.0", "pin-project", "tracing", - "tracing-opentelemetry 0.21.0", + "tracing-opentelemetry 0.22.0", "uuid", ] @@ -5694,18 +5789,20 @@ dependencies = [ [[package]] name = "tracing-opentelemetry" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75327c6b667828ddc28f5e3f169036cb793c3f588d83bf0f262a7f062ffed3c8" +checksum = "c67ac25c5407e7b961fafc6f7e9aa5958fd297aada2d20fa2ae1737357e55596" dependencies = [ + "js-sys", "once_cell", - "opentelemetry 0.20.0", - "opentelemetry_sdk 0.20.0", + "opentelemetry 0.21.0", + "opentelemetry_sdk 0.21.1", "smallvec", "tracing", "tracing-core", - "tracing-log 0.1.4", + "tracing-log 0.2.0", "tracing-subscriber", + "web-time", ] [[package]] @@ -5801,12 +5898,6 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" -[[package]] -name = "ucd-trie" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" - [[package]] name = "unicase" version = "2.7.0" @@ -5909,6 +6000,7 @@ version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e395fcf16a7a3d8127ec99782007af141946b4795001f876d54fb0d55978560" dependencies = [ + "atomic", "getrandom", "serde", ] @@ -6060,6 +6152,16 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "web-time" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57099a701fb3a8043f993e8228dc24229c7b942e2b009a1b962e54489ba1d3bf" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + [[package]] name = "webmention" version = "0.5.0" diff --git a/Cargo.toml b/Cargo.toml index 3bb1c58a2..5b9e319ba 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -183,7 +183,7 @@ tracing-opentelemetry = { workspace = true, optional = true } opentelemetry = { workspace = true, optional = true } console-subscriber = { version = "0.1.10", optional = true } opentelemetry-otlp = { version = "0.12.0", optional = true } -pict-rs = { version = "0.4.5", optional = true } +pict-rs = { version = "0.5.0-beta.2", optional = true } tokio.workspace = true actix-cors = "0.6.4" futures-util = { workspace = true } diff --git a/crates/db_schema/src/lib.rs b/crates/db_schema/src/lib.rs index 8d5ad8d79..a53a1733c 100644 --- a/crates/db_schema/src/lib.rs +++ b/crates/db_schema/src/lib.rs @@ -31,7 +31,11 @@ pub mod schema; #[cfg(feature = "full")] pub mod aliases { use crate::schema::{community_moderator, person}; - diesel::alias!(person as person1: Person1, person as person2: Person2, community_moderator as community_moderator1: CommunityModerator1); + diesel::alias!( + person as person1: Person1, + person as person2: Person2, + community_moderator as community_moderator1: CommunityModerator1 + ); } pub mod source; #[cfg(feature = "full")] diff --git a/src/main.rs b/src/main.rs index a876f7f11..85d74fb13 100644 --- a/src/main.rs +++ b/src/main.rs @@ -18,7 +18,7 @@ pub async fn main() -> Result<(), LemmyError> { .port() .unwrap_or(8080); let pictrs_address = ["127.0.0.1", &pictrs_port.to_string()].join(":"); - pict_rs::ConfigSource::memory(serde_json::json!({ + let pictrs_config = pict_rs::ConfigSource::memory(serde_json::json!({ "server": { "address": pictrs_address }, @@ -36,7 +36,7 @@ pub async fn main() -> Result<(), LemmyError> { })) .init::<&str>(None) .expect("initialize pictrs config"); - let (lemmy, pictrs) = tokio::join!(start_lemmy_server(args), pict_rs::run()); + let (lemmy, pictrs) = tokio::join!(start_lemmy_server(args), pictrs_config.run_on_localset()); lemmy?; pictrs.expect("run pictrs"); }