Initial commit
This commit is contained in:
@@ -0,0 +1 @@
|
|||||||
|
/target
|
||||||
Generated
+603
@@ -0,0 +1,603 @@
|
|||||||
|
# This file is automatically @generated by Cargo.
|
||||||
|
# It is not intended for manual editing.
|
||||||
|
version = 4
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "anyhow"
|
||||||
|
version = "1.0.102"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "autocfg"
|
||||||
|
version = "1.5.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "bitflags"
|
||||||
|
version = "2.11.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "bumpalo"
|
||||||
|
version = "3.20.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "cfg-if"
|
||||||
|
version = "1.0.4"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "deranged"
|
||||||
|
version = "0.5.8"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c"
|
||||||
|
dependencies = [
|
||||||
|
"powerfmt",
|
||||||
|
"serde_core",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "equivalent"
|
||||||
|
version = "1.0.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "fedichat"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"rmp-serde",
|
||||||
|
"serde",
|
||||||
|
"serde_bytes",
|
||||||
|
"time",
|
||||||
|
"uuid",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "foldhash"
|
||||||
|
version = "0.1.5"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "futures-core"
|
||||||
|
version = "0.3.32"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "futures-task"
|
||||||
|
version = "0.3.32"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "futures-util"
|
||||||
|
version = "0.3.32"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6"
|
||||||
|
dependencies = [
|
||||||
|
"futures-core",
|
||||||
|
"futures-task",
|
||||||
|
"pin-project-lite",
|
||||||
|
"slab",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "getrandom"
|
||||||
|
version = "0.4.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555"
|
||||||
|
dependencies = [
|
||||||
|
"cfg-if",
|
||||||
|
"libc",
|
||||||
|
"r-efi",
|
||||||
|
"wasip2",
|
||||||
|
"wasip3",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "hashbrown"
|
||||||
|
version = "0.15.5"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1"
|
||||||
|
dependencies = [
|
||||||
|
"foldhash",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "hashbrown"
|
||||||
|
version = "0.17.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "4f467dd6dccf739c208452f8014c75c18bb8301b050ad1cfb27153803edb0f51"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "heck"
|
||||||
|
version = "0.5.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "id-arena"
|
||||||
|
version = "2.3.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "indexmap"
|
||||||
|
version = "2.14.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9"
|
||||||
|
dependencies = [
|
||||||
|
"equivalent",
|
||||||
|
"hashbrown 0.17.0",
|
||||||
|
"serde",
|
||||||
|
"serde_core",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "itoa"
|
||||||
|
version = "1.0.18"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "js-sys"
|
||||||
|
version = "0.3.98"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "67df7112613f8bfd9150013a0314e196f4800d3201ae742489d999db2f979f08"
|
||||||
|
dependencies = [
|
||||||
|
"cfg-if",
|
||||||
|
"futures-util",
|
||||||
|
"once_cell",
|
||||||
|
"wasm-bindgen",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "leb128fmt"
|
||||||
|
version = "0.1.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "libc"
|
||||||
|
version = "0.2.186"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "log"
|
||||||
|
version = "0.4.29"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "memchr"
|
||||||
|
version = "2.8.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "num-conv"
|
||||||
|
version = "0.2.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "c6673768db2d862beb9b39a78fdcb1a69439615d5794a1be50caa9bc92c81967"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "num-traits"
|
||||||
|
version = "0.2.19"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
|
||||||
|
dependencies = [
|
||||||
|
"autocfg",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "once_cell"
|
||||||
|
version = "1.21.4"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "pin-project-lite"
|
||||||
|
version = "0.2.17"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "powerfmt"
|
||||||
|
version = "0.2.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "prettyplease"
|
||||||
|
version = "0.2.37"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b"
|
||||||
|
dependencies = [
|
||||||
|
"proc-macro2",
|
||||||
|
"syn",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "proc-macro2"
|
||||||
|
version = "1.0.106"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
|
||||||
|
dependencies = [
|
||||||
|
"unicode-ident",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "quote"
|
||||||
|
version = "1.0.45"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
|
||||||
|
dependencies = [
|
||||||
|
"proc-macro2",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "r-efi"
|
||||||
|
version = "6.0.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "rmp"
|
||||||
|
version = "0.8.15"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "4ba8be72d372b2c9b35542551678538b562e7cf86c3315773cae48dfbfe7790c"
|
||||||
|
dependencies = [
|
||||||
|
"num-traits",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "rmp-serde"
|
||||||
|
version = "1.3.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "72f81bee8c8ef9b577d1681a70ebbc962c232461e397b22c208c43c04b67a155"
|
||||||
|
dependencies = [
|
||||||
|
"rmp",
|
||||||
|
"serde",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "rustversion"
|
||||||
|
version = "1.0.22"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "semver"
|
||||||
|
version = "1.0.28"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "serde"
|
||||||
|
version = "1.0.228"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
|
||||||
|
dependencies = [
|
||||||
|
"serde_core",
|
||||||
|
"serde_derive",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "serde_bytes"
|
||||||
|
version = "0.11.19"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "a5d440709e79d88e51ac01c4b72fc6cb7314017bb7da9eeff678aa94c10e3ea8"
|
||||||
|
dependencies = [
|
||||||
|
"serde",
|
||||||
|
"serde_core",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "serde_core"
|
||||||
|
version = "1.0.228"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
|
||||||
|
dependencies = [
|
||||||
|
"serde_derive",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "serde_derive"
|
||||||
|
version = "1.0.228"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
|
||||||
|
dependencies = [
|
||||||
|
"proc-macro2",
|
||||||
|
"quote",
|
||||||
|
"syn",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "serde_json"
|
||||||
|
version = "1.0.149"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86"
|
||||||
|
dependencies = [
|
||||||
|
"itoa",
|
||||||
|
"memchr",
|
||||||
|
"serde",
|
||||||
|
"serde_core",
|
||||||
|
"zmij",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "slab"
|
||||||
|
version = "0.4.12"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "syn"
|
||||||
|
version = "2.0.117"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
|
||||||
|
dependencies = [
|
||||||
|
"proc-macro2",
|
||||||
|
"quote",
|
||||||
|
"unicode-ident",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "time"
|
||||||
|
version = "0.3.47"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c"
|
||||||
|
dependencies = [
|
||||||
|
"deranged",
|
||||||
|
"num-conv",
|
||||||
|
"powerfmt",
|
||||||
|
"serde_core",
|
||||||
|
"time-core",
|
||||||
|
"time-macros",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "time-core"
|
||||||
|
version = "0.1.8"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "time-macros"
|
||||||
|
version = "0.2.27"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "2e70e4c5a0e0a8a4823ad65dfe1a6930e4f4d756dcd9dd7939022b5e8c501215"
|
||||||
|
dependencies = [
|
||||||
|
"num-conv",
|
||||||
|
"time-core",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "unicode-ident"
|
||||||
|
version = "1.0.24"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "unicode-xid"
|
||||||
|
version = "0.2.6"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "uuid"
|
||||||
|
version = "1.23.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "ddd74a9687298c6858e9b88ec8935ec45d22e8fd5e6394fa1bd4e99a87789c76"
|
||||||
|
dependencies = [
|
||||||
|
"getrandom",
|
||||||
|
"js-sys",
|
||||||
|
"serde_core",
|
||||||
|
"wasm-bindgen",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "wasip2"
|
||||||
|
version = "1.0.3+wasi-0.2.9"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "20064672db26d7cdc89c7798c48a0fdfac8213434a1186e5ef29fd560ae223d6"
|
||||||
|
dependencies = [
|
||||||
|
"wit-bindgen 0.57.1",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "wasip3"
|
||||||
|
version = "0.4.0+wasi-0.3.0-rc-2026-01-06"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5"
|
||||||
|
dependencies = [
|
||||||
|
"wit-bindgen 0.51.0",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "wasm-bindgen"
|
||||||
|
version = "0.2.121"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "49ace1d07c165b0864824eee619580c4689389afa9dc9ed3a4c75040d82e6790"
|
||||||
|
dependencies = [
|
||||||
|
"cfg-if",
|
||||||
|
"once_cell",
|
||||||
|
"rustversion",
|
||||||
|
"wasm-bindgen-macro",
|
||||||
|
"wasm-bindgen-shared",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "wasm-bindgen-macro"
|
||||||
|
version = "0.2.121"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "8e68e6f4afd367a562002c05637acb8578ff2dea1943df76afb9e83d177c8578"
|
||||||
|
dependencies = [
|
||||||
|
"quote",
|
||||||
|
"wasm-bindgen-macro-support",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "wasm-bindgen-macro-support"
|
||||||
|
version = "0.2.121"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "d95a9ec35c64b2a7cb35d3fead40c4238d0940c86d107136999567a4703259f2"
|
||||||
|
dependencies = [
|
||||||
|
"bumpalo",
|
||||||
|
"proc-macro2",
|
||||||
|
"quote",
|
||||||
|
"syn",
|
||||||
|
"wasm-bindgen-shared",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "wasm-bindgen-shared"
|
||||||
|
version = "0.2.121"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "c4e0100b01e9f0d03189a92b96772a1fb998639d981193d7dbab487302513441"
|
||||||
|
dependencies = [
|
||||||
|
"unicode-ident",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "wasm-encoder"
|
||||||
|
version = "0.244.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319"
|
||||||
|
dependencies = [
|
||||||
|
"leb128fmt",
|
||||||
|
"wasmparser",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "wasm-metadata"
|
||||||
|
version = "0.244.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909"
|
||||||
|
dependencies = [
|
||||||
|
"anyhow",
|
||||||
|
"indexmap",
|
||||||
|
"wasm-encoder",
|
||||||
|
"wasmparser",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "wasmparser"
|
||||||
|
version = "0.244.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe"
|
||||||
|
dependencies = [
|
||||||
|
"bitflags",
|
||||||
|
"hashbrown 0.15.5",
|
||||||
|
"indexmap",
|
||||||
|
"semver",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "wit-bindgen"
|
||||||
|
version = "0.51.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5"
|
||||||
|
dependencies = [
|
||||||
|
"wit-bindgen-rust-macro",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "wit-bindgen"
|
||||||
|
version = "0.57.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "wit-bindgen-core"
|
||||||
|
version = "0.51.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc"
|
||||||
|
dependencies = [
|
||||||
|
"anyhow",
|
||||||
|
"heck",
|
||||||
|
"wit-parser",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "wit-bindgen-rust"
|
||||||
|
version = "0.51.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21"
|
||||||
|
dependencies = [
|
||||||
|
"anyhow",
|
||||||
|
"heck",
|
||||||
|
"indexmap",
|
||||||
|
"prettyplease",
|
||||||
|
"syn",
|
||||||
|
"wasm-metadata",
|
||||||
|
"wit-bindgen-core",
|
||||||
|
"wit-component",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "wit-bindgen-rust-macro"
|
||||||
|
version = "0.51.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a"
|
||||||
|
dependencies = [
|
||||||
|
"anyhow",
|
||||||
|
"prettyplease",
|
||||||
|
"proc-macro2",
|
||||||
|
"quote",
|
||||||
|
"syn",
|
||||||
|
"wit-bindgen-core",
|
||||||
|
"wit-bindgen-rust",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "wit-component"
|
||||||
|
version = "0.244.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2"
|
||||||
|
dependencies = [
|
||||||
|
"anyhow",
|
||||||
|
"bitflags",
|
||||||
|
"indexmap",
|
||||||
|
"log",
|
||||||
|
"serde",
|
||||||
|
"serde_derive",
|
||||||
|
"serde_json",
|
||||||
|
"wasm-encoder",
|
||||||
|
"wasm-metadata",
|
||||||
|
"wasmparser",
|
||||||
|
"wit-parser",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "wit-parser"
|
||||||
|
version = "0.244.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736"
|
||||||
|
dependencies = [
|
||||||
|
"anyhow",
|
||||||
|
"id-arena",
|
||||||
|
"indexmap",
|
||||||
|
"log",
|
||||||
|
"semver",
|
||||||
|
"serde",
|
||||||
|
"serde_derive",
|
||||||
|
"serde_json",
|
||||||
|
"unicode-xid",
|
||||||
|
"wasmparser",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "zmij"
|
||||||
|
version = "1.0.21"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa"
|
||||||
+17
@@ -0,0 +1,17 @@
|
|||||||
|
[package]
|
||||||
|
name = "fedichat"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2024"
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
rmp-serde = "1.3.1"
|
||||||
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
|
serde_bytes = "0.11.19"
|
||||||
|
time = {version = "0.3.47", features = ["serde"]}
|
||||||
|
|
||||||
|
[dependencies.uuid]
|
||||||
|
version = "1.23.1"
|
||||||
|
features = [
|
||||||
|
"v4",
|
||||||
|
"serde"
|
||||||
|
]
|
||||||
+194
@@ -0,0 +1,194 @@
|
|||||||
|
use uuid::Uuid;
|
||||||
|
use crate::message::{MessageId,Message};
|
||||||
|
use crate::state::{StateType,StateValue,StatePath,StatePermission,StatePermissionKey};
|
||||||
|
use crate::{RoomId,Group,Role,User,GroupPower};
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
//StatePath [String]
|
||||||
|
//octal is fine for now
|
||||||
|
//maybe do ACL late???
|
||||||
|
//StatePermissions (u8,u8,u8)
|
||||||
|
//RoomId [i64]
|
||||||
|
|
||||||
|
|
||||||
|
#[derive(Serialize,Deserialize,Clone,Debug)]
|
||||||
|
pub struct TaggedClientMessage {
|
||||||
|
message: ClientMessage,
|
||||||
|
#[serde(with = "serde_bytes")]
|
||||||
|
signature: Box<[u8]>,
|
||||||
|
user: User
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Serialize,Deserialize,Clone,Debug)]
|
||||||
|
pub struct SignedClientMessage {
|
||||||
|
message: ClientMessage,
|
||||||
|
// Should I enforce this being a ecdsa signature?
|
||||||
|
#[serde(with = "serde_bytes")]
|
||||||
|
signature: Box<[u8]>
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Serialize,Deserialize,Clone,Debug)]
|
||||||
|
pub enum ClientMessage {
|
||||||
|
|
||||||
|
Auth{
|
||||||
|
username: String,
|
||||||
|
password: String
|
||||||
|
},
|
||||||
|
// Maybe ask for email too? Or a potential invite code
|
||||||
|
UserCreate {
|
||||||
|
username: String,
|
||||||
|
password: String,
|
||||||
|
},
|
||||||
|
// Used to require accounts to complete some kind of challenge. Simplest
|
||||||
|
// is giving a password/invite code to create an account or join a room
|
||||||
|
ChallengeAnswer {
|
||||||
|
response: String
|
||||||
|
},
|
||||||
|
// TODO I still dont have key management commands
|
||||||
|
|
||||||
|
// Should it be one message type or mutiple?
|
||||||
|
Message {
|
||||||
|
body: String,
|
||||||
|
},
|
||||||
|
// Private message/invite mechanism
|
||||||
|
MessagePost {
|
||||||
|
body: String,
|
||||||
|
user: User
|
||||||
|
},
|
||||||
|
// Replace the body of the message with a new one
|
||||||
|
MessageEdit {
|
||||||
|
body: String,
|
||||||
|
id: MessageId
|
||||||
|
},
|
||||||
|
MessageDelete {
|
||||||
|
id: MessageId
|
||||||
|
},
|
||||||
|
// State Actions
|
||||||
|
StateCreate {
|
||||||
|
path: StatePath,
|
||||||
|
ty: StateType,
|
||||||
|
permissions: Option<Vec<StatePermission>>
|
||||||
|
},
|
||||||
|
StateWrite {
|
||||||
|
path: StatePath,
|
||||||
|
content: StateValue
|
||||||
|
},
|
||||||
|
StateDelete {
|
||||||
|
path: StatePath,
|
||||||
|
},
|
||||||
|
StateAppend {
|
||||||
|
path: StatePath,
|
||||||
|
content: StateValue
|
||||||
|
},
|
||||||
|
StateMove {
|
||||||
|
path: StatePath,
|
||||||
|
target: StatePath,
|
||||||
|
},
|
||||||
|
StateRead {
|
||||||
|
path: StatePath
|
||||||
|
},
|
||||||
|
PermissionAdd {
|
||||||
|
permission: StatePermission
|
||||||
|
},
|
||||||
|
PermissionDelete {
|
||||||
|
permission: StatePermissionKey
|
||||||
|
},
|
||||||
|
// Groups really should have a way to add permissions by user
|
||||||
|
// specifically for who can join or invite others
|
||||||
|
//
|
||||||
|
// Maybe make a group -> role -> member hierarchy?
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Could always do this through a bot that owns a group??
|
||||||
|
GroupCreate {
|
||||||
|
group: Group,
|
||||||
|
users: Vec<User>
|
||||||
|
},
|
||||||
|
// Only the creator of a group or a server admin can delete groups
|
||||||
|
GroupDelete {
|
||||||
|
group: Group
|
||||||
|
},
|
||||||
|
// Only the creator of a group or a server admin can delete groups
|
||||||
|
// same with adding, though there should be a way to add group officers
|
||||||
|
// at some point
|
||||||
|
GroupUserAdd {
|
||||||
|
group: Group,
|
||||||
|
users: Vec<User>
|
||||||
|
},
|
||||||
|
GroupUserRemove {
|
||||||
|
group: Group,
|
||||||
|
users: Vec<User>
|
||||||
|
},
|
||||||
|
GroupRoleCreate {
|
||||||
|
group: Group,
|
||||||
|
role: Role
|
||||||
|
},
|
||||||
|
GroupRoleDelete {
|
||||||
|
group: Group,
|
||||||
|
role: Role
|
||||||
|
},
|
||||||
|
GroupRoleUserAdd {
|
||||||
|
group: Group,
|
||||||
|
role: Role,
|
||||||
|
users: Vec<User>
|
||||||
|
},
|
||||||
|
GroupRoleUserRemove {
|
||||||
|
group: Group,
|
||||||
|
role: Role,
|
||||||
|
users: Vec<User>
|
||||||
|
},
|
||||||
|
// Should work like discord roles
|
||||||
|
// Can control who can invite to the group
|
||||||
|
// Can be used with permissions to make rooms that are private for individual roles
|
||||||
|
GroupRolePowerAdd {
|
||||||
|
group: Group,
|
||||||
|
role: Role,
|
||||||
|
power: GroupPower
|
||||||
|
},
|
||||||
|
GroupRolePowerRemove {
|
||||||
|
group: Group,
|
||||||
|
role: Role,
|
||||||
|
power: GroupPower
|
||||||
|
},
|
||||||
|
// Returns an ID to use for message sending
|
||||||
|
// The server can potentially use the current username to associate media uploads
|
||||||
|
// with users
|
||||||
|
MediaUpload {
|
||||||
|
#[serde(with = "serde_bytes")]
|
||||||
|
bytes: Vec<u8>
|
||||||
|
},
|
||||||
|
// Join and subscribe
|
||||||
|
Join {
|
||||||
|
room_id: RoomId,
|
||||||
|
},
|
||||||
|
SubscribeMessages {
|
||||||
|
room_id: RoomId,
|
||||||
|
},
|
||||||
|
SubscribeState {
|
||||||
|
room_id: RoomId,
|
||||||
|
state: StatePath
|
||||||
|
},
|
||||||
|
FetchMessages {
|
||||||
|
count: u64,
|
||||||
|
end: MessageId,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Serialize,Deserialize)]
|
||||||
|
enum ServerError {
|
||||||
|
InvalidPermission,
|
||||||
|
// Server can specify the required challenge
|
||||||
|
ChallengeInvitecode,
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Serialize,Deserialize)]
|
||||||
|
enum ServerMessage {
|
||||||
|
// Returned on fetch or naturally from subscribe
|
||||||
|
Messages(Vec<Message>),
|
||||||
|
MediaUploaded(Uuid),
|
||||||
|
Error(ServerError),
|
||||||
|
// Returned both on read and from subscribe
|
||||||
|
State(StateValue),
|
||||||
|
Ok,
|
||||||
|
}
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
use uuid::Uuid;
|
||||||
|
|
||||||
|
use crate::state::{StatePath,StateValue,StatePermissionKey};
|
||||||
|
use crate::message::Message;
|
||||||
|
use crate::{RoomId,User};
|
||||||
|
use crate::client::TaggedClientMessage;
|
||||||
|
// How do remote subscriptions work?
|
||||||
|
// Server pushes subscription to remote
|
||||||
|
// remote keeps track of list, filters on message broadcast
|
||||||
|
// forwards message
|
||||||
|
// local server sends over local channel
|
||||||
|
// local server checks for message ack
|
||||||
|
// if no acks for N times then subscription is cancelled
|
||||||
|
// NOTE: should acks be sent by the client??
|
||||||
|
// NOTE 2: Should they be sent by the server to avoid traffic multiplication attacks?
|
||||||
|
#[derive(Serialize,Deserialize)]
|
||||||
|
pub enum ServerRequest {
|
||||||
|
SubscribeMessages {
|
||||||
|
room_id: RoomId,
|
||||||
|
user: User,
|
||||||
|
|
||||||
|
},
|
||||||
|
UnsubscribeMessages {
|
||||||
|
room_id: RoomId
|
||||||
|
},
|
||||||
|
SubscribeState {
|
||||||
|
room_id: RoomId,
|
||||||
|
user: User,
|
||||||
|
state: StatePath
|
||||||
|
},
|
||||||
|
UnsubscribeState {
|
||||||
|
room_id: RoomId,
|
||||||
|
state: StatePath
|
||||||
|
},
|
||||||
|
FetchRemoteMedia {
|
||||||
|
id: Uuid
|
||||||
|
},
|
||||||
|
// Check to see if a user is in any of the given groups on the remote server
|
||||||
|
CheckGroups {
|
||||||
|
user: User,
|
||||||
|
groups: Vec<StatePermissionKey>
|
||||||
|
},
|
||||||
|
//NOTE: It doesn't make sense to forward every kind of message
|
||||||
|
// But duplicating work here doesn't make sense
|
||||||
|
ForwardedMessage(TaggedClientMessage)
|
||||||
|
}
|
||||||
|
#[derive(Serialize,Deserialize)]
|
||||||
|
pub enum ServerResponse {
|
||||||
|
Messages(Vec<Message>),
|
||||||
|
Error(FederationError),
|
||||||
|
State(StateValue),
|
||||||
|
Media(Uuid,#[serde(with = "serde_bytes")] Vec<u8>),
|
||||||
|
ValidGroups(User,Vec<StatePermissionKey>)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Serialize,Deserialize)]
|
||||||
|
pub enum FederationError {
|
||||||
|
InvalidPermission,
|
||||||
|
}
|
||||||
+38
@@ -0,0 +1,38 @@
|
|||||||
|
use serde::{Deserialize,Serialize};
|
||||||
|
|
||||||
|
pub mod client;
|
||||||
|
pub mod federation;
|
||||||
|
pub mod state;
|
||||||
|
pub mod message;
|
||||||
|
|
||||||
|
// Room coordinates and originating server
|
||||||
|
#[derive(Serialize,Deserialize,Clone,Debug)]
|
||||||
|
pub struct RoomId{
|
||||||
|
coordinates: Vec<i64>,
|
||||||
|
server: Option<String>
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Serialize,Deserialize,Clone,Hash,Eq,PartialEq,Debug)]
|
||||||
|
pub struct User {
|
||||||
|
name: String,
|
||||||
|
// Should be a fqdn probably, dunno if its worth enforcing that here
|
||||||
|
server: String
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Serialize,Deserialize,Clone,Hash,Eq,PartialEq,Debug)]
|
||||||
|
pub struct Group {
|
||||||
|
name: String,
|
||||||
|
// Should be a fqdn probably, dunno if its worth enforcing that here
|
||||||
|
server: String
|
||||||
|
}
|
||||||
|
|
||||||
|
// Might want to standardize this, idk which powers would be useful though
|
||||||
|
// should be things like who can manage roles, group members, and more specific
|
||||||
|
// stuff like who can post images or join different rooms
|
||||||
|
#[derive(Serialize,Deserialize,Clone,Debug)]
|
||||||
|
pub struct GroupPower(String);
|
||||||
|
|
||||||
|
#[derive(Serialize,Deserialize,Clone,Hash,Eq,PartialEq,Debug)]
|
||||||
|
pub struct Role {
|
||||||
|
name: String
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
use crate::User;
|
||||||
|
use time::OffsetDateTime;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
//Monotonically increasing messageID
|
||||||
|
#[derive(Serialize,Deserialize,Debug,Clone)]
|
||||||
|
pub struct MessageId(u64);
|
||||||
|
|
||||||
|
#[derive(Serialize,Deserialize,Debug,Clone)]
|
||||||
|
pub struct Message {
|
||||||
|
body: String,
|
||||||
|
signature: Box<[u8]>,
|
||||||
|
sender: User,
|
||||||
|
timestamp: OffsetDateTime
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
use serde::{Deserialize,Serialize};
|
||||||
|
use crate::{User,Group,Role};
|
||||||
|
#[derive(Serialize,Deserialize,Clone,Debug)]
|
||||||
|
pub enum StateValue {
|
||||||
|
String(String),
|
||||||
|
Binary(Vec<u8>)
|
||||||
|
}
|
||||||
|
#[derive(Serialize,Deserialize,Debug,Clone)]
|
||||||
|
pub enum StateType {
|
||||||
|
Directory,
|
||||||
|
String,
|
||||||
|
Binary
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#[derive(Serialize,Deserialize,Clone,Hash,Eq,PartialEq,Debug)]
|
||||||
|
pub enum StatePermissionKey {
|
||||||
|
User(User),
|
||||||
|
Group(Group),
|
||||||
|
Role(Group,Role),
|
||||||
|
//This is a string for now but could get compiled later into an actual regex
|
||||||
|
//should be able to match on name and server
|
||||||
|
UserRegex(String)
|
||||||
|
}
|
||||||
|
#[derive(Serialize,Deserialize,Clone,Debug)]
|
||||||
|
pub enum StatePermissionValue {
|
||||||
|
None,
|
||||||
|
Read,
|
||||||
|
ReadWrite,
|
||||||
|
// Can only set value, does not allow appending
|
||||||
|
Write
|
||||||
|
}
|
||||||
|
#[derive(Serialize,Deserialize,Clone,Debug)]
|
||||||
|
pub struct StatePermission(StatePermissionKey,StatePermissionValue);
|
||||||
|
|
||||||
|
#[derive(Serialize,Deserialize,Clone,Debug)]
|
||||||
|
pub struct StatePath(Vec<String>);
|
||||||
Reference in New Issue
Block a user