feat: added new packages
This commit is contained in:
parent
f5afd60086
commit
b416f35b63
249
Cargo.lock
generated
249
Cargo.lock
generated
@ -124,9 +124,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "async-trait"
|
name = "async-trait"
|
||||||
version = "0.1.85"
|
version = "0.1.86"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "3f934833b4b7233644e5848f235df3f57ed8c80f1528a26c3dfa13d2147fa056"
|
checksum = "644dd749086bf3771a2fbc5f256fdb982d53f011c7d5d560304eafeecebce79d"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
@ -436,9 +436,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bumpalo"
|
name = "bumpalo"
|
||||||
version = "3.16.0"
|
version = "3.17.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c"
|
checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "byteorder"
|
name = "byteorder"
|
||||||
@ -460,9 +460,9 @@ checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cc"
|
name = "cc"
|
||||||
version = "1.2.10"
|
version = "1.2.11"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "13208fcbb66eaeffe09b99fffbe1af420f00a7b35aa99ad683dfc1aa76145229"
|
checksum = "e4730490333d58093109dc02c23174c3f4d490998c3fed3cc8e82d57afedb9cf"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"jobserver",
|
"jobserver",
|
||||||
"libc",
|
"libc",
|
||||||
@ -539,10 +539,19 @@ name = "codee"
|
|||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "5d3ad3122b0001c7f140cf4d605ef9a9e2c24d96ab0b4fb4347b76de2425f445"
|
checksum = "5d3ad3122b0001c7f140cf4d605ef9a9e2c24d96ab0b4fb4347b76de2425f445"
|
||||||
|
dependencies = [
|
||||||
|
"thiserror 1.0.69",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "codee"
|
||||||
|
version = "0.3.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "0f18d705321923b1a9358e3fc3c57c3b50171196827fc7f5f10b053242aca627"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"thiserror 1.0.69",
|
"thiserror 2.0.11",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -643,9 +652,9 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cpufeatures"
|
name = "cpufeatures"
|
||||||
version = "0.2.16"
|
version = "0.2.17"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3"
|
checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc",
|
"libc",
|
||||||
]
|
]
|
||||||
@ -682,7 +691,7 @@ checksum = "5877d3fbf742507b66bc2a1945106bd30dd8504019d596901ddd012a4dd01740"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono",
|
"chrono",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"winnow",
|
"winnow 0.6.26",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -849,6 +858,12 @@ version = "1.0.5"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813"
|
checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "dyn-clone"
|
||||||
|
version = "1.0.18"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "feeef44e73baff3a26d371801df019877a9866a8c493d315ab00177843314f35"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "either"
|
name = "either"
|
||||||
version = "1.13.0"
|
version = "1.13.0"
|
||||||
@ -860,10 +875,11 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "either_of"
|
name = "either_of"
|
||||||
version = "0.1.2"
|
version = "0.1.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e2dc0006c5cf511f802ddcffc0a6df9dcc1912f5f0e448f6641b3b035f14f43d"
|
checksum = "169ae1dd00fb612cf27fd069b3b10f325ea60ac551f08e5b931b4413972a847d"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"paste",
|
||||||
"pin-project-lite",
|
"pin-project-lite",
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -1098,10 +1114,22 @@ dependencies = [
|
|||||||
"cfg-if",
|
"cfg-if",
|
||||||
"js-sys",
|
"js-sys",
|
||||||
"libc",
|
"libc",
|
||||||
"wasi",
|
"wasi 0.11.0+wasi-snapshot-preview1",
|
||||||
"wasm-bindgen",
|
"wasm-bindgen",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "getrandom"
|
||||||
|
version = "0.3.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8"
|
||||||
|
dependencies = [
|
||||||
|
"cfg-if",
|
||||||
|
"libc",
|
||||||
|
"wasi 0.13.3+wasi-0.2.2",
|
||||||
|
"windows-targets 0.52.6",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "gimli"
|
name = "gimli"
|
||||||
version = "0.31.1"
|
version = "0.31.1"
|
||||||
@ -1313,9 +1341,9 @@ checksum = "9171a2ea8a68358193d15dd5d70c1c10a2afc3e7e4c5bc92bc9f025cebd7359c"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "httparse"
|
name = "httparse"
|
||||||
version = "1.9.5"
|
version = "1.10.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946"
|
checksum = "f2d708df4e7140240a16cd6ab0ab65c972d7433ab77819ea693fde9c43811e2a"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "httpdate"
|
name = "httpdate"
|
||||||
@ -1341,9 +1369,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "hyper"
|
name = "hyper"
|
||||||
version = "1.5.2"
|
version = "1.6.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "256fb8d4bd6413123cc9d91832d78325c48ff41677595be797d90f42969beae0"
|
checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytes",
|
"bytes",
|
||||||
"futures-channel",
|
"futures-channel",
|
||||||
@ -1561,9 +1589,9 @@ checksum = "71dd52191aae121e8611f1e8dc3e324dd0dd1dee1e6dd91d10ee07a3cfb4d9d8"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "inventory"
|
name = "inventory"
|
||||||
version = "0.3.17"
|
version = "0.3.19"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "3b31349d02fe60f80bbbab1a9402364cad7460626d6030494b08ac4a2075bf81"
|
checksum = "54b12ebb6799019b044deaf431eadfe23245b259bba5a2c0796acec3943a3cdb"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"rustversion",
|
"rustversion",
|
||||||
]
|
]
|
||||||
@ -1628,16 +1656,16 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "leptos"
|
name = "leptos"
|
||||||
version = "0.7.4"
|
version = "0.7.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "21c31c9d022c77702c53e02830d08b28320aca9c0899a19c443096c114623fa5"
|
checksum = "78329c12843d64766d8f00216aae665416d804327302ce8e0ab83884dfa91887"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"any_spawner",
|
"any_spawner",
|
||||||
"base64",
|
"base64",
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"either_of",
|
"either_of",
|
||||||
"futures",
|
"futures",
|
||||||
"getrandom",
|
"getrandom 0.2.15",
|
||||||
"hydration_context",
|
"hydration_context",
|
||||||
"leptos_config",
|
"leptos_config",
|
||||||
"leptos_dom",
|
"leptos_dom",
|
||||||
@ -1672,7 +1700,7 @@ checksum = "e63ce77018c615075541d944d678853b5bb40c79510e39edf695cadb9b128e13"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"chrono",
|
"chrono",
|
||||||
"codee",
|
"codee 0.2.0",
|
||||||
"default-struct-builder",
|
"default-struct-builder",
|
||||||
"js-sys",
|
"js-sys",
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
@ -1687,9 +1715,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "leptos_axum"
|
name = "leptos_axum"
|
||||||
version = "0.7.4"
|
version = "0.7.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "43b613d5784037baee42a11d21bc263adfc1a55e416556a3d5bfe39c7b87fadf"
|
checksum = "d59be1dd90fa5102d0a48696c93328c9947aaef19f2dbe9c81f819db3b11a849"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"any_spawner",
|
"any_spawner",
|
||||||
"axum",
|
"axum",
|
||||||
@ -1711,9 +1739,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "leptos_config"
|
name = "leptos_config"
|
||||||
version = "0.7.4"
|
version = "0.7.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "5d874993c7664d757677d056c8f46b5cb5365fe622005e1bf26050f4996e7e52"
|
checksum = "132a18e8ffc4fbe2d624f3743d88a1b4989bff2d5e12be2b0d2749201d9dfb52"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"config",
|
"config",
|
||||||
"regex",
|
"regex",
|
||||||
@ -1724,9 +1752,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "leptos_dom"
|
name = "leptos_dom"
|
||||||
version = "0.7.4"
|
version = "0.7.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a462aaeec85bc4ecfb26bf324437b92690bf3add1e30eb29b3acc08b20e8b4cb"
|
checksum = "d468f638f2f13d70d99d9952be98d671a75366034472f3828e586ba62d770049"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"js-sys",
|
"js-sys",
|
||||||
"or_poisoned",
|
"or_poisoned",
|
||||||
@ -1739,9 +1767,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "leptos_hot_reload"
|
name = "leptos_hot_reload"
|
||||||
version = "0.7.4"
|
version = "0.7.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "07eb295ad2f3b2af190da62af339b84fd01ce3c71702f09eb69a57310fcf0c6d"
|
checksum = "8ba37d76693fc6228554e0bb06a9aa41c59e2b5180caf423c7913557b81d01dd"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"camino",
|
"camino",
|
||||||
@ -1757,9 +1785,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "leptos_integration_utils"
|
name = "leptos_integration_utils"
|
||||||
version = "0.7.4"
|
version = "0.7.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a8652fcd7a1744f85403b95c5520143f3b962d640c8450b8514f9530fb5c4b76"
|
checksum = "123887e1b34f8fadab385b3192e14a4e5bd84505dec16c31de0b8c4ccc8553d3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"futures",
|
"futures",
|
||||||
"hydration_context",
|
"hydration_context",
|
||||||
@ -1772,9 +1800,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "leptos_macro"
|
name = "leptos_macro"
|
||||||
version = "0.7.4"
|
version = "0.7.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "90291b25ee576bc9c299d3371cc8f09bf60ea939a8de61fa8b744650aff76e24"
|
checksum = "064d0c8b144b93f8d7e84b30c16d1da0e64a63c7e91b9a872f7be63601c5868b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"attribute-derive",
|
"attribute-derive",
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
@ -1794,9 +1822,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "leptos_meta"
|
name = "leptos_meta"
|
||||||
version = "0.7.4"
|
version = "0.7.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "7250991b2077ef5869e999c74cf4990926a3c3919b50c9937e101c1c874102db"
|
checksum = "3abd2ac7fbfeee757fd569f7db4bdbaafe1e899049435476f06d4be1911f6097"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"futures",
|
"futures",
|
||||||
"indexmap",
|
"indexmap",
|
||||||
@ -1810,9 +1838,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "leptos_router"
|
name = "leptos_router"
|
||||||
version = "0.7.4"
|
version = "0.7.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "9a193dbd62b9617a5d7d199ea70c570da01a1bbe798e617373b6351845be6778"
|
checksum = "8dbc548cc4d127608a79354361df357f53c7d8e89dc14ef9738d789cd338694a"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"any_spawner",
|
"any_spawner",
|
||||||
"either_of",
|
"either_of",
|
||||||
@ -1835,24 +1863,25 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "leptos_router_macro"
|
name = "leptos_router_macro"
|
||||||
version = "0.7.4"
|
version = "0.7.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "34bc3f80ad810b22058f12d278bb0bf929779cc0bc1289a06980d896f62743f0"
|
checksum = "3010b3a222b5ff3d16421d074f74b52049df4353330373d17f675b2e0f51c9de"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro-error2",
|
"proc-macro-error2",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
|
"syn 2.0.96",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "leptos_server"
|
name = "leptos_server"
|
||||||
version = "0.7.4"
|
version = "0.7.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "18caffe32c245ddb35697edd898ccb3393efce67672a707a14eebd0db2e8249a"
|
checksum = "fb1779f1f0570915066c132fb11f999add8b13d02ca5221735193eb02b3fa69a"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"any_spawner",
|
"any_spawner",
|
||||||
"base64",
|
"base64",
|
||||||
"codee",
|
"codee 0.3.0",
|
||||||
"futures",
|
"futures",
|
||||||
"hydration_context",
|
"hydration_context",
|
||||||
"or_poisoned",
|
"or_poisoned",
|
||||||
@ -2023,7 +2052,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd"
|
checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc",
|
"libc",
|
||||||
"wasi",
|
"wasi 0.11.0+wasi-snapshot-preview1",
|
||||||
"windows-sys 0.52.0",
|
"windows-sys 0.52.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -2504,7 +2533,7 @@ version = "0.6.4"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
|
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"getrandom",
|
"getrandom 0.2.15",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -2522,9 +2551,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "reactive_graph"
|
name = "reactive_graph"
|
||||||
version = "0.1.4"
|
version = "0.1.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "9fbf210c04505e128fb7f64acecc23c71f82f56c7d481b190e1010b7bada2cb9"
|
checksum = "059aede5acae8f5c25b1d34b6df34700006418b3c493db3698b7ebcd4a8a6287"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"any_spawner",
|
"any_spawner",
|
||||||
"async-lock",
|
"async-lock",
|
||||||
@ -2543,9 +2572,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "reactive_stores"
|
name = "reactive_stores"
|
||||||
version = "0.1.3"
|
version = "0.1.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "80bb1913eeb71f74028213455ee971550c2b3cb91b6acd5efa8a0f8dc59f5039"
|
checksum = "4c7edacf4298579a5772285b8e2dc0b9953c8fbaa9c3f56c3dd69d56e5af7a48"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"guardian",
|
"guardian",
|
||||||
"itertools 0.13.0",
|
"itertools 0.13.0",
|
||||||
@ -2558,9 +2587,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "reactive_stores_macro"
|
name = "reactive_stores_macro"
|
||||||
version = "0.1.0"
|
version = "0.1.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4d86e4f08f361b05d11422398cef4bc4cf356f2fdd2f06a96646b0e9cd902226"
|
checksum = "178b1cd8b2871a45bfc8e13ff8076049b6e9a5132e72414e5cab3894c4a6adb3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"convert_case",
|
"convert_case",
|
||||||
"proc-macro-error2",
|
"proc-macro-error2",
|
||||||
@ -2630,7 +2659,7 @@ checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"cc",
|
"cc",
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"getrandom",
|
"getrandom 0.2.15",
|
||||||
"libc",
|
"libc",
|
||||||
"spin",
|
"spin",
|
||||||
"untrusted",
|
"untrusted",
|
||||||
@ -2726,9 +2755,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustls"
|
name = "rustls"
|
||||||
version = "0.23.21"
|
version = "0.23.22"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "8f287924602bf649d949c63dc8ac8b235fa5387d394020705b80c4eb597ce5b8"
|
checksum = "9fb9263ab4eb695e42321db096e3b8fbd715a59b154d5c88d82db2175b681ba7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aws-lc-rs",
|
"aws-lc-rs",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
@ -2749,9 +2778,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustls-pki-types"
|
name = "rustls-pki-types"
|
||||||
version = "1.10.1"
|
version = "1.11.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d2bf47e6ff922db3825eb750c4e2ff784c6ff8fb9e13046ef6a1d1c5401b0b37"
|
checksum = "917ce264624a4b4db1c364dcc35bfca9ded014d0a958cd47ad3e960e988ea51c"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustls-webpki"
|
name = "rustls-webpki"
|
||||||
@ -2773,9 +2802,9 @@ checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ryu"
|
name = "ryu"
|
||||||
version = "1.0.18"
|
version = "1.0.19"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f"
|
checksum = "6ea1a2d0a644769cc99faa24c3ad26b379b786fe7c36fd3c546254801650e6dd"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "same-file"
|
name = "same-file"
|
||||||
@ -2823,9 +2852,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_json"
|
name = "serde_json"
|
||||||
version = "1.0.137"
|
version = "1.0.138"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "930cfb6e6abf99298aaad7d29abbef7a9999a9a8806a40088f55f0dcec03146b"
|
checksum = "d434192e7da787e94a6ea7e9670b26a036d0ca41e0b7efb2676dd32bae872949"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"itoa",
|
"itoa",
|
||||||
"memchr",
|
"memchr",
|
||||||
@ -2877,9 +2906,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "server_fn"
|
name = "server_fn"
|
||||||
version = "0.7.4"
|
version = "0.7.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f5dd7fcccd3ef2081da086c1f8595b506627abbbbc9f64be0141d2251219570e"
|
checksum = "5c183c31152fd00e994a3ea0ca43e6017056ccf7812160b0ae008acc3de8241c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"axum",
|
"axum",
|
||||||
"bytes",
|
"bytes",
|
||||||
@ -2913,9 +2942,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "server_fn_macro"
|
name = "server_fn_macro"
|
||||||
version = "0.7.4"
|
version = "0.7.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e0bbac4f01a714b0490247ac625bdb7055548210556c39e8f56a2dbbe3abc70b"
|
checksum = "c43b2266308c118be1a1cc60602f8efb07a64e72deed8d317704d5cfda092ca1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"const_format",
|
"const_format",
|
||||||
"convert_case",
|
"convert_case",
|
||||||
@ -2927,9 +2956,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "server_fn_macro_default"
|
name = "server_fn_macro_default"
|
||||||
version = "0.7.4"
|
version = "0.7.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f07dfd1744a5f5612f00f69fe035b0bfafdf12bb46d76e785673078a9e56b170"
|
checksum = "087eca61bc8f93d868b8c10ca058da358fd7aaeb7bc8415b572f9f3f27ce0b93"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"server_fn_macro",
|
"server_fn_macro",
|
||||||
"syn 2.0.96",
|
"syn 2.0.96",
|
||||||
@ -3043,11 +3072,23 @@ dependencies = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "sparse-infector"
|
name = "sparse-handler"
|
||||||
version = "2.0.0"
|
version = "2.0.0"
|
||||||
|
dependencies = [
|
||||||
|
"anyhow",
|
||||||
|
"axum",
|
||||||
|
"axum-server",
|
||||||
|
"futures",
|
||||||
|
"serde",
|
||||||
|
"serde_json",
|
||||||
|
"sqlx",
|
||||||
|
"tokio",
|
||||||
|
"tokio-stream",
|
||||||
|
"tracing",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "sparse-installer"
|
name = "sparse-infector"
|
||||||
version = "2.0.0"
|
version = "2.0.0"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -3060,7 +3101,7 @@ dependencies = [
|
|||||||
"axum-server",
|
"axum-server",
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"chrono",
|
"chrono",
|
||||||
"codee",
|
"codee 0.2.0",
|
||||||
"console_error_panic_hook",
|
"console_error_panic_hook",
|
||||||
"cron",
|
"cron",
|
||||||
"futures",
|
"futures",
|
||||||
@ -3077,6 +3118,7 @@ dependencies = [
|
|||||||
"rpassword",
|
"rpassword",
|
||||||
"serde",
|
"serde",
|
||||||
"sha2",
|
"sha2",
|
||||||
|
"sparse-handler",
|
||||||
"sqlx",
|
"sqlx",
|
||||||
"structopt",
|
"structopt",
|
||||||
"thiserror 1.0.69",
|
"thiserror 1.0.69",
|
||||||
@ -3094,10 +3136,22 @@ dependencies = [
|
|||||||
name = "sparse-unix-beacon"
|
name = "sparse-unix-beacon"
|
||||||
version = "2.0.0"
|
version = "2.0.0"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "sparse-unix-installer"
|
||||||
|
version = "2.0.0"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "sparse-windows-beacon"
|
name = "sparse-windows-beacon"
|
||||||
version = "2.0.0"
|
version = "2.0.0"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "sparse-windows-infector"
|
||||||
|
version = "2.0.0"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "sparse-windows-installer"
|
||||||
|
version = "2.0.0"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "spin"
|
name = "spin"
|
||||||
version = "0.9.8"
|
version = "0.9.8"
|
||||||
@ -3420,13 +3474,15 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tachys"
|
name = "tachys"
|
||||||
version = "0.1.4"
|
version = "0.1.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d777e4426a597296b020edcb5c3d8f25a3ccd8adfd22eb5154ac81da946aef9f"
|
checksum = "59a3bbcf8e3b52cad5f0aa860837d4d1796c7c4873b083c9520a1bbba4747973"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"any_spawner",
|
"any_spawner",
|
||||||
|
"async-trait",
|
||||||
"const_str_slice_concat",
|
"const_str_slice_concat",
|
||||||
"drain_filter_polyfill",
|
"drain_filter_polyfill",
|
||||||
|
"dyn-clone",
|
||||||
"either_of",
|
"either_of",
|
||||||
"futures",
|
"futures",
|
||||||
"html-escape",
|
"html-escape",
|
||||||
@ -3452,13 +3508,13 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tempfile"
|
name = "tempfile"
|
||||||
version = "3.15.0"
|
version = "3.16.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "9a8a559c81686f576e8cd0290cd2a24a2a9ad80c98b3478856500fcbd7acd704"
|
checksum = "38c246215d7d24f48ae091a2902398798e05d978b24315d6efbc00ede9a8bb91"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"fastrand",
|
"fastrand",
|
||||||
"getrandom",
|
"getrandom 0.3.1",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"rustix",
|
"rustix",
|
||||||
"windows-sys 0.59.0",
|
"windows-sys 0.59.0",
|
||||||
@ -3685,15 +3741,15 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "toml_edit"
|
name = "toml_edit"
|
||||||
version = "0.22.22"
|
version = "0.22.23"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5"
|
checksum = "02a8b472d1a3d7c18e2d61a489aee3453fd9031c33e4f55bd533f4a7adca1bee"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"indexmap",
|
"indexmap",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_spanned",
|
"serde_spanned",
|
||||||
"toml_datetime",
|
"toml_datetime",
|
||||||
"winnow",
|
"winnow 0.7.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -3924,9 +3980,9 @@ checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "unicode-ident"
|
name = "unicode-ident"
|
||||||
version = "1.0.15"
|
version = "1.0.16"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "11cd88e12b17c6494200a9c1b683a04fcac9573ed74cd1b62aeb2727c5592243"
|
checksum = "a210d160f08b701c8721ba1c726c11662f877ea6b7094007e1ca9a1041945034"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "unicode-normalization"
|
name = "unicode-normalization"
|
||||||
@ -4008,7 +4064,7 @@ version = "1.12.1"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b3758f5e68192bb96cc8f9b7e2c2cfdabb435499a28499a42f8f984092adad4b"
|
checksum = "b3758f5e68192bb96cc8f9b7e2c2cfdabb435499a28499a42f8f984092adad4b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"getrandom",
|
"getrandom 0.2.15",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -4051,6 +4107,15 @@ version = "0.11.0+wasi-snapshot-preview1"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
|
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "wasi"
|
||||||
|
version = "0.13.3+wasi-0.2.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "26816d2e1a4a36a2940b96c5296ce403917633dff8f3440e9b236ed6f6bacad2"
|
||||||
|
dependencies = [
|
||||||
|
"wit-bindgen-rt",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wasite"
|
name = "wasite"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
@ -4363,13 +4428,31 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "winnow"
|
name = "winnow"
|
||||||
version = "0.6.24"
|
version = "0.6.26"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c8d71a593cc5c42ad7876e2c1fda56f314f3754c084128833e64f1345ff8a03a"
|
checksum = "1e90edd2ac1aa278a5c4599b1d89cf03074b610800f866d4026dc199d7929a28"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"memchr",
|
"memchr",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "winnow"
|
||||||
|
version = "0.7.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "7e49d2d35d3fad69b39b94139037ecfb4f359f08958b9c11e7315ce770462419"
|
||||||
|
dependencies = [
|
||||||
|
"memchr",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "wit-bindgen-rt"
|
||||||
|
version = "0.33.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c"
|
||||||
|
dependencies = [
|
||||||
|
"bitflags 2.8.0",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "write16"
|
name = "write16"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
|
|||||||
77
packages.nix
77
packages.nix
@ -30,7 +30,8 @@ let
|
|||||||
|
|
||||||
src = craneLib.cleanCargoSource ./.;
|
src = craneLib.cleanCargoSource ./.;
|
||||||
|
|
||||||
fileSetForBeaconCrate = pkgs.lib.fileset.toSource {
|
fileSetForBeaconCrate = beacon: infector:
|
||||||
|
pkgs.lib.fileset.toSource {
|
||||||
root = ./.;
|
root = ./.;
|
||||||
fileset = pkgs.lib.fileset.unions [
|
fileset = pkgs.lib.fileset.unions [
|
||||||
./.cargo/config.toml
|
./.cargo/config.toml
|
||||||
@ -43,14 +44,14 @@ let
|
|||||||
(craneLib.fileset.commonCargoSources ./nl-sys)
|
(craneLib.fileset.commonCargoSources ./nl-sys)
|
||||||
./nl-sys/src/bridge.c
|
./nl-sys/src/bridge.c
|
||||||
(craneLib.fileset.commonCargoSources ./packets)
|
(craneLib.fileset.commonCargoSources ./packets)
|
||||||
(craneLib.fileset.commonCargoSources ./sparse-infector)
|
(craneLib.fileset.commonCargoSources infector)
|
||||||
(craneLib.fileset.commonCargoSources ./sparse-beacon)
|
(craneLib.fileset.commonCargoSources ./sparse-beacon)
|
||||||
(craneLib.fileset.commonCargoSources ./sparse-unix-beacon)
|
(craneLib.fileset.commonCargoSources beacon)
|
||||||
(craneLib.fileset.commonCargoSources ./sparse-windows-beacon)
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSetForInstallerCrate = pkgs.lib.fileset.toSource {
|
fileSetForInstallerCrate = installer: infector:
|
||||||
|
pkgs.lib.fileset.toSource {
|
||||||
root = ./.;
|
root = ./.;
|
||||||
fileset = pkgs.lib.fileset.unions [
|
fileset = pkgs.lib.fileset.unions [
|
||||||
./.cargo/config.toml
|
./.cargo/config.toml
|
||||||
@ -63,8 +64,8 @@ let
|
|||||||
(craneLib.fileset.commonCargoSources ./nl-sys)
|
(craneLib.fileset.commonCargoSources ./nl-sys)
|
||||||
./nl-sys/src/bridge.c
|
./nl-sys/src/bridge.c
|
||||||
(craneLib.fileset.commonCargoSources ./packets)
|
(craneLib.fileset.commonCargoSources ./packets)
|
||||||
(craneLib.fileset.commonCargoSources ./sparse-infector)
|
(craneLib.fileset.commonCargoSources infector)
|
||||||
(craneLib.fileset.commonCargoSources ./sparse-installer)
|
(craneLib.fileset.commonCargoSources installer)
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -81,10 +82,10 @@ let
|
|||||||
(craneLib.fileset.commonCargoSources ./nl-sys)
|
(craneLib.fileset.commonCargoSources ./nl-sys)
|
||||||
./nl-sys/src/bridge.c
|
./nl-sys/src/bridge.c
|
||||||
(craneLib.fileset.commonCargoSources ./packets)
|
(craneLib.fileset.commonCargoSources ./packets)
|
||||||
|
(craneLib.fileset.commonCargoSources ./sparse-handler)
|
||||||
(craneLib.fileset.commonCargoSources ./sparse-server)
|
(craneLib.fileset.commonCargoSources ./sparse-server)
|
||||||
./sparse-server/style
|
./sparse-server/style
|
||||||
./sparse-server/public
|
./sparse-server/public
|
||||||
./sparse-server/.sqlx
|
|
||||||
./sparse-server/migrations
|
./sparse-server/migrations
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
@ -111,7 +112,6 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
windowsArgs = commonArgs // {
|
windowsArgs = commonArgs // {
|
||||||
src = fileSetForBeaconCrate;
|
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
nativeBuildInputs = buildTools.linux ++ buildTools.windows;
|
nativeBuildInputs = buildTools.linux ++ buildTools.windows;
|
||||||
@ -135,17 +135,17 @@ let
|
|||||||
cargoArtifacts = linuxCargoArtifacts;
|
cargoArtifacts = linuxCargoArtifacts;
|
||||||
name = "sparse-beacon-linux";
|
name = "sparse-beacon-linux";
|
||||||
cargoExtraArgs = "-p sparse-unix-beacon";
|
cargoExtraArgs = "-p sparse-unix-beacon";
|
||||||
src = fileSetForBeaconCrate;
|
src = fileSetForBeaconCrate ./sparse-unix-beacon ./sparse-unix-infector;
|
||||||
|
|
||||||
CARGO_BUILD_TARGET = "x86_64-unknown-linux-musl";
|
CARGO_BUILD_TARGET = "x86_64-unknown-linux-musl";
|
||||||
CARGO_BUILD_RUSTFLAGS = "-Ctarget-feature=+crt-static";
|
CARGO_BUILD_RUSTFLAGS = "-Ctarget-feature=+crt-static";
|
||||||
});
|
});
|
||||||
|
|
||||||
sparse-beacon-freebsd-sysv = craneLib.buildPackage (freebsdArgs // {
|
sparse-beacon-freebsd-sysv = craneLib.buildPackage (freebsdArgs // {
|
||||||
src = fileSetForBeaconCrate;
|
|
||||||
cargoArtifacts = freebsdCargoArtifacts;
|
cargoArtifacts = freebsdCargoArtifacts;
|
||||||
name = "sparse-beacon-freebsd";
|
name = "sparse-beacon-freebsd";
|
||||||
cargoExtraArgs = "-p sparse-unix-beacon";
|
cargoExtraArgs = "-p sparse-unix-beacon";
|
||||||
|
src = fileSetForBeaconCrate ./sparse-unix-beacon ./sparse-unix-infector;
|
||||||
|
|
||||||
nativeBuildInputs = buildTools.linux ++ buildTools.freebsd;
|
nativeBuildInputs = buildTools.linux ++ buildTools.freebsd;
|
||||||
|
|
||||||
@ -160,6 +160,8 @@ let
|
|||||||
cargoArtifacts = windowsCargoArtifacts;
|
cargoArtifacts = windowsCargoArtifacts;
|
||||||
name = "sparse-beacon-windows";
|
name = "sparse-beacon-windows";
|
||||||
cargoExtraArgs = "-p sparse-windows-beacon";
|
cargoExtraArgs = "-p sparse-windows-beacon";
|
||||||
|
src =
|
||||||
|
fileSetForBeaconCrate ./sparse-windows-beacon ./sparse-windows-infector;
|
||||||
|
|
||||||
CARGO_BUILD_TARGET = "x86_64-pc-windows-gnu";
|
CARGO_BUILD_TARGET = "x86_64-pc-windows-gnu";
|
||||||
CARGO_BUILD_RUSTFLAGS = "-Ctarget-feature=+crt-static";
|
CARGO_BUILD_RUSTFLAGS = "-Ctarget-feature=+crt-static";
|
||||||
@ -210,36 +212,57 @@ let
|
|||||||
sparse-installer-linux = craneLib.buildPackage (commonArgs // {
|
sparse-installer-linux = craneLib.buildPackage (commonArgs // {
|
||||||
cargoArtifacts = linuxCargoArtifacts;
|
cargoArtifacts = linuxCargoArtifacts;
|
||||||
name = "sparse-installer-linux";
|
name = "sparse-installer-linux";
|
||||||
cargoExtraArgs = "-p sparse-installer";
|
cargoExtraArgs = "-p sparse-unix-installer";
|
||||||
src = fileSetForInstallerCrate;
|
src =
|
||||||
|
fileSetForInstallerCrate ./sparse-unix-installer ./sparse-unix-infector;
|
||||||
|
|
||||||
CARGO_BUILD_TARGET = "x86_64-unknown-linux-musl";
|
CARGO_BUILD_TARGET = "x86_64-unknown-linux-musl";
|
||||||
CARGO_BUILD_RUSTFLAGS = "-Ctarget-feature=+crt-static";
|
CARGO_BUILD_RUSTFLAGS = "-Ctarget-feature=+crt-static";
|
||||||
|
|
||||||
SPARSE_INSTALLER_LINUX = "${linux-loader}/lib/libunix-loader.so";
|
SPARSE_LOADER_LINUX = "${linux-loader}/lib/libunix-loader.so";
|
||||||
});
|
});
|
||||||
|
|
||||||
sparse-installer-freebsd-sysv = craneLib.buildPackage (commonArgs // {
|
sparse-installer-freebsd-sysv = craneLib.buildPackage (commonArgs // {
|
||||||
cargoArtifacts = linuxCargoArtifacts;
|
cargoArtifacts = linuxCargoArtifacts;
|
||||||
name = "sparse-installer-linux";
|
name = "sparse-installer-freebsd";
|
||||||
cargoExtraArgs = "-p sparse-installer";
|
cargoExtraArgs = "-p sparse-unix-installer";
|
||||||
src = fileSetForInstallerCrate;
|
src =
|
||||||
|
fileSetForInstallerCrate ./sparse-unix-installer ./sparse-unix-infector;
|
||||||
|
|
||||||
CARGO_BUILD_TARGET = "x86_64-unknown-linux-musl";
|
CARGO_BUILD_TARGET = "x86_64-unknown-linux-musl";
|
||||||
CARGO_BUILD_RUSTFLAGS = "-Ctarget-feature=+crt-static";
|
CARGO_BUILD_RUSTFLAGS = "-Ctarget-feature=+crt-static";
|
||||||
|
|
||||||
SPARSE_INSTALLER_FREEBSD = "${freebsd-loader}/lib/libunix-loader.so";
|
SPARSE_LOADER_FREEBSD = "${freebsd-loader}/lib/libunix-loader.so";
|
||||||
});
|
});
|
||||||
|
|
||||||
sparse-installer-freebsd =
|
sparse-installer-freebsd =
|
||||||
patch-freebsd-elf sparse-installer-freebsd-sysv "bin/sparse-installer";
|
patch-freebsd-elf sparse-installer-freebsd-sysv "bin/sparse-unix-installer";
|
||||||
|
|
||||||
|
sparse-installer-windows = craneLib.buildPackage (windowsArgs // {
|
||||||
|
cargoArtifacts = windowsCargoArtifacts;
|
||||||
|
name = "sparse-installer-windows";
|
||||||
|
cargoExtraArgs = "-p sparse-windows-installer";
|
||||||
|
src = fileSetForInstallerCrate ./sparse-windows-installer
|
||||||
|
./sparse-windows-infector;
|
||||||
|
|
||||||
|
CARGO_BUILD_TARGET = "x86_64-pc-windows-gnu";
|
||||||
|
CARGO_BUILD_RUSTFLAGS = "-Ctarget-feature=+crt-static";
|
||||||
|
|
||||||
|
SPARSE_BEACON_WINDOWS =
|
||||||
|
"${sparse-beacon-windows}/bin/sparse-windows-beacon.exe";
|
||||||
|
});
|
||||||
|
|
||||||
sparse-server = craneLib.buildPackage (commonArgs // {
|
sparse-server = craneLib.buildPackage (commonArgs // {
|
||||||
src = fileSetForWebCrate;
|
src = fileSetForWebCrate;
|
||||||
|
|
||||||
|
nativeBuildInputs = buildTools.linux ++ (with pkgs; [ glibc.static ]);
|
||||||
cargoArtifacts = linuxCargoArtifacts;
|
cargoArtifacts = linuxCargoArtifacts;
|
||||||
name = "sparse-server-webclient";
|
name = "sparse-server-webclient";
|
||||||
|
|
||||||
|
preBuild = ''
|
||||||
|
export DATABASE_URL=sqlite:./db.sqlite3
|
||||||
|
sqlx database setup --source=sparse-server/migrations
|
||||||
|
'';
|
||||||
buildPhaseCargoCommand = ''
|
buildPhaseCargoCommand = ''
|
||||||
cargo leptos build \
|
cargo leptos build \
|
||||||
--release \
|
--release \
|
||||||
@ -255,20 +278,18 @@ let
|
|||||||
|
|
||||||
RUSTFLAGS = "-Ctarget-feature=+crt-static";
|
RUSTFLAGS = "-Ctarget-feature=+crt-static";
|
||||||
|
|
||||||
SPARSE_INSTALLER_LINUX = "${sparse-installer-linux}/bin/sparse-installer";
|
SPARSE_INSTALLER_LINUX =
|
||||||
|
"${sparse-installer-linux}/bin/sparse-unix-installer";
|
||||||
SPARSE_INSTALLER_FREEBSD =
|
SPARSE_INSTALLER_FREEBSD =
|
||||||
"${sparse-installer-freebsd}/bin/sparse-installer";
|
"${sparse-installer-freebsd}/bin/sparse-unix-installer";
|
||||||
SPARSE_BEACON_LINUX = "${sparse-beacon-linux}/bin/sparse-unix-beacon";
|
SPARSE_INSTALLER_WINDOWS =
|
||||||
SPARSE_BEACON_FREEBSD = "${sparse-beacon-freebsd}/bin/sparse-unix-beacon";
|
"${sparse-installer-windows}/bin/sparse-windows-installer.exe";
|
||||||
SPARSE_BEACON_WINDOWS =
|
|
||||||
"${sparse-beacon-windows}/bin/sparse-windows-beacon.exe";
|
|
||||||
});
|
});
|
||||||
|
|
||||||
outputs = rec {
|
outputs = rec {
|
||||||
packages = {
|
packages = {
|
||||||
inherit sparse-server sparse-beacon-linux sparse-beacon-windows
|
inherit sparse-server sparse-installer-linux sparse-installer-freebsd
|
||||||
sparse-installer-linux sparse-installer-freebsd linux-loader
|
sparse-installer-windows;
|
||||||
freebsd-loader sparse-beacon-freebsd;
|
|
||||||
|
|
||||||
inherit freebsd-zig-libc;
|
inherit freebsd-zig-libc;
|
||||||
|
|
||||||
|
|||||||
16
sparse-handler/Cargo.toml
Normal file
16
sparse-handler/Cargo.toml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
[package]
|
||||||
|
name = "sparse-handler"
|
||||||
|
edition = "2024"
|
||||||
|
version.workspace = true
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
axum = { version = "^0.7", features = ["ws", "macros"] }
|
||||||
|
tokio = { version = "1", features = ["rt-multi-thread", "signal"] }
|
||||||
|
anyhow = "1.0"
|
||||||
|
futures = "0.3"
|
||||||
|
tokio-stream = "0.1"
|
||||||
|
tracing = "0.1"
|
||||||
|
sqlx = { version = "0.8", default-features = false, features = ["chrono", "macros", "migrate", "runtime-tokio", "sqlite", "sqlx-sqlite"] }
|
||||||
|
serde = "1.0"
|
||||||
|
serde_json = "1.0"
|
||||||
|
axum-server = { version = "^0.7", features = ["tokio-rustls", "tls-rustls"] }
|
||||||
63
sparse-handler/src/error.rs
Normal file
63
sparse-handler/src/error.rs
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
#[derive(Debug)]
|
||||||
|
pub enum Error {
|
||||||
|
Generic(String),
|
||||||
|
Sqlx(sqlx::Error),
|
||||||
|
TokioJoin(tokio::task::JoinError),
|
||||||
|
Io(std::io::Error),
|
||||||
|
}
|
||||||
|
|
||||||
|
impl std::fmt::Display for Error {
|
||||||
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
match self {
|
||||||
|
Error::Generic(err) => {
|
||||||
|
write!(f, "generic error: {err}")
|
||||||
|
}
|
||||||
|
Error::Sqlx(err) => {
|
||||||
|
write!(f, "sqlx error: {err:?}")
|
||||||
|
}
|
||||||
|
Error::TokioJoin(err) => {
|
||||||
|
write!(f, "tokio join error: {err:?}")
|
||||||
|
}
|
||||||
|
Error::Io(err) => {
|
||||||
|
write!(f, "io error: {err:?}")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl std::error::Error for Error {
|
||||||
|
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
|
||||||
|
match self {
|
||||||
|
Error::Sqlx(err) => Some(err),
|
||||||
|
Error::TokioJoin(err) => Some(err),
|
||||||
|
Error::Io(err) => Some(err),
|
||||||
|
_ => None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl std::str::FromStr for Error {
|
||||||
|
type Err = Self;
|
||||||
|
|
||||||
|
fn from_str(err: &str) -> Result<Self, Self::Err> {
|
||||||
|
Ok(Self::Generic(err.to_string()))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl From<sqlx::Error> for Error {
|
||||||
|
fn from(err: sqlx::Error) -> Self {
|
||||||
|
Self::Sqlx(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl From<tokio::task::JoinError> for Error {
|
||||||
|
fn from(err: tokio::task::JoinError) -> Self {
|
||||||
|
Self::TokioJoin(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl From<std::io::Error> for Error {
|
||||||
|
fn from(err: std::io::Error) -> Self {
|
||||||
|
Self::Io(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -4,10 +4,12 @@ use std::{
|
|||||||
};
|
};
|
||||||
|
|
||||||
use axum::routing::{get, post, Router};
|
use axum::routing::{get, post, Router};
|
||||||
use axum_server::{service::MakeService, tls_rustls::RustlsConfig};
|
use axum_server::tls_rustls::RustlsConfig;
|
||||||
use sqlx::SqlitePool;
|
use sqlx::SqlitePool;
|
||||||
use tokio::task::JoinHandle;
|
use tokio::task::JoinHandle;
|
||||||
|
|
||||||
|
pub mod error;
|
||||||
|
|
||||||
pub struct BeaconListenerHandle {
|
pub struct BeaconListenerHandle {
|
||||||
join_handle: JoinHandle<()>
|
join_handle: JoinHandle<()>
|
||||||
}
|
}
|
||||||
@ -22,9 +24,20 @@ impl BeaconListenerHandle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub type BeaconListenerMap = Arc<RwLock<HashMap<i64, BeaconListenerHandle>>>;
|
#[derive(Clone, Default)]
|
||||||
|
pub struct BeaconListenerMap(Arc<RwLock<HashMap<i64, BeaconListenerHandle>>>);
|
||||||
|
|
||||||
|
impl std::ops::Deref for BeaconListenerMap {
|
||||||
|
type Target = Arc<RwLock<HashMap<i64, BeaconListenerHandle>>>;
|
||||||
|
|
||||||
|
fn deref(&self) -> &Self::Target {
|
||||||
|
&self.0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub async fn start_all_listeners(beacon_listener_map: BeaconListenerMap, db: SqlitePool) -> Result<(), crate::error::Error> {
|
pub async fn start_all_listeners(beacon_listener_map: BeaconListenerMap, db: SqlitePool) -> Result<(), crate::error::Error> {
|
||||||
|
tracing::debug!("Typeid: {:?}", std::any::TypeId::of::<BeaconListenerMap>());
|
||||||
|
|
||||||
let listener_ids = sqlx::query!("SELECT listener_id FROM beacon_listener")
|
let listener_ids = sqlx::query!("SELECT listener_id FROM beacon_listener")
|
||||||
.fetch_all(&db)
|
.fetch_all(&db)
|
||||||
.await?;
|
.await?;
|
||||||
@ -32,7 +45,7 @@ pub async fn start_all_listeners(beacon_listener_map: BeaconListenerMap, db: Sql
|
|||||||
tracing::info!("Starting {} listener(s)...", listener_ids.len());
|
tracing::info!("Starting {} listener(s)...", listener_ids.len());
|
||||||
|
|
||||||
for listener in listener_ids {
|
for listener in listener_ids {
|
||||||
start_listener(Arc::clone(&beacon_listener_map), listener.listener_id, db.clone()).await?;
|
start_listener(beacon_listener_map.clone(), listener.listener_id, db.clone()).await?;
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
@ -58,8 +71,11 @@ pub async fn start_listener(beacon_listener_map: BeaconListenerMap, listener_id:
|
|||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
let app: Router<()> = Router::new()
|
let app: Router<()> = Router::new()
|
||||||
.route("/register_beacon", post(|| async {}))
|
.route("/register_beacon", post(|| async {
|
||||||
|
tracing::info!("Beacon attempting to register");
|
||||||
|
}))
|
||||||
.route("/test", get(|| async {
|
.route("/test", get(|| async {
|
||||||
|
tracing::info!("Hello");
|
||||||
"hi there"
|
"hi there"
|
||||||
}))
|
}))
|
||||||
.with_state(ListenerState {
|
.with_state(ListenerState {
|
||||||
@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
"db_name": "SQLite",
|
|
||||||
"query": "UPDATE users SET last_active = ?",
|
|
||||||
"describe": {
|
|
||||||
"columns": [],
|
|
||||||
"parameters": {
|
|
||||||
"Right": 1
|
|
||||||
},
|
|
||||||
"nullable": []
|
|
||||||
},
|
|
||||||
"hash": "09801043d7da4a27d3388f289ef8bf040f1279bb1aee533f7ab45d375f6e0b70"
|
|
||||||
}
|
|
||||||
@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
"db_name": "SQLite",
|
|
||||||
"query": "INSERT INTO users (user_name, password_hash) VALUES (?, \"\")",
|
|
||||||
"describe": {
|
|
||||||
"columns": [],
|
|
||||||
"parameters": {
|
|
||||||
"Right": 1
|
|
||||||
},
|
|
||||||
"nullable": []
|
|
||||||
},
|
|
||||||
"hash": "36691252e9640a76c9381b00ab14931aaa45f8d1cd1de4697bcd726865719d70"
|
|
||||||
}
|
|
||||||
@ -1,20 +0,0 @@
|
|||||||
{
|
|
||||||
"db_name": "SQLite",
|
|
||||||
"query": "SELECT COUNT(*) FROM users WHERE user_name = ?",
|
|
||||||
"describe": {
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"name": "COUNT(*)",
|
|
||||||
"ordinal": 0,
|
|
||||||
"type_info": "Integer"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"parameters": {
|
|
||||||
"Right": 1
|
|
||||||
},
|
|
||||||
"nullable": [
|
|
||||||
false
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"hash": "3f802dc13ded65f2532490e7dd6b9e109d34d70954e577e49cd2cc33d82e2111"
|
|
||||||
}
|
|
||||||
@ -1,32 +0,0 @@
|
|||||||
{
|
|
||||||
"db_name": "SQLite",
|
|
||||||
"query": "SELECT user_id, user_name, last_active FROM users",
|
|
||||||
"describe": {
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"name": "user_id",
|
|
||||||
"ordinal": 0,
|
|
||||||
"type_info": "Integer"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "user_name",
|
|
||||||
"ordinal": 1,
|
|
||||||
"type_info": "Text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "last_active",
|
|
||||||
"ordinal": 2,
|
|
||||||
"type_info": "Integer"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"parameters": {
|
|
||||||
"Right": 0
|
|
||||||
},
|
|
||||||
"nullable": [
|
|
||||||
false,
|
|
||||||
false,
|
|
||||||
true
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"hash": "4eeb48b1e4f85bae416b9d91b663d25b9abb6ecb4a31700b95141937c2f8f1f9"
|
|
||||||
}
|
|
||||||
@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
"db_name": "SQLite",
|
|
||||||
"query": "UPDATE users SET password_hash = ? WHERE user_id = ?",
|
|
||||||
"describe": {
|
|
||||||
"columns": [],
|
|
||||||
"parameters": {
|
|
||||||
"Right": 2
|
|
||||||
},
|
|
||||||
"nullable": []
|
|
||||||
},
|
|
||||||
"hash": "6bccf4d930b1603d7df48cdbc605dc9095185b0fdcc5bf3613966699a9e67577"
|
|
||||||
}
|
|
||||||
@ -1,38 +0,0 @@
|
|||||||
{
|
|
||||||
"db_name": "SQLite",
|
|
||||||
"query": "SELECT * FROM users WHERE user_id = ?",
|
|
||||||
"describe": {
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"name": "user_id",
|
|
||||||
"ordinal": 0,
|
|
||||||
"type_info": "Integer"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "user_name",
|
|
||||||
"ordinal": 1,
|
|
||||||
"type_info": "Text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "password_hash",
|
|
||||||
"ordinal": 2,
|
|
||||||
"type_info": "Text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "last_active",
|
|
||||||
"ordinal": 3,
|
|
||||||
"type_info": "Integer"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"parameters": {
|
|
||||||
"Right": 1
|
|
||||||
},
|
|
||||||
"nullable": [
|
|
||||||
false,
|
|
||||||
false,
|
|
||||||
false,
|
|
||||||
true
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"hash": "7ca12d1edd84924ca65f597196eb618e4a313caf315a90aceaaaa253ff25947b"
|
|
||||||
}
|
|
||||||
@ -1,26 +0,0 @@
|
|||||||
{
|
|
||||||
"db_name": "SQLite",
|
|
||||||
"query": "SELECT user_id, user_name FROM users;",
|
|
||||||
"describe": {
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"name": "user_id",
|
|
||||||
"ordinal": 0,
|
|
||||||
"type_info": "Integer"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "user_name",
|
|
||||||
"ordinal": 1,
|
|
||||||
"type_info": "Text"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"parameters": {
|
|
||||||
"Right": 0
|
|
||||||
},
|
|
||||||
"nullable": [
|
|
||||||
false,
|
|
||||||
false
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"hash": "86f197e514e8d55b95a71ab52b5901e939ee2c9e832ed1fae2661ad770d3ad60"
|
|
||||||
}
|
|
||||||
@ -1,38 +0,0 @@
|
|||||||
{
|
|
||||||
"db_name": "SQLite",
|
|
||||||
"query": "SELECT * FROM users WHERE user_name = ?",
|
|
||||||
"describe": {
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"name": "user_id",
|
|
||||||
"ordinal": 0,
|
|
||||||
"type_info": "Integer"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "user_name",
|
|
||||||
"ordinal": 1,
|
|
||||||
"type_info": "Text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "password_hash",
|
|
||||||
"ordinal": 2,
|
|
||||||
"type_info": "Text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "last_active",
|
|
||||||
"ordinal": 3,
|
|
||||||
"type_info": "Integer"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"parameters": {
|
|
||||||
"Right": 1
|
|
||||||
},
|
|
||||||
"nullable": [
|
|
||||||
false,
|
|
||||||
false,
|
|
||||||
false,
|
|
||||||
true
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"hash": "e0951ca9b4ff37ca9d9c8c4ea1ab618ad0dc8cdff118b6d801b568592762a29f"
|
|
||||||
}
|
|
||||||
@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
"db_name": "SQLite",
|
|
||||||
"query": "DELETE FROM users WHERE user_id = ?",
|
|
||||||
"describe": {
|
|
||||||
"columns": [],
|
|
||||||
"parameters": {
|
|
||||||
"Right": 1
|
|
||||||
},
|
|
||||||
"nullable": []
|
|
||||||
},
|
|
||||||
"hash": "fe857854bbacf9e8fc44ef0dffc2d5e15da15f805064f1e969a1d6d9516294b6"
|
|
||||||
}
|
|
||||||
@ -42,6 +42,8 @@ cfg-if = "1.0.0"
|
|||||||
rcgen = { version = "0.13.2", optional = true }
|
rcgen = { version = "0.13.2", optional = true }
|
||||||
cron = { version = "0.15.0", optional = true }
|
cron = { version = "0.15.0", optional = true }
|
||||||
|
|
||||||
|
sparse-handler = { path = "../sparse-handler", optional = true }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
hydrate = ["leptos/hydrate", "chrono/wasmbind"]
|
hydrate = ["leptos/hydrate", "chrono/wasmbind"]
|
||||||
ssr = [
|
ssr = [
|
||||||
@ -64,6 +66,7 @@ ssr = [
|
|||||||
"dep:hex",
|
"dep:hex",
|
||||||
"dep:rcgen",
|
"dep:rcgen",
|
||||||
"dep:cron",
|
"dep:cron",
|
||||||
|
"dep:sparse-handler",
|
||||||
"leptos/ssr",
|
"leptos/ssr",
|
||||||
"leptos_meta/ssr",
|
"leptos_meta/ssr",
|
||||||
"leptos_router/ssr",
|
"leptos_router/ssr",
|
||||||
|
|||||||
@ -6,9 +6,13 @@ use serde::{Serialize, Deserialize};
|
|||||||
#[cfg(feature = "ssr")]
|
#[cfg(feature = "ssr")]
|
||||||
use {
|
use {
|
||||||
sqlx::SqlitePool,
|
sqlx::SqlitePool,
|
||||||
|
|
||||||
leptos::server_fn::error::NoCustomError,
|
leptos::server_fn::error::NoCustomError,
|
||||||
rcgen::{generate_simple_self_signed, CertifiedKey},
|
rcgen::{generate_simple_self_signed, CertifiedKey},
|
||||||
crate::{db::user, beacon_handler::BeaconListenerMap},
|
|
||||||
|
sparse_handler::BeaconListenerMap,
|
||||||
|
|
||||||
|
crate::db::user,
|
||||||
};
|
};
|
||||||
|
|
||||||
use super::BeaconResources;
|
use super::BeaconResources;
|
||||||
@ -106,6 +110,28 @@ pub async fn add_listener(public_ip: String, port: i16, domain_name: String) ->
|
|||||||
|
|
||||||
#[server]
|
#[server]
|
||||||
pub async fn remove_listener(listener_id: i64) -> Result<(), ServerFnError> {
|
pub async fn remove_listener(listener_id: i64) -> Result<(), ServerFnError> {
|
||||||
|
let user = user::get_auth_session().await?;
|
||||||
|
|
||||||
|
if user.is_none() {
|
||||||
|
return Err(ServerFnError::<NoCustomError>::ServerError("You are not signed in!".to_owned()));
|
||||||
|
}
|
||||||
|
|
||||||
|
let pool = expect_context::<SqlitePool>();
|
||||||
|
let blm = expect_context::<BeaconListenerMap>();
|
||||||
|
|
||||||
|
let Ok(mut blm_handle) = blm.write() else {
|
||||||
|
return Err(ServerFnError::<NoCustomError>::ServerError("Failed to get write handle for beacon listener map".to_owned()));
|
||||||
|
};
|
||||||
|
|
||||||
|
if let Some(mut bl) = blm_handle.get_mut(&listener_id) {
|
||||||
|
bl.abort();
|
||||||
|
} else {
|
||||||
|
return Err(ServerFnError::<NoCustomError>::ServerError("Failed to get write handle for beacon listener map".to_owned()));
|
||||||
|
}
|
||||||
|
|
||||||
|
blm_handle.remove(&listener_id);
|
||||||
|
drop(blm_handle);
|
||||||
|
|
||||||
unimplemented!()
|
unimplemented!()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -117,7 +143,7 @@ pub async fn start_listener(listener_id: i64) -> Result<(), ServerFnError> {
|
|||||||
return Err(ServerFnError::<NoCustomError>::ServerError("You are not signed in!".to_owned()));
|
return Err(ServerFnError::<NoCustomError>::ServerError("You are not signed in!".to_owned()));
|
||||||
}
|
}
|
||||||
|
|
||||||
crate::beacon_handler::start_listener(
|
sparse_handler::start_listener(
|
||||||
expect_context(),
|
expect_context(),
|
||||||
listener_id,
|
listener_id,
|
||||||
expect_context()
|
expect_context()
|
||||||
|
|||||||
@ -1,6 +1,4 @@
|
|||||||
pub mod app;
|
pub mod app;
|
||||||
#[cfg(feature = "ssr")]
|
|
||||||
pub mod beacon_handler;
|
|
||||||
pub mod beacons;
|
pub mod beacons;
|
||||||
pub mod db;
|
pub mod db;
|
||||||
pub mod error;
|
pub mod error;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#[cfg(feature = "ssr")]
|
#[cfg(feature = "hydrate")]
|
||||||
pub(crate) mod beacon_binaries {
|
pub(crate) mod beacon_binaries {
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
pub const LINUX_BEACON: &'static [u8] = include_bytes!(std::env!("SPARSE_BEACON_LINUX"));
|
pub const LINUX_BEACON: &'static [u8] = include_bytes!(std::env!("SPARSE_BEACON_LINUX"));
|
||||||
@ -11,6 +11,8 @@ pub(crate) mod beacon_binaries {
|
|||||||
pub const LINUX_INSTALLER: &'static [u8] = include_bytes!(std::env!("SPARSE_INSTALLER_LINUX"));
|
pub const LINUX_INSTALLER: &'static [u8] = include_bytes!(std::env!("SPARSE_INSTALLER_LINUX"));
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
pub const FREEBSD_INSTALLER: &'static [u8] = include_bytes!(std::env!("SPARSE_INSTALLER_FREEBSD"));
|
pub const FREEBSD_INSTALLER: &'static [u8] = include_bytes!(std::env!("SPARSE_INSTALLER_FREEBSD"));
|
||||||
|
#[allow(dead_code)]
|
||||||
|
pub const WINDOWS_INSTALLER: &'static [u8] = include_bytes!(std::env!("SPARSE_INSTALLER_WINDOWS"));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "ssr")]
|
#[cfg(feature = "ssr")]
|
||||||
@ -23,7 +25,6 @@ mod beacons;
|
|||||||
pub mod users;
|
pub mod users;
|
||||||
pub mod error;
|
pub mod error;
|
||||||
pub mod db;
|
pub mod db;
|
||||||
pub mod beacon_handler;
|
|
||||||
|
|
||||||
#[cfg(feature = "ssr")]
|
#[cfg(feature = "ssr")]
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
@ -37,7 +38,7 @@ async fn main() -> anyhow::Result<std::process::ExitCode> {
|
|||||||
tracing_subscriber::registry()
|
tracing_subscriber::registry()
|
||||||
.with(
|
.with(
|
||||||
tracing_subscriber::EnvFilter::try_from_default_env()
|
tracing_subscriber::EnvFilter::try_from_default_env()
|
||||||
.unwrap_or_else(|_| format!("{}=debug,tower_http=trace", env!("CARGO_CRATE_NAME")).into()),
|
.unwrap_or_else(|_| format!("{}=debug,sparse_handler=debug,tower_http=trace", env!("CARGO_CRATE_NAME")).into()),
|
||||||
)
|
)
|
||||||
.with(tracing_subscriber::fmt::layer())
|
.with(tracing_subscriber::fmt::layer())
|
||||||
.init();
|
.init();
|
||||||
|
|||||||
@ -12,7 +12,7 @@ pub async fn serve_web(management_address: SocketAddrV4, db: SqlitePool) -> anyh
|
|||||||
let conf = get_configuration(None).unwrap();
|
let conf = get_configuration(None).unwrap();
|
||||||
let leptos_options = conf.leptos_options;
|
let leptos_options = conf.leptos_options;
|
||||||
let routes = generate_route_list(App);
|
let routes = generate_route_list(App);
|
||||||
let beacon_listeners = crate::beacon_handler::BeaconListenerMap::default();
|
let beacon_listeners = sparse_handler::BeaconListenerMap::default();
|
||||||
|
|
||||||
let compression_layer = tower_http::compression::CompressionLayer::new()
|
let compression_layer = tower_http::compression::CompressionLayer::new()
|
||||||
.gzip(true)
|
.gzip(true)
|
||||||
@ -20,15 +20,15 @@ pub async fn serve_web(management_address: SocketAddrV4, db: SqlitePool) -> anyh
|
|||||||
.br(true)
|
.br(true)
|
||||||
.zstd(true);
|
.zstd(true);
|
||||||
|
|
||||||
crate::beacon_handler::start_all_listeners(std::sync::Arc::clone(&beacon_listeners), db.clone()).await?;
|
sparse_handler::start_all_listeners(beacon_listeners.clone(), db.clone()).await?;
|
||||||
|
|
||||||
let app = Router::new()
|
let app = Router::new()
|
||||||
.leptos_routes_with_context(
|
.leptos_routes_with_context(
|
||||||
&leptos_options,
|
&leptos_options,
|
||||||
routes,
|
routes,
|
||||||
move || {
|
move || {
|
||||||
provide_context(std::sync::Arc::clone(&beacon_listeners));
|
provide_context(beacon_listeners.clone());
|
||||||
provide_context(db.clone())
|
provide_context::<SqlitePool>(db.clone());
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
let leptos_options = leptos_options.clone();
|
let leptos_options = leptos_options.clone();
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "sparse-installer"
|
name = "sparse-unix-installer"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
version.workspace = true
|
version.workspace = true
|
||||||
|
|
||||||
6
sparse-windows-infector/Cargo.toml
Normal file
6
sparse-windows-infector/Cargo.toml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
[package]
|
||||||
|
name = "sparse-windows-infector"
|
||||||
|
edition = "2024"
|
||||||
|
version.workspace = true
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
14
sparse-windows-infector/src/lib.rs
Normal file
14
sparse-windows-infector/src/lib.rs
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
pub fn add(left: u64, right: u64) -> u64 {
|
||||||
|
left + right
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod tests {
|
||||||
|
use super::*;
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn it_works() {
|
||||||
|
let result = add(2, 2);
|
||||||
|
assert_eq!(result, 4);
|
||||||
|
}
|
||||||
|
}
|
||||||
6
sparse-windows-installer/Cargo.toml
Normal file
6
sparse-windows-installer/Cargo.toml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
[package]
|
||||||
|
name = "sparse-windows-installer"
|
||||||
|
edition = "2024"
|
||||||
|
version.workspace = true
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
14
sparse-windows-installer/src/lib.rs
Normal file
14
sparse-windows-installer/src/lib.rs
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
pub fn add(left: u64, right: u64) -> u64 {
|
||||||
|
left + right
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod tests {
|
||||||
|
use super::*;
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn it_works() {
|
||||||
|
let result = add(2, 2);
|
||||||
|
assert_eq!(result, 4);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -29,8 +29,10 @@ typedef struct Parameters {
|
|||||||
unsigned short pubkey_cert_size;
|
unsigned short pubkey_cert_size;
|
||||||
unsigned short template_name_length;
|
unsigned short template_name_length;
|
||||||
unsigned short domain_name_length;
|
unsigned short domain_name_length;
|
||||||
|
unsigned short beacon_name_length;
|
||||||
char pubkey_cert[1024];
|
char pubkey_cert[1024];
|
||||||
char beacon_identifier[64];
|
char beacon_identifier[64];
|
||||||
char template_name[128];
|
char template_name[128];
|
||||||
char domain_name[128];
|
char domain_name[128];
|
||||||
|
char beacon_name[128];
|
||||||
} Parameters_t;
|
} Parameters_t;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user