aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar cel 🌸 <cel@bunny.garden>2025-04-11 02:57:20 +0100
committerLibravatar cel 🌸 <cel@bunny.garden>2025-04-11 02:57:20 +0100
commit1299841ecb5648328a590658c2ea6ad18ecf46e3 (patch)
tree89932862dab0e59b76de10cf0d9a55413c831338
parent78577fb74949c83e3c8196a7310781c15e73bf64 (diff)
downloadmacaw-1299841ecb5648328a590658c2ea6ad18ecf46e3.tar.gz
macaw-1299841ecb5648328a590658c2ea6ad18ecf46e3.tar.bz2
macaw-1299841ecb5648328a590658c2ea6ad18ecf46e3.zip
i hate everything
Diffstat (limited to '')
-rw-r--r--.cargo/config.toml2
-rw-r--r--.gitignore1
-rw-r--r--.helix/languages.toml4
-rw-r--r--Cargo.lock1379
-rw-r--r--Cargo.toml9
-rw-r--r--aaaa.md11
-rw-r--r--ideas.md6
-rw-r--r--old_code.md460
-rw-r--r--src/main.rs883
-rw-r--r--src/message_view.rs71
10 files changed, 2158 insertions, 668 deletions
diff --git a/.cargo/config.toml b/.cargo/config.toml
new file mode 100644
index 0000000..c91c3f3
--- /dev/null
+++ b/.cargo/config.toml
@@ -0,0 +1,2 @@
+[net]
+git-fetch-with-cli = true
diff --git a/.gitignore b/.gitignore
index 8c308d0..e13b707 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
/target
.vscode
macaw.db
+filamento.db
diff --git a/.helix/languages.toml b/.helix/languages.toml
index 8742aed..e828879 100644
--- a/.helix/languages.toml
+++ b/.helix/languages.toml
@@ -1,4 +1,4 @@
[language-server.rust-analyzer]
command = "rust-analyzer"
-environment = { "DATABASE_URL" = "sqlite://luz.db" }
-config = { cargo.features = "all" }
+environment = { "DATABASE_URL" = "sqlite://filamento.db" }
+# config = { cargo.features = ["stanza/rfc_6121", "stanza/xep_0203", "stanza/xep_0030", "stanza/xep_0060", "stanza/xep_0172", "stanza/xep_0390", "stanza/xep_0128", "stanza/xep_0115", "stanza/xep_0084", "sqlx/sqlite", "sqlx/runtime-tokio", "sqlx/uuid", "sqlx/chrono", "jid/sqlx", "uuid/v4", "tokio/full", "rsasl/provider_base64", "rsasl/plain", "rsasl/config_builder", "rsasl/scram-sha-1"] }
diff --git a/Cargo.lock b/Cargo.lock
index b11868d..ae12778 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -43,10 +43,16 @@ dependencies = [
"getrandom 0.2.15",
"once_cell",
"version_check",
- "zerocopy",
+ "zerocopy 0.7.35",
]
[[package]]
+name = "aligned-vec"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4aa90d7ce82d4be67b64039a3d588d38dbcc6736577de4a847025ce5b0c468d1"
+
+[[package]]
name = "allocator-api2"
version = "0.2.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -59,7 +65,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ef6978589202a00cd7e118380c448a08b6ed394c3a8df3a430d0898e3a42d046"
dependencies = [
"android-properties",
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"cc",
"cesu8",
"jni",
@@ -95,12 +101,26 @@ dependencies = [
]
[[package]]
-name = "approx"
-version = "0.5.1"
+name = "anyhow"
+version = "1.0.97"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dcfed56ad506cb2c684a14971b8861fdc3baaaae314b9e5f9bb532cbe3ba7a4f"
+
+[[package]]
+name = "arbitrary"
+version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6"
+checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223"
+
+[[package]]
+name = "arg_enum_proc_macro"
+version = "0.3.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea"
dependencies = [
- "num-traits",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.100",
]
[[package]]
@@ -132,9 +152,9 @@ dependencies = [
[[package]]
name = "ashpd"
-version = "0.10.2"
+version = "0.10.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e9c39d707614dbcc6bed00015539f488d8e3fe3e66ed60961efc0c90f4b380b3"
+checksum = "de3d60bee1a1d38c2077030f4788e1b4e31058d2e79a8cfc8f2b440bd44db290"
dependencies = [
"async-fs",
"async-net",
@@ -235,7 +255,7 @@ dependencies = [
"futures-lite",
"parking",
"polling",
- "rustix",
+ "rustix 0.38.44",
"slab",
"tracing",
"windows-sys 0.59.0",
@@ -278,7 +298,7 @@ dependencies = [
"cfg-if",
"event-listener 5.4.0",
"futures-lite",
- "rustix",
+ "rustix 0.38.44",
"tracing",
]
@@ -290,7 +310,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.98",
+ "syn 2.0.100",
]
[[package]]
@@ -305,7 +325,7 @@ dependencies = [
"cfg-if",
"futures-core",
"futures-io",
- "rustix",
+ "rustix 0.38.44",
"signal-hook-registry",
"slab",
"windows-sys 0.59.0",
@@ -313,9 +333,9 @@ dependencies = [
[[package]]
name = "async-std"
-version = "1.13.0"
+version = "1.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c634475f29802fde2b8f0b505b1bd00dfe4df7d4a000f0b36f7671197d5c3615"
+checksum = "730294c1c08c2e0f85759590518f6333f0d5a0a766a27d519c1b244c3dfd8a24"
dependencies = [
"async-channel 1.9.0",
"async-global-executor",
@@ -345,13 +365,13 @@ checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de"
[[package]]
name = "async-trait"
-version = "0.1.86"
+version = "0.1.88"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "644dd749086bf3771a2fbc5f256fdb982d53f011c7d5d560304eafeecebce79d"
+checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.98",
+ "syn 2.0.100",
]
[[package]]
@@ -376,6 +396,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
[[package]]
+name = "av1-grain"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6678909d8c5d46a42abcf571271e15fdbc0a225e3646cf23762cd415046c78bf"
+dependencies = [
+ "anyhow",
+ "arrayvec",
+ "log",
+ "nom",
+ "num-rational",
+ "v_frame",
+]
+
+[[package]]
+name = "avif-serialize"
+version = "0.8.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "98922d6a4cfbcb08820c69d8eeccc05bb1f29bfa06b4f5b1dbfe9a868bd7608e"
+dependencies = [
+ "arrayvec",
+]
+
+[[package]]
name = "backtrace"
version = "0.3.74"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -398,9 +441,9 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
[[package]]
name = "base64ct"
-version = "1.6.0"
+version = "1.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b"
+checksum = "89e25b6adfb930f02d1981565a6e5d9c547ac15a96606256d3b59040e5cd4ca3"
[[package]]
name = "bit-set"
@@ -418,6 +461,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7"
[[package]]
+name = "bit_field"
+version = "0.10.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dc827186963e592360843fb5ba4b973e145841266c1357f7180c43526f2e5b61"
+
+[[package]]
name = "bitflags"
version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -425,14 +474,20 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "bitflags"
-version = "2.8.0"
+version = "2.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36"
+checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd"
dependencies = [
"serde",
]
[[package]]
+name = "bitstream-io"
+version = "2.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6099cdc01846bc367c4e7dd630dc5966dccf36b652fae7a74e17b640411a91b2"
+
+[[package]]
name = "block"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -470,35 +525,35 @@ dependencies = [
]
[[package]]
-name = "bumpalo"
-version = "3.17.0"
+name = "built"
+version = "0.7.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf"
+checksum = "56ed6191a7e78c36abdb16ab65341eefd73d64d303fffccdbb00d51e4205967b"
[[package]]
-name = "by_address"
-version = "1.2.1"
+name = "bumpalo"
+version = "3.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "64fa3c856b712db6612c019f14756e64e4bcea13337a6b33b696333a9eaa2d06"
+checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf"
[[package]]
name = "bytemuck"
-version = "1.21.0"
+version = "1.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ef657dfab802224e671f5818e9a4935f9b1957ed18e58292690cc39e7a4092a3"
+checksum = "b6b1fc10dbac614ebc03540c9dbd60e83887fda27794998c6528f1782047d540"
dependencies = [
"bytemuck_derive",
]
[[package]]
name = "bytemuck_derive"
-version = "1.8.1"
+version = "1.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3fa76293b4f7bb636ab88fd78228235b5248b4d05cc589aed610f954af5d7c7a"
+checksum = "7ecc273b49b3205b83d648f0690daa588925572cc5063745bfe547fe7ec8e1a1"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.98",
+ "syn 2.0.100",
]
[[package]]
@@ -508,10 +563,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
[[package]]
+name = "byteorder-lite"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495"
+
+[[package]]
name = "bytes"
-version = "1.10.0"
+version = "1.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f61dac84819c6588b558454b194026eb1f09c293b9036ae9b159e74e73ab6cf9"
+checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a"
[[package]]
name = "calloop"
@@ -519,10 +580,10 @@ version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b99da2f8558ca23c71f4fd15dc57c906239752dd27ff3c00a1d56b685b7cbfec"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"log",
"polling",
- "rustix",
+ "rustix 0.38.44",
"slab",
"thiserror 1.0.69",
]
@@ -534,16 +595,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95a66a987056935f7efce4ab5668920b5d0dac4a7c99991a67395f13702ddd20"
dependencies = [
"calloop",
- "rustix",
+ "rustix 0.38.44",
"wayland-backend",
"wayland-client",
]
[[package]]
name = "cc"
-version = "1.2.13"
+version = "1.2.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c7777341816418c02e033934a09f20dc0ccaf65a5201ef8a450ae0105a573fda"
+checksum = "525046617d8376e3db1deffb079e91cef90a89fc3ca5c185bbf8c9ecdd15cd5c"
dependencies = [
"jobserver",
"libc",
@@ -557,16 +618,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c"
[[package]]
-name = "cfg-if"
-version = "1.0.0"
+name = "cfg-expr"
+version = "0.15.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02"
+dependencies = [
+ "smallvec",
+ "target-lexicon",
+]
[[package]]
-name = "cfg_aliases"
-version = "0.1.1"
+name = "cfg-if"
+version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e"
+checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "cfg_aliases"
@@ -600,6 +665,7 @@ dependencies = [
[[package]]
name = "circular"
version = "0.3.0"
+source = "git+https://bunny.garden/forks/circular#0a9c9ab1e2f4e3eb912ad9fe91e3ea953e066453"
dependencies = [
"bytes",
]
@@ -654,6 +720,12 @@ dependencies = [
]
[[package]]
+name = "color_quant"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b"
+
+[[package]]
name = "combine"
version = "4.6.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -735,7 +807,7 @@ version = "0.24.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fa95a34622365fa5bbf40b20b75dba8dfa8c94c734aea8ac9a5ca38af14316f1"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"core-foundation 0.10.0",
"core-graphics-types 0.2.0",
"foreign-types 0.5.0",
@@ -759,7 +831,7 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"core-foundation 0.10.0",
"libc",
]
@@ -775,18 +847,18 @@ dependencies = [
[[package]]
name = "cosmic-text"
-version = "0.12.1"
+version = "0.14.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "59fd57d82eb4bfe7ffa9b1cec0c05e2fd378155b47f255a67983cb4afe0e80c2"
+checksum = "1db686e755000c93f73a3acc78be56a71e3efb83ed92886f45faea2b9485bad7"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"fontdb",
"log",
"rangemap",
- "rayon",
"rustc-hash 1.1.0",
"rustybuzz",
"self_cell",
+ "smol_str",
"swash",
"sys-locale",
"ttf-parser 0.21.1",
@@ -870,6 +942,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "43da5946c66ffcc7745f48db692ffbb10a83bfe0afd96235c5c2a4fb23994929"
[[package]]
+name = "cryoglyph"
+version = "0.1.0"
+source = "git+https://github.com/iced-rs/cryoglyph.git?rev=a456d1c17bbcf33afcca41d9e5e299f9f1193819#a456d1c17bbcf33afcca41d9e5e299f9f1193819"
+dependencies = [
+ "cosmic-text",
+ "etagere",
+ "lru",
+ "rustc-hash 2.1.1",
+ "wgpu",
+]
+
+[[package]]
name = "crypto-common"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1014,7 +1098,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.98",
+ "syn 2.0.100",
]
[[package]]
@@ -1058,11 +1142,11 @@ version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "98888c4bbd601524c11a7ed63f814b8825f420514f78e96f752c437ae9cbb5d1"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"bytemuck",
"drm-ffi",
"drm-fourcc",
- "rustix",
+ "rustix 0.38.44",
]
[[package]]
@@ -1072,7 +1156,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "97c98727e48b7ccb4f4aea8cfe881e5b07f702d17b7875991881b41af7278d53"
dependencies = [
"drm-sys",
- "rustix",
+ "rustix 0.38.44",
]
[[package]]
@@ -1093,9 +1177,9 @@ dependencies = [
[[package]]
name = "either"
-version = "1.13.0"
+version = "1.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0"
+checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719"
dependencies = [
"serde",
]
@@ -1136,20 +1220,20 @@ checksum = "fc4caf64a58d7a6d65ab00639b046ff54399a39f5f2554728895ace4b297cd79"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.98",
+ "syn 2.0.100",
]
[[package]]
name = "equivalent"
-version = "1.0.1"
+version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
+checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
[[package]]
name = "errno"
-version = "0.3.10"
+version = "0.3.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d"
+checksum = "976dd42dc7e85965fe702eb8164f21f450704bdde31faefd6471dba214cb594e"
dependencies = [
"libc",
"windows-sys 0.59.0",
@@ -1210,19 +1294,28 @@ dependencies = [
[[package]]
name = "event-listener-strategy"
-version = "0.5.3"
+version = "0.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3c3e4e0dd3673c1139bf041f3008816d9cf2946bbfac2945c09e523b8d7b05b2"
+checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93"
dependencies = [
"event-listener 5.4.0",
"pin-project-lite",
]
[[package]]
-name = "fast-srgb8"
-version = "1.0.0"
+name = "exr"
+version = "1.73.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dd2e7510819d6fbf51a5545c8f922716ecfb14df168a3242f7d33e0239efe6a1"
+checksum = "f83197f59927b46c04a183a619b7c29df34e63e63c7869320862268c0ef687e0"
+dependencies = [
+ "bit_field",
+ "half",
+ "lebe",
+ "miniz_oxide",
+ "rayon-core",
+ "smallvec",
+ "zune-inflate",
+]
[[package]]
name = "fastrand"
@@ -1242,14 +1335,21 @@ dependencies = [
[[package]]
name = "filamento"
version = "0.1.0"
+source = "git+https://bunny.garden/luz#aab4cd47b1d2da5539c50675be4c7a36898189ef"
dependencies = [
+ "base64",
"chrono",
"futures",
+ "hex",
+ "image",
"jid",
"lampada",
+ "sha1",
+ "sha2",
+ "sha3",
"sqlx",
"stanza",
- "thiserror 2.0.11",
+ "thiserror 2.0.12",
"tokio",
"tracing",
"uuid",
@@ -1257,9 +1357,9 @@ dependencies = [
[[package]]
name = "flate2"
-version = "1.0.35"
+version = "1.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c"
+checksum = "7ced92e76e966ca2fd84c8f7aa01a4aea65b0eb6648d72f7c8f3e2764a67fece"
dependencies = [
"crc32fast",
"miniz_oxide",
@@ -1278,15 +1378,15 @@ dependencies = [
[[package]]
name = "foldhash"
-version = "0.1.4"
+version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a0d2fde1f7b3d48b8395d5f2de76c18a528bd6a9cdde438df747bfcba3e05d6f"
+checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2"
[[package]]
name = "font-types"
-version = "0.7.3"
+version = "0.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b3971f9a5ca983419cdc386941ba3b9e1feba01a0ab888adf78739feb2798492"
+checksum = "1fa6a5e5a77b5f3f7f9e32879f484aa5b3632ddfbe568a16266c904a6f32cdaf"
dependencies = [
"bytemuck",
]
@@ -1341,7 +1441,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.98",
+ "syn 2.0.100",
]
[[package]]
@@ -1446,7 +1546,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.98",
+ "syn 2.0.100",
]
[[package]]
@@ -1512,14 +1612,24 @@ dependencies = [
[[package]]
name = "getrandom"
-version = "0.3.1"
+version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8"
+checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0"
dependencies = [
"cfg-if",
"libc",
- "wasi 0.13.3+wasi-0.2.2",
- "windows-targets 0.52.6",
+ "r-efi",
+ "wasi 0.14.2+wasi-0.2.4",
+]
+
+[[package]]
+name = "gif"
+version = "0.13.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3fb2d69b19215e18bb912fa30f7ce15846e301408695e44e0ef719f1da9e19f2"
+dependencies = [
+ "color_quant",
+ "weezl",
]
[[package]]
@@ -1559,9 +1669,9 @@ dependencies = [
[[package]]
name = "glow"
-version = "0.14.2"
+version = "0.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d51fa363f025f5c111e03f13eda21162faeacb6911fe8caa0c0349f9cf0c4483"
+checksum = "c5e5ea60d70410161c8bf5da3fdfeaa1c72ed2c15f8bbb9d19fe3a4fad085f08"
dependencies = [
"js-sys",
"slotmap",
@@ -1579,24 +1689,12 @@ dependencies = [
]
[[package]]
-name = "glyphon"
-version = "0.5.0"
-source = "git+https://github.com/hecrj/glyphon.git?rev=09712a70df7431e9a3b1ac1bbd4fb634096cb3b4#09712a70df7431e9a3b1ac1bbd4fb634096cb3b4"
-dependencies = [
- "cosmic-text",
- "etagere",
- "lru",
- "rustc-hash 2.1.1",
- "wgpu",
-]
-
-[[package]]
name = "gpu-alloc"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fbcd2dba93594b227a1f57ee09b8b9da8892c34d55aa332e034a228d0fe6a171"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"gpu-alloc-types",
]
@@ -1606,7 +1704,7 @@ version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "98ff03b468aa837d70984d55f5d3f846f6ec31fe34bbb97c4f85219caeee1ca4"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
]
[[package]]
@@ -1627,7 +1725,7 @@ version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dcf29e94d6d243368b7a56caa16bc213e4f9f8ed38c4d9557069527b5d5281ca"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"gpu-descriptor-types",
"hashbrown",
]
@@ -1638,7 +1736,7 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fdf242682df893b86f33a73828fb09ca4b2d3bb6cc95249707fc684d27484b91"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
]
[[package]]
@@ -1653,9 +1751,9 @@ dependencies = [
[[package]]
name = "half"
-version = "2.4.1"
+version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888"
+checksum = "459196ed295495a68f7d7fe1d84f6c4b7ff0e21fe3017b2f283c6fac3ad803c9"
dependencies = [
"cfg-if",
"crunchy",
@@ -1746,27 +1844,28 @@ dependencies = [
[[package]]
name = "hostname"
-version = "0.3.1"
+version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867"
+checksum = "a56f203cd1c76362b69e3863fd987520ac36cf70a8c92627449b2f64a8cf7d65"
dependencies = [
+ "cfg-if",
"libc",
- "match_cfg",
- "winapi",
+ "windows-link",
]
[[package]]
name = "iana-time-zone"
-version = "0.1.61"
+version = "0.1.63"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220"
+checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8"
dependencies = [
"android_system_properties",
"core-foundation-sys",
"iana-time-zone-haiku",
"js-sys",
+ "log",
"wasm-bindgen",
- "windows-core 0.52.0",
+ "windows-core 0.61.0",
]
[[package]]
@@ -1781,29 +1880,31 @@ dependencies = [
[[package]]
name = "iced"
version = "0.14.0-dev"
-source = "git+https://github.com/iced-rs/iced#beddf49c76f3b43e7b33452831e1293cad28fd89"
+source = "git+https://github.com/iced-rs/iced#3ee9a1e18716aa25ab09458201e69c83d3df276c"
dependencies = [
"iced_core",
+ "iced_debug",
"iced_futures",
"iced_renderer",
+ "iced_runtime",
"iced_widget",
"iced_winit",
+ "image",
"thiserror 1.0.69",
]
[[package]]
name = "iced_core"
version = "0.14.0-dev"
-source = "git+https://github.com/iced-rs/iced#beddf49c76f3b43e7b33452831e1293cad28fd89"
+source = "git+https://github.com/iced-rs/iced#3ee9a1e18716aa25ab09458201e69c83d3df276c"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"bytes",
"dark-light",
"glam",
"lilt",
"log",
"num-traits",
- "palette",
"rustc-hash 2.1.1",
"smol_str",
"thiserror 1.0.69",
@@ -1811,9 +1912,18 @@ dependencies = [
]
[[package]]
+name = "iced_debug"
+version = "0.14.0-dev"
+source = "git+https://github.com/iced-rs/iced#3ee9a1e18716aa25ab09458201e69c83d3df276c"
+dependencies = [
+ "iced_core",
+ "log",
+]
+
+[[package]]
name = "iced_futures"
version = "0.14.0-dev"
-source = "git+https://github.com/iced-rs/iced#beddf49c76f3b43e7b33452831e1293cad28fd89"
+source = "git+https://github.com/iced-rs/iced#3ee9a1e18716aa25ab09458201e69c83d3df276c"
dependencies = [
"futures",
"iced_core",
@@ -1827,14 +1937,16 @@ dependencies = [
[[package]]
name = "iced_graphics"
version = "0.14.0-dev"
-source = "git+https://github.com/iced-rs/iced#beddf49c76f3b43e7b33452831e1293cad28fd89"
+source = "git+https://github.com/iced-rs/iced#3ee9a1e18716aa25ab09458201e69c83d3df276c"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"bytemuck",
"cosmic-text",
"half",
"iced_core",
"iced_futures",
+ "image",
+ "kamadak-exif",
"log",
"raw-window-handle",
"rustc-hash 2.1.1",
@@ -1843,9 +1955,18 @@ dependencies = [
]
[[package]]
+name = "iced_program"
+version = "0.14.0-dev"
+source = "git+https://github.com/iced-rs/iced#3ee9a1e18716aa25ab09458201e69c83d3df276c"
+dependencies = [
+ "iced_graphics",
+ "iced_runtime",
+]
+
+[[package]]
name = "iced_renderer"
version = "0.14.0-dev"
-source = "git+https://github.com/iced-rs/iced#beddf49c76f3b43e7b33452831e1293cad28fd89"
+source = "git+https://github.com/iced-rs/iced#3ee9a1e18716aa25ab09458201e69c83d3df276c"
dependencies = [
"iced_graphics",
"iced_tiny_skia",
@@ -1857,23 +1978,24 @@ dependencies = [
[[package]]
name = "iced_runtime"
version = "0.14.0-dev"
-source = "git+https://github.com/iced-rs/iced#beddf49c76f3b43e7b33452831e1293cad28fd89"
+source = "git+https://github.com/iced-rs/iced#3ee9a1e18716aa25ab09458201e69c83d3df276c"
dependencies = [
"bytes",
"iced_core",
+ "iced_debug",
"iced_futures",
"raw-window-handle",
- "sipper",
"thiserror 1.0.69",
]
[[package]]
name = "iced_tiny_skia"
version = "0.14.0-dev"
-source = "git+https://github.com/iced-rs/iced#beddf49c76f3b43e7b33452831e1293cad28fd89"
+source = "git+https://github.com/iced-rs/iced#3ee9a1e18716aa25ab09458201e69c83d3df276c"
dependencies = [
"bytemuck",
"cosmic-text",
+ "iced_debug",
"iced_graphics",
"kurbo",
"log",
@@ -1885,14 +2007,15 @@ dependencies = [
[[package]]
name = "iced_wgpu"
version = "0.14.0-dev"
-source = "git+https://github.com/iced-rs/iced#beddf49c76f3b43e7b33452831e1293cad28fd89"
+source = "git+https://github.com/iced-rs/iced#3ee9a1e18716aa25ab09458201e69c83d3df276c"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"bytemuck",
+ "cryoglyph",
"futures",
"glam",
- "glyphon",
"guillotiere",
+ "iced_debug",
"iced_graphics",
"log",
"rustc-hash 2.1.1",
@@ -1903,7 +2026,7 @@ dependencies = [
[[package]]
name = "iced_widget"
version = "0.14.0-dev"
-source = "git+https://github.com/iced-rs/iced#beddf49c76f3b43e7b33452831e1293cad28fd89"
+source = "git+https://github.com/iced-rs/iced#3ee9a1e18716aa25ab09458201e69c83d3df276c"
dependencies = [
"iced_renderer",
"iced_runtime",
@@ -1917,11 +2040,10 @@ dependencies = [
[[package]]
name = "iced_winit"
version = "0.14.0-dev"
-source = "git+https://github.com/iced-rs/iced#beddf49c76f3b43e7b33452831e1293cad28fd89"
+source = "git+https://github.com/iced-rs/iced#3ee9a1e18716aa25ab09458201e69c83d3df276c"
dependencies = [
- "iced_futures",
- "iced_graphics",
- "iced_runtime",
+ "iced_debug",
+ "iced_program",
"log",
"rustc-hash 2.1.1",
"thiserror 1.0.69",
@@ -1973,9 +2095,9 @@ dependencies = [
[[package]]
name = "icu_locid_transform_data"
-version = "1.5.0"
+version = "1.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e"
+checksum = "7515e6d781098bf9f7205ab3fc7e9709d34554ae0b21ddbcb5febfa4bc7df11d"
[[package]]
name = "icu_normalizer"
@@ -1997,9 +2119,9 @@ dependencies = [
[[package]]
name = "icu_normalizer_data"
-version = "1.5.0"
+version = "1.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516"
+checksum = "c5e8338228bdc8ab83303f16b797e177953730f601a96c25d10cb3ab0daa0cb7"
[[package]]
name = "icu_properties"
@@ -2018,9 +2140,9 @@ dependencies = [
[[package]]
name = "icu_properties_data"
-version = "1.5.0"
+version = "1.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569"
+checksum = "85fb8799753b75aee8d2a21d7c14d9f38921b54b3dbda10f5a3c7a7b82dba5e2"
[[package]]
name = "icu_provider"
@@ -2047,7 +2169,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.98",
+ "syn 2.0.100",
]
[[package]]
@@ -2083,16 +2205,66 @@ dependencies = [
]
[[package]]
+name = "image"
+version = "0.25.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "db35664ce6b9810857a38a906215e75a9c879f0696556a39f59c62829710251a"
+dependencies = [
+ "bytemuck",
+ "byteorder-lite",
+ "color_quant",
+ "exr",
+ "gif",
+ "image-webp",
+ "num-traits",
+ "png",
+ "qoi",
+ "ravif",
+ "rayon",
+ "rgb",
+ "tiff",
+ "zune-core",
+ "zune-jpeg",
+]
+
+[[package]]
+name = "image-webp"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b77d01e822461baa8409e156015a1d91735549f0f2c17691bd2d996bef238f7f"
+dependencies = [
+ "byteorder-lite",
+ "quick-error",
+]
+
+[[package]]
+name = "imgref"
+version = "1.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d0263a3d970d5c054ed9312c0057b4f3bde9c0b33836d3637361d4a9e6e7a408"
+
+[[package]]
name = "indexmap"
-version = "2.7.1"
+version = "2.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8c9c992b02b5b4c94ea26e32fe5bccb7aa7d9f390ab5c1221ff895bc7ea8b652"
+checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e"
dependencies = [
"equivalent",
"hashbrown",
]
[[package]]
+name = "interpolate_name"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.100",
+]
+
+[[package]]
name = "ipconfig"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2111,14 +2283,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130"
[[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.14"
+version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674"
+checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c"
[[package]]
name = "jid"
version = "0.1.0"
+source = "git+https://bunny.garden/luz#aab4cd47b1d2da5539c50675be4c7a36898189ef"
dependencies = [
"sqlx",
]
@@ -2147,14 +2329,21 @@ checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130"
[[package]]
name = "jobserver"
-version = "0.1.32"
+version = "0.1.33"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0"
+checksum = "38f262f097c174adebe41eb73d66ae9c06b2844fb0da69969647bbddd9b0538a"
dependencies = [
+ "getrandom 0.3.2",
"libc",
]
[[package]]
+name = "jpeg-decoder"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f5d4a7da358eff58addd2877a45865158f0d78c911d43a5784ceb7bbf52833b0"
+
+[[package]]
name = "js-sys"
version = "0.3.77"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2165,10 +2354,28 @@ dependencies = [
]
[[package]]
+name = "kamadak-exif"
+version = "0.5.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ef4fc70d0ab7e5b6bafa30216a6b48705ea964cdfc29c050f2412295eba58077"
+dependencies = [
+ "mutate_once",
+]
+
+[[package]]
+name = "keccak"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654"
+dependencies = [
+ "cpufeatures",
+]
+
+[[package]]
name = "keyring"
-version = "3.6.1"
+version = "3.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2f8fe839464d4e4b37d756d7e910063696af79a7e877282cb1825e4ec5f10833"
+checksum = "1961983669d57bdfe6c0f3ef8e4c229b5ef751afcc7d87e4271d2f71f6ccfa8b"
dependencies = [
"byteorder",
"dbus-secret-service",
@@ -2217,13 +2424,14 @@ dependencies = [
[[package]]
name = "lampada"
version = "0.1.0"
+source = "git+https://bunny.garden/luz#aab4cd47b1d2da5539c50675be4c7a36898189ef"
dependencies = [
"futures",
"jid",
"luz",
"peanuts",
"stanza",
- "thiserror 2.0.11",
+ "thiserror 2.0.12",
"tokio",
"tracing",
]
@@ -2238,10 +2446,16 @@ dependencies = [
]
[[package]]
+name = "lebe"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8"
+
+[[package]]
name = "libc"
-version = "0.2.169"
+version = "0.2.171"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a"
+checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6"
[[package]]
name = "libdbus-sys"
@@ -2253,6 +2467,16 @@ dependencies = [
]
[[package]]
+name = "libfuzzer-sys"
+version = "0.4.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cf78f52d400cf2d84a3a973a78a592b4adc535739e0a5597a0da6f0c357adc75"
+dependencies = [
+ "arbitrary",
+ "cc",
+]
+
+[[package]]
name = "libloading"
version = "0.8.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2274,9 +2498,9 @@ version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"libc",
- "redox_syscall 0.5.8",
+ "redox_syscall 0.5.11",
]
[[package]]
@@ -2292,9 +2516,9 @@ dependencies = [
[[package]]
name = "lilt"
-version = "0.8.0"
+version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1ab94c7e69044511f79ce4b4201a49324b7f5b35410f862264e044690b950a67"
+checksum = "f67562e5eff6b20553fa9be1c503356768420994e28f67e3eafe6f41910e57ad"
dependencies = [
"web-time",
]
@@ -2318,10 +2542,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2a385b1be4e5c3e362ad2ffa73c392e53f031eaa5b7d648e64cd87f27f6063d7"
[[package]]
+name = "linux-raw-sys"
+version = "0.9.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12"
+
+[[package]]
name = "litemap"
-version = "0.7.4"
+version = "0.7.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104"
+checksum = "23fb14cb19457329c82206317a5663005a4d404783dc74f4252769b0d5f42856"
[[package]]
name = "litrs"
@@ -2341,14 +2571,23 @@ dependencies = [
[[package]]
name = "log"
-version = "0.4.25"
+version = "0.4.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f"
+checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94"
dependencies = [
"value-bag",
]
[[package]]
+name = "loop9"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0fae87c125b03c1d2c0150c90365d7d6bcc53fb73a9acaef207d2d065860f062"
+dependencies = [
+ "imgref",
+]
+
+[[package]]
name = "lru"
version = "0.12.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2366,6 +2605,7 @@ dependencies = [
[[package]]
name = "luz"
version = "0.1.0"
+source = "git+https://bunny.garden/luz#aab4cd47b1d2da5539c50675be4c7a36898189ef"
dependencies = [
"async-recursion",
"async-trait",
@@ -2379,7 +2619,7 @@ dependencies = [
"rsasl",
"stanza",
"take_mut",
- "thiserror 2.0.11",
+ "thiserror 2.0.12",
"tokio",
"tokio-native-tls",
"tracing",
@@ -2401,7 +2641,7 @@ dependencies = [
"jid",
"keyring",
"serde",
- "thiserror 2.0.11",
+ "thiserror 2.0.12",
"tokio",
"tokio-stream",
"toml",
@@ -2420,18 +2660,22 @@ dependencies = [
]
[[package]]
-name = "match_cfg"
-version = "0.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4"
-
-[[package]]
name = "matches"
version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5"
[[package]]
+name = "maybe-rayon"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8ea1f30cedd69f0a2954655f7188c6a834246d2bcf1e315e2ac40c4b24dc9519"
+dependencies = [
+ "cfg-if",
+ "rayon",
+]
+
+[[package]]
name = "md-5"
version = "0.10.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2467,11 +2711,11 @@ dependencies = [
[[package]]
name = "metal"
-version = "0.29.0"
+version = "0.31.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7ecfd3296f8c56b7c1f6fbac3c71cefa9d78ce009850c45000015f206dc7fa21"
+checksum = "f569fb946490b5743ad69813cb19629130ce9374034abe31614a36402d18f99e"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"block",
"core-graphics-types 0.1.3",
"foreign-types 0.5.0",
@@ -2488,9 +2732,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
[[package]]
name = "miniz_oxide"
-version = "0.8.4"
+version = "0.8.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b3b1c9bd4fe1f0f8b387f6eb9eb3b4a1aa26185e5750efb9140301703f62cd1b"
+checksum = "3be647b768db090acb35d5ec5db2b0e1f1de11133ca123b9eacf5137868f892a"
dependencies = [
"adler2",
"simd-adler32",
@@ -2508,23 +2752,30 @@ dependencies = [
]
[[package]]
+name = "mutate_once"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "16cf681a23b4d0a43fc35024c176437f9dcd818db34e0f42ab456a0ee5ad497b"
+
+[[package]]
name = "naga"
-version = "23.1.0"
+version = "24.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "364f94bc34f61332abebe8cad6f6cd82a5b65cff22c828d05d0968911462ca4f"
+checksum = "e380993072e52eef724eddfcde0ed013b0c023c3f0417336ed041aa9f076994e"
dependencies = [
"arrayvec",
"bit-set",
- "bitflags 2.8.0",
- "cfg_aliases 0.1.1",
+ "bitflags 2.9.0",
+ "cfg_aliases",
"codespan-reporting",
"hexf-parse",
"indexmap",
"log",
"rustc-hash 1.1.0",
"spirv",
+ "strum",
"termcolor",
- "thiserror 1.0.69",
+ "thiserror 2.0.12",
"unicode-xid",
]
@@ -2539,9 +2790,9 @@ dependencies = [
[[package]]
name = "native-tls"
-version = "0.2.13"
+version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0dab59f8e050d5df8e4dd87d9206fb6f65a483e20ac9fda365ade4fab353196c"
+checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e"
dependencies = [
"libc",
"log",
@@ -2560,7 +2811,7 @@ version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"jni-sys",
"log",
"ndk-sys 0.6.0+11769913",
@@ -2594,14 +2845,20 @@ dependencies = [
]
[[package]]
+name = "new_debug_unreachable"
+version = "1.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086"
+
+[[package]]
name = "nix"
version = "0.29.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"cfg-if",
- "cfg_aliases 0.2.1",
+ "cfg_aliases",
"libc",
"memoffset",
]
@@ -2617,6 +2874,12 @@ dependencies = [
]
[[package]]
+name = "noop_proc_macro"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8"
+
+[[package]]
name = "nu-ansi-term"
version = "0.46.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2677,6 +2940,17 @@ dependencies = [
]
[[package]]
+name = "num-derive"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.100",
+]
+
+[[package]]
name = "num-integer"
version = "0.1.46"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2745,7 +3019,7 @@ dependencies = [
"proc-macro-crate",
"proc-macro2",
"quote",
- "syn 2.0.98",
+ "syn 2.0.100",
]
[[package]]
@@ -2779,7 +3053,7 @@ version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"block2",
"libc",
"objc2",
@@ -2795,7 +3069,7 @@ version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"block2",
"objc2",
"objc2-core-location",
@@ -2819,7 +3093,7 @@ version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"block2",
"objc2",
"objc2-foundation",
@@ -2861,7 +3135,7 @@ version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"block2",
"dispatch",
"libc",
@@ -2886,7 +3160,7 @@ version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"block2",
"objc2",
"objc2-foundation",
@@ -2898,7 +3172,7 @@ version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"block2",
"objc2",
"objc2-foundation",
@@ -2921,7 +3195,7 @@ version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"block2",
"objc2",
"objc2-cloud-kit",
@@ -2953,7 +3227,7 @@ version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"block2",
"objc2",
"objc2-core-location",
@@ -2971,17 +3245,17 @@ dependencies = [
[[package]]
name = "once_cell"
-version = "1.20.3"
+version = "1.21.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "945462a4b81e43c4e3ba96bd7b49d834c6f61198356aa858733bc4acf3cbe62e"
+checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
[[package]]
name = "openssl"
-version = "0.10.70"
+version = "0.10.72"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "61cfb4e166a8bb8c9b55c500bc2308550148ece889be90f609377e58140f42c6"
+checksum = "fedfea7d58a1f73118430a55da6a286e7b044961736ce96a16a17068ea25e5da"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"cfg-if",
"foreign-types 0.3.2",
"libc",
@@ -2998,7 +3272,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.98",
+ "syn 2.0.100",
]
[[package]]
@@ -3009,9 +3283,9 @@ checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e"
[[package]]
name = "openssl-sys"
-version = "0.9.105"
+version = "0.9.107"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8b22d5b84be05a8d6947c7cb71f7c849aa0f112acd4bf51c2a7c1c988ac0a9dc"
+checksum = "8288979acd84749c744a9014b4382d42b8f7b2592847b5afb2ed29e5d16ede07"
dependencies = [
"cc",
"libc",
@@ -3035,6 +3309,15 @@ dependencies = [
]
[[package]]
+name = "ordered-float"
+version = "4.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7bb71e1b3fa6ca1c61f383464aaf2bb0e2f8e772a1f01d486832464de363b951"
+dependencies = [
+ "num-traits",
+]
+
+[[package]]
name = "ordered-stream"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3060,30 +3343,6 @@ dependencies = [
]
[[package]]
-name = "palette"
-version = "0.7.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4cbf71184cc5ecc2e4e1baccdb21026c20e5fc3dcf63028a086131b3ab00b6e6"
-dependencies = [
- "approx",
- "fast-srgb8",
- "palette_derive",
- "phf",
-]
-
-[[package]]
-name = "palette_derive"
-version = "0.7.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f5030daf005bface118c096f510ffb781fc28f9ab6a32ab224d8631be6851d30"
-dependencies = [
- "by_address",
- "proc-macro2",
- "quote",
- "syn 2.0.98",
-]
-
-[[package]]
name = "parking"
version = "2.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3107,7 +3366,7 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8"
dependencies = [
"cfg-if",
"libc",
- "redox_syscall 0.5.8",
+ "redox_syscall 0.5.11",
"smallvec",
"windows-targets 0.52.6",
]
@@ -3130,13 +3389,15 @@ dependencies = [
[[package]]
name = "peanuts"
version = "0.1.0"
+source = "git+https://bunny.garden/peanuts#92f4fd88295cb39bf865e10b0a28cc36acb5276a"
dependencies = [
"async-recursion",
"circular",
"futures",
"futures-util",
"nom",
- "thiserror 2.0.11",
+ "pin-project",
+ "thiserror 2.0.12",
"tokio",
"tracing",
]
@@ -3157,65 +3418,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
[[package]]
-name = "phf"
-version = "0.11.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078"
-dependencies = [
- "phf_macros",
- "phf_shared",
-]
-
-[[package]]
-name = "phf_generator"
-version = "0.11.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d"
-dependencies = [
- "phf_shared",
- "rand",
-]
-
-[[package]]
-name = "phf_macros"
-version = "0.11.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216"
-dependencies = [
- "phf_generator",
- "phf_shared",
- "proc-macro2",
- "quote",
- "syn 2.0.98",
-]
-
-[[package]]
-name = "phf_shared"
-version = "0.11.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5"
-dependencies = [
- "siphasher",
-]
-
-[[package]]
name = "pin-project"
-version = "1.1.9"
+version = "1.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dfe2e71e1471fe07709406bf725f710b02927c9c54b2b5b2ec0e8087d97c327d"
+checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a"
dependencies = [
"pin-project-internal",
]
[[package]]
name = "pin-project-internal"
-version = "1.1.9"
+version = "1.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f6e859e6e5bd50440ab63c47e3ebabc90f26251f7c73c3d3e837b74a1cc3fa67"
+checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.98",
+ "syn 2.0.100",
]
[[package]]
@@ -3264,9 +3483,9 @@ dependencies = [
[[package]]
name = "pkg-config"
-version = "0.3.31"
+version = "0.3.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2"
+checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c"
[[package]]
name = "png"
@@ -3291,18 +3510,18 @@ dependencies = [
"concurrent-queue",
"hermit-abi 0.4.0",
"pin-project-lite",
- "rustix",
+ "rustix 0.38.44",
"tracing",
"windows-sys 0.59.0",
]
[[package]]
name = "ppv-lite86"
-version = "0.2.20"
+version = "0.2.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04"
+checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9"
dependencies = [
- "zerocopy",
+ "zerocopy 0.8.24",
]
[[package]]
@@ -3313,18 +3532,18 @@ checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa"
[[package]]
name = "proc-macro-crate"
-version = "3.2.0"
+version = "3.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b"
+checksum = "edce586971a4dfaa28950c6f18ed55e0406c1ab88bbce2c6f6293a7aaba73d35"
dependencies = [
"toml_edit",
]
[[package]]
name = "proc-macro2"
-version = "1.0.93"
+version = "1.0.94"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99"
+checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84"
dependencies = [
"unicode-ident",
]
@@ -3334,32 +3553,60 @@ name = "profiling"
version = "1.0.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "afbdc74edc00b6f6a218ca6a5364d6226a259d4b8ea1af4a0ea063f27e179f4d"
+dependencies = [
+ "profiling-procmacros",
+]
+
+[[package]]
+name = "profiling-procmacros"
+version = "1.0.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a65f2e60fbf1063868558d69c6beacf412dc755f9fc020f514b7955fc914fe30"
+dependencies = [
+ "quote",
+ "syn 2.0.100",
+]
+
+[[package]]
+name = "qoi"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7f6d64c71eb498fe9eae14ce4ec935c555749aef511cca85b5568910d6e48001"
+dependencies = [
+ "bytemuck",
+]
[[package]]
name = "quick-error"
-version = "1.2.3"
+version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0"
+checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3"
[[package]]
name = "quick-xml"
-version = "0.37.2"
+version = "0.37.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "165859e9e55f79d67b96c5d96f4e88b6f2695a1972849c15a6a3f5c59fc2c003"
+checksum = "a4ce8c88de324ff838700f36fb6ab86c96df0e3c4ab6ef3a9b2044465cce1369"
dependencies = [
"memchr",
]
[[package]]
name = "quote"
-version = "1.0.38"
+version = "1.0.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc"
+checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d"
dependencies = [
"proc-macro2",
]
[[package]]
+name = "r-efi"
+version = "5.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5"
+
+[[package]]
name = "rand"
version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3402,6 +3649,56 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f60fcc7d6849342eff22c4350c8b9a989ee8ceabc4b481253e8946b9fe83d684"
[[package]]
+name = "rav1e"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cd87ce80a7665b1cce111f8a16c1f3929f6547ce91ade6addf4ec86a8dda5ce9"
+dependencies = [
+ "arbitrary",
+ "arg_enum_proc_macro",
+ "arrayvec",
+ "av1-grain",
+ "bitstream-io",
+ "built",
+ "cfg-if",
+ "interpolate_name",
+ "itertools",
+ "libc",
+ "libfuzzer-sys",
+ "log",
+ "maybe-rayon",
+ "new_debug_unreachable",
+ "noop_proc_macro",
+ "num-derive",
+ "num-traits",
+ "once_cell",
+ "paste",
+ "profiling",
+ "rand",
+ "rand_chacha",
+ "simd_helpers",
+ "system-deps",
+ "thiserror 1.0.69",
+ "v_frame",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "ravif"
+version = "0.11.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2413fd96bd0ea5cdeeb37eaf446a22e6ed7b981d792828721e74ded1980a45c6"
+dependencies = [
+ "avif-serialize",
+ "imgref",
+ "loop9",
+ "quick-error",
+ "rav1e",
+ "rayon",
+ "rgb",
+]
+
+[[package]]
name = "raw-window-handle"
version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3429,9 +3726,9 @@ dependencies = [
[[package]]
name = "read-fonts"
-version = "0.22.7"
+version = "0.25.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "69aacb76b5c29acfb7f90155d39759a29496aebb49395830e928a9703d2eec2f"
+checksum = "f6f9e8a4f503e5c8750e4cd3b32a4e090035c46374b305a15c70bad833dca05f"
dependencies = [
"bytemuck",
"font-types",
@@ -3448,11 +3745,11 @@ dependencies = [
[[package]]
name = "redox_syscall"
-version = "0.5.8"
+version = "0.5.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834"
+checksum = "d2f103c6d277498fbceb16e84d317e2a400f160f46904d5f5410848c829511a3"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
]
[[package]]
@@ -3474,7 +3771,7 @@ checksum = "dd6f9d3d47bdd2ad6945c5015a226ec6155d0bcdfd8f7cd29f86b71f8de99d2b"
dependencies = [
"getrandom 0.2.15",
"libredox",
- "thiserror 2.0.11",
+ "thiserror 2.0.12",
]
[[package]]
@@ -3485,15 +3782,20 @@ checksum = "19b30a45b0cd0bcca8037f3d0dc3421eaf95327a17cad11964fb8179b4fc4832"
[[package]]
name = "resolv-conf"
-version = "0.7.0"
+version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "52e44394d2086d010551b14b53b1f24e31647570cd1deb0379e2c21b329aba00"
+checksum = "48375394603e3dd4b2d64371f7148fd8c7baa2680e28741f2cb8d23b59e3d4c4"
dependencies = [
"hostname",
- "quick-error",
]
[[package]]
+name = "rgb"
+version = "0.8.50"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "57397d16646700483b67d2dd6511d79318f9d057fdbd21a4066aeac8b41d310a"
+
+[[package]]
name = "roxmltree"
version = "0.20.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3501,9 +3803,9 @@ checksum = "6c20b6793b5c2fa6553b250154b78d6d0db37e72700ae35fad9387a46f487c97"
[[package]]
name = "rsa"
-version = "0.9.7"
+version = "0.9.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "47c75d7c5c6b673e58bf54d8544a9f432e3a925b0e80f7cd3602ab5c50c55519"
+checksum = "78928ac1ed176a5ca1d17e578a1825f3d81ca54cf41053a592584b020cfd691b"
dependencies = [
"const-oid",
"digest",
@@ -3561,7 +3863,7 @@ version = "0.38.44"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"errno",
"libc",
"linux-raw-sys 0.4.15",
@@ -3569,10 +3871,23 @@ dependencies = [
]
[[package]]
+name = "rustix"
+version = "1.0.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d97817398dd4bb2e6da002002db259209759911da105da92bec29ccb12cf58bf"
+dependencies = [
+ "bitflags 2.9.0",
+ "errno",
+ "libc",
+ "linux-raw-sys 0.9.4",
+ "windows-sys 0.59.0",
+]
+
+[[package]]
name = "rustversion"
-version = "1.0.19"
+version = "1.0.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4"
+checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2"
[[package]]
name = "rustybuzz"
@@ -3580,7 +3895,7 @@ version = "0.14.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cfb9cf8877777222e4a3bc7eb247e398b56baba500c38c1c46842431adc8b55c"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"bytemuck",
"libm",
"smallvec",
@@ -3593,9 +3908,9 @@ dependencies = [
[[package]]
name = "ryu"
-version = "1.0.19"
+version = "1.0.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6ea1a2d0a644769cc99faa24c3ad26b379b786fe7c36fd3c546254801650e6dd"
+checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f"
[[package]]
name = "same-file"
@@ -3646,7 +3961,7 @@ version = "2.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"core-foundation 0.9.4",
"core-foundation-sys",
"libc",
@@ -3659,7 +3974,7 @@ version = "3.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "271720403f46ca04f7ba6f55d438f8bd878d6b8ca0a1046e8228c4145bcbb316"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"core-foundation 0.10.0",
"core-foundation-sys",
"libc",
@@ -3684,29 +3999,29 @@ checksum = "c2fdfc24bc566f839a2da4c4295b82db7d25a24253867d5c64355abb5799bdbe"
[[package]]
name = "serde"
-version = "1.0.218"
+version = "1.0.219"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e8dfc9d19bdbf6d17e22319da49161d5d0108e4188e8b680aef6299eed22df60"
+checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
-version = "1.0.218"
+version = "1.0.219"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f09503e191f4e797cb8aac08e9a4a4695c5edf6a2e70e376d961ddd5c969f82b"
+checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.98",
+ "syn 2.0.100",
]
[[package]]
name = "serde_json"
-version = "1.0.138"
+version = "1.0.140"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d434192e7da787e94a6ea7e9670b26a036d0ca41e0b7efb2676dd32bae872949"
+checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373"
dependencies = [
"itoa",
"memchr",
@@ -3716,13 +4031,13 @@ dependencies = [
[[package]]
name = "serde_repr"
-version = "0.1.19"
+version = "0.1.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9"
+checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.98",
+ "syn 2.0.100",
]
[[package]]
@@ -3769,6 +4084,16 @@ dependencies = [
]
[[package]]
+name = "sha3"
+version = "0.10.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60"
+dependencies = [
+ "digest",
+ "keccak",
+]
+
+[[package]]
name = "sharded-slab"
version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3809,26 +4134,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe"
[[package]]
-name = "siphasher"
-version = "1.0.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d"
-
-[[package]]
-name = "sipper"
+name = "simd_helpers"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1bccb4192828b3d9a08e0b5a73f17795080dfb278b50190216e3ae2132cf4f95"
+checksum = "95890f873bec569a0362c235787f3aca6e1e887302ba4840839bcc6459c42da6"
dependencies = [
- "futures",
- "pin-project-lite",
+ "quote",
]
[[package]]
name = "skrifa"
-version = "0.22.3"
+version = "0.26.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8e1c44ad1f6c5bdd4eefed8326711b7dbda9ea45dfd36068c427d332aa382cbe"
+checksum = "8cc1aa86c26dbb1b63875a7180aa0819709b33348eb5b1491e4321fae388179d"
dependencies = [
"bytemuck",
"read-fonts",
@@ -3854,9 +4172,9 @@ dependencies = [
[[package]]
name = "smallvec"
-version = "1.13.2"
+version = "1.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67"
+checksum = "8917285742e9f3e1683f0a9c4e6b57960b7314d0b08d30d1ecd426713ee2eee9"
dependencies = [
"serde",
]
@@ -3867,14 +4185,14 @@ version = "0.19.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"calloop",
"calloop-wayland-source",
"cursor-icon",
"libc",
"log",
"memmap2",
- "rustix",
+ "rustix 0.38.44",
"thiserror 1.0.69",
"wayland-backend",
"wayland-client",
@@ -3908,9 +4226,9 @@ dependencies = [
[[package]]
name = "socket2"
-version = "0.5.8"
+version = "0.5.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8"
+checksum = "4f5fd57c80058a56cf5c777ab8a126398ece8e442983605d280a44ce79d0edef"
dependencies = [
"libc",
"windows-sys 0.52.0",
@@ -3924,7 +4242,7 @@ checksum = "18051cdd562e792cad055119e0cdb2cfc137e44e3987532e0f9659a77931bb08"
dependencies = [
"as-raw-xcb-connection",
"bytemuck",
- "cfg_aliases 0.2.1",
+ "cfg_aliases",
"core-graphics 0.24.0",
"drm",
"fastrand",
@@ -3936,8 +4254,8 @@ dependencies = [
"objc2-foundation",
"objc2-quartz-core",
"raw-window-handle",
- "redox_syscall 0.5.8",
- "rustix",
+ "redox_syscall 0.5.11",
+ "rustix 0.38.44",
"tiny-xlib",
"wasm-bindgen",
"wayland-backend",
@@ -3963,7 +4281,7 @@ version = "0.3.0+sdk-1.3.268.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eda41003dc44290527a59b13432d4a0379379fa074b70174882adfbdfd917844"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
]
[[package]]
@@ -4016,7 +4334,7 @@ dependencies = [
"serde_json",
"sha2",
"smallvec",
- "thiserror 2.0.11",
+ "thiserror 2.0.12",
"tokio",
"tokio-stream",
"tracing",
@@ -4034,7 +4352,7 @@ dependencies = [
"quote",
"sqlx-core",
"sqlx-macros-core",
- "syn 2.0.98",
+ "syn 2.0.100",
]
[[package]]
@@ -4057,7 +4375,7 @@ dependencies = [
"sqlx-mysql",
"sqlx-postgres",
"sqlx-sqlite",
- "syn 2.0.98",
+ "syn 2.0.100",
"tempfile",
"tokio",
"url",
@@ -4071,7 +4389,7 @@ checksum = "4560278f0e00ce64938540546f59f590d60beee33fffbd3b9cd47851e5fff233"
dependencies = [
"atoi",
"base64",
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"byteorder",
"bytes",
"chrono",
@@ -4101,7 +4419,7 @@ dependencies = [
"smallvec",
"sqlx-core",
"stringprep",
- "thiserror 2.0.11",
+ "thiserror 2.0.12",
"tracing",
"uuid",
"whoami",
@@ -4115,7 +4433,7 @@ checksum = "c5b98a57f363ed6764d5b3a12bfedf62f07aa16e1856a7ddc2a0bb190a959613"
dependencies = [
"atoi",
"base64",
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"byteorder",
"chrono",
"crc",
@@ -4140,7 +4458,7 @@ dependencies = [
"smallvec",
"sqlx-core",
"stringprep",
- "thiserror 2.0.11",
+ "thiserror 2.0.12",
"tracing",
"uuid",
"whoami",
@@ -4180,11 +4498,12 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"
[[package]]
name = "stanza"
version = "0.1.0"
+source = "git+https://bunny.garden/luz#aab4cd47b1d2da5539c50675be4c7a36898189ef"
dependencies = [
"chrono",
"jid",
"peanuts",
- "thiserror 2.0.11",
+ "thiserror 2.0.12",
]
[[package]]
@@ -4211,6 +4530,28 @@ dependencies = [
]
[[package]]
+name = "strum"
+version = "0.26.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06"
+dependencies = [
+ "strum_macros",
+]
+
+[[package]]
+name = "strum_macros"
+version = "0.26.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be"
+dependencies = [
+ "heck 0.5.0",
+ "proc-macro2",
+ "quote",
+ "rustversion",
+ "syn 2.0.100",
+]
+
+[[package]]
name = "subtle"
version = "2.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -4224,9 +4565,9 @@ checksum = "ce5d813d71d82c4cbc1742135004e4a79fd870214c155443451c139c9470a0aa"
[[package]]
name = "swash"
-version = "0.1.19"
+version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cbd59f3f359ddd2c95af4758c18270eddd9c730dde98598023cdabff472c2ca2"
+checksum = "fae9a562c7b46107d9c78cd78b75bbe1e991c16734c0aee8ff0ee711fb8b620a"
dependencies = [
"skrifa",
"yazi",
@@ -4246,9 +4587,9 @@ dependencies = [
[[package]]
name = "syn"
-version = "2.0.98"
+version = "2.0.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "36147f1a48ae0ec2b5b3bc5b537d267457555a10dc06f3dbc8cb11ba3006d3b1"
+checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0"
dependencies = [
"proc-macro2",
"quote",
@@ -4263,7 +4604,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.98",
+ "syn 2.0.100",
]
[[package]]
@@ -4276,22 +4617,40 @@ dependencies = [
]
[[package]]
+name = "system-deps"
+version = "6.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349"
+dependencies = [
+ "cfg-expr",
+ "heck 0.5.0",
+ "pkg-config",
+ "toml",
+ "version-compare",
+]
+
+[[package]]
name = "take_mut"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60"
[[package]]
+name = "target-lexicon"
+version = "0.12.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
+
+[[package]]
name = "tempfile"
-version = "3.16.0"
+version = "3.19.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "38c246215d7d24f48ae091a2902398798e05d978b24315d6efbc00ede9a8bb91"
+checksum = "7437ac7763b9b123ccf33c338a5cc1bac6f69b45a136c19bdd8a65e3916435bf"
dependencies = [
- "cfg-if",
"fastrand",
- "getrandom 0.3.1",
+ "getrandom 0.3.2",
"once_cell",
- "rustix",
+ "rustix 1.0.5",
"windows-sys 0.59.0",
]
@@ -4315,11 +4674,11 @@ dependencies = [
[[package]]
name = "thiserror"
-version = "2.0.11"
+version = "2.0.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d452f284b73e6d76dd36758a0c8684b1d5be31f92b89d07fd5822175732206fc"
+checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708"
dependencies = [
- "thiserror-impl 2.0.11",
+ "thiserror-impl 2.0.12",
]
[[package]]
@@ -4330,18 +4689,18 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.98",
+ "syn 2.0.100",
]
[[package]]
name = "thiserror-impl"
-version = "2.0.11"
+version = "2.0.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2"
+checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.98",
+ "syn 2.0.100",
]
[[package]]
@@ -4355,6 +4714,17 @@ dependencies = [
]
[[package]]
+name = "tiff"
+version = "0.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ba1310fcea54c6a9a4fd1aad794ecc02c31682f6bfbecdf460bf19533eed1e3e"
+dependencies = [
+ "flate2",
+ "jpeg-decoder",
+ "weezl",
+]
+
+[[package]]
name = "tiny-skia"
version = "0.11.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -4405,9 +4775,9 @@ dependencies = [
[[package]]
name = "tinyvec"
-version = "1.8.1"
+version = "1.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "022db8904dfa342efe721985167e9fcd16c29b226db4397ed752a761cfce81e8"
+checksum = "09b3661f17e86524eccd4371ab0429194e0d7c008abb45f7a7495b1719463c71"
dependencies = [
"tinyvec_macros",
]
@@ -4420,9 +4790,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]]
name = "tokio"
-version = "1.43.0"
+version = "1.44.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3d61fa4ffa3de412bfea335c6ecff681de2b609ba3c77ef3e00e521813a9ed9e"
+checksum = "e6b88822cbe49de4185e3a4cbf8321dd487cf5fe0c5c65695fef6346371e9c48"
dependencies = [
"backtrace",
"bytes",
@@ -4444,7 +4814,7 @@ checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.98",
+ "syn 2.0.100",
]
[[package]]
@@ -4522,7 +4892,7 @@ checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.98",
+ "syn 2.0.100",
]
[[package]]
@@ -4631,9 +5001,9 @@ checksum = "d2df906b07856748fa3f6e0ad0cbaa047052d4a7dd609e231c4f72cee8c36f31"
[[package]]
name = "typenum"
-version = "1.17.0"
+version = "1.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
+checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f"
[[package]]
name = "uds_windows"
@@ -4666,9 +5036,9 @@ checksum = "1df77b101bcc4ea3d78dafc5ad7e4f58ceffe0b2b16bf446aeb50b6cb4157656"
[[package]]
name = "unicode-ident"
-version = "1.0.16"
+version = "1.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a210d160f08b701c8721ba1c726c11662f877ea6b7094007e1ca9a1041945034"
+checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512"
[[package]]
name = "unicode-linebreak"
@@ -4741,11 +5111,22 @@ checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be"
[[package]]
name = "uuid"
-version = "1.14.0"
+version = "1.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "93d59ca99a559661b96bf898d8fce28ed87935fd2bea9f05983c1464dd6c71b1"
+checksum = "458f7a779bf54acc9f347480ac654f68407d3aab21269a6e3c9f922acd9e2da9"
dependencies = [
- "getrandom 0.3.1",
+ "getrandom 0.3.2",
+]
+
+[[package]]
+name = "v_frame"
+version = "0.3.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d6f32aaa24bacd11e488aa9ba66369c7cd514885742c9fe08cfe85884db3e92b"
+dependencies = [
+ "aligned-vec",
+ "num-traits",
+ "wasm-bindgen",
]
[[package]]
@@ -4756,9 +5137,9 @@ checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65"
[[package]]
name = "value-bag"
-version = "1.10.0"
+version = "1.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3ef4c4aa54d5d05a279399bfa921ec387b7aba77caf7a682ae8d86785b8fdad2"
+checksum = "943ce29a8a743eb10d6082545d861b24f9d1b160b7d741e0f2cdf726bec909c5"
[[package]]
name = "vcpkg"
@@ -4767,6 +5148,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
[[package]]
+name = "version-compare"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "852e951cb7832cb45cb1169900d19760cfa39b82bc0ea9c0e5a14ae88411c98b"
+
+[[package]]
name = "version_check"
version = "0.9.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -4790,9 +5177,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]]
name = "wasi"
-version = "0.13.3+wasi-0.2.2"
+version = "0.14.2+wasi-0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "26816d2e1a4a36a2940b96c5296ce403917633dff8f3440e9b236ed6f6bacad2"
+checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3"
dependencies = [
"wit-bindgen-rt",
]
@@ -4825,7 +5212,7 @@ dependencies = [
"log",
"proc-macro2",
"quote",
- "syn 2.0.98",
+ "syn 2.0.100",
"wasm-bindgen-shared",
]
@@ -4860,7 +5247,7 @@ checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.98",
+ "syn 2.0.100",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
@@ -4896,7 +5283,7 @@ checksum = "b7208998eaa3870dad37ec8836979581506e0c5c64c20c9e79e9d2a10d6f47bf"
dependencies = [
"cc",
"downcast-rs",
- "rustix",
+ "rustix 0.38.44",
"scoped-tls",
"smallvec",
"wayland-sys",
@@ -4908,8 +5295,8 @@ version = "0.31.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2120de3d33638aaef5b9f4472bff75f07c56379cf76ea320bd3a3d65ecaf73f"
dependencies = [
- "bitflags 2.8.0",
- "rustix",
+ "bitflags 2.9.0",
+ "rustix 0.38.44",
"wayland-backend",
"wayland-scanner",
]
@@ -4920,7 +5307,7 @@ version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"cursor-icon",
"wayland-backend",
]
@@ -4931,7 +5318,7 @@ version = "0.31.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a93029cbb6650748881a00e4922b076092a6a08c11e7fbdb923f064b23968c5d"
dependencies = [
- "rustix",
+ "rustix 0.38.44",
"wayland-client",
"xcursor",
]
@@ -4942,7 +5329,7 @@ version = "0.32.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0781cf46869b37e36928f7b432273c0995aa8aed9552c556fb18754420541efc"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"wayland-backend",
"wayland-client",
"wayland-scanner",
@@ -4954,7 +5341,7 @@ version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ccaacc76703fefd6763022ac565b590fcade92202492381c95b2edfdf7d46b3"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"wayland-backend",
"wayland-client",
"wayland-protocols",
@@ -4967,7 +5354,7 @@ version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "248a02e6f595aad796561fa82d25601bd2c8c3b145b1c7453fc8f94c1a58f8b2"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"wayland-backend",
"wayland-client",
"wayland-protocols",
@@ -5018,13 +5405,20 @@ dependencies = [
]
[[package]]
+name = "weezl"
+version = "0.1.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082"
+
+[[package]]
name = "wgpu"
-version = "23.0.1"
+version = "24.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "80f70000db37c469ea9d67defdc13024ddf9a5f1b89cb2941b812ad7cde1735a"
+checksum = "35904fb00ba2d2e0a4d002fcbbb6e1b89b574d272a50e5fc95f6e81cf281c245"
dependencies = [
"arrayvec",
- "cfg_aliases 0.1.1",
+ "bitflags 2.9.0",
+ "cfg_aliases",
"document-features",
"js-sys",
"log",
@@ -5044,14 +5438,14 @@ dependencies = [
[[package]]
name = "wgpu-core"
-version = "23.0.1"
+version = "24.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d63c3c478de8e7e01786479919c8769f62a22eec16788d8c2ac77ce2c132778a"
+checksum = "671c25545d479b47d3f0a8e373aceb2060b67c6eb841b24ac8c32348151c7a0c"
dependencies = [
"arrayvec",
"bit-vec",
- "bitflags 2.8.0",
- "cfg_aliases 0.1.1",
+ "bitflags 2.9.0",
+ "cfg_aliases",
"document-features",
"indexmap",
"log",
@@ -5062,25 +5456,25 @@ dependencies = [
"raw-window-handle",
"rustc-hash 1.1.0",
"smallvec",
- "thiserror 1.0.69",
+ "thiserror 2.0.12",
"wgpu-hal",
"wgpu-types",
]
[[package]]
name = "wgpu-hal"
-version = "23.0.1"
+version = "24.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "89364b8a0b211adc7b16aeaf1bd5ad4a919c1154b44c9ce27838213ba05fd821"
+checksum = "f112f464674ca69f3533248508ee30cb84c67cf06c25ff6800685f5e0294e259"
dependencies = [
"android_system_properties",
"arrayvec",
"ash",
"bit-set",
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"block",
"bytemuck",
- "cfg_aliases 0.1.1",
+ "cfg_aliases",
"core-graphics-types 0.1.3",
"glow",
"glutin_wgl_sys",
@@ -5097,6 +5491,7 @@ dependencies = [
"ndk-sys 0.5.0+25.2.9519653",
"objc",
"once_cell",
+ "ordered-float",
"parking_lot",
"profiling",
"range-alloc",
@@ -5104,7 +5499,7 @@ dependencies = [
"renderdoc-sys",
"rustc-hash 1.1.0",
"smallvec",
- "thiserror 1.0.69",
+ "thiserror 2.0.12",
"wasm-bindgen",
"web-sys",
"wgpu-types",
@@ -5114,30 +5509,31 @@ dependencies = [
[[package]]
name = "wgpu-types"
-version = "23.0.0"
+version = "24.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "610f6ff27778148c31093f3b03abc4840f9636d58d597ca2f5977433acfe0068"
+checksum = "50ac044c0e76c03a0378e7786ac505d010a873665e2d51383dcff8dd227dc69c"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"js-sys",
+ "log",
"web-sys",
]
[[package]]
name = "whoami"
-version = "1.5.2"
+version = "1.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "372d5b87f58ec45c384ba03563b03544dc5fadc3983e434b286913f5b4a9bb6d"
+checksum = "6994d13118ab492c3c80c1f81928718159254c53c472bf9ce36f8dae4add02a7"
dependencies = [
- "redox_syscall 0.5.8",
+ "redox_syscall 0.5.11",
"wasite",
]
[[package]]
name = "widestring"
-version = "1.1.0"
+version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311"
+checksum = "dd7cf3379ca1aac9eea11fba24fd7e315d621f8dfe35c8d7d2be8b793726e07d"
[[package]]
name = "winapi"
@@ -5196,24 +5592,28 @@ dependencies = [
[[package]]
name = "windows-core"
-version = "0.52.0"
+version = "0.58.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9"
+checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99"
dependencies = [
+ "windows-implement 0.58.0",
+ "windows-interface 0.58.0",
+ "windows-result 0.2.0",
+ "windows-strings 0.1.0",
"windows-targets 0.52.6",
]
[[package]]
name = "windows-core"
-version = "0.58.0"
+version = "0.61.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99"
+checksum = "4763c1de310c86d75a878046489e2e5ba02c649d185f21c67d4cf8a56d098980"
dependencies = [
- "windows-implement",
- "windows-interface",
- "windows-result",
- "windows-strings",
- "windows-targets 0.52.6",
+ "windows-implement 0.60.0",
+ "windows-interface 0.59.1",
+ "windows-link",
+ "windows-result 0.3.2",
+ "windows-strings 0.4.0",
]
[[package]]
@@ -5224,7 +5624,18 @@ checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.98",
+ "syn 2.0.100",
+]
+
+[[package]]
+name = "windows-implement"
+version = "0.60.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.100",
]
[[package]]
@@ -5235,14 +5646,25 @@ checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.98",
+ "syn 2.0.100",
+]
+
+[[package]]
+name = "windows-interface"
+version = "0.59.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.100",
]
[[package]]
name = "windows-link"
-version = "0.1.0"
+version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6dccfd733ce2b1753b03b6d3c65edf020262ea35e20ccdf3e288043e6dd620e3"
+checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38"
[[package]]
name = "windows-result"
@@ -5254,16 +5676,34 @@ dependencies = [
]
[[package]]
+name = "windows-result"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c64fd11a4fd95df68efcfee5f44a294fe71b8bc6a91993e2791938abcc712252"
+dependencies = [
+ "windows-link",
+]
+
+[[package]]
name = "windows-strings"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10"
dependencies = [
- "windows-result",
+ "windows-result 0.2.0",
"windows-targets 0.52.6",
]
[[package]]
+name = "windows-strings"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7a2ba9642430ee452d5a7aa78d72907ebe8cfda358e8cb7918a2050581322f97"
+dependencies = [
+ "windows-link",
+]
+
+[[package]]
name = "windows-sys"
version = "0.45.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -5485,11 +5925,11 @@ dependencies = [
"ahash",
"android-activity",
"atomic-waker",
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"block2",
"bytemuck",
"calloop",
- "cfg_aliases 0.2.1",
+ "cfg_aliases",
"concurrent-queue",
"core-foundation 0.9.4",
"core-graphics 0.23.2",
@@ -5508,7 +5948,7 @@ dependencies = [
"pin-project",
"raw-window-handle",
"redox_syscall 0.4.1",
- "rustix",
+ "rustix 0.38.44",
"sctk-adwaita",
"smithay-client-toolkit",
"smol_str",
@@ -5530,9 +5970,9 @@ dependencies = [
[[package]]
name = "winnow"
-version = "0.7.2"
+version = "0.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "59690dea168f2198d1a3b0cac23b8063efcd11012f10ae4698f284808c8ef603"
+checksum = "63d3fcd9bba44b03821e7d699eeee959f3126dcc4aa8e4ae18ec617c2a5cea10"
dependencies = [
"memchr",
]
@@ -5559,11 +5999,11 @@ dependencies = [
[[package]]
name = "wit-bindgen-rt"
-version = "0.33.0"
+version = "0.39.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c"
+checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
]
[[package]]
@@ -5600,7 +6040,7 @@ dependencies = [
"libc",
"libloading",
"once_cell",
- "rustix",
+ "rustix 0.38.44",
"x11rb-protocol",
]
@@ -5632,7 +6072,7 @@ version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5"
dependencies = [
- "bitflags 2.8.0",
+ "bitflags 2.9.0",
"dlib",
"log",
"once_cell",
@@ -5647,15 +6087,15 @@ checksum = "b9cc00251562a284751c9973bace760d86c0276c471b4be569fe6b068ee97a56"
[[package]]
name = "xml-rs"
-version = "0.8.25"
+version = "0.8.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c5b940ebc25896e71dd073bad2dbaa2abfe97b0a391415e22ad1326d9c54e3c4"
+checksum = "a62ce76d9b56901b19a74f19431b0d8b3bc7ca4ad685a746dfd78ca8f4fc6bda"
[[package]]
name = "yazi"
-version = "0.1.6"
+version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c94451ac9513335b5e23d7a8a2b61a7102398b8cca5160829d313e84c9d98be1"
+checksum = "e01738255b5a16e78bbb83e7fbba0a1e7dd506905cfc53f4622d89015a03fbb5"
[[package]]
name = "yoke"
@@ -5677,7 +6117,7 @@ checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.98",
+ "syn 2.0.100",
"synstructure",
]
@@ -5726,7 +6166,7 @@ dependencies = [
"proc-macro-crate",
"proc-macro2",
"quote",
- "syn 2.0.98",
+ "syn 2.0.100",
"zbus_names",
"zvariant",
"zvariant_utils",
@@ -5746,9 +6186,9 @@ dependencies = [
[[package]]
name = "zeno"
-version = "0.2.3"
+version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dd15f8e0dbb966fd9245e7498c7e9e5055d9e5c8b676b95bd67091cd11a1e697"
+checksum = "cc0de2315dc13d00e5df3cd6b8d2124a6eaec6a2d4b6a1c5f37b7efad17fcc17"
[[package]]
name = "zerocopy"
@@ -5756,8 +6196,16 @@ version = "0.7.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0"
dependencies = [
- "byteorder",
- "zerocopy-derive",
+ "zerocopy-derive 0.7.35",
+]
+
+[[package]]
+name = "zerocopy"
+version = "0.8.24"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2586fea28e186957ef732a5f8b3be2da217d65c5969d4b1e17f973ebbe876879"
+dependencies = [
+ "zerocopy-derive 0.8.24",
]
[[package]]
@@ -5768,27 +6216,38 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.98",
+ "syn 2.0.100",
+]
+
+[[package]]
+name = "zerocopy-derive"
+version = "0.8.24"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a996a8f63c5c4448cd959ac1bab0aaa3306ccfd060472f85943ee0750f0169be"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.100",
]
[[package]]
name = "zerofrom"
-version = "0.1.5"
+version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e"
+checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5"
dependencies = [
"zerofrom-derive",
]
[[package]]
name = "zerofrom-derive"
-version = "0.1.5"
+version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808"
+checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.98",
+ "syn 2.0.100",
"synstructure",
]
@@ -5817,7 +6276,31 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.98",
+ "syn 2.0.100",
+]
+
+[[package]]
+name = "zune-core"
+version = "0.4.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3f423a2c17029964870cfaabb1f13dfab7d092a62a29a89264f4d36990ca414a"
+
+[[package]]
+name = "zune-inflate"
+version = "0.2.54"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "73ab332fe2f6680068f3582b16a24f90ad7096d5d39b974d1c0aff0125116f02"
+dependencies = [
+ "simd-adler32",
+]
+
+[[package]]
+name = "zune-jpeg"
+version = "0.4.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "99a5bab8d7dedf81405c4bb1f2b83ea057643d9cb28778cea9eecddeedd2e028"
+dependencies = [
+ "zune-core",
]
[[package]]
@@ -5845,7 +6328,7 @@ dependencies = [
"proc-macro-crate",
"proc-macro2",
"quote",
- "syn 2.0.98",
+ "syn 2.0.100",
"zvariant_utils",
]
@@ -5859,6 +6342,6 @@ dependencies = [
"quote",
"serde",
"static_assertions",
- "syn 2.0.98",
+ "syn 2.0.100",
"winnow",
]
diff --git a/Cargo.toml b/Cargo.toml
index cb8f05d..2fc7ebe 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,12 +1,15 @@
+[workspace]
+resolver = "2"
+
[package]
name = "macaw"
version = "0.1.0"
edition = "2021"
[dependencies]
-iced = { git = "https://github.com/iced-rs/iced", features = ["tokio"] }
-filamento = { version = "0.1.0", path = "../luz/filamento" }
-jid = { version = "0.1.0", path = "../luz/jid" }
+iced = { git = "https://github.com/iced-rs/iced", features = ["tokio", "image"] }
+filamento = { version = "0.1.0", git = "https://bunny.garden/luz" }
+jid = { version = "0.1.0", git = "https://bunny.garden/luz" }
tokio = "1.43.0"
tokio-stream = "0.1.17"
tracing-subscriber = "0.3.19"
diff --git a/aaaa.md b/aaaa.md
new file mode 100644
index 0000000..699f9f3
--- /dev/null
+++ b/aaaa.md
@@ -0,0 +1,11 @@
+- each thing that references something holds a reference to it, guaranteeing that it is stored in the cache.
+- if all the references are dropped, it is removed from the cache.
+- if you query the cache with an id you should be able to get a reference.
+- but the issue is that the underlying data can change when the value in the cache changes. therefore, the reference must be a reference to a mutex.
+ - so then use generational thing
+- the cache also needs to be in a mutex, because the cache must be modifiable through the drop function and the main logic.
+ - the drop function doesn't have to be able to modify the cache, it can just let the program know it's time to delete something from the cache.
+ - the generational thing means that it will be auto-dropped.
+
+
+arena that has a hashmap along with it. the hashmap has the id and the generation index. if the generation thing is fucked, then it falls back to the hashmap to change the index. changing the hashmap unfortunately requires mutex. the key is self referential to the macaw struct.
diff --git a/ideas.md b/ideas.md
index 837a40e..23d2a89 100644
--- a/ideas.md
+++ b/ideas.md
@@ -13,6 +13,9 @@
- video streaming
- broadcast rooms
- request message sync between devices (chat and global level) and with particular contacts (on a chat level)
+- pass the aux
+ - when on call, can start an aux session to share application audio in high quality, and pass around with audio status shared (track etc.) in call.
+- (when mobile is good): proper location sharing map
- theme parts
- main application style (component styles) done through setting variables to do with components
- may include assets for borders, backgrounds, etc.
@@ -78,6 +81,9 @@
- guilds at guild@guilds.example.org, channels at guild#channel@guilds.example.org or channel#guild@guilds.example.org or #channel%guild@guilds.example.org
- guilds as a special type of mix channel, guild@mix.example.org, rest of channels at channel@mix.example.org
- guilds at guild@guilds.example.org, channels at channel@mix.example.org (probably won't work)
+- maybe guilds should be split from spaces
+ - guilds as guild.example.org, query items and get channels channel@guild.example.org. easy shared permissions and roles. just an extended mix service, so people can still join channels individually. only annoying in terms of creating new guilds now requires dns and tls annoyances, but could maybe have a fallback by either using a different format, or specifying a node in the disco things(?). i guess people could just put wildcards as like *.guilds.example.org too.
+ - spaces as spaces.example.org, or just as a pubsub item in a particular namespace, so people can have private (or public) spaces organising channels, guilds and people together.
- proper rtl, ttb and bbt text rendering which switches depending on xml message language.
- xmpp as a desktop service
- xmpp gateways forwarding other xmpp accounts
diff --git a/old_code.md b/old_code.md
new file mode 100644
index 0000000..acf7bfa
--- /dev/null
+++ b/old_code.md
@@ -0,0 +1,460 @@
+// pub struct State<'a> {
+// // open_chat: Option<OpenChat<'a>>,
+// chats: Vec<BorrowedChat<'a>>,
+// roster: Vec<BorrowedContact<'a>>,
+// }
+
+// impl Macaw {
+// pub fn state(&self) -> State {
+// let chats = self
+// .chats
+// .iter()
+// .map(|(_, chat)| {
+// let user = chat.user.as_ref().borrow();
+// let contact = self.roster.get(&user.inner.jid);
+// let latest_message = match &chat.message {
+// Some(the_message) => {
+// let message: Ref<'_, OwnedMessage> = the_message.as_ref().borrow();
+// let user = {
+// let user = message.user.as_ref().borrow();
+// let contact = self.roster.get(&user.inner.jid);
+
+// BorrowedUser {
+// inner: user,
+// contact,
+// }
+// };
+// Some(BorrowedMessage {
+// inner: message,
+// user,
+// })
+// }
+// None => None,
+// };
+// BorrowedChat {
+// inner: &chat,
+// user: BorrowedUser {
+// inner: user,
+// contact,
+// },
+// latest_message,
+// }
+// })
+// .collect();
+// State {
+// // open_chat: todo!(),
+// chats,
+// roster: todo!(),
+// }
+// }
+// }
+
+// pub enum Node<'a> {
+// User(BorrowedUser<'a>),
+// Message(BorrowedMessage<'a>),
+// Contact(BorrowedContact<'a>),
+// Chat(BorrowedChat<'a>),
+// OpenChat(OpenChat<'a>),
+// }
+
+// pub enum Orphan {
+// User(JID),
+// Message(Uuid),
+// }
+
+// pub struct BorrowedUser<'a> {
+// inner: Ref<'a, OwnedUser>,
+// // inner: &'a OwnedUser,
+// contact: Option<&'a OwnedContact>,
+// }
+
+// pub struct BorrowedMessage<'a> {
+// inner: Ref<'a, OwnedMessage>,
+// // user: Rc<RefCell<User>>,
+// user: BorrowedUser<'a>,
+// }
+
+// pub struct BorrowedContact<'a> {
+// inner: &'a OwnedContact,
+// user: BorrowedUser<'a>,
+// }
+
+// pub struct BorrowedChat<'a> {
+// inner: &'a OwnedChat,
+// // user: Rc<RefCell<OwnedUser>>,
+// user: BorrowedUser<'a>,
+// // latest_message: Option<Rc<RefCell<OwnedMessage>>>,
+// latest_message: Option<BorrowedMessage<'a>>,
+// }
+
+// pub struct OpenChat<'a> {
+// chat: BorrowedChat<'a>,
+// messages: Vec<BorrowedMessage<'a>>,
+// }
+
+// there are two states: an editing state and a reading state.
+// because the state is self-referential, each time there is a change, the state needs to be recalculated.
+// pub struct State<'a> {
+// // open_chat: Option<OpenChat<'a>>,
+// chats: Vec<BorrowedChat<'a>>,
+// roster: Vec<BorrowedContact<'a>>,
+// }
+
+// pub struct AState {
+// open_chat: Option<OwnedOpenChat>,
+// chats: HashMap<JID, (Chat, (User, Option<Contact>), Option<ChatMessage>)>,
+// roster: HashMap<JID, (Contact, User)>,
+// }
+
+// pub struct OwnedOpenChat {
+// chat: (Chat, (User, Option<Contact>)),
+// messages: IndexMap<Uuid, (ChatMessage, (User, Option<Contact>))>,
+// }
+
+// pub struct MacawUser {
+// inner: User,
+// contact: Option<Contact>,
+// }
+
+// impl Deref for MacawUser {
+
+// }
+
+// other option is forget about all this bullshit and just build the relations graph again after each update?
+// impl Macaw {
+// pub async fn insert_contact(
+// &mut self,
+// contact: Contact,
+// ) -> Result<(), CommandError<DatabaseError>> {
+// let user_jid = contact.user_jid.clone();
+// if !self.users.contains_key(&user_jid) {
+// // TODO: all methods only on logged-in client
+// match &self.client {
+// Account::LoggedIn(client) => {
+// let user = client.get_user(user_jid.clone()).await?;
+// self.users.insert(user_jid, user);
+// }
+// Account::LoggedOut(login_modal) => todo!(),
+// }
+// } else {
+// // up the dependency count
+// }
+// self.roster.insert(contact.user_jid.clone(), contact);
+// Ok(())
+// }
+
+// pub fn get_contact(&self, jid: &JID) -> Option<(&Contact, &User)> {}
+
+// pub fn get_contact_mut(&mut self, jid: &JID) -> Option<&mut Contact> {}
+
+// pub fn remove_contact(&mut self, jid: JID) -> Option<Contact> {
+// self.roster.
+// }
+
+// // updating is fine to do directly on any part of the store.
+// // if a contact is retrieved, it is guaranteed that there is a user in the store, because when the contact was inserted, a user was added to the user store, and the userstore is a droppable store that does not allow you to remove items if there are other things depending on it.
+// }
+
+// pub struct MacawContact<'a> {
+// inner: Contact,
+// user: &'a User,
+// }
+
+// messages must be tombstoned because of this
+// items are never directly added to or removed from a droppablestore
+// remove can only be called from a store that called insert
+// if a store calls insert it must call remove if something is removed from that store
+pub struct DroppableStore<K: Clone, V: Clone>(HashMap<K, (usize, V)>);
+
+impl<K: Clone, V: Clone> DroppableStore<K, V> {
+ pub fn capacity(&self) -> usize {
+ self.0.capacity()
+ }
+
+ pub fn contains_key<Q: ?Sized>(&self, k: &Q) -> bool
+ where
+ Q: std::hash::Hash + Eq,
+ K: Borrow<Q> + std::hash::Hash + Eq,
+ {
+ self.0.contains_key(k)
+ }
+
+ pub fn get<Q>(&self, k: &Q) -> Option<&V>
+ where
+ Q: std::hash::Hash + Eq,
+ K: Borrow<Q> + std::hash::Hash + Eq,
+ {
+ self.0.get(k).map(|(_, v)| v)
+ }
+
+ pub fn get_key_value<Q>(&self, k: &Q) -> Option<(&K, &V)>
+ where
+ Q: std::hash::Hash + Eq + ?Sized,
+ K: Borrow<Q> + std::hash::Hash + Eq,
+ {
+ self.0.get_key_value(k).map(|(k, (_, v))| (k, v))
+ }
+
+ pub fn get_mut<Q>(&mut self, k: &Q) -> Option<&mut V>
+ where
+ Q: std::hash::Hash + Eq + ?Sized,
+ K: Borrow<Q> + std::hash::Hash + Eq,
+ {
+ self.0.get_mut(k).map(|(_, v)| v)
+ }
+
+ pub fn insert(&mut self, k: K, v: V) -> Option<V>
+ where
+ K: std::hash::Hash + Eq,
+ {
+ if let Some((count, old_v)) = self.0.get_mut(&k) {
+ *count += 1;
+ let output = std::mem::replace(old_v, v);
+ Some(output)
+ } else {
+ self.0.insert(k, (1, v));
+ None
+ }
+ }
+
+ pub fn is_empty(&self) -> bool {
+ self.0.is_empty()
+ }
+
+ pub fn iter(&self) -> impl Iterator<Item = (&K, &V)> {
+ self.0.iter().map(|(k, (_, v))| (k, v))
+ }
+
+ pub fn iter_mut(&mut self) -> impl Iterator<Item = (&K, &mut V)> {
+ self.0.iter_mut().map(|(k, (_, v))| (k, v))
+ }
+
+ pub fn keys(&self) -> impl Iterator<Item = &K> {
+ self.0.keys()
+ }
+
+ pub fn len(&self) -> usize {
+ self.0.len()
+ }
+
+ pub fn new() -> Self {
+ Self(HashMap::new())
+ }
+
+ pub fn remove<Q>(&mut self, k: &Q) -> Option<V>
+ where
+ K: Borrow<Q> + std::hash::Hash + Eq,
+ Q: std::hash::Hash + Eq + ?Sized,
+ {
+ if let Some((count, old_v)) = self.0.get_mut(&k) {
+ if *count == 1 {
+ self.0.remove(&k).map(|(_, v)| v)
+ } else {
+ *count = *count - 1;
+ Some(old_v.clone())
+ }
+ } else {
+ None
+ }
+ }
+
+ pub fn remove_entry<Q>(&mut self, k: &K) -> Option<(K, V)>
+ where
+ K: std::hash::Hash + Eq,
+ {
+ if let Some((count, old_v)) = self.0.get_mut(&k) {
+ if *count == 1 {
+ self.0.remove_entry(&k).map(|(k, (_, v))| (k, v))
+ } else {
+ *count = *count - 1;
+ Some((k.clone(), old_v.clone()))
+ }
+ } else {
+ None
+ }
+ }
+
+ pub fn reserve(&mut self, additional: usize)
+ where
+ K: std::hash::Hash + Eq,
+ {
+ self.0.reserve(additional)
+ }
+
+ pub fn shrink_to(&mut self, min_capacity: usize)
+ where
+ K: std::hash::Hash + Eq,
+ {
+ self.0.shrink_to(min_capacity)
+ }
+
+ pub fn shrink_to_fit(&mut self)
+ where
+ K: std::hash::Hash + Eq,
+ {
+ self.0.shrink_to_fit()
+ }
+
+ pub fn try_reserve(
+ &mut self,
+ additional: usize,
+ ) -> Result<(), std::collections::TryReserveError>
+ where
+ K: std::hash::Hash + Eq,
+ {
+ self.0.try_reserve(additional)
+ }
+
+ pub fn values(&self) -> impl Iterator<Item = &V> {
+ self.0.values().map(|(_, v)| v)
+ }
+
+ pub fn values_mut(&mut self) -> impl Iterator<Item = &mut V> {
+ self.0.values_mut().map(|(_, v)| v)
+ }
+
+ pub fn with_capacity(capacity: usize) -> Self {
+ Self(HashMap::with_capacity(capacity))
+ }
+}
+
+// #[derive(Debug, Clone)]
+// pub struct MacawChat {
+// inner: Arc<Mutex<Chat>>,
+// jid: JID,
+// latest_message: Option<MacawChatMessage>,
+// store: MacawChatStore,
+// }
+
+// impl Drop for MacawChat {
+// fn drop(&mut self) {
+// let mut store = match self.store.0.lock() {
+// Ok(s) => s,
+// Err(s) => s.into_inner(),
+// };
+// if Arc::<Mutex<Chat>>::strong_count(&self.inner) == 2 {
+// store.shift_remove(&self.jid);
+// }
+// }
+// }
+
+// #[derive(Debug, Clone)]
+// pub struct MacawChatStore(Arc<Mutex<IndexMap<JID, MacawChat>>>);
+
+// #[derive(Debug, Clone)]
+// pub struct MacawChatMessage {
+// inner: Arc<Mutex<ChatMessage>>,
+// id: Uuid,
+// user: BorrowedUser,
+// store: MacawChatMessageStore,
+// }
+
+// impl Drop for MacawChatMessage {
+// fn drop(&mut self) {
+// let mut store = match self.store.0.lock() {
+// Ok(s) => s,
+// Err(s) => s.into_inner(),
+// };
+// if Rc::<ChatMessage>::strong_count(&self.inner) == 1 {
+// store.shift_remove(&self.id)
+// }
+// }
+// }
+
+// #[derive(Debug, Clone)]
+// pub struct MacawChatMessageStore(HashMap<Uuid, MacawChatMessage>);
+
+// impl Deref for MacawChatMessageStore {
+// type Target = HashMap<Uuid, (ChatMessage, BorrowedUser)>;
+
+// fn deref(&self) -> &Self::Target {
+// &self.0
+// }
+// }
+
+// impl DerefMut for MacawChatMessageStore {
+// fn deref_mut(&mut self) -> &mut Self::Target {
+// &mut self.0
+// }
+// }
+
+// #[derive(Debug, Clone)]
+// pub struct BorrowedUser {
+// inner: Rc<User>,
+// contact: Option<Box<BorrowedContact>>,
+// store: Rc<RefCell<MacawUserStore>>,
+// }
+
+// impl Drop for BorrowedUser {
+// fn drop(&mut self) {
+// if Rc::<User>::strong_count(&self.inner) == 1 {
+// self.store.borrow_mut().remove(&self.inner.jid);
+// }
+// }
+// }
+
+// impl Deref for BorrowedUser {
+// type Target = User;
+
+// fn deref(&self) -> &Self::Target {
+// self.inner.as_ref()
+// }
+// }
+
+// #[derive(Debug)]
+// pub struct MacawUserStore(HashMap<JID, (User, Option<BorrowedContact>)>);
+
+// impl Deref for MacawUserStore {
+// type Target = HashMap<JID, (User, Option<BorrowedContact>)>;
+
+// fn deref(&self) -> &Self::Target {
+// &self.0
+// }
+// }
+
+// impl DerefMut for MacawUserStore {
+// fn deref_mut(&mut self) -> &mut Self::Target {
+// &mut self.0
+// }
+// }
+
+// #[derive(Debug, Clone)]
+// pub struct BorrowedContact {
+// inner: Rc<Contact>,
+// user: Box<BorrowedUser>,
+// store: Rc<RefCell<MacawRosterStore>>,
+// }
+
+// impl Drop for BorrowedContact {
+// fn drop(&mut self) {
+// if Rc::<Contact>::strong_count(&self.inner) == 1 {
+// self.store.borrow_mut().remove(&self.inner.user_jid);
+// }
+// }
+// }
+
+// impl Deref for BorrowedContact {
+// type Target = Contact;
+
+// fn deref(&self) -> &Self::Target {
+// self.inner.as_ref()
+// }
+// }
+
+// #[derive(Debug)]
+// pub struct MacawRosterStore(HashMap<JID, (Contact, BorrowedUser)>);
+
+// impl Deref for MacawRosterStore {
+// type Target = HashMap<JID, (Contact, BorrowedUser)>;
+
+// fn deref(&self) -> &Self::Target {
+// &self.0
+// }
+// }
+
+// impl DerefMut for MacawRosterStore {
+// fn deref_mut(&mut self) -> &mut Self::Target {
+// &mut self.0
+// }
+// }
+
diff --git a/src/main.rs b/src/main.rs
index 1a979c3..8b22ce3 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,14 +1,17 @@
-use std::borrow::Cow;
+use std::borrow::{Borrow, Cow};
+use std::cell::{Ref, RefCell};
use std::collections::{HashMap, HashSet};
use std::fmt::Debug;
use std::ops::{Deref, DerefMut};
-use std::path::PathBuf;
+use std::path::{Path, PathBuf};
+use std::rc::{Rc, Weak};
use std::str::FromStr;
-use std::sync::Arc;
+use std::sync::{Arc, Mutex};
use chrono::{Local, Utc};
use filamento::chat::{Chat, Message as ChatMessage};
-use filamento::error::CommandError;
+use filamento::error::{CommandError, DatabaseError};
+use filamento::files::Files;
use filamento::presence::{Offline, Presence, PresenceType};
use filamento::{roster::Contact, user::User, UpdateMessage};
use iced::alignment::Horizontal::Right;
@@ -21,7 +24,7 @@ use iced::theme::{Custom, Palette};
use iced::widget::button::Status;
use iced::widget::text::{Fragment, IntoFragment, Wrapping};
use iced::widget::{
- button, center, checkbox, column, container, horizontal_space, mouse_area, opaque, row,
+ button, center, checkbox, column, container, horizontal_space, image, mouse_area, opaque, row,
scrollable, stack, text, text_input, toggler, Column, Text, Toggler,
};
use iced::Length::{self, Fill, Shrink};
@@ -33,6 +36,7 @@ use login_modal::{Creds, LoginModal};
use message_view::MessageView;
use serde::{Deserialize, Serialize};
use thiserror::Error;
+use tokio::sync::mpsc::Sender;
use tokio::sync::{mpsc, oneshot};
use tokio_stream::wrappers::ReceiverStream;
use tracing::{error, info};
@@ -60,18 +64,156 @@ impl Default for Config {
}
}
+// any object that references another contains an arc to that object, so that items can be garbage-collected by checking reference count
+// maybe have a cache which is a set of an enum of reference counted objects, so that when an object is needed it's first cloned from the set, otherwise it is added then cloned. then once an object is no longer needed, it is automatically garbage collected.
+// or maybe have the cache items automatically drop themselves at 1 reference? some kind of custom pointer. items in the cache must be easily addressable and updateable.
pub struct Macaw {
client: Account,
config: Config,
- roster: HashMap<JID, Contact>,
- users: HashMap<JID, User>,
- presences: HashMap<JID, Presence>,
- chats: IndexMap<JID, (Chat, Option<ChatMessage>)>,
+ // references users
+ messages: HashMap<Uuid, Weak<RefCell<MacawMessage>>>,
+ // references users
+ roster: HashMap<JID, MacawContact>,
+ // store count of how many things reference it. allows it to stay mutable.
+ // or maybe store a bool that indicates whether it can be garbage collected
+ // but then in that case, if you change the bool, then it can be dropped anyway....
+ // realistically none of this stuff matters until there are group chats. and group chats will have a list of users anyway.
+ // so whenever a group chat is closed any users that are both not in the roster and that one doesn't also have a chat with
+ // can be dropped.
+ // but then also users who are no longer in the chat but were loaded because of old messages must also be dropped.
+ // so the set of users in the group chat must also include people who left, just marked as do-not-show/departed. solution!
+ // this only doesn't work if there are multiple group chats open at the same time ig. in this case the other chats' user
+ // lists would need to also be differenced.
+ // i'm pretty sure this is just O(2 + n) where n = number of other group chats open for each drop attempt, and it can
+ // happen in a separate thread in the background anyway so no slowdown.
+ // TODO: add presences reference
+ // references nothing, optionally contact
+ users: HashMap<JID, Weak<RefCell<MacawUser>>>,
+ // chat could have no messages, and therefore no latest message.
+ // references users, latest message
+ chats: IndexMap<JID, Rc<RefCell<MacawChat>>>,
subscription_requests: HashSet<JID>,
open_chat: Option<MessageView>,
new_chat: Option<NewChat>,
}
+#[derive(Debug)]
+pub struct MacawUser {
+ inner: User,
+ contact: Option<Rc<RefCell<MacawContact>>>,
+}
+
+impl Deref for MacawUser {
+ type Target = User;
+
+ fn deref(&self) -> &Self::Target {
+ &self.inner
+ }
+}
+
+impl DerefMut for MacawUser {
+ fn deref_mut(&mut self) -> &mut Self::Target {
+ &mut self.inner
+ }
+}
+
+impl MacawUser {
+ pub fn contact(&self) -> Option<Ref<'_, MacawContact>> {
+ self.contact
+ .as_ref()
+ .map(|contact| contact.as_ref().borrow())
+ }
+}
+
+#[derive(Debug, Clone)]
+pub struct MacawMessage {
+ inner: ChatMessage,
+ user: Rc<RefCell<MacawUser>>,
+}
+
+impl Deref for MacawMessage {
+ type Target = ChatMessage;
+
+ fn deref(&self) -> &Self::Target {
+ &self.inner
+ }
+}
+
+impl DerefMut for MacawMessage {
+ fn deref_mut(&mut self) -> &mut Self::Target {
+ &mut self.inner
+ }
+}
+
+impl MacawMessage {
+ pub fn user(&self) -> Ref<'_, MacawUser> {
+ let user = self.user.as_ref().borrow();
+ user
+ }
+}
+
+#[derive(Debug)]
+pub struct MacawContact {
+ inner: Contact,
+ user: Rc<RefCell<MacawUser>>,
+}
+
+impl Deref for MacawContact {
+ type Target = Contact;
+
+ fn deref(&self) -> &Self::Target {
+ &self.inner
+ }
+}
+
+impl DerefMut for MacawContact {
+ fn deref_mut(&mut self) -> &mut Self::Target {
+ &mut self.inner
+ }
+}
+
+impl MacawContact {
+ pub fn user(&self) -> Ref<'_, MacawUser> {
+ let user = self.user.as_ref().borrow();
+ user
+ }
+}
+
+pub struct MacawChat {
+ inner: Chat,
+ user: Rc<RefCell<MacawUser>>,
+ message: Option<Rc<RefCell<MacawMessage>>>,
+}
+
+impl Deref for MacawChat {
+ type Target = Chat;
+
+ fn deref(&self) -> &Self::Target {
+ &self.inner
+ }
+}
+
+impl DerefMut for MacawChat {
+ fn deref_mut(&mut self) -> &mut Self::Target {
+ &mut self.inner
+ }
+}
+
+impl MacawChat {
+ pub fn user(&self) -> Ref<'_, MacawUser> {
+ let user = self.user.as_ref().borrow();
+ user
+ }
+
+ pub fn latest_message(&self) -> Option<Ref<'_, MacawMessage>> {
+ let latest_message = self
+ .message
+ .as_ref()
+ .map(|message| message.as_ref().borrow());
+ latest_message
+ }
+}
+
pub struct NewChat;
impl Macaw {
@@ -88,11 +230,11 @@ impl Macaw {
config,
roster: HashMap::new(),
users: HashMap::new(),
- presences: HashMap::new(),
chats: IndexMap::new(),
subscription_requests: HashSet::new(),
open_chat: None,
new_chat: None,
+ messages: HashMap::new(),
}
}
}
@@ -124,7 +266,8 @@ impl Account {
#[derive(Clone, Debug)]
pub struct Client {
- client: filamento::Client,
+ client: filamento::Client<Files>,
+ files_root: PathBuf,
jid: JID,
status: Presence,
connection_state: ConnectionState,
@@ -134,6 +277,10 @@ impl Client {
pub fn is_connected(&self) -> bool {
self.connection_state.is_connected()
}
+
+ pub fn files_root(&self) -> &Path {
+ &self.files_root
+ }
}
#[derive(Clone, Debug)]
@@ -160,7 +307,7 @@ impl DerefMut for Client {
}
impl Deref for Client {
- type Target = filamento::Client;
+ type Target = filamento::Client<Files>;
fn deref(&self) -> &Self::Target {
&self.client
@@ -171,7 +318,10 @@ async fn filamento(
jid: &JID,
creds: &Creds,
cfg: &Config,
-) -> (filamento::Client, mpsc::Receiver<UpdateMessage>) {
+) -> (
+ (filamento::Client<Files>, mpsc::Receiver<UpdateMessage>),
+ PathBuf,
+) {
let filamento;
if let Some(ref dburl) = cfg.dburl {
// TODO: have some sort of crash popup for this stuff
@@ -180,29 +330,94 @@ async fn filamento(
let db = filamento::db::Db::create_connect_and_migrate(db_path)
.await
.unwrap();
- filamento = filamento::Client::new(jid.clone(), creds.password.to_string(), db);
- } else if let Some(ref dir) = cfg.storage_dir {
- let mut data_dir = PathBuf::from_str(&dir).expect("invalid storage directory path");
- data_dir.push(creds.jid.clone());
- data_dir.push(creds.jid.clone());
- data_dir.set_extension("db");
- let db = filamento::db::Db::create_connect_and_migrate(data_dir)
- .await
- .unwrap();
- filamento = filamento::Client::new(jid.clone(), creds.password.to_string(), db);
+ let files;
+ if let Some(ref dir) = cfg.storage_dir {
+ let mut data_dir = PathBuf::from_str(&dir).expect("invalid storage directory path");
+ data_dir.push(creds.jid.clone());
+ let files_dir = data_dir.join("files");
+ files = Files::new(&files_dir);
+ if !tokio::fs::try_exists(&files_dir)
+ .await
+ .expect("could not read storage directory")
+ {
+ tokio::fs::create_dir_all(&files_dir)
+ .await
+ .expect("could not create file storage directory")
+ }
+ filamento = (
+ filamento::Client::new(jid.clone(), creds.password.to_string(), db, files),
+ files_dir,
+ );
+ } else {
+ let mut data_dir = dirs::data_dir().expect(
+ "operating system does not support retreiving determining default data dir",
+ );
+ data_dir.push("macaw");
+ data_dir.push(creds.jid.clone());
+ data_dir.push("files");
+ let files_dir = data_dir;
+ files = Files::new(&files_dir);
+ if !tokio::fs::try_exists(&files_dir)
+ .await
+ .expect("could not read storage directory")
+ {
+ tokio::fs::create_dir_all(&files_dir)
+ .await
+ .expect("could not create file storage directory")
+ }
+ filamento = (
+ filamento::Client::new(jid.clone(), creds.password.to_string(), db, files),
+ files_dir,
+ );
+ }
} else {
- let mut data_dir = dirs::data_dir()
- .expect("operating system does not support retreiving determining default data dir");
- data_dir.push("macaw");
- data_dir.push(creds.jid.clone());
- data_dir.push(creds.jid.clone());
- // TODO: better lol
- data_dir.set_extension("db");
- info!("db_path: {:?}", data_dir);
- let db = filamento::db::Db::create_connect_and_migrate(data_dir)
- .await
- .unwrap();
- filamento = filamento::Client::new(jid.clone(), creds.password.to_string(), db);
+ if let Some(ref dir) = cfg.storage_dir {
+ let mut data_dir = PathBuf::from_str(&dir).expect("invalid storage directory path");
+ data_dir.push(creds.jid.clone());
+ let files_dir = data_dir.join("files");
+ let files = Files::new(&files_dir);
+ data_dir.push(format!("{}.db", creds.jid.clone()));
+ let db = filamento::db::Db::create_connect_and_migrate(data_dir)
+ .await
+ .unwrap();
+ if !tokio::fs::try_exists(&files_dir)
+ .await
+ .expect("could not read storage directory")
+ {
+ tokio::fs::create_dir_all(&files_dir)
+ .await
+ .expect("could not create file storage directory")
+ }
+ filamento = (
+ filamento::Client::new(jid.clone(), creds.password.to_string(), db, files),
+ files_dir,
+ );
+ } else {
+ let mut data_dir = dirs::data_dir().expect(
+ "operating system does not support retreiving determining default data dir",
+ );
+ data_dir.push("macaw");
+ data_dir.push(creds.jid.clone());
+ let files_dir = data_dir.join("files");
+ let files = Files::new(&files_dir);
+ data_dir.push(format!("{}.db", creds.jid.clone()));
+ info!("db_path: {:?}", data_dir);
+ let db = filamento::db::Db::create_connect_and_migrate(data_dir)
+ .await
+ .unwrap();
+ if !tokio::fs::try_exists(&files_dir)
+ .await
+ .expect("could not read storage directory")
+ {
+ tokio::fs::create_dir_all(&files_dir)
+ .await
+ .expect("could not create file storage directory")
+ }
+ filamento = (
+ filamento::Client::new(jid.clone(), creds.password.to_string(), db, files),
+ files_dir,
+ );
+ }
}
filamento
}
@@ -247,19 +462,24 @@ async fn main() -> iced::Result {
}
}
- let mut client: Option<(JID, filamento::Client, mpsc::Receiver<UpdateMessage>)> = None;
+ let mut client: Option<(
+ JID,
+ filamento::Client<Files>,
+ mpsc::Receiver<UpdateMessage>,
+ PathBuf,
+ )> = None;
if let Some(creds) = creds {
let jid = creds.jid.parse::<JID>();
match jid {
Ok(jid) => {
- let (handle, updates) = filamento(&jid, &creds, &cfg).await;
- client = Some((jid, handle, updates));
+ let ((handle, updates), files_dir) = filamento(&jid, &creds, &cfg).await;
+ client = Some((jid, handle, updates, files_dir));
}
Err(e) => client_creation_error = Some(Error::CredentialsLoad(e.into())),
}
}
- if let Some((jid, luz_handle, update_recv)) = client {
+ if let Some((jid, luz_handle, update_recv, files_root)) = client {
let stream = ReceiverStream::new(update_recv);
let stream = stream.map(|message| Message::Luz(message));
let task = {
@@ -270,14 +490,14 @@ async fn main() -> iced::Result {
[
Task::batch([
Task::perform(
- async move { luz_handle1.get_roster().await },
+ async move { luz_handle1.get_roster_with_users().await },
|result| {
let roster = result.unwrap();
let mut macaw_roster = HashMap::new();
for contact in roster {
- macaw_roster.insert(contact.user_jid.clone(), contact);
+ macaw_roster.insert(contact.0.user_jid.clone(), contact);
}
- Message::Roster(macaw_roster)
+ Message::RosterWithUsers(macaw_roster)
},
),
Task::perform(
@@ -297,14 +517,17 @@ async fn main() -> iced::Result {
)
} else {
Task::batch([
- Task::perform(async move { luz_handle1.get_roster().await }, |result| {
- let roster = result.unwrap();
- let mut macaw_roster = HashMap::new();
- for contact in roster {
- macaw_roster.insert(contact.user_jid.clone(), contact);
- }
- Message::Roster(macaw_roster)
- }),
+ Task::perform(
+ async move { luz_handle1.get_roster_with_users().await },
+ |result| {
+ let roster = result.unwrap();
+ let mut macaw_roster = HashMap::new();
+ for contact in roster {
+ macaw_roster.insert(contact.0.user_jid.clone(), contact);
+ }
+ Message::RosterWithUsers(macaw_roster)
+ },
+ ),
Task::perform(
async move { luz_handle2.get_chats_ordered_with_latest_messages().await },
|chats| {
@@ -325,14 +548,13 @@ async fn main() -> iced::Result {
Macaw::new(
Some(Client {
client: luz_handle,
- // TODO:
jid,
- // TODO: store cached status
status: Presence {
timestamp: Utc::now(),
presence: PresenceType::Offline(Offline::default()),
},
connection_state: ConnectionState::Offline,
+ files_root,
}),
cfg,
),
@@ -383,11 +605,10 @@ pub enum Message {
LoginModal(login_modal::Message),
ClientCreated(Client),
Luz(UpdateMessage),
- Roster(HashMap<JID, Contact>),
+ RosterWithUsers(HashMap<JID, (Contact, User)>),
Connect,
Disconnect,
GotChats(Vec<(Chat, ChatMessage)>),
- GotMessageHistory(Chat, IndexMap<Uuid, ChatMessage>),
ToggleChat(JID),
SendMessage(JID, String),
Error(Error),
@@ -440,10 +661,6 @@ impl Macaw {
fn update(&mut self, message: Message) -> Task<Message> {
match message {
Message::Luz(update_message) => match update_message {
- UpdateMessage::Error(error) => {
- tracing::error!("Luz error: {:?}", error);
- Task::none()
- }
UpdateMessage::Online(online, vec) => match &mut self.client {
Account::LoggedIn(client) => {
client.status = Presence {
@@ -452,11 +669,57 @@ impl Macaw {
};
client.connection_state = ConnectionState::Online;
let mut roster = HashMap::new();
+ let mut get_users = Vec::new();
for contact in vec {
- roster.insert(contact.user_jid.clone(), contact);
+ if let Some(Some(user)) =
+ self.users.get(&contact.user_jid).map(|user| user.upgrade())
+ {
+ let contact = MacawContact {
+ inner: contact,
+ user,
+ };
+ roster.insert(contact.user_jid.clone(), contact);
+ user.borrow_mut().contact = Some(Rc::new(RefCell::new(contact)))
+ } else {
+ match self.client {
+ Account::LoggedIn(client) => get_users.push(Task::perform(
+ client.get_user(contact.user_jid),
+ |result| {
+ let result = result.unwrap();
+ (contact, result)
+ },
+ )),
+ Account::LoggedOut(login_modal) => {}
+ }
+ }
+ }
+ if get_users.is_empty() {
+ self.roster = roster;
+ Task::none()
+ } else {
+ // TODO: potential race condition if two rosters are gotten at the same time?
+ Task::batch(get_users).collect().then(|users| {
+ for (contact, user) in users {
+ let user = Rc::new(RefCell::new(MacawUser {
+ inner: user,
+ contact: None,
+ }));
+ let contact = MacawContact {
+ inner: contact,
+ user,
+ };
+ roster.insert(contact.user_jid, contact);
+ user.borrow_mut().contact =
+ Some(Rc::new(RefCell::new(contact)));
+ self.users.insert(
+ contact.user_jid,
+ Rc::<RefCell<MacawUser>>::downgrade(&user),
+ );
+ }
+ self.roster = roster;
+ Task::none()
+ })
}
- self.roster = roster;
- Task::none()
}
Account::LoggedOut(login_modal) => Task::none(),
},
@@ -475,49 +738,225 @@ impl Macaw {
}
}
UpdateMessage::FullRoster(vec) => {
- let mut macaw_roster = HashMap::new();
+ let mut roster = HashMap::new();
+ let mut get_users = Vec::new();
for contact in vec {
- macaw_roster.insert(contact.user_jid.clone(), contact);
+ if let Some(Some(user)) =
+ self.users.get(&contact.user_jid).map(|user| user.upgrade())
+ {
+ let contact = MacawContact {
+ inner: contact,
+ user,
+ };
+ roster.insert(contact.user_jid.clone(), contact);
+ user.borrow_mut().contact = Some(Rc::new(RefCell::new(contact)))
+ } else {
+ match self.client {
+ Account::LoggedIn(client) => get_users.push(Task::perform(
+ client.get_user(contact.user_jid),
+ |result| {
+ let result = result.unwrap();
+ (contact, result)
+ },
+ )),
+ Account::LoggedOut(login_modal) => {}
+ }
+ }
+ }
+ if get_users.is_empty() {
+ self.roster = roster;
+ Task::none()
+ } else {
+ // TODO: potential race condition if two rosters are gotten at the same time?
+ Task::batch(get_users).collect().then(|users| {
+ for (contact, user) in users {
+ let user = Rc::new(RefCell::new(MacawUser {
+ inner: user,
+ contact: None,
+ }));
+ let contact = MacawContact {
+ inner: contact,
+ user,
+ };
+ roster.insert(contact.user_jid, contact);
+ user.borrow_mut().contact = Some(Rc::new(RefCell::new(contact)));
+ self.users.insert(
+ contact.user_jid,
+ Rc::<RefCell<MacawUser>>::downgrade(&user),
+ );
+ }
+ self.roster = roster;
+ Task::none()
+ })
}
- self.roster = macaw_roster;
- Task::none()
}
UpdateMessage::RosterUpdate(contact) => {
- self.roster.insert(contact.user_jid.clone(), contact);
- Task::none()
+ if let Some(Some(user)) =
+ self.users.get(&contact.user_jid).map(|user| user.upgrade())
+ {
+ let contact = MacawContact {
+ inner: contact,
+ user,
+ };
+ self.roster.insert(contact.user_jid.clone(), contact);
+ user.borrow_mut().contact = Some(Rc::new(RefCell::new(contact)));
+ Task::none()
+ } else {
+ match self.client {
+ Account::LoggedIn(client) => {
+ Task::perform(client.get_user(contact.user_jid), |result| {
+ let result = result.unwrap();
+ (contact, result)
+ })
+ .then(|(contact, user)| {
+ let user = Rc::new(RefCell::new(MacawUser {
+ inner: user,
+ contact: None,
+ }));
+ let contact = MacawContact {
+ inner: contact,
+ user,
+ };
+ self.roster.insert(contact.user_jid.clone(), contact);
+ user.borrow_mut().contact =
+ Some(Rc::new(RefCell::new(contact)));
+ self.users.insert(
+ contact.user_jid,
+ Rc::<RefCell<MacawUser>>::downgrade(&user),
+ );
+ Task::none()
+ })
+ }
+ Account::LoggedOut(login_modal) => Task::none(),
+ }
+ }
}
UpdateMessage::RosterDelete(jid) => {
self.roster.remove(&jid);
Task::none()
}
UpdateMessage::Presence { from, presence } => {
- self.presences.insert(from, presence);
+ // TODO: presence handling
Task::none()
}
UpdateMessage::Message { to, message } => {
- if let Some((chat_jid, (chat, old_message))) =
- self.chats.shift_remove_entry(&to)
+ if let Some(Some(user)) =
+ self.users.get(&message.from).map(|user| user.upgrade())
{
- self.chats
- .insert_before(0, chat_jid, (chat, Some(message.clone())));
- if let Some(open_chat) = &mut self.open_chat {
- if open_chat.jid == to {
- open_chat.update(message_view::Message::Message(message));
+ let message = MacawMessage {
+ inner: message,
+ user,
+ };
+ let message = Rc::new(RefCell::new(message));
+ self.messages.insert(
+ message.as_ref().borrow().id,
+ Rc::<RefCell<MacawMessage>>::downgrade(&message),
+ );
+ if let Some((chat_jid, chat)) = self.chats.shift_remove_entry(&to) {
+ chat.as_ref().borrow_mut().message = Some(message);
+ self.chats.insert_before(0, chat_jid, chat);
+ if let Some(open_chat) = &mut self.open_chat {
+ if open_chat.chat().user().jid == to {
+ open_chat.messages.push(message);
+ }
}
+ } else {
+ let chat = Chat {
+ correspondent: to.clone(),
+ // TODO: should have a new chat event first...
+ have_chatted: false,
+ };
+ let chat = MacawChat {
+ inner: chat,
+ user,
+ message: Some(message),
+ };
+ self.chats.insert_before(0, to, Rc::new(RefCell::new(chat)));
}
+ Task::none()
} else {
- let chat = Chat {
- correspondent: to.clone(),
- };
- let message_history = indexmap! {message.id => message.clone()};
- self.chats.insert_before(0, to, (chat, Some(message)));
+ match self.client {
+ Account::LoggedIn(client) => {
+ Task::perform(client.get_user(message.from), |result| {
+ let result = result.unwrap();
+ result
+ })
+ .then(|user| {
+ let user = Rc::new(RefCell::new(MacawUser {
+ inner: user,
+ contact: None,
+ }));
+ self.users.insert(
+ user.as_ref().borrow().jid,
+ Rc::<RefCell<MacawUser>>::downgrade(&user),
+ );
+ let message = MacawMessage {
+ inner: message,
+ user,
+ };
+ let message = Rc::new(RefCell::new(message));
+ self.messages.insert(
+ message.as_ref().borrow().id,
+ Rc::<RefCell<MacawMessage>>::downgrade(&message),
+ );
+ if let Some((chat_jid, chat)) =
+ self.chats.shift_remove_entry(&to)
+ {
+ chat.as_ref().borrow_mut().message = Some(message);
+ self.chats.insert_before(0, chat_jid, chat);
+ if let Some(open_chat) = &mut self.open_chat {
+ if open_chat.chat().user().jid == to {
+ open_chat.messages.push(message);
+ }
+ }
+ } else {
+ let chat = Chat {
+ correspondent: to.clone(),
+ // TODO: should have a new chat event first...
+ have_chatted: false,
+ };
+ let chat = MacawChat {
+ inner: chat,
+ user,
+ message: Some(message),
+ };
+ self.chats.insert_before(
+ 0,
+ to,
+ Rc::new(RefCell::new(chat)),
+ );
+ }
+ Task::none()
+ })
+ }
+ Account::LoggedOut(login_modal) => Task::none(),
+ }
}
- Task::none()
}
UpdateMessage::SubscriptionRequest(jid) => {
// TODO: subscription requests
Task::none()
}
+ UpdateMessage::MessageDelivery { id, delivery } => {
+ if let Some(Some(message)) =
+ self.messages.get(&id).map(|message| message.upgrade())
+ {
+ message.as_ref().borrow_mut().delivery = Some(delivery)
+ }
+ Task::none()
+ }
+ UpdateMessage::NickChanged { jid, nick } => {
+ if let Some(Some(user)) = self.users.get(&jid).map(|user| user.upgrade()) {
+ user.as_ref().borrow_mut().nick = nick
+ }
+ Task::none()
+ }
+ UpdateMessage::AvatarChanged { jid, id } => {
+ if let Some(Some(user)) = self.users.get(&jid).map(|user| user.upgrade()) {
+ user.as_ref().borrow_mut().avatar = id
+ }
+ Task::none()
+ }
},
// TODO: NEXT
Message::ClientCreated(client) => {
@@ -526,14 +965,17 @@ impl Macaw {
let client2 = client.clone();
if self.config.auto_connect {
Task::batch([
- Task::perform(async move { client1.client.get_roster().await }, |result| {
- let roster = result.unwrap();
- let mut macaw_roster = HashMap::new();
- for contact in roster {
- macaw_roster.insert(contact.user_jid.clone(), contact);
- }
- Message::Roster(macaw_roster)
- }),
+ Task::perform(
+ async move { client1.client.get_roster_with_users().await },
+ |result| {
+ let roster = result.unwrap();
+ let mut macaw_roster = HashMap::new();
+ for contact in roster {
+ macaw_roster.insert(contact.0.user_jid.clone(), contact);
+ }
+ Message::RosterWithUsers(macaw_roster)
+ },
+ ),
Task::perform(
async move {
client2
@@ -555,14 +997,17 @@ impl Macaw {
.chain(Task::done(Message::Connect))
} else {
Task::batch([
- Task::perform(async move { client1.client.get_roster().await }, |result| {
- let roster = result.unwrap();
- let mut macaw_roster = HashMap::new();
- for contact in roster {
- macaw_roster.insert(contact.user_jid.clone(), contact);
- }
- Message::Roster(macaw_roster)
- }),
+ Task::perform(
+ async move { client1.client.get_roster_with_users().await },
+ |result| {
+ let roster = result.unwrap();
+ let mut macaw_roster = HashMap::new();
+ for contact in roster {
+ macaw_roster.insert(contact.0.user_jid.clone(), contact);
+ }
+ Message::RosterWithUsers(macaw_roster)
+ },
+ ),
Task::perform(
async move {
client2
@@ -583,8 +1028,22 @@ impl Macaw {
])
}
}
- Message::Roster(hash_map) => {
- self.roster = hash_map;
+ Message::RosterWithUsers(hash_map) => {
+ for (_, (contact, user)) in hash_map {
+ let user = MacawUser {
+ inner: user,
+ contact: None,
+ };
+ let user = Rc::new(RefCell::new(user));
+ let contact = MacawContact {
+ inner: contact,
+ user,
+ };
+ self.roster.insert(contact.user_jid, contact);
+ user.borrow_mut().contact = Some(Rc::new(RefCell::new(contact)));
+ self.users
+ .insert(contact.user_jid, Rc::<RefCell<MacawUser>>::downgrade(&user));
+ }
Task::none()
}
Message::Connect => match &mut self.client {
@@ -611,29 +1070,52 @@ impl Macaw {
Message::ToggleChat(jid) => {
match &self.open_chat {
Some(message_view) => {
- if message_view.jid == jid {
+ if message_view.chat().user().jid == jid {
self.open_chat = None;
return Task::none();
}
}
None => {}
}
- self.open_chat = Some(MessageView::new(jid.clone(), &self.config));
- let jid1 = jid.clone();
- match &self.client {
- Account::LoggedIn(client) => {
- let client = client.clone();
- Task::perform(
- async move { client.get_messages(jid1).await },
- move |result| match result {
- Ok(h) => {
- Message::MessageView(message_view::Message::MessageHistory(h))
- }
- Err(e) => Message::Error(Error::MessageHistory(jid.clone(), e)),
- },
- )
+ if let Some(chat) = self.chats.get(&jid) {
+ match &self.client {
+ Account::LoggedIn(client) => {
+ let client = client.clone();
+ Task::perform(
+ async move { client.get_messages(jid).await },
+ move |result| {
+ let message_history = result.unwrap();
+ let messages = Vec::new();
+ for message in message_history {
+ // TODO: there must be users for the messages, but won't work for group chats.
+ let user = self
+ .users
+ .get(&message.from)
+ .unwrap()
+ .upgrade()
+ .unwrap();
+ let message = MacawMessage {
+ inner: message,
+ user,
+ };
+ let message = Rc::new(RefCell::new(message));
+ self.messages.insert(
+ message.as_ref().borrow().id,
+ Rc::<RefCell<MacawMessage>>::downgrade(&message),
+ );
+ messages.push(message)
+ }
+ let open_chat = MessageView::new(chat.clone(), &self.config);
+ open_chat.messages = messages;
+ self.open_chat = Some(open_chat);
+ },
+ )
+ .discard()
+ }
+ Account::LoggedOut(login_modal) => Task::none(),
}
- Account::LoggedOut(login_modal) => Task::none(),
+ } else {
+ Task::none()
}
}
Message::LoginModal(login_modal_message) => match &mut self.client {
@@ -650,9 +1132,9 @@ impl Macaw {
Ok(jid) => {
Task::perform(async move {
let (jid, creds, config) = (jid, creds, config);
- let (handle, recv) = filamento(&jid, &creds, &config).await;
- (handle, recv, jid, creds, config)
- }, move |(handle, recv, jid, creds, config)| {
+ let ((handle, recv), files_root) = filamento(&jid, &creds, &config).await;
+ (handle, recv, jid, creds, config, files_root)
+ }, move |(handle, recv, jid, creds, config, files_root)| {
let creds = creds;
let mut tasks = Vec::new();
tasks.push(Task::done(crate::Message::ClientCreated(
@@ -661,6 +1143,7 @@ impl Macaw {
jid,
status: Presence { timestamp: Utc::now(), presence: PresenceType::Offline(Offline::default()) },
connection_state: ConnectionState::Offline,
+ files_root,
},
)));
let stream = ReceiverStream::new(recv);
@@ -720,45 +1203,16 @@ impl Macaw {
return Task::none();
}
};
- for chat in chats {
+ for (chat, message) in chats {
+ let chat = MacawChat {
+ inner: todo!(),
+ user: todo!(),
+ message: todo!(),
+ }
self.chats
- // TODO: could have a chat with no messages, bad database state
.insert(chat.0.correspondent.clone(), (chat.0.clone(), Some(chat.1)));
- // let client = client.clone();
- // let correspondent = chat.correspondent.clone();
- // tasks.push(Task::perform(
- // // TODO: don't get the entire message history LOL
- // async move { (chat, client.get_messages(correspondent).await) },
- // |result| {
- // let messages: IndexMap<Uuid, ChatMessage> = result
- // .1
- // .unwrap()
- // .into_iter()
- // .map(|message| (message.id.clone(), message))
- // .collect();
- // Message::GotMessageHistory(result.0, messages)
- // },
- // ))
}
Task::batch(tasks)
- // .then(|chats| {
- // let tasks = Vec::new();
- // for key in chats.keys() {
- // let client = client.client.clone();
- // tasks.push(Task::future(async {
- // client.get_messages(key.clone()).await;
- // }));
- // }
- // Task::batch(tasks)
- // }),
- }
- Message::GotMessageHistory(chat, mut message_history) => {
- // TODO: don't get the entire message history LOL
- if let Some((_id, message)) = message_history.pop() {
- self.chats
- .insert(chat.correspondent.clone(), (chat, Some(message)));
- }
- Task::none()
}
Message::SendMessage(jid, body) => {
let client = match &self.client {
@@ -784,9 +1238,10 @@ impl Macaw {
let action = message_view.update(message);
match action {
message_view::Action::None => Task::none(),
- message_view::Action::SendMessage(m) => {
- Task::done(Message::SendMessage(message_view.jid.clone(), m))
- }
+ message_view::Action::SendMessage(m) => Task::done(Message::SendMessage(
+ message_view.chat().user().jid.clone(),
+ m,
+ )),
}
} else {
Task::none()
@@ -812,15 +1267,18 @@ impl Macaw {
fn view(&self) -> Element<Message> {
let mut ui: Element<Message> = {
let mut chats_list: Column<Message> = column![];
- for (jid, (chat, latest_message)) in &self.chats {
- let mut open = false;
- if let Some(open_chat) = &self.open_chat {
- if open_chat.jid == *jid {
- open = true;
+ if let Account::LoggedIn(client) = &self.client {
+ for (jid, chat) in &self.chats {
+ let mut open = false;
+ if let Some(open_chat) = &self.open_chat {
+ if open_chat.chat().user().jid == *jid {
+ open = true;
+ }
}
+ let chat_list_item =
+ chat_list_item(client.files_root(), chat.as_ref().borrow(), open);
+ chats_list = chats_list.push(chat_list_item);
}
- let chat_list_item = chat_list_item(chat, latest_message, open);
- chats_list = chats_list.push(chat_list_item);
}
let chats_list = scrollable(chats_list.spacing(8).padding(8))
.spacing(1)
@@ -1021,34 +1479,97 @@ where
stack![base.into(), opaque(mouse_area)].into()
}
-fn chat_list_item<'a>(
- chat: &'a Chat,
- latest_message: &'a Option<ChatMessage>,
- open: bool,
-) -> Element<'a, Message> {
- let mut content: Column<Message> = column![text(chat.correspondent.to_string())];
- if let Some(latest_message) = latest_message {
+fn chat_list_item<'a, C>(file_root: &'a Path, chat: C, open: bool) -> Element<'a, Message>
+where
+ C: Deref<Target = MacawChat> + 'a,
+{
+ let name: String;
+ if let Some(Some(contact_name)) = chat.user().contact().map(|contact| contact.name.clone()) {
+ name = contact_name
+ } else if let Some(nick) = &chat.user().nick {
+ name = nick.clone()
+ } else {
+ name = chat.correspondent().to_string();
+ }
+
+ let avatar: Option<String>;
+ if let Some(user_avatar) = &chat.user().avatar {
+ avatar = Some(user_avatar.clone())
+ } else {
+ avatar = None
+ }
+
+ let latest_message_text: Option<(String, String)>;
+ if let Some(latest_message) = chat.latest_message() {
let message = latest_message.body.body.replace("\n", " ");
let date = latest_message.timestamp.naive_local();
let now = Local::now().naive_local();
let timeinfo;
if date.date() == now.date() {
// TODO: localisation/config
- timeinfo = text(date.time().format("%H:%M").to_string())
+ timeinfo = date.time().format("%H:%M").to_string()
} else {
- timeinfo = text(date.date().format("%d/%m").to_string())
+ timeinfo = date.date().format("%d/%m").to_string()
}
- content = content.push(
+ latest_message_text = Some((message, timeinfo));
+ // content = content.push(
+ // row![
+ // container(text(message).wrapping(Wrapping::None))
+ // .clip(true)
+ // .width(Fill),
+ // timeinfo
+ // ]
+ // .spacing(8)
+ // .width(Fill),
+ // );
+ } else {
+ latest_message_text = None;
+ }
+
+ let avatar_image = if let Some(avatar) = avatar {
+ let path = file_root.join(avatar);
+ Some(image(path).width(48).height(48))
+ } else {
+ None
+ };
+ let content: Element<Message> = if let Some(avatar_image) = avatar_image {
+ if let Some((message, time)) = latest_message_text {
row![
- container(text(message).wrapping(Wrapping::None))
- .clip(true)
- .width(Fill),
- timeinfo
+ avatar_image,
+ column![
+ text(name),
+ row![
+ container(text(message).wrapping(Wrapping::None))
+ .clip(true)
+ .width(Fill),
+ text(time)
+ ]
+ .spacing(8)
+ .width(Fill)
+ ]
]
- .spacing(8)
- .width(Fill),
- );
- }
+ .into()
+ } else {
+ row![avatar_image, text(name)].into()
+ }
+ } else {
+ if let Some((message, time)) = latest_message_text {
+ column![
+ text(name),
+ row![
+ container(text(message).wrapping(Wrapping::None))
+ .clip(true)
+ .width(Fill),
+ text(time)
+ ]
+ .spacing(8)
+ .width(Fill)
+ ]
+ .into()
+ } else {
+ text(name).into()
+ }
+ };
let mut button = button(content).on_press(Message::ToggleChat(chat.correspondent.clone()));
if open {
button = button.style(|theme: &Theme, status| {
diff --git a/src/message_view.rs b/src/message_view.rs
index 5d27335..4ebda83 100644
--- a/src/message_view.rs
+++ b/src/message_view.rs
@@ -1,4 +1,9 @@
-use std::borrow::Cow;
+use std::{
+ borrow::{Borrow, Cow},
+ cell::{Ref, RefCell},
+ ops::Deref,
+ rc::Rc,
+};
use chrono::NaiveDate;
use filamento::chat::Message as ChatMessage;
@@ -20,14 +25,30 @@ use jid::JID;
use serde::{Deserialize, Serialize};
use uuid::Uuid;
+use crate::{MacawChat, MacawMessage};
+
pub struct MessageView {
pub config: Config,
- pub jid: JID,
- pub message_history: IndexMap<Uuid, ChatMessage>,
+ pub chat: Rc<RefCell<MacawChat>>,
+ pub messages: Vec<Rc<RefCell<MacawMessage>>>,
pub new_message: Content,
pub shift_pressed: bool,
}
+impl MessageView {
+ pub fn chat(&self) -> Ref<'_, MacawChat> {
+ self.chat.as_ref().borrow()
+ }
+
+ pub fn messages(
+ &self,
+ ) -> impl Iterator<Item = impl Deref<Target = MacawMessage> + use<'_>> + use<'_> {
+ self.messages
+ .iter()
+ .map(|message| message.as_ref().borrow())
+ }
+}
+
#[derive(Serialize, Deserialize, Clone)]
pub struct Config {
pub send_on_enter: bool,
@@ -43,8 +64,8 @@ impl Default for Config {
#[derive(Debug, Clone)]
pub enum Message {
- MessageHistory(Vec<ChatMessage>),
- Message(ChatMessage),
+ // MessageHistory(Vec<Rc<RefCell<MacawMessage>>>),
+ // Message(Rc<RefCell<MacawMessage>>),
MessageCompose(text_editor::Action),
SendMessage(String),
}
@@ -55,11 +76,11 @@ pub enum Action {
}
impl MessageView {
- pub fn new(jid: JID, config: &super::Config) -> Self {
+ pub fn new(chat: Rc<RefCell<MacawChat>>, config: &super::Config) -> Self {
Self {
- jid,
+ chat,
// TODO: save position in message history
- message_history: IndexMap::new(),
+ messages: Vec::new(),
// TODO: save draft (as part of chat struct?)
new_message: Content::new(),
config: config.message_view_config.clone(),
@@ -70,27 +91,6 @@ impl MessageView {
pub fn update(&mut self, message: Message) -> Action {
match message {
- Message::MessageHistory(messages) => {
- if self.message_history.is_empty() {
- self.message_history = messages
- .into_iter()
- .map(|message| (message.id.clone(), message))
- .collect();
- }
- Action::None
- }
- Message::Message(message) => {
- let i = self
- .message_history
- .iter()
- .position(|(_id, m)| m.timestamp > message.timestamp);
- if let Some(i) = i {
- self.message_history.insert_before(i, message.id, message);
- } else {
- self.message_history.insert(message.id, message);
- }
- Action::None
- }
Message::MessageCompose(a) => {
match &a {
text_editor::Action::Edit(edit) => match edit {
@@ -126,7 +126,7 @@ impl MessageView {
pub fn view(&self) -> Element<Message> {
let mut messages_view = column![].spacing(8).padding(8);
let mut latest_date = NaiveDate::MIN;
- for (_id, message) in &self.message_history {
+ for message in self.messages() {
let message_date = message.timestamp.naive_local().date();
if message_date > latest_date {
latest_date = message_date;
@@ -154,15 +154,18 @@ impl MessageView {
.into()
}
- pub fn message<'a>(&'a self, message: &'a ChatMessage) -> Element<'a, Message> {
+ pub fn message<'a, 'b, M>(&'a self, message: M) -> Element<'b, Message>
+ where
+ M: Deref<Target = MacawMessage> + 'b,
+ {
let timestamp = message.timestamp.naive_local();
let timestamp = timestamp.time().format("%H:%M").to_string();
- if self.jid == message.from.as_bare() {
+ if self.chat().user().jid == message.user().jid {
container(
container(
column![
- text(message.body.body.as_str()).wrapping(text::Wrapping::WordOrGlyph),
+ text(message.body.body.clone()).wrapping(text::Wrapping::WordOrGlyph),
container(text(timestamp).wrapping(text::Wrapping::None).size(12)) // .align_right(Fill)
]
.width(Shrink)
@@ -187,7 +190,7 @@ impl MessageView {
let element: Element<Message> = container(
container(
column![
- text(message.body.body.as_str()).wrapping(text::Wrapping::WordOrGlyph),
+ text(message.body.body.clone()).wrapping(text::Wrapping::WordOrGlyph),
container(text(timestamp).wrapping(text::Wrapping::None).size(12))
.align_right(Fill) // row![
// // horizontal_space(),