diff --git a/CHANGELOG.md b/CHANGELOG.md index 87d44b281..a6f5b6f42 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # UNRELEASED +- Update matrix-rusk-sdk to `e99939db857ca`. + # matrix-sdk-crypto-wasm v11.0.0 - Update matrix-rust-sdk to `70bcddfba5e19`. diff --git a/Cargo.lock b/Cargo.lock index e68c156b0..ecc0989e0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -61,9 +61,23 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.92" +version = "1.0.93" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775" + +[[package]] +name = "aquamarine" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74f37166d7d48a0284b99dd824694c26119c700b53bf0d1540cdb147dbdaaf13" +checksum = "0f50776554130342de4836ba542aa85a4ddb361690d7e8df13774d7284c3d5c2" +dependencies = [ + "include_dir", + "itertools 0.10.5", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn", +] [[package]] name = "arrayref" @@ -136,11 +150,17 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" +[[package]] +name = "bitmaps" +version = "3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d084b0137aaa901caf9f1e8b21daa6aa24d41cd806e111335541eff9683bd6" + [[package]] name = "blake3" -version = "1.5.4" +version = "1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d82033247fd8e890df8f740e407ad4d038debb9eb1f40533fffb32e7d17dc6f7" +checksum = "b8ee0c1824c4dea5b5f81736aff91bae041d2c07ee1192bec91054e10e3e601e" dependencies = [ "arrayref", "arrayvec", @@ -205,9 +225,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.31" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f" +checksum = "fd9de9f2205d5ef3fd67e685b0df337994ddd4495e2a28d185500d0e1edfea47" dependencies = [ "shlex", ] @@ -283,9 +303,9 @@ checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" [[package]] name = "cpufeatures" -version = "0.2.14" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" +checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" dependencies = [ "libc", ] @@ -386,6 +406,17 @@ dependencies = [ "subtle", ] +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "ed25519" version = "2.2.3" @@ -435,6 +466,18 @@ dependencies = [ "tracing", ] +[[package]] +name = "eyeball-im" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1c02432230060cae0621e15803e073976d22974e0f013c9cb28a4ea1b484629" +dependencies = [ + "futures-core", + "imbl", + "tokio", + "tracing", +] + [[package]] name = "fancy_constructor" version = "1.3.0" @@ -577,9 +620,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.0" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" [[package]] name = "hkdf" @@ -610,14 +653,184 @@ dependencies = [ "itoa", ] +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "idna" -version = "0.5.0" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "imbl" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc3be8d8cd36f33a46b1849f31f837c44d9fa87223baee3b4bd96b8f11df81eb" +dependencies = [ + "bitmaps", + "imbl-sized-chunks", + "rand_core", + "rand_xoshiro", + "version_check", +] + +[[package]] +name = "imbl-sized-chunks" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "144006fb58ed787dcae3f54575ff4349755b00ccc99f4b4873860b654be1ed63" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "bitmaps", +] + +[[package]] +name = "include_dir" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "923d117408f1e49d914f1a379a309cffe4f18c05cf4e3d12e613a15fc81bd0dd" +dependencies = [ + "include_dir_macros", +] + +[[package]] +name = "include_dir_macros" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cab85a7ed0bd5f0e76d93846e0147172bed2e2d3f859bcc33a8d9699cad1a75" +dependencies = [ + "proc-macro2", + "quote", ] [[package]] @@ -660,9 +873,9 @@ dependencies = [ [[package]] name = "itertools" -version = "0.12.1" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" dependencies = [ "either", ] @@ -678,9 +891,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.11" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" [[package]] name = "js-sys" @@ -711,9 +924,9 @@ dependencies = [ [[package]] name = "konst" -version = "0.3.9" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50a0ba6de5f7af397afff922f22c149ff605c766cd3269cf6c1cd5e466dbe3b9" +checksum = "b65f00fb3910881e52bf0850ae2a82aea411488a557e1c02820ceaa60963dce3" dependencies = [ "const_panic", "konst_kernel", @@ -722,9 +935,9 @@ dependencies = [ [[package]] name = "konst_kernel" -version = "0.3.9" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be0a455a1719220fd6adf756088e1c69a85bf14b6a9e24537a5cc04f503edb2b" +checksum = "599c1232f55c72c7fc378335a3efe1c878c92720838c8e6a4fd87784ef7764de" dependencies = [ "typewit", ] @@ -737,9 +950,15 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.161" +version = "0.2.166" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" +checksum = "c2ccc108bbc0b1331bd061864e7cd823c0cab660bbe6970e66e2c0614decde36" + +[[package]] +name = "litemap" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" [[package]] name = "log" @@ -807,7 +1026,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e2551de3bba2cc65b52dc6b268df6114011fe118ac24870fbcf1b35537bd721" dependencies = [ "matrix-pickle-derive", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -825,17 +1044,19 @@ dependencies = [ [[package]] name = "matrix-sdk-common" -version = "0.7.0" -source = "git+https://github.com/matrix-org/matrix-rust-sdk#70bcddfba5e19f2d0fd11577edb55b9868f89678" +version = "0.8.0" +source = "git+https://github.com/matrix-org/matrix-rust-sdk#e99939db857ca36054c0023ef68cc181236fdee4" dependencies = [ "async-trait", + "eyeball-im", "futures-core", "futures-util", "gloo-timers", + "imbl", "ruma", "serde", "serde_json", - "thiserror", + "thiserror 2.0.3", "tokio", "tracing", "tracing-subscriber", @@ -846,10 +1067,11 @@ dependencies = [ [[package]] name = "matrix-sdk-crypto" -version = "0.7.2" -source = "git+https://github.com/matrix-org/matrix-rust-sdk#70bcddfba5e19f2d0fd11577edb55b9868f89678" +version = "0.8.0" +source = "git+https://github.com/matrix-org/matrix-rust-sdk#e99939db857ca36054c0023ef68cc181236fdee4" dependencies = [ "aes", + "aquamarine", "as_variant", "async-trait", "bs58", @@ -861,7 +1083,7 @@ dependencies = [ "futures-util", "hkdf", "hmac", - "itertools 0.12.1", + "itertools 0.13.0", "js_option", "matrix-sdk-common", "matrix-sdk-qrcode", @@ -873,7 +1095,7 @@ dependencies = [ "serde_json", "sha2", "subtle", - "thiserror", + "thiserror 2.0.3", "time", "tokio", "tokio-stream", @@ -912,8 +1134,8 @@ dependencies = [ [[package]] name = "matrix-sdk-indexeddb" -version = "0.7.0" -source = "git+https://github.com/matrix-org/matrix-rust-sdk#70bcddfba5e19f2d0fd11577edb55b9868f89678" +version = "0.8.0" +source = "git+https://github.com/matrix-org/matrix-rust-sdk#e99939db857ca36054c0023ef68cc181236fdee4" dependencies = [ "anyhow", "async-trait", @@ -930,7 +1152,7 @@ dependencies = [ "serde-wasm-bindgen 0.6.5", "serde_json", "sha2", - "thiserror", + "thiserror 2.0.3", "tokio", "tracing", "wasm-bindgen", @@ -940,20 +1162,20 @@ dependencies = [ [[package]] name = "matrix-sdk-qrcode" -version = "0.7.1" -source = "git+https://github.com/matrix-org/matrix-rust-sdk#70bcddfba5e19f2d0fd11577edb55b9868f89678" +version = "0.8.0" +source = "git+https://github.com/matrix-org/matrix-rust-sdk#e99939db857ca36054c0023ef68cc181236fdee4" dependencies = [ "byteorder", "qrcode", "ruma-common", - "thiserror", + "thiserror 2.0.3", "vodozemac", ] [[package]] name = "matrix-sdk-store-encryption" -version = "0.7.0" -source = "git+https://github.com/matrix-org/matrix-rust-sdk#70bcddfba5e19f2d0fd11577edb55b9868f89678" +version = "0.8.0" +source = "git+https://github.com/matrix-org/matrix-rust-sdk#e99939db857ca36054c0023ef68cc181236fdee4" dependencies = [ "base64", "blake3", @@ -965,7 +1187,7 @@ dependencies = [ "serde", "serde_json", "sha2", - "thiserror", + "thiserror 2.0.3", "zeroize", ] @@ -977,9 +1199,9 @@ checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "minicov" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "def6d99771d7c499c26ad4d40eb6645eafd3a1553b35fc26ea5a489a45e82d9a" +checksum = "f27fe9f1cc3c22e1687f9446c2083c4c5fc7f0bcf1c7a86bdbded14985895b4b" dependencies = [ "cc", "walkdir", @@ -1157,9 +1379,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.89" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] @@ -1232,6 +1454,15 @@ dependencies = [ "getrandom", ] +[[package]] +name = "rand_xoshiro" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" +dependencies = [ + "rand_core", +] + [[package]] name = "readlock" version = "0.1.8" @@ -1252,9 +1483,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", @@ -1323,7 +1554,7 @@ dependencies = [ "serde", "serde_html_form", "serde_json", - "thiserror", + "thiserror 1.0.69", "url", "web-time", ] @@ -1352,7 +1583,7 @@ dependencies = [ "serde", "serde_html_form", "serde_json", - "thiserror", + "thiserror 1.0.69", "time", "tracing", "url", @@ -1378,7 +1609,7 @@ dependencies = [ "ruma-macros", "serde", "serde_json", - "thiserror", + "thiserror 1.0.69", "tracing", "url", "web-time", @@ -1392,7 +1623,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2e7f9b534a65698d7db3c08d94bf91de0046fe6c7893a7b360502f65e7011ac4" dependencies = [ "js_int", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -1462,9 +1693,9 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.214" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f55c3193aca71c12ad7890f1785d2b73e1b9f63a0bbc353c08ef26fe03fc56b5" +checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" dependencies = [ "serde_derive", ] @@ -1502,9 +1733,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.214" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" +checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" dependencies = [ "proc-macro2", "quote", @@ -1526,9 +1757,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.132" +version = "1.0.133" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" +checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" dependencies = [ "itoa", "memchr", @@ -1605,6 +1836,12 @@ dependencies = [ "der", ] +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "subtle" version = "2.6.1" @@ -1613,29 +1850,60 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" -version = "2.0.86" +version = "2.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89275301d38033efb81a6e60e3497e734dfcc62571f2854bf4b16690398824c" +checksum = "44d46482f1c1c87acd84dea20c1bf5ebff4c757009ed6bf19cfd36fb10e92c4e" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + [[package]] name = "thiserror" -version = "1.0.66" +version = "2.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c006c85c7651b3cf2ada4584faa36773bd07bac24acfb39f3c431b36d7e667aa" +dependencies = [ + "thiserror-impl 2.0.3", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d171f59dbaa811dbbb1aee1e73db92ec2b122911a48e1390dfe327a821ddede" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ - "thiserror-impl", + "proc-macro2", + "quote", + "syn", ] [[package]] name = "thiserror-impl" -version = "1.0.66" +version = "2.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b08be0f17bd307950653ce45db00cd31200d82b624b36e181337d9c7d92765b5" +checksum = "f077553d607adc1caf65430528a576c757a71ed73944b66ebb58ef2bbd243568" dependencies = [ "proc-macro2", "quote", @@ -1685,6 +1953,16 @@ dependencies = [ "time-core", ] +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + [[package]] name = "tinyvec" version = "1.8.0" @@ -1702,12 +1980,24 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.41.0" +version = "1.41.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "145f3413504347a2be84393cc8a7d2fb4d863b375909ea59f2158261aa258bbb" +checksum = "22cfb5bee7a6a52939ca9224d6ac897bb669134078daa8735560897f69de4d33" dependencies = [ "backtrace", "pin-project-lite", + "tokio-macros", +] + +[[package]] +name = "tokio-macros" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" +dependencies = [ + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -1771,9 +2061,9 @@ dependencies = [ [[package]] name = "tracing" -version = "0.1.40" +version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ "pin-project-lite", "tracing-attributes", @@ -1782,9 +2072,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.27" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", @@ -1793,9 +2083,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.32" +version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" dependencies = [ "once_cell", "valuable", @@ -1834,9 +2124,9 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "typewit" -version = "1.9.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fb9ae6a3cafaf0a5d14c2302ca525f9ae8e07a0f0e6949de88d882c37a6e24" +checksum = "d51dbd25812f740f45e2a9769f84711982e000483b13b73a8a1852e092abac8c" dependencies = [ "typewit_proc_macros", ] @@ -1858,26 +2148,11 @@ dependencies = [ "web-time", ] -[[package]] -name = "unicode-bidi" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" - [[package]] name = "unicode-ident" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" - -[[package]] -name = "unicode-normalization" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" -dependencies = [ - "tinyvec", -] +checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" [[package]] name = "universal-hash" @@ -1891,9 +2166,9 @@ dependencies = [ [[package]] name = "url" -version = "2.5.2" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" dependencies = [ "form_urlencoded", "idna", @@ -1901,6 +2176,18 @@ dependencies = [ "serde", ] +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "uuid" version = "1.11.0" @@ -1960,7 +2247,7 @@ dependencies = [ "serde_json", "sha2", "subtle", - "thiserror", + "thiserror 1.0.69", "x25519-dalek", "zeroize", ] @@ -2213,6 +2500,18 @@ dependencies = [ "memchr", ] +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + [[package]] name = "x25519-dalek" version = "2.0.1" @@ -2225,6 +2524,30 @@ dependencies = [ "zeroize", ] +[[package]] +name = "yoke" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + [[package]] name = "zerocopy" version = "0.7.35" @@ -2246,6 +2569,27 @@ dependencies = [ "syn", ] +[[package]] +name = "zerofrom" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + [[package]] name = "zeroize" version = "1.8.1" @@ -2265,3 +2609,25 @@ dependencies = [ "quote", "syn", ] + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] diff --git a/src/requests.rs b/src/requests.rs index 051c66334..44be137b3 100644 --- a/src/requests.rs +++ b/src/requests.rs @@ -16,14 +16,15 @@ use matrix_sdk_common::ruma::{ exports::serde::ser::Error, }; use matrix_sdk_crypto::{ - requests::{ + types::requests::{ + AnyOutgoingRequest, KeysBackupRequest as OriginalKeysBackupRequest, KeysQueryRequest as OriginalKeysQueryRequest, RoomMessageRequest as OriginalRoomMessageRequest, ToDeviceRequest as OriginalToDeviceRequest, UploadSigningKeysRequest as OriginalUploadSigningKeysRequest, }, - CrossSigningBootstrapRequests as OriginalCrossSigningBootstrapRequests, OutgoingRequests, + CrossSigningBootstrapRequests as OriginalCrossSigningBootstrapRequests, }; use wasm_bindgen::prelude::*; @@ -405,7 +406,7 @@ macro_rules! request { }; } -// Generate the methods needed to convert rust `OutgoingRequests` into the js +// Generate the methods needed to convert rust `AnyOutgoingRequest` into the js // counterpart. Technically it's converting tuples `(String, &Original)`, where // the first member is the request ID, into js requests. Used by // `TryFrom for JsValue`. @@ -487,32 +488,32 @@ impl TryFrom<&OriginalToDeviceRequest> for ToDeviceRequest { /// different types, we have no choice that hiding everything behind a /// `JsValue`. pub fn outgoing_request_to_js_value( - outgoing_request: matrix_sdk_crypto::OutgoingRequest, + outgoing_request: matrix_sdk_crypto::types::requests::OutgoingRequest, ) -> Result { let request_id = outgoing_request.request_id().to_string(); Ok(match outgoing_request.request() { - OutgoingRequests::KeysUpload(request) => { + AnyOutgoingRequest::KeysUpload(request) => { JsValue::from(KeysUploadRequest::try_from((request_id, request))?) } - OutgoingRequests::KeysQuery(request) => { + AnyOutgoingRequest::KeysQuery(request) => { JsValue::from(KeysQueryRequest::try_from((request_id, request))?) } - OutgoingRequests::KeysClaim(request) => { + AnyOutgoingRequest::KeysClaim(request) => { JsValue::from(KeysClaimRequest::try_from((request_id, request))?) } - OutgoingRequests::ToDeviceRequest(request) => { + AnyOutgoingRequest::ToDeviceRequest(request) => { JsValue::from(ToDeviceRequest::try_from((request_id, request))?) } - OutgoingRequests::SignatureUpload(request) => { + AnyOutgoingRequest::SignatureUpload(request) => { JsValue::from(SignatureUploadRequest::try_from((request_id, request))?) } - OutgoingRequests::RoomMessage(request) => { + AnyOutgoingRequest::RoomMessage(request) => { JsValue::from(RoomMessageRequest::try_from((request_id, request))?) } }) @@ -714,7 +715,7 @@ pub(crate) mod tests { }, device_id, user_id, OneTimeKeyAlgorithm, }; - use matrix_sdk_crypto::requests::KeysQueryRequest as OriginalKeysQueryRequest; + use matrix_sdk_crypto::types::requests::KeysQueryRequest as OriginalKeysQueryRequest; use serde_json::Value; use wasm_bindgen_test::wasm_bindgen_test; diff --git a/src/responses.rs b/src/responses.rs index 3f0a89e8f..913a078d8 100644 --- a/src/responses.rs +++ b/src/responses.rs @@ -15,7 +15,7 @@ use matrix_sdk_common::{ deserialized_responses::AlgorithmInfo, ruma::{self, api::IncomingResponse as RumaIncomingResponse}, }; -use matrix_sdk_crypto::IncomingResponse; +use matrix_sdk_crypto::types::requests::AnyIncomingResponse; use wasm_bindgen::prelude::*; use crate::{encryption, identifiers, impl_from_to_inner, requests::RequestType}; @@ -127,20 +127,20 @@ impl TryFrom<(RequestType, http::Response>)> for OwnedResponse { } } -// Make `OwnedResponse` implement `Into`. +// Make `OwnedResponse` implement `Into`. // // Required so that we can pass `OwnedResponse` into the real // `matrix_sdk_crypto_js::OlmMachine::mark_request_as_sent`. -impl<'a> From<&'a OwnedResponse> for IncomingResponse<'a> { +impl<'a> From<&'a OwnedResponse> for AnyIncomingResponse<'a> { fn from(response: &'a OwnedResponse) -> Self { match response { - OwnedResponse::KeysUpload(response) => IncomingResponse::KeysUpload(response), - OwnedResponse::KeysQuery(response) => IncomingResponse::KeysQuery(response), - OwnedResponse::KeysClaim(response) => IncomingResponse::KeysClaim(response), - OwnedResponse::ToDevice(response) => IncomingResponse::ToDevice(response), - OwnedResponse::SignatureUpload(response) => IncomingResponse::SignatureUpload(response), - OwnedResponse::RoomMessage(response) => IncomingResponse::RoomMessage(response), - OwnedResponse::KeysBackup(response) => IncomingResponse::KeysBackup(response), + OwnedResponse::KeysUpload(response) => AnyIncomingResponse::KeysUpload(response), + OwnedResponse::KeysQuery(response) => AnyIncomingResponse::KeysQuery(response), + OwnedResponse::KeysClaim(response) => AnyIncomingResponse::KeysClaim(response), + OwnedResponse::ToDevice(response) => AnyIncomingResponse::ToDevice(response), + OwnedResponse::SignatureUpload(response) => AnyIncomingResponse::SignatureUpload(response), + OwnedResponse::RoomMessage(response) => AnyIncomingResponse::RoomMessage(response), + OwnedResponse::KeysBackup(response) => AnyIncomingResponse::KeysBackup(response), } } } diff --git a/src/verification.rs b/src/verification.rs index 1415fcc62..a12d52422 100644 --- a/src/verification.rs +++ b/src/verification.rs @@ -1075,16 +1075,16 @@ impl VerificationRequest { // different types, we have no choice that hiding everything behind a // `JsValue`. pub(crate) struct OutgoingVerificationRequest { - pub(crate) inner: matrix_sdk_crypto::OutgoingVerificationRequest, + pub(crate) inner: matrix_sdk_crypto::types::requests::OutgoingVerificationRequest, } -impl_from_to_inner!(matrix_sdk_crypto::OutgoingVerificationRequest => OutgoingVerificationRequest); +impl_from_to_inner!(matrix_sdk_crypto::types::requests::OutgoingVerificationRequest => OutgoingVerificationRequest); impl TryFrom for JsValue { type Error = serde_json::Error; fn try_from(outgoing_request: OutgoingVerificationRequest) -> Result { - use matrix_sdk_crypto::OutgoingVerificationRequest::*; + use matrix_sdk_crypto::types::requests::OutgoingVerificationRequest::*; let request_id = outgoing_request.inner.request_id().to_string();