From 0160266f29455da02ddcc91e735eed0841b14299 Mon Sep 17 00:00:00 2001 From: "Tristan Poland (Trident_For_U)" <34868944+tristanpoland@users.noreply.github.com> Date: Fri, 22 Nov 2024 15:21:25 -0500 Subject: [PATCH 01/41] Update main.yml --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 01f924f..536928f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -43,7 +43,7 @@ jobs: - name: Create Release id: create_release env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB }} uses: softprops/action-gh-release@v1 with: tag_name: v${{ needs.check-version.outputs.version }} @@ -112,7 +112,7 @@ jobs: - name: Upload Binary uses: actions/upload-release-asset@v1 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB }} with: upload_url: ${{ needs.create-release.outputs.upload_url }} asset_path: ${{ matrix.bin_path }} @@ -122,7 +122,7 @@ jobs: - name: Upload SHA256 uses: actions/upload-release-asset@v1 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB }} with: upload_url: ${{ needs.create-release.outputs.upload_url }} asset_path: ${{ matrix.bin_path }}.sha256 From 284e77b13b6618b2dd8cd1a933a27b38b03840a5 Mon Sep 17 00:00:00 2001 From: "Tristan Poland (Trident_For_U)" <34868944+tristanpoland@users.noreply.github.com> Date: Tue, 3 Dec 2024 13:29:08 -0500 Subject: [PATCH 02/41] Disabled collision checking temporarily --- server/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/main.rs b/server/src/main.rs index 6ac683e..ccf420d 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -49,7 +49,7 @@ pub static LOGGER: Lazy = Lazy::new(|| { #[tokio::main] async fn main() -> Result<()> { - collision::main(); + //collision::main(); let mut _profiler = Some(dhat::Profiler::new_heap()); splash(); From 071501f7356c20759bd822b0edd0aad2c1e6c4cd Mon Sep 17 00:00:00 2001 From: "Tristan Poland (Trident_For_U)" <34868944+tristanpoland@users.noreply.github.com> Date: Tue, 3 Dec 2024 13:55:12 -0500 Subject: [PATCH 03/41] Expanded config options --- dhat-heap.json | 2634 +++++++++++++++++++++++++++++++++++ server/server_config.json | 4 - server/src/server/config.rs | 6 +- server/src/server/mod.rs | 24 +- server_config.json | 6 + 5 files changed, 2662 insertions(+), 12 deletions(-) create mode 100644 dhat-heap.json delete mode 100644 server/server_config.json create mode 100644 server_config.json diff --git a/dhat-heap.json b/dhat-heap.json new file mode 100644 index 0000000..b31ed11 --- /dev/null +++ b/dhat-heap.json @@ -0,0 +1,2634 @@ +{ +"dhatFileVersion": 2, +"mode": "rust-heap", +"verb": "Allocated", +"bklt": true, +"bkacc": false, +"tu": "µs", +"Mtu": "s", +"tuth": 10, +"cmd": "target\\debug\\horizon-server.exe", +"pid": 10716, +"tg": 26512, +"te": 29016, +"pps": [ +{ +"tb": 64, +"tbk": 2, +"tl": 17752, +"mb": 64, +"mbk": 2, +"gb": 64, +"gbk": 2, +"eb": 0, +"ebk": 0, +"fs": [ +1, +2, +3, +4, +5, +6, +7 +] +}, +{ +"tb": 320, +"tbk": 64, +"tl": 41, +"mb": 8, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +8, +9, +10, +11, +12, +13, +14, +15, +16 +] +}, +{ +"tb": 2048, +"tbk": 64, +"tl": 165, +"mb": 32, +"mbk": 1, +"gb": 32, +"gbk": 1, +"eb": 0, +"ebk": 0, +"fs": [ +17, +18, +19, +20, +21, +22, +23 +] +}, +{ +"tb": 1024, +"tbk": 1, +"tl": 28608, +"mb": 1024, +"mbk": 1, +"gb": 1024, +"gbk": 1, +"eb": 1024, +"ebk": 1, +"fs": [ +24, +25, +26, +27, +28, +29, +30, +31, +32, +33, +34, +35, +36, +37, +38, +39, +40, +41, +42, +43, +44, +45, +46 +] +}, +{ +"tb": 11, +"tbk": 2, +"tl": 9176, +"mb": 8, +"mbk": 1, +"gb": 8, +"gbk": 1, +"eb": 0, +"ebk": 0, +"fs": [ +17, +47, +48, +49, +50, +51, +52, +53, +54, +55 +] +}, +{ +"tb": 12, +"tbk": 2, +"tl": 6, +"mb": 8, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +56, +57, +58, +59, +60, +61, +62, +63, +64, +65, +66, +67, +68, +69, +43 +] +}, +{ +"tb": 18, +"tbk": 1, +"tl": 2, +"mb": 18, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +70, +71, +72, +73, +74, +75, +76, +77, +78, +79, +80, +81, +82, +83, +84, +85, +86 +] +}, +{ +"tb": 200, +"tbk": 1, +"tl": 9753, +"mb": 200, +"mbk": 1, +"gb": 200, +"gbk": 1, +"eb": 0, +"ebk": 0, +"fs": [ +1, +87, +88, +89, +90, +91, +92 +] +}, +{ +"tb": 224, +"tbk": 1, +"tl": 9556, +"mb": 224, +"mbk": 1, +"gb": 224, +"gbk": 1, +"eb": 0, +"ebk": 0, +"fs": [ +1, +93, +94, +95, +96, +97, +98, +99 +] +}, +{ +"tb": 448, +"tbk": 1, +"tl": 9251, +"mb": 448, +"mbk": 1, +"gb": 448, +"gbk": 1, +"eb": 0, +"ebk": 0, +"fs": [ +100, +101, +102, +103, +104, +105, +106 +] +}, +{ +"tb": 252, +"tbk": 6, +"tl": 237, +"mb": 168, +"mbk": 4, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +70, +71, +72, +73, +74, +75, +76, +107, +108, +109, +110, +111, +111, +112 +] +}, +{ +"tb": 38, +"tbk": 1, +"tl": 2, +"mb": 38, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +70, +71, +72, +73, +74, +75, +76, +77, +78, +79, +80, +81, +113, +114, +115, +116, +117 +] +}, +{ +"tb": 1792, +"tbk": 64, +"tl": 128, +"mb": 28, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +118, +119, +120, +121, +122, +123, +124, +125 +] +}, +{ +"tb": 64, +"tbk": 1, +"tl": 5947, +"mb": 64, +"mbk": 1, +"gb": 64, +"gbk": 1, +"eb": 0, +"ebk": 0, +"fs": [ +1, +126, +127, +128, +129, +130, +131 +] +}, +{ +"tb": 31, +"tbk": 3, +"tl": 26, +"mb": 18, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +56, +57, +58, +59, +60, +61, +62, +63, +64, +65, +66, +132, +68, +69, +43 +] +}, +{ +"tb": 232, +"tbk": 2, +"tl": 18485, +"mb": 232, +"mbk": 2, +"gb": 232, +"gbk": 2, +"eb": 0, +"ebk": 0, +"fs": [ +133, +134, +135, +136, +137, +138, +139, +140 +] +}, +{ +"tb": 200, +"tbk": 1, +"tl": 9653, +"mb": 200, +"mbk": 1, +"gb": 200, +"gbk": 1, +"eb": 0, +"ebk": 0, +"fs": [ +1, +87, +88, +89, +90, +91, +141 +] +}, +{ +"tb": 32, +"tbk": 1, +"tl": 8930, +"mb": 32, +"mbk": 1, +"gb": 32, +"gbk": 1, +"eb": 0, +"ebk": 0, +"fs": [ +1, +2, +3, +4, +5, +142, +143 +] +}, +{ +"tb": 20, +"tbk": 1, +"tl": 15066, +"mb": 20, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +100, +144, +145, +146, +147, +148, +149, +150, +151, +152 +] +}, +{ +"tb": 320, +"tbk": 1, +"tl": 25118, +"mb": 320, +"mbk": 1, +"gb": 320, +"gbk": 1, +"eb": 320, +"ebk": 1, +"fs": [ +153, +154, +155, +156, +157, +158, +159 +] +}, +{ +"tb": 8, +"tbk": 1, +"tl": 8985, +"mb": 8, +"mbk": 1, +"gb": 8, +"gbk": 1, +"eb": 0, +"ebk": 0, +"fs": [ +1, +160, +161, +162, +163, +164, +165 +] +}, +{ +"tb": 8, +"tbk": 1, +"tl": 39, +"mb": 8, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +1, +166, +167, +168, +169, +170, +171 +] +}, +{ +"tb": 32, +"tbk": 1, +"tl": 580, +"mb": 32, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +56, +57, +58, +59, +60, +61, +62, +63, +172, +173, +174, +175, +176, +43, +44, +45, +46 +] +}, +{ +"tb": 286, +"tbk": 2, +"tl": 14758, +"mb": 244, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +70, +71, +72, +73, +74, +75, +76, +177, +178, +179, +180, +181, +182, +183, +184, +185, +115, +116, +117 +] +}, +{ +"tb": 2984, +"tbk": 2, +"tl": 624, +"mb": 2984, +"mbk": 2, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +186, +187, +188, +189, +190, +191, +192, +193 +] +}, +{ +"tb": 1182, +"tbk": 1, +"tl": 1677, +"mb": 1182, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +56, +57, +58, +59, +60, +61, +62, +63, +172, +173, +174, +194, +42, +43, +44, +45, +46 +] +}, +{ +"tb": 117, +"tbk": 4, +"tl": 37105, +"mb": 117, +"mbk": 4, +"gb": 63, +"gbk": 2, +"eb": 117, +"ebk": 4, +"fs": [ +153, +195, +196, +197, +198, +199, +200, +201, +202, +203 +] +}, +{ +"tb": 96, +"tbk": 3, +"tl": 27749, +"mb": 96, +"mbk": 3, +"gb": 96, +"gbk": 3, +"eb": 0, +"ebk": 0, +"fs": [ +204, +205, +206, +207, +208, +209, +210, +211 +] +}, +{ +"tb": 8704, +"tbk": 64, +"tl": 313635, +"mb": 8704, +"mbk": 64, +"gb": 8704, +"gbk": 64, +"eb": 0, +"ebk": 0, +"fs": [ +1, +212, +213, +214, +215, +216, +217, +218 +] +}, +{ +"tb": 7, +"tbk": 1, +"tl": 27, +"mb": 7, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +219, +220, +221, +222, +223, +224, +225, +226, +227, +228, +229, +230, +231, +176, +43, +44, +45, +46, +232, +233 +] +}, +{ +"tb": 206, +"tbk": 16, +"tl": 5812, +"mb": 55, +"mbk": 4, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +153, +195, +196, +197, +198, +199, +234, +235, +236 +] +}, +{ +"tb": 232, +"tbk": 2, +"tl": 18466, +"mb": 232, +"mbk": 2, +"gb": 232, +"gbk": 2, +"eb": 0, +"ebk": 0, +"fs": [ +133, +134, +135, +136, +237, +238, +239, +240 +] +}, +{ +"tb": 1, +"tbk": 1, +"tl": 6, +"mb": 1, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +219, +220, +221, +222, +223, +224, +225, +226, +227, +228, +241, +242, +243, +244, +245, +246, +247 +] +}, +{ +"tb": 32, +"tbk": 1, +"tl": 8858, +"mb": 32, +"mbk": 1, +"gb": 32, +"gbk": 1, +"eb": 0, +"ebk": 0, +"fs": [ +1, +2, +3, +4, +5, +248, +249 +] +}, +{ +"tb": 448, +"tbk": 7, +"tl": 200363, +"mb": 448, +"mbk": 7, +"gb": 448, +"gbk": 7, +"eb": 448, +"ebk": 7, +"fs": [ +250, +251, +252, +253, +254, +255, +256, +257, +258, +259, +260, +261, +262, +263, +264, +110, +111, +111, +112 +] +}, +{ +"tb": 360, +"tbk": 1, +"tl": 24982, +"mb": 360, +"mbk": 1, +"gb": 360, +"gbk": 1, +"eb": 0, +"ebk": 0, +"fs": [ +1, +265, +266, +267, +268, +269, +270, +176 +] +}, +{ +"tb": 2, +"tbk": 2, +"tl": 18535, +"mb": 2, +"mbk": 2, +"gb": 2, +"gbk": 2, +"eb": 0, +"ebk": 0, +"fs": [ +153, +195, +196, +197, +198, +199, +271, +272, +273, +274, +275 +] +}, +{ +"tb": 48, +"tbk": 1, +"tl": 1696, +"mb": 48, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +56, +57, +58, +59, +60, +61, +62, +63, +172, +173, +174, +276, +43, +44, +45, +46, +232 +] +}, +{ +"tb": 32, +"tbk": 4, +"tl": 28, +"mb": 8, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +277, +278, +279, +280, +281, +282, +283, +284, +285, +286, +287, +288, +289, +290, +291, +292 +] +}, +{ +"tb": 184, +"tbk": 1, +"tl": 1, +"mb": 184, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +293, +294, +295, +296, +297, +176, +43 +] +}, +{ +"tb": 10752, +"tbk": 128, +"tl": 293, +"mb": 84, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +186, +187, +188, +298, +299, +300, +301 +] +}, +{ +"tb": 109, +"tbk": 1, +"tl": 226, +"mb": 109, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +277, +278, +302, +303, +304, +305, +306, +184, +185, +115, +116, +117 +] +}, +{ +"tb": 7168, +"tbk": 64, +"tl": 210807, +"mb": 7168, +"mbk": 64, +"gb": 112, +"gbk": 1, +"eb": 0, +"ebk": 0, +"fs": [ +1, +307, +308, +309, +310, +311, +312 +] +}, +{ +"tb": 27, +"tbk": 2, +"tl": 63, +"mb": 26, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +219, +220, +221, +222, +223, +224, +225, +226, +227, +228, +241, +242, +243, +244, +245, +313, +314 +] +}, +{ +"tb": 2688, +"tbk": 64, +"tl": 98, +"mb": 42, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +118, +119, +120, +121, +122, +123, +315, +316, +317, +318 +] +}, +{ +"tb": 25, +"tbk": 1, +"tl": 9261, +"mb": 25, +"mbk": 1, +"gb": 25, +"gbk": 1, +"eb": 0, +"ebk": 0, +"fs": [ +153, +195, +196, +197, +198, +199, +271, +272, +273, +274, +319 +] +}, +{ +"tb": 32, +"tbk": 4, +"tl": 152, +"mb": 8, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +153, +154, +155, +320, +321, +322, +323 +] +}, +{ +"tb": 12, +"tbk": 2, +"tl": 5, +"mb": 8, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +56, +57, +58, +59, +60, +61, +62, +63, +64, +65, +66, +67, +68, +324, +176 +] +}, +{ +"tb": 26, +"tbk": 4, +"tl": 37129, +"mb": 26, +"mbk": 4, +"gb": 14, +"gbk": 2, +"eb": 26, +"ebk": 4, +"fs": [ +153, +195, +196, +197, +198, +199, +200, +201, +202, +325 +] +}, +{ +"tb": 32, +"tbk": 1, +"tl": 1233, +"mb": 32, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +326, +327, +328, +329, +330, +331, +332, +333, +37, +334 +] +}, +{ +"tb": 8, +"tbk": 1, +"tl": 15, +"mb": 8, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +100, +101, +102, +335, +336, +337, +338, +339 +] +}, +{ +"tb": 16384, +"tbk": 64, +"tl": 319086, +"mb": 16384, +"mbk": 64, +"gb": 16384, +"gbk": 64, +"eb": 16384, +"ebk": 64, +"fs": [ +1, +340, +341, +342, +343, +344, +345 +] +}, +{ +"tb": 184, +"tbk": 1, +"tl": 55, +"mb": 184, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +293, +294, +295, +346, +99, +176, +43 +] +}, +{ +"tb": 40, +"tbk": 4, +"tl": 35592, +"mb": 40, +"mbk": 4, +"gb": 40, +"gbk": 4, +"eb": 0, +"ebk": 0, +"fs": [ +17, +47, +48, +49, +50, +51, +347, +348 +] +}, +{ +"tb": 92, +"tbk": 4, +"tl": 38762, +"mb": 92, +"mbk": 4, +"gb": 46, +"gbk": 2, +"eb": 92, +"ebk": 4, +"fs": [ +153, +154, +155, +349, +350, +351, +352, +353 +] +}, +{ +"tb": 2560, +"tbk": 1, +"tl": 1783, +"mb": 2560, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +100, +144, +145, +354, +355, +356, +357, +358, +359 +] +}, +{ +"tb": 31, +"tbk": 3, +"tl": 17, +"mb": 18, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +56, +57, +58, +59, +60, +61, +62, +63, +64, +65, +66, +132, +68, +360, +176 +] +}, +{ +"tb": 224, +"tbk": 1, +"tl": 9555, +"mb": 224, +"mbk": 1, +"gb": 224, +"gbk": 1, +"eb": 0, +"ebk": 0, +"fs": [ +1, +93, +94, +95, +361, +362, +99, +176 +] +}, +{ +"tb": 10, +"tbk": 1, +"tl": 25023, +"mb": 10, +"mbk": 1, +"gb": 10, +"gbk": 1, +"eb": 0, +"ebk": 0, +"fs": [ +118, +119, +120, +121, +122, +123, +363, +364, +365, +366 +] +}, +{ +"tb": 38, +"tbk": 1, +"tl": 2, +"mb": 38, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +70, +71, +72, +73, +74, +75, +76, +77, +78, +79, +367, +368, +369, +370, +371, +372, +373, +374, +176, +43 +] +}, +{ +"tb": 5376, +"tbk": 64, +"tl": 2605, +"mb": 84, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +133, +134, +135, +136, +375, +376, +377, +378 +] +}, +{ +"tb": 54, +"tbk": 1, +"tl": 329, +"mb": 54, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +56, +57, +58, +59, +60, +61, +62, +63, +172, +173, +174, +379, +176, +43, +44, +45, +46 +] +}, +{ +"tb": 672, +"tbk": 4, +"tl": 35565, +"mb": 672, +"mbk": 4, +"gb": 672, +"gbk": 4, +"eb": 0, +"ebk": 0, +"fs": [ +1, +380, +381, +382, +383, +384, +385 +] +}, +{ +"tb": 36, +"tbk": 1, +"tl": 181, +"mb": 36, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 36, +"ebk": 1, +"fs": [ +56, +57, +58, +59, +60, +61, +62, +63, +172, +173, +174, +386, +176, +43, +44, +45, +46 +] +}, +{ +"tb": 56, +"tbk": 1, +"tl": 9889, +"mb": 56, +"mbk": 1, +"gb": 56, +"gbk": 1, +"eb": 56, +"ebk": 1, +"fs": [ +1, +387, +388, +389, +390, +391, +392 +] +}, +{ +"tb": 37, +"tbk": 3, +"tl": 6, +"mb": 22, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +56, +57, +58, +59, +60, +61, +62, +63, +64, +65, +66, +67, +68, +360, +176 +] +}, +{ +"tb": 31, +"tbk": 3, +"tl": 8, +"mb": 18, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +56, +57, +58, +59, +60, +61, +62, +63, +64, +65, +66, +132, +68, +324, +176 +] +}, +{ +"tb": 992, +"tbk": 5, +"tl": 4880, +"mb": 512, +"mbk": 1, +"gb": 512, +"gbk": 1, +"eb": 0, +"ebk": 0, +"fs": [ +100, +101, +102, +393, +394, +395, +396 +] +}, +{ +"tb": 7, +"tbk": 1, +"tl": 9923, +"mb": 7, +"mbk": 1, +"gb": 7, +"gbk": 1, +"eb": 7, +"ebk": 1, +"fs": [ +118, +119, +120, +121, +122, +123, +124, +397 +] +}, +{ +"tb": 1492, +"tbk": 1, +"tl": 9017, +"mb": 1492, +"mbk": 1, +"gb": 1492, +"gbk": 1, +"eb": 0, +"ebk": 0, +"fs": [ +186, +187, +188, +189, +190, +191, +192, +398, +399 +] +}, +{ +"tb": 112, +"tbk": 1, +"tl": 5956, +"mb": 112, +"mbk": 1, +"gb": 112, +"gbk": 1, +"eb": 0, +"ebk": 0, +"fs": [ +1, +307, +308, +400, +129, +130, +131 +] +}, +{ +"tb": 88, +"tbk": 1, +"tl": 156, +"mb": 88, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 88, +"ebk": 1, +"fs": [ +1, +401, +402, +403, +404, +373, +374 +] +}, +{ +"tb": 8, +"tbk": 1, +"tl": 9167, +"mb": 8, +"mbk": 1, +"gb": 8, +"gbk": 1, +"eb": 0, +"ebk": 0, +"fs": [ +1, +405, +406, +407, +408, +409, +410 +] +}, +{ +"tb": 18, +"tbk": 1, +"tl": 2, +"mb": 18, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +70, +71, +72, +73, +74, +75, +76, +77, +78, +79, +80, +81, +82, +411, +84, +85, +86 +] +}, +{ +"tb": 64, +"tbk": 1, +"tl": 9827, +"mb": 64, +"mbk": 1, +"gb": 64, +"gbk": 1, +"eb": 0, +"ebk": 0, +"fs": [ +1, +412, +413, +414, +117, +176, +43 +] +}, +{ +"tb": 30, +"tbk": 1, +"tl": 1, +"mb": 30, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +70, +71, +72, +73, +74, +75, +76, +77, +78, +79, +80, +81, +82, +415, +84, +85, +86 +] +}, +{ +"tb": 184, +"tbk": 1, +"tl": 8852, +"mb": 184, +"mbk": 1, +"gb": 184, +"gbk": 1, +"eb": 0, +"ebk": 0, +"fs": [ +293, +294, +295, +416, +417, +176, +43 +] +}, +{ +"tb": 12, +"tbk": 2, +"tl": 6, +"mb": 8, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +56, +57, +58, +59, +60, +61, +62, +63, +64, +65, +66, +67, +68, +418, +176 +] +}, +{ +"tb": 7, +"tbk": 1, +"tl": 9743, +"mb": 7, +"mbk": 1, +"gb": 7, +"gbk": 1, +"eb": 0, +"ebk": 0, +"fs": [ +219, +220, +221, +222, +223, +224, +225, +226, +227, +228, +419, +420, +421, +176, +43, +44, +45, +46, +232 +] +}, +{ +"tb": 24, +"tbk": 2, +"tl": 8769, +"mb": 16, +"mbk": 1, +"gb": 16, +"gbk": 1, +"eb": 0, +"ebk": 0, +"fs": [ +277, +278, +422, +423, +424, +425, +426, +427, +428, +429, +430, +431, +432, +433, +434, +290, +291, +292, +172, +173 +] +}, +{ +"tb": 32, +"tbk": 1, +"tl": 8980, +"mb": 32, +"mbk": 1, +"gb": 32, +"gbk": 1, +"eb": 0, +"ebk": 0, +"fs": [ +1, +435, +436, +162, +163, +164, +165 +] +}, +{ +"tb": 31, +"tbk": 3, +"tl": 18, +"mb": 18, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +56, +57, +58, +59, +60, +61, +62, +63, +64, +65, +66, +132, +68, +418, +176 +] +}, +{ +"tb": 40, +"tbk": 1, +"tl": 432, +"mb": 40, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +56, +57, +58, +59, +60, +61, +62, +63, +172, +173, +174, +437, +176, +43, +44, +45, +46 +] +}, +{ +"tb": 224, +"tbk": 12, +"tl": 42, +"mb": 32, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +438, +439, +440, +441, +442, +443, +444 +] +}, +{ +"tb": 80, +"tbk": 1, +"tl": 1, +"mb": 80, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 80, +"ebk": 1, +"fs": [ +1, +445, +446, +447, +448, +449, +450 +] +}, +{ +"tb": 30, +"tbk": 1, +"tl": 1, +"mb": 30, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +70, +71, +72, +73, +74, +75, +76, +77, +78, +79, +451, +452, +453, +454, +455, +372, +373, +374, +176, +43 +] +}, +{ +"tb": 28, +"tbk": 3, +"tl": 141, +"mb": 26, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +456, +457, +458, +459, +460, +461, +462, +463, +464 +] +}, +{ +"tb": 1492, +"tbk": 1, +"tl": 8907, +"mb": 1492, +"mbk": 1, +"gb": 1492, +"gbk": 1, +"eb": 0, +"ebk": 0, +"fs": [ +186, +187, +188, +189, +190, +191, +192, +465, +466 +] +}, +{ +"tb": 180, +"tbk": 1, +"tl": 9690, +"mb": 180, +"mbk": 1, +"gb": 180, +"gbk": 1, +"eb": 0, +"ebk": 0, +"fs": [ +133, +134, +135, +136, +467, +468, +469, +470 +] +} +], +"ftbl": [ +"[root]", +"0x7ff644fc3aa6: alloc::alloc::exchange_malloc (alloc\\src\\alloc.rs:330:0)", +"0x7ff644f487ad: alloc::boxed::impl$0::new (alloc\\src\\boxed.rs:257:0)", +"0x7ff644f487ad: tower::util::boxed_clone::BoxCloneService,http::response::Response,enum2$ >::new,http::response::Response >::new,tower::util::map_err::MapErr >::layer,socketioxide::layer::SocketIoLayer,enum2$ > (src\\routing\\route.rs:81:0)", +"0x7ff644f33d01: enum2$ > >::layer,socketioxide::layer::SocketIoLayer > (src\\routing\\mod.rs:731:0)", +"0x7ff644f2e322: axum::routing::path_router::impl$1::layer::closure$0,true,socketioxide::layer::SocketIoLayer > (src\\routing\\path_router.rs:264:0)", +"0x7ff64528a59d: alloc::alloc::impl$1::allocate (alloc\\src\\alloc.rs:241:0)", +"0x7ff6452857bc: alloc::raw_vec::RawVecInner::try_allocate_in (alloc\\src\\raw_vec.rs:478:0)", +"0x7ff64528592b: alloc::raw_vec::RawVecInner::with_capacity_in (alloc\\src\\raw_vec.rs:425:0)", +"0x7ff645280633: alloc::raw_vec::RawVec::with_capacity_in (alloc\\src\\raw_vec.rs:202:0)", +"0x7ff645280633: alloc::vec::Vec::with_capacity_in (src\\vec\\mod.rs:698:0)", +"0x7ff645280633: alloc::slice::hack::impl$1::to_vec (alloc\\src\\slice.rs:161:0)", +"0x7ff64527f44c: alloc::str::impl$4::to_owned (alloc\\src\\str.rs:210:0)", +"0x7ff64527f44c: alloc::string::impl$44::from (alloc\\src\\string.rs:2758:0)", +"0x7ff64527fa7c: colored::ColoredString::compute_style (colored-2.1.0\\src\\lib.rs:400:0)", +"0x7ff64523b78d: alloc::alloc::impl$1::allocate (alloc\\src\\alloc.rs:241:0)", +"0x7ff645237e76: alloc::raw_vec::finish_grow (alloc\\src\\raw_vec.rs:776:0)", +"0x7ff64523892b: alloc::raw_vec::RawVecInner::grow_amortized (alloc\\src\\raw_vec.rs:658:0)", +"0x7ff6451e3f7d: alloc::raw_vec::RawVecInner::grow_one (alloc\\src\\raw_vec.rs:567:0)", +"0x7ff6451e3f7d: alloc::raw_vec::RawVec::grow_one (alloc\\src\\raw_vec.rs:349:0)", +"0x7ff64520b40c: alloc::vec::Vec::push (src\\vec\\mod.rs:2009:0)", +"0x7ff644f4c797: horizon_server::server::start::async_fn$0::closure$3::async_block$0 (src\\server\\mod.rs:193:0)", +"0x7ff6452b45b3: alloc::alloc::impl$1::allocate (alloc\\src\\alloc.rs:241:0)", +"0x7ff6452b45b3: alloc::raw_vec::RawVecInner::try_allocate_in (alloc\\src\\raw_vec.rs:478:0)", +"0x7ff6452b45b3: alloc::raw_vec::RawVecInner::with_capacity_in (alloc\\src\\raw_vec.rs:425:0)", +"0x7ff6452b45b3: alloc::raw_vec::RawVec::with_capacity_in (alloc\\src\\raw_vec.rs:202:0)", +"0x7ff6452b45b3: alloc::vec::Vec::with_capacity_in (src\\vec\\mod.rs:698:0)", +"0x7ff6452b45b3: alloc::vec::Vec::with_capacity (src\\vec\\mod.rs:480:0)", +"0x7ff6452b45b3: std::io::buffered::bufwriter::BufWriter::with_capacity (io\\buffered\\bufwriter.rs:112:0)", +"0x7ff6452b45b3: std::io::buffered::linewriter::LineWriter::with_capacity (io\\buffered\\linewriter.rs:110:0)", +"0x7ff6452b45b3: std::io::buffered::linewriter::LineWriter::new (io\\buffered\\linewriter.rs:90:0)", +"0x7ff6452b45b3: std::io::stdio::stdout::closure$0 (src\\io\\stdio.rs:671:0)", +"0x7ff6452b45b3: std::sync::once_lock::impl$0::get_or_init::closure$0 (src\\sync\\once_lock.rs:304:0)", +"0x7ff6452b45b3: std::sync::once_lock::impl$0::initialize::closure$0 (src\\sync\\once_lock.rs:511:0)", +"0x7ff6452b45b3: std::sync::once::impl$2::call_once_force::closure$0 > >,std::sync::onc (src\\sync\\once.rs:217:0)", +"0x7ff6454377c4: std::sys::sync::once::futex::Once::call (sync\\once\\futex.rs:168:0)", +"0x7ff64543728b: std::sync::once::Once::call_once_force (src\\sync\\once.rs:217:0)", +"0x7ff64543728b: std::sync::once_lock::OnceLock::initialize > >,std::sync::once_lock::impl$0::get_or_init::closure_env$0 > (src\\runtime\\park.rs:281:0)", +"0x7ff644f093e3: tokio::runtime::coop::with_budget (src\\runtime\\coop.rs:107:0)", +"0x7ff644f093e3: tokio::runtime::coop::budget (src\\runtime\\coop.rs:73:0)", +"0x7ff644f093e3: tokio::runtime::park::CachedParkThread::block_on > (src\\runtime\\park.rs:281:0)", +"0x7ff645238ddc: alloc::raw_vec::RawVecInner::try_allocate_in (alloc\\src\\raw_vec.rs:478:0)", +"0x7ff64523940b: alloc::raw_vec::RawVecInner::with_capacity_in (alloc\\src\\raw_vec.rs:425:0)", +"0x7ff6452395c3: alloc::raw_vec::RawVec::with_capacity_in (alloc\\src\\raw_vec.rs:202:0)", +"0x7ff6452395c3: alloc::vec::Vec::with_capacity_in (src\\vec\\mod.rs:698:0)", +"0x7ff6452395c3: alloc::slice::hack::impl$1::to_vec (alloc\\src\\slice.rs:161:0)", +"0x7ff6452397bb: alloc::slice::hack::to_vec (alloc\\src\\slice.rs:110:0)", +"0x7ff6452397bb: alloc::slice::impl$0::to_vec_in (alloc\\src\\slice.rs:477:0)", +"0x7ff6452397bb: alloc::slice::impl$0::to_vec (alloc\\src\\slice.rs:452:0)", +"0x7ff645235372: bytes::bytes_mut::impl$8::from (bytes-1.9.0\\src\\bytes_mut.rs:1260:0)", +"0x7ff6452c4554: alloc::alloc::impl$1::allocate (alloc\\src\\alloc.rs:241:0)", +"0x7ff6452c4554: alloc::raw_vec::RawVecInner::try_allocate_in (alloc\\src\\raw_vec.rs:478:0)", +"0x7ff6452c4554: alloc::raw_vec::RawVecInner::with_capacity_in (alloc\\src\\raw_vec.rs:425:0)", +"0x7ff6452c4554: alloc::raw_vec::RawVec::with_capacity_in (alloc\\src\\raw_vec.rs:202:0)", +"0x7ff6452c4554: alloc::vec::Vec::with_capacity_in (src\\vec\\mod.rs:698:0)", +"0x7ff6452c4554: alloc::vec::Vec::with_capacity (src\\vec\\mod.rs:480:0)", +"0x7ff6452c4554: alloc::string::String::with_capacity (alloc\\src\\string.rs:489:0)", +"0x7ff6452c4554: alloc::fmt::format::format_inner (alloc\\src\\fmt.rs:635:0)", +"0x7ff645263a32: alloc::fmt::format::closure$0 (alloc\\src\\fmt.rs:642:0)", +"0x7ff645261284: enum2$ > >::map_or_else,alloc::string::String,alloc::fmt::format::closure_env$0,alloc::string::String (*)(ref$)> (core\\src\\option.rs:1211:0)", +"0x7ff645259a88: alloc::fmt::format (alloc\\src\\fmt.rs:642:0)", +"0x7ff645258925: horizon_logger::HorizonLogger::log (horizon_logger-0.1.0\\src\\lib.rs:95:0)", +"0x7ff645258626: horizon_logger::HorizonLogger::info (horizon_logger-0.1.0\\src\\lib.rs:71:0)", +"0x7ff644f4cd16: horizon_server::main::async_block$0 (server\\src\\main.rs:58:0)", +"0x7ff6452baa72: alloc::alloc::impl$1::allocate (alloc\\src\\alloc.rs:241:0)", +"0x7ff6452baa72: alloc::raw_vec::RawVecInner::try_allocate_in (alloc\\src\\raw_vec.rs:478:0)", +"0x7ff6452baa72: alloc::raw_vec::RawVecInner::with_capacity_in (alloc\\src\\raw_vec.rs:425:0)", +"0x7ff6452baa72: alloc::raw_vec::RawVec::with_capacity_in (alloc\\src\\raw_vec.rs:202:0)", +"0x7ff6452baa72: alloc::vec::Vec::with_capacity_in (src\\vec\\mod.rs:698:0)", +"0x7ff6452baa72: alloc::vec::Vec::with_capacity (src\\vec\\mod.rs:480:0)", +"0x7ff6452baa72: std::sys::pal::windows::to_u16s::inner (pal\\windows\\mod.rs:182:0)", +"0x7ff6452adf92: std::sys::pal::windows::to_u16s (pal\\windows\\mod.rs:194:0)", +"0x7ff6452adf92: std::sys::pal::windows::os::getenv (pal\\windows\\os.rs:293:0)", +"0x7ff6452adf92: std::env::_var_os (std\\src\\env.rs:262:0)", +"0x7ff6452ade39: std::env::var_os (std\\src\\env.rs:258:0)", +"0x7ff6452ade39: std::env::_var (std\\src\\env.rs:225:0)", +"0x7ff645288e46: std::env::var > (std\\src\\env.rs:221:0)", +"0x7ff645280bd2: colored::control::ShouldColorize::from_env (colored-2.1.0\\src\\control.rs:104:0)", +"0x7ff64527e529: core::ops::function::FnOnce::call_once > (src\\ops\\function.rs:250:0)", +"0x7ff645288f39: lazy_static::lazy::impl$0::get::closure$0 (lazy_static-1.5.0\\src\\inline_lazy.rs:31:0)", +"0x7ff645282ee1: std::sync::once::impl$2::call_once::closure$0 > (src\\sync\\once.rs:158:0)", +"0x7ff644f51c2e: alloc::boxed::impl$0::new (alloc\\src\\boxed.rs:257:0)", +"0x7ff644f51c2e: alloc::sync::Arc,alloc::alloc::Global>::new_cyclic,socketioxide::ns::impl$1::new::closure_env$0::new,socketioxide::extract::data::Data::add_ns,socketioxide::extract::data::Data::ns,socketioxide::extract::data::Data::new (alloc\\src\\sync.rs:387:0)", +"0x7ff644f54c44: alloc::sync::impl$56::default (alloc\\src\\sync.rs:3404:0)", +"0x7ff644f35458: axum::routing::path_router::impl$2::default,true> (src\\routing\\path_router.rs:416:0)", +"0x7ff644f2c9fc: axum::routing::path_router::PathRouter,true>::new_fallback > (src\\routing\\path_router.rs:27:0)", +"0x7ff644f334e0: axum::routing::Router >::new > (src\\routing\\mod.rs:143:0)", +"0x7ff644f4b2de: horizon_server::server::start::async_fn$0 (src\\server\\mod.rs:203:0)", +"0x7ff64506140d: alloc::alloc::impl$1::allocate (alloc\\src\\alloc.rs:241:0)", +"0x7ff64505dfe6: alloc::raw_vec::finish_grow (alloc\\src\\raw_vec.rs:776:0)", +"0x7ff64505ea7b: alloc::raw_vec::RawVecInner::grow_amortized (alloc\\src\\raw_vec.rs:658:0)", +"0x7ff644f80bcd: alloc::raw_vec::RawVecInner::grow_one (alloc\\src\\raw_vec.rs:567:0)", +"0x7ff644f80bcd: alloc::raw_vec::RawVec,alloc::alloc::Global>::grow_one,alloc::alloc::Global> (alloc\\src\\raw_vec.rs:349:0)", +"0x7ff644f4f19b: alloc::vec::Vec,alloc::alloc::Global>::push,alloc::alloc::Global> (src\\vec\\mod.rs:2009:0)", +"0x7ff644f41615: matchit::tree::Node::add_child (matchit-0.7.3\\src\\tree.rs:171:0)", +"0x7ff6452ba53e: std::sys::pal::windows::to_u16s (pal\\windows\\mod.rs:194:0)", +"0x7ff6452ba53e: std::sys::pal::windows::thread::Thread::set_name (pal\\windows\\thread.rs:62:0)", +"0x7ff6452236d8: std::thread::impl$0::spawn_unchecked_::closure$1 > (src\\thread\\mod.rs:514:0)", +"0x7ff6451c8fbe: core::ops::function::FnOnce::call_once >,tuple$<> > (src\\ops\\function.rs:250:0)", +"0x7ff6452ba44d: alloc::boxed::impl$48::call_once (alloc\\src\\boxed.rs:2231:0)", +"0x7ff6452ba44d: std::sys::pal::windows::thread::impl$0::new::thread_start (pal\\windows\\thread.rs:55:0)", +"0x7ff6452048f6: std::env::var > (std\\src\\env.rs:221:0)", +"0x7ff644f4945c: horizon_server::server::config::server_config (src\\server\\config.rs:18:0)", +"0x7ff644f49a75: horizon_server::server::HorizonServer::new (src\\server\\mod.rs:63:0)", +"0x7ff644f49984: horizon_server::server::Server::new (src\\server\\mod.rs:52:0)", +"0x7ff644f4afc6: horizon_server::server::start::async_fn$0 (src\\server\\mod.rs:166:0)", +"0x7ff64515782d: alloc::alloc::impl$1::allocate (alloc\\src\\alloc.rs:241:0)", +"0x7ff6451486fc: alloc::raw_vec::RawVecInner::try_allocate_in (alloc\\src\\raw_vec.rs:478:0)", +"0x7ff645148d2b: alloc::raw_vec::RawVecInner::with_capacity_in (alloc\\src\\raw_vec.rs:425:0)", +"0x7ff64514c833: alloc::raw_vec::RawVec::with_capacity_in (alloc\\src\\raw_vec.rs:202:0)", +"0x7ff64514c833: alloc::vec::Vec::with_capacity_in (src\\vec\\mod.rs:698:0)", +"0x7ff64514c833: alloc::slice::hack::impl$1::to_vec (alloc\\src\\slice.rs:161:0)", +"0x7ff64514c92c: alloc::str::impl$4::to_owned (alloc\\src\\str.rs:210:0)", +"0x7ff64513ab25: core::ops::function::FnOnce::call_once),tuple$ > > (src\\ops\\function.rs:250:0)", +"0x7ff644f525d6: alloc::boxed::impl$0::new (alloc\\src\\boxed.rs:257:0)", +"0x7ff644f525d6: alloc::sync::Arc > >,alloc::alloc::Global>::new (alloc\\src\\sync.rs:387:0)", +"0x7ff644f3b33a: futures_util::stream::futures_unordered::FuturesUnordered > >::new >::new > (src\\stream\\futures_ordered.rs:116:0)", +"0x7ff644fd3d55: futures_util::stream::futures_ordered::impl$10::from_iter,alloc::vec::into_iter::IntoIter,alloc: (src\\stream\\futures_ordered.rs:226:0)", +"0x7ff644fc3781: core::iter::traits::iterator::Iterator::collect,alloc::alloc::Global>,futures_util::stream::futures_ordered::FuturesOrdered (src\\raw\\mod.rs:1750:0)", +"0x7ff64505c591: hashbrown::raw::RawTableInner::fallible_with_capacity (src\\raw\\mod.rs:1788:0)", +"0x7ff644faeb4b: hashbrown::raw::RawTableInner::reserve_rehash_inner (src\\raw\\mod.rs:2950:0)", +"0x7ff644faeb4b: hashbrown::raw::RawTable >,alloc::alloc::Global>::reserve_rehash >,alloc::alloc::Global,hashbrown::map::make (src\\raw\\mod.rs:1231:0)", +"0x7ff644fb4798: hashbrown::raw::RawTable >,alloc::alloc::Global>::reserve >,alloc::alloc::Global,hashbrown::map::make_hasher (src\\raw\\mod.rs:1179:0)", +"0x7ff644fb1739: hashbrown::raw::RawTable >,alloc::alloc::Global>::find_or_find_insert_slot >,alloc::alloc::Global,hashbrown: (src\\raw\\mod.rs:1413:0)", +"0x7ff644f4b2d7: horizon_server::server::start::async_fn$0 (src\\server\\mod.rs:201:0)", +"0x7ff644f32df1: axum::routing::method_routing::impl$4::layer::closure$0,enum2$,socketioxide::layer::SocketIoLayer,enum2$ > (src\\routing\\method_routing.rs:974:0)", +"0x7ff644f8ae5a: core::ops::function::FnOnce::call_once,enum2$,socketioxide::layer::SocketIoLayer,enum2$ >,tuple$ (src\\ops\\function.rs:250:0)", +"0x7ff64505ef2c: alloc::raw_vec::RawVecInner::try_allocate_in (alloc\\src\\raw_vec.rs:478:0)", +"0x7ff64505f09b: alloc::raw_vec::RawVecInner::with_capacity_in (alloc\\src\\raw_vec.rs:425:0)", +"0x7ff64505d173: alloc::raw_vec::RawVec::with_capacity_in (alloc\\src\\raw_vec.rs:202:0)", +"0x7ff64505d173: alloc::vec::Vec::with_capacity_in (src\\vec\\mod.rs:698:0)", +"0x7ff64505d173: alloc::slice::hack::impl$1::to_vec (alloc\\src\\slice.rs:161:0)", +"0x7ff644fe297c: alloc::str::impl$4::to_owned (alloc\\src\\str.rs:210:0)", +"0x7ff644fe297c: alloc::string::impl$44::from (alloc\\src\\string.rs:2758:0)", +"0x7ff644fe297c: alloc::string::impl$102::to_string (alloc\\src\\string.rs:2673:0)", +"0x7ff644f3587f: horizon_server::server::config::server_config::closure$0 (src\\server\\config.rs:18:0)", +"0x7ff6452647cd: alloc::alloc::impl$1::allocate (alloc\\src\\alloc.rs:241:0)", +"0x7ff6452624b6: alloc::raw_vec::finish_grow (alloc\\src\\raw_vec.rs:776:0)", +"0x7ff645262d9b: alloc::raw_vec::RawVecInner::grow_amortized (alloc\\src\\raw_vec.rs:658:0)", +"0x7ff64525dd4d: alloc::raw_vec::RawVecInner::grow_one (alloc\\src\\raw_vec.rs:567:0)", +"0x7ff64525dd4d: alloc::raw_vec::RawVec::grow_one (alloc\\src\\raw_vec.rs:349:0)", +"0x7ff645259248: alloc::vec::Vec::push (src\\vec\\mod.rs:2009:0)", +"0x7ff645258cf4: horizon_logger::HorizonLogger::log (horizon_logger-0.1.0\\src\\lib.rs:114:0)", +"0x7ff644f2c520: alloc::boxed::impl$0::new (alloc\\src\\boxed.rs:257:0)", +"0x7ff644f2c520: axum::boxed::BoxedIntoRoute,enum2$ >::map,enum2$,axum::routing::method_routing::impl$4::layer::closure_env$0,enum2$,socketioxide::layer::SocketIoLay (axum-0.7.9\\src\\boxed.rs:41:0)", +"0x7ff644f32f73: enum2$,enum2$ > >::map,enum2$,axum::routing::method_routing::impl$4::layer::closure_env$0,enum2$,socke (src\\routing\\method_routing.rs:1253:0)", +"0x7ff644f322ca: axum::routing::method_routing::MethodRouter,enum2$ >::layer,enum2$,socketioxide::layer::SocketIoLayer,enum2$ > (src\\routing\\method_routing.rs:977:0)", +"0x7ff644f33ca4: enum2$ > >::layer,socketioxide::layer::SocketIoLayer > (src\\routing\\mod.rs:729:0)", +"0x7ff644f2e452: axum::routing::path_router::impl$1::layer::closure$0,false,socketioxide::layer::SocketIoLayer > (src\\routing\\path_router.rs:264:0)", +"0x7ff644f2c932: alloc::boxed::impl$0::new (alloc\\src\\boxed.rs:257:0)", +"0x7ff644f2c932: axum::boxed::BoxedIntoRoute,enum2$ >::from_handler,horizon_server::server::start::async_fn$0::closure_env$4,tuple$ > > (axum-0.7.9\\src\\boxed.rs:24:0)", +"0x7ff644f2efad: axum::routing::method_routing::MethodRouter,enum2$ >::on,horizon_server::server::start::async_fn$0::closure_env$4,tuple$ > > (src\\routing\\method_routing.rs:637:0)", +"0x7ff644f33067: axum::routing::method_routing::on >,tuple$<> > (src\\routing\\method_routing.rs:470:0)", +"0x7ff644f330c6: axum::routing::method_routing::get >,tuple$<> > (src\\routing\\method_routing.rs:170:0)", +"0x7ff644f4b302: horizon_server::server::start::async_fn$0 (src\\server\\mod.rs:204:0)", +"0x7ff645155cb2: alloc::fmt::format::closure$0 (alloc\\src\\fmt.rs:642:0)", +"0x7ff6451418d4: enum2$ > >::map_or_else,alloc::string::String,alloc::fmt::format::closure_env$0,alloc::string::String (*)(ref$)> (core\\src\\option.rs:1211:0)", +"0x7ff644f76838: alloc::fmt::format (alloc\\src\\fmt.rs:642:0)", +"0x7ff644f4b836: horizon_server::server::start::async_fn$0 (src\\server\\mod.rs:211:0)", +"0x7ff644f4cd9d: horizon_server::main::async_block$0 (server\\src\\main.rs:63:0)", +"0x7ff6452b82b9: std::sys::pal::windows::to_u16s (pal\\windows\\mod.rs:194:0)", +"0x7ff6452b82b9: std::sys::path::windows::maybe_verbatim (sys\\path\\windows.rs:221:0)", +"0x7ff6452b82b9: std::sys::pal::windows::fs::File::open (pal\\windows\\fs.rs:296:0)", +"0x7ff6452af037: std::fs::OpenOptions::_open (std\\src\\fs.rs:1236:0)", +"0x7ff6452af037: std::fs::OpenOptions::open (std\\src\\fs.rs:1232:0)", +"0x7ff6452af037: std::fs::File::open (std\\src\\fs.rs:375:0)", +"0x7ff6452af037: std::fs::read_to_string::inner (std\\src\\fs.rs:304:0)", +"0x7ff64505bc22: std::fs::read_to_string > (std\\src\\fs.rs:311:0)", +"0x7ff644f49481: horizon_server::server::config::server_config (src\\server\\config.rs:19:0)", +"0x7ff64520c98d: alloc::alloc::impl$1::allocate (alloc\\src\\alloc.rs:241:0)", +"0x7ff6452276b9: hashbrown::raw::alloc::inner::do_alloc (src\\raw\\alloc.rs:15:0)", +"0x7ff6452276b9: hashbrown::raw::RawTableInner::new_uninitialized (src\\raw\\mod.rs:1750:0)", +"0x7ff645227a81: hashbrown::raw::RawTableInner::fallible_with_capacity (src\\raw\\mod.rs:1788:0)", +"0x7ff645121dab: hashbrown::raw::RawTableInner::reserve_rehash_inner (src\\raw\\mod.rs:2950:0)", +"0x7ff645121dab: hashbrown::raw::RawTable > > >,alloc::alloc::Global>::reserve_rehash > > >,alloc::alloc::Global,hashbrown::map::make (src\\raw\\mod.rs:1231:0)", +"0x7ff645123ba8: hashbrown::raw::RawTable > > >,alloc::alloc::Global>::reserve > > >,alloc::alloc::Global,hashbrown::map::make_hasher (src\\raw\\mod.rs:1179:0)", +"0x7ff645123289: hashbrown::raw::RawTable > > >,alloc::alloc::Global>::find_or_find_insert_slot > > >,alloc::alloc::Global,hashbrown: (src\\raw\\mod.rs:1413:0)", +"0x7ff644f35a64: horizon_server::splash::splash (server\\src\\splash.rs:3:0)", +"0x7ff64526324c: alloc::raw_vec::RawVecInner::try_allocate_in (alloc\\src\\raw_vec.rs:478:0)", +"0x7ff6452633bb: alloc::raw_vec::RawVecInner::with_capacity_in (alloc\\src\\raw_vec.rs:425:0)", +"0x7ff645263933: alloc::raw_vec::RawVec::with_capacity_in (alloc\\src\\raw_vec.rs:202:0)", +"0x7ff645263933: alloc::vec::Vec::with_capacity_in (src\\vec\\mod.rs:698:0)", +"0x7ff645263933: alloc::slice::hack::impl$1::to_vec (alloc\\src\\slice.rs:161:0)", +"0x7ff645259b5c: alloc::str::impl$4::to_owned (alloc\\src\\str.rs:210:0)", +"0x7ff645259b5c: alloc::string::impl$44::from (alloc\\src\\string.rs:2758:0)", +"0x7ff645259b5c: alloc::string::impl$102::to_string (alloc\\src\\string.rs:2673:0)", +"0x7ff645258bb5: horizon_logger::HorizonLogger::log (horizon_logger-0.1.0\\src\\lib.rs:110:0)", +"0x7ff64512e89c: alloc::alloc::impl$1::allocate (alloc\\src\\alloc.rs:241:0)", +"0x7ff64512e89c: alloc::sync::impl$24::allocate_for_slice::closure$0 (alloc\\src\\sync.rs:1966:0)", +"0x7ff64512e0f7: alloc::sync::Arc,alloc::alloc::Global>::allocate_for_layout,alloc::sync::impl$24::allocate_for_slice::closure_env$0,alloc::sync::impl$24::allocate_for_slice::closure_env$1 > (alloc\\src\\sync.rs:1879:0)", +"0x7ff64512e814: alloc::sync::Arc,alloc::alloc::Global>::allocate_for_slice (alloc\\src\\sync.rs:1964:0)", +"0x7ff64512e6fd: alloc::sync::Arc,alloc::alloc::Global>::copy_from_slice (alloc\\src\\sync.rs:1978:0)", +"0x7ff64512f56f: alloc::sync::impl$64::from (alloc\\src\\sync.rs:3574:0)", +"0x7ff64512f56f: alloc::sync::impl$65::from (alloc\\src\\sync.rs:3594:0)", +"0x7ff64512dc19: core::convert::impl$3::into > (src\\convert\\mod.rs:759:0)", +"0x7ff644f552e5: alloc::boxed::impl$0::new (alloc\\src\\boxed.rs:257:0)", +"0x7ff644f552e5: alloc::sync::Arc::new (alloc\\src\\sync.rs:387:0)", +"0x7ff644f552e5: alloc::sync::impl$61::from (alloc\\src\\sync.rs:3516:0)", +"0x7ff644f47e99: core::convert::impl$3::into > (src\\convert\\mod.rs:759:0)", +"0x7ff644f49c03: horizon_server::server::HorizonServer::spawn_thread (src\\server\\mod.rs:72:0)", +"0x7ff644f4c765: horizon_server::server::start::async_fn$0::closure$3::async_block$0 (src\\server\\mod.rs:192:0)", +"0x7ff644fd354d: futures_util::stream::futures_ordered::impl$4::poll > (src\\stream\\futures_ordered.rs:56:0)", +"0x7ff6452c4a1d: alloc::alloc::impl$1::allocate (alloc\\src\\alloc.rs:241:0)", +"0x7ff6452c4a1d: alloc::raw_vec::RawVecInner::try_allocate_in (alloc\\src\\raw_vec.rs:478:0)", +"0x7ff6452c4a1d: alloc::raw_vec::RawVecInner::with_capacity_in (alloc\\src\\raw_vec.rs:425:0)", +"0x7ff6452c4a1d: alloc::raw_vec::RawVec::with_capacity_in (alloc\\src\\raw_vec.rs:202:0)", +"0x7ff6452c4a1d: alloc::vec::Vec::with_capacity_in (src\\vec\\mod.rs:698:0)", +"0x7ff6452c4a1d: alloc::slice::hack::impl$1::to_vec (alloc\\src\\slice.rs:161:0)", +"0x7ff6452c4a1d: alloc::slice::hack::to_vec (alloc\\src\\slice.rs:110:0)", +"0x7ff6452c4a1d: alloc::slice::impl$0::to_vec_in (alloc\\src\\slice.rs:477:0)", +"0x7ff6452c4a1d: alloc::vec::impl$11::clone (src\\vec\\mod.rs:2851:0)", +"0x7ff6452c4a1d: alloc::string::impl$6::clone (alloc\\src\\string.rs:2096:0)", +"0x7ff644fe53d6: alloc::borrow::impl$1::to_owned (alloc\\src\\borrow.rs:88:0)", +"0x7ff644fe53d6: alloc::string::impl$39::to_string (alloc\\src\\string.rs:2712:0)", +"0x7ff644f4b3a9: horizon_server::server::start::async_fn$0 (src\\server\\mod.rs:207:0)", +"0x7ff644f71676: tokio::runtime::context::blocking::BlockingRegionGuard::block_on > (runtime\\context\\blocking.rs:66:0)", +"0x7ff644fd6739: tokio::runtime::scheduler::multi_thread::impl$0::block_on::closure$0 > (scheduler\\multi_thread\\mod.rs:87:0)", +"0x7ff645259f3c: alloc::str::impl$4::to_owned (alloc\\src\\str.rs:210:0)", +"0x7ff645259f3c: alloc::string::impl$44::from (alloc\\src\\string.rs:2758:0)", +"0x7ff645259fdf: colored::impl$6::color > (colored-2.1.0\\src\\lib.rs:560:0)", +"0x7ff644fac5cb: hashbrown::raw::RawTableInner::reserve_rehash_inner (src\\raw\\mod.rs:2950:0)", +"0x7ff644fac5cb: hashbrown::raw::RawTable,axum::routing::RouteId>,alloc::alloc::Global>::reserve_rehash,axum::routing::RouteId>,alloc::alloc::Global,hashbrown::map::make_h (src\\raw\\mod.rs:1231:0)", +"0x7ff644fb46d8: hashbrown::raw::RawTable,axum::routing::RouteId>,alloc::alloc::Global>::reserve,axum::routing::RouteId>,alloc::alloc::Global,hashbrown::map::make_hasher:: (src\\raw\\mod.rs:1179:0)", +"0x7ff644fb14f9: hashbrown::raw::RawTable,axum::routing::RouteId>,alloc::alloc::Global>::find_or_find_insert_slot,axum::routing::RouteId>,alloc::alloc::Global,hashbrown::m (src\\raw\\mod.rs:1413:0)", +"0x7ff644fe68d6: alloc::string::impl$46::from (alloc\\src\\string.rs:2782:0)", +"0x7ff644f51956: core::convert::impl$3::into,alloc::string::String> (src\\convert\\mod.rs:759:0)", +"0x7ff644f3fcec: matchit::tree::Node::insert > (matchit-0.7.3\\src\\tree.rs:41:0)", +"0x7ff644f64e40: matchit::router::Router::insert > (matchit-0.7.3\\src\\router.rs:41:0)", +"0x7ff644f2ed69: axum::routing::path_router::Node::insert > (src\\routing\\path_router.rs:457:0)", +"0x7ff644f2ea68: axum::routing::path_router::PathRouter,false>::set_node,false> (src\\routing\\path_router.rs:131:0)", +"0x7ff644f2e7a9: axum::routing::path_router::PathRouter,false>::route,false> (src\\routing\\path_router.rs:79:0)", +"0x7ff644f339d3: axum::routing::impl$3::layer::closure$0,socketioxide::layer::SocketIoLayer > (src\\routing\\mod.rs:293:0)", +"0x7ff644f34248: enum2$,enum2$ > >::map,enum2$,axum::routing::impl$3::layer::closure_env$0,socketioxide::layer::SocketIoLayer >,enu (src\\routing\\mod.rs:662:0)", +"0x7ff6452ab69d: alloc::alloc::impl$1::grow (alloc\\src\\alloc.rs:266:0)", +"0x7ff6452ab69d: alloc::raw_vec::finish_grow (alloc\\src\\raw_vec.rs:773:0)", +"0x7ff6452ab8ea: alloc::raw_vec::RawVecInner::grow_amortized (alloc\\src\\raw_vec.rs:658:0)", +"0x7ff6452ab8ea: alloc::raw_vec::RawVecInner::grow_one (alloc\\src\\raw_vec.rs:567:0)", +"0x7ff6452ab8ea: alloc::raw_vec::RawVec::grow_one,void (*)(ptr_mut$)>,alloc::alloc::Global> (alloc\\src\\raw_vec.rs:349:0)", +"0x7ff6452bc230: alloc::vec::Vec::push (src\\vec\\mod.rs:2009:0)", +"0x7ff6452bc230: std::sys::thread_local::destructors::list::register (thread_local\\destructors\\list.rs:17:0)", +"0x7ff6452ac594: std::sys::thread_local::native::eager::Storage::initialize (thread_local\\native\\eager.rs:47:0)", +"0x7ff6452ac594: std::sys::thread_local::native::eager::Storage::get (thread_local\\native\\eager.rs:36:0)", +"0x7ff6452ac594: std::thread::CURRENT::constant$0::closure$0 (thread_local\\native\\mod.rs:63:0)", +"0x7ff6452ac594: core::ops::function::FnOnce::call_once (src\\ops\\function.rs:250:0)", +"0x7ff6452ac594: std::thread::local::LocalKey::try_with (src\\thread\\local.rs:282:0)", +"0x7ff6452ac594: std::thread::local::LocalKey::with (src\\thread\\local.rs:260:0)", +"0x7ff6452ac594: std::thread::set_current (src\\thread\\mod.rs:696:0)", +"0x7ff645223782: std::thread::impl$0::spawn_unchecked_::closure$1 > (src\\thread\\mod.rs:520:0)", +"0x7ff644f524ad: alloc::boxed::impl$0::new (alloc\\src\\boxed.rs:257:0)", +"0x7ff644f524ad: alloc::sync::Arc,alloc::alloc::Global>::new > (alloc\\src\\sync.rs:387:0)", +"0x7ff644f18c84: socketioxide::layer::SocketIoLayer::from_config (socketioxide-0.15.1\\src\\layer.rs:48:0)", +"0x7ff644f018e3: socketioxide::io::SocketIoBuilder::build_layer (socketioxide-0.15.1\\src\\io.rs:230:0)", +"0x7ff644f4af83: socketioxide::io::SocketIo::new_layer (socketioxide-0.15.1\\src\\io.rs:311:0)", +"0x7ff644f4af83: horizon_server::server::start::async_fn$0 (src\\server\\mod.rs:164:0)", +"0x7ff645260a9b: alloc::slice::hack::to_vec (alloc\\src\\slice.rs:110:0)", +"0x7ff645260a9b: alloc::slice::impl$0::to_vec_in (alloc\\src\\slice.rs:477:0)", +"0x7ff645260a9b: alloc::slice::impl$0::to_vec (alloc\\src\\slice.rs:452:0)", +"0x7ff645260a9b: alloc::slice::impl$9::to_owned (alloc\\src\\slice.rs:859:0)", +"0x7ff644f3daa7: matchit::tree::Node::insert_child (matchit-0.7.3\\src\\tree.rs:221:0)", +"0x7ff644f4ccc9: horizon_server::main::async_block$0 (server\\src\\main.rs:58:0)", +"0x7ff6452c404d: alloc::alloc::impl$1::grow (alloc\\src\\alloc.rs:266:0)", +"0x7ff6452c404d: alloc::raw_vec::finish_grow (alloc\\src\\raw_vec.rs:773:0)", +"0x7ff6452c3fcc: alloc::raw_vec::RawVecInner::grow_amortized (alloc\\src\\raw_vec.rs:658:0)", +"0x7ff6452c3fcc: alloc::raw_vec::RawVecInner::grow_one (alloc\\src\\raw_vec.rs:567:0)", +"0x7ff6452c3fcc: alloc::raw_vec::RawVec::grow_one (alloc\\src\\raw_vec.rs:349:0)", +"0x7ff6452c487b: alloc::vec::Vec::push (src\\vec\\mod.rs:2009:0)", +"0x7ff6452c487b: alloc::string::String::push (alloc\\src\\string.rs:1357:0)", +"0x7ff6452c4aef: alloc::string::impl$57::write_char (alloc\\src\\string.rs:2970:0)", +"0x7ff6452cbd10: core::fmt::Formatter::pad (src\\fmt\\mod.rs:1466:0)", +"0x7ff645260460: core::fmt::impl$55::fmt (src\\fmt\\mod.rs:2382:0)", +"0x7ff6452cb2ec: core::fmt::rt::Argument::fmt (src\\fmt\\rt.rs:177:0)", +"0x7ff6452cb2ec: core::fmt::run (src\\fmt\\mod.rs:1228:0)", +"0x7ff6452cb2ec: core::fmt::write (src\\fmt\\mod.rs:1195:0)", +"0x7ff6452c4585: core::fmt::Write::write_fmt::impl$1::spec_write_fmt (src\\fmt\\mod.rs:226:0)", +"0x7ff6452c4585: core::fmt::Write::write_fmt (src\\fmt\\mod.rs:231:0)", +"0x7ff6452c4585: alloc::fmt::format::format_inner (alloc\\src\\fmt.rs:637:0)", +"0x7ff645136236: alloc::alloc::exchange_malloc (alloc\\src\\alloc.rs:330:0)", +"0x7ff64512e27d: alloc::boxed::impl$0::new (alloc\\src\\boxed.rs:257:0)", +"0x7ff64512e27d: alloc::sync::Arc >,alloc::alloc::Global>::new > > (alloc\\src\\sync.rs:387:0)", +"0x7ff644f33ae6: axum::routing::Router >::route > (src\\routing\\mod.rs:125:0)", +"0x7ff644f4b339: horizon_server::server::start::async_fn$0 (src\\server\\mod.rs:203:0)", +"0x7ff6450517a6: hashbrown::raw::RawTable,horizon_plugin_api::LoadedPlugin>,alloc::alloc::Global>::new_uninitialized,horizon_plugin_api::LoadedPlugin>,alloc::alloc::Global> (src\\raw\\mod.rs:870:0)", +"0x7ff64504f81d: hashbrown::raw::impl$13::clone,horizon_plugin_api::LoadedPlugin>,alloc::alloc::Global> (src\\raw\\mod.rs:3447:0)", +"0x7ff6450521f3: hashbrown::map::impl$0::clone,horizon_plugin_api::LoadedPlugin,std::hash::random::RandomState,alloc::alloc::Global> (hashbrown-0.14.5\\src\\map.rs:199:0)", +"0x7ff64504f42d: std::collections::hash::map::impl$4::clone,horizon_plugin_api::LoadedPlugin,std::hash::random::RandomState> (collections\\hash\\map.rs:1268:0)", +"0x7ff6452c4830: alloc::raw_vec::RawVecInner::try_reserve_exact (alloc\\src\\raw_vec.rs:602:0)", +"0x7ff6452c4830: alloc::raw_vec::RawVec::try_reserve_exact (alloc\\src\\raw_vec.rs:385:0)", +"0x7ff6452c4830: alloc::vec::Vec::try_reserve_exact (src\\vec\\mod.rs:1083:0)", +"0x7ff6452c4830: alloc::string::String::try_reserve_exact (alloc\\src\\string.rs:1289:0)", +"0x7ff6452af0fa: std::fs::read_to_string::inner (std\\src\\fs.rs:307:0)", +"0x7ff644f5281e: alloc::boxed::impl$0::new (alloc\\src\\boxed.rs:257:0)", +"0x7ff644f5281e: alloc::sync::Arc > >,alloc::alloc::Global>::new > >::push >::push_back > (src\\stream\\futures_ordered.rs:157:0)", +"0x7ff644fd3e89: futures_util::stream::futures_ordered::impl$10::from_iter::closure$0,alloc::vec::into_iter::IntoIter,alloc::alloc::Global,futures_util::stream::futures_ordered::FuturesOrdered,true>::set_node,true> (src\\routing\\path_router.rs:131:0)", +"0x7ff644f2cd4b: axum::routing::path_router::PathRouter,true>::route_endpoint,true> (src\\routing\\path_router.rs:122:0)", +"0x7ff64505673c: alloc::str::impl$4::to_owned (alloc\\src\\str.rs:210:0)", +"0x7ff64505673c: alloc::string::impl$44::from (alloc\\src\\string.rs:2758:0)", +"0x7ff64505673c: alloc::string::impl$102::to_string (alloc\\src\\string.rs:2673:0)", +"0x7ff645054e43: test_plugin::impl$1::thing (test_plugin\\src\\lib.rs:32:0)", +"0x7ff644f3e340: matchit::tree::Node::insert_child (matchit-0.7.3\\src\\tree.rs:289:0)", +"0x7ff64526262a: alloc::raw_vec::RawVecInner::grow_one (alloc\\src\\raw_vec.rs:567:0)", +"0x7ff64526262a: alloc::raw_vec::RawVec::grow_one (alloc\\src\\raw_vec.rs:349:0)", +"0x7ff645260cca: alloc::vec::Vec::push (src\\vec\\mod.rs:2009:0)", +"0x7ff645259c62: alloc::string::String::push (alloc\\src\\string.rs:1357:0)", +"0x7ff644f4b88f: horizon_server::server::start::async_fn$0 (src\\server\\mod.rs:211:0)", +"0x7ff645258b9f: horizon_logger::HorizonLogger::log (horizon_logger-0.1.0\\src\\lib.rs:109:0)", +"0x7ff644ff9239: dhat::impl$7::alloc (dhat-0.3.3\\src\\lib.rs:1176:0)", +"0x7ff644f0e42c: horizon_server::_::__rust_alloc (server\\src\\main.rs:26:0)", +"0x7ff6452b2620: std::net::socket_addr::impl$12::to_socket_addrs (src\\net\\socket_addr.rs:280:0)", +"0x7ff64524f030: std::net::socket_addr::impl$14::to_socket_addrs (src\\net\\socket_addr.rs:300:0)", +"0x7ff645256b80: std::net::each_addr,enum2$ > (*)(enum2$ >,std::io::error::Error> >),std::sys_common::net::UdpSocket> (src\\net\\mod.rs:75:0)", +"0x7ff64524f883: std::net::udp::UdpSocket::bind > (src\\net\\udp.rs:113:0)", +"0x7ff64524bcb5: mio::sys::windows::net::init::closure$0 (sys\\windows\\net.rs:19:0)", +"0x7ff64524f30a: std::sync::once::impl$2::call_once::closure$0 (src\\sync\\once.rs:158:0)", +"0x7ff64524f24f: std::sync::once::Once::call_once (src\\sync\\once.rs:158:0)", +"0x7ff64505f19f: alloc::raw_vec::impl$5::reserve::do_reserve_and_handle (alloc\\src\\raw_vec.rs:554:0)", +"0x7ff64505d802: alloc::raw_vec::RawVecInner::reserve (alloc\\src\\raw_vec.rs:560:0)", +"0x7ff64505d802: alloc::raw_vec::RawVec::reserve (alloc\\src\\raw_vec.rs:341:0)", +"0x7ff64505d802: alloc::vec::Vec::reserve (src\\vec\\mod.rs:973:0)", +"0x7ff64505d627: alloc::vec::Vec::append_elements (src\\vec\\mod.rs:2155:0)", +"0x7ff644f1dfc4: alloc::boxed::impl$0::new (alloc\\src\\boxed.rs:257:0)", +"0x7ff644f1dfc4: tokio::runtime::task::core::Cell,alloc::sync::Arc >::new,alloc::sync::Arc > (runtime\\task\\raw.rs:165:0)", +"0x7ff644f09b1e: tokio::runtime::task::new_task,alloc::sync::Arc > (runtime\\task\\mod.rs:305:0)", +"0x7ff644f5af59: tokio::runtime::task::list::OwnedTasks >::bind,enum2$ > (scheduler\\multi_thread\\handle.rs:56:0)", +"0x7ff644f3358f: axum::routing::Router >::new > (src\\routing\\mod.rs:141:0)", +"0x7ff6450b5c1c: alloc::str::impl$4::to_owned (alloc\\src\\str.rs:210:0)", +"0x7ff6450a9e0f: alloc::borrow::impl$2::clone (alloc\\src\\borrow.rs:199:0)", +"0x7ff6452634bf: alloc::raw_vec::impl$5::reserve::do_reserve_and_handle (alloc\\src\\raw_vec.rs:554:0)", +"0x7ff645260e02: alloc::raw_vec::RawVecInner::reserve (alloc\\src\\raw_vec.rs:560:0)", +"0x7ff645260e02: alloc::raw_vec::RawVec::reserve (alloc\\src\\raw_vec.rs:341:0)", +"0x7ff645260e02: alloc::vec::Vec::reserve (src\\vec\\mod.rs:973:0)", +"0x7ff645260be7: alloc::vec::Vec::append_elements (src\\vec\\mod.rs:2155:0)", +"0x7ff644f4d29d: alloc::raw_vec::RawVec,alloc::alloc::Global>::with_capacity_in (alloc\\src\\raw_vec.rs:202:0)", +"0x7ff644f4d29d: alloc::vec::Vec,alloc::alloc::Global>::with_capacity_in (src\\vec\\mod.rs:698:0)", +"0x7ff644f4d29d: alloc::vec::Vec,alloc::alloc::Global>::with_capacity (src\\vec\\mod.rs:480:0)", +"0x7ff644f4d29d: alloc::vec::spec_from_iter_nested::impl$1::from_iter,core::iter::adapters::map::Map,horizon_server::server::start::async_fn$0::closure_env$3> > (src\\vec\\spec_from_iter_nested.rs:52:0)", +"0x7ff644f50f01: alloc::vec::spec_from_iter::impl$0::from_iter,core::iter::adapters::map::Map,horizon_server::server::start::async_fn$0::closure_env$3> > (src\\vec\\spec_from_iter.rs:33:0)", +"0x7ff644f50dd7: alloc::vec::impl$15::from_iter,core::iter::adapters::map::Map,horizon_server::server::start::async_fn$0::closure_env$3> > (src\\vec\\mod.rs:2985:0)", +"0x7ff644f4b626: horizon_server::server::start::async_fn$0 (src\\server\\mod.rs:208:0)", +"0x7ff644f353d8: axum::routing::path_router::impl$2::default,false> (src\\routing\\path_router.rs:416:0)", +"0x7ff644f334d4: axum::routing::Router >::new > (src\\routing\\mod.rs:142:0)", +"0x7ff64508640c: alloc::str::impl$4::to_owned (alloc\\src\\str.rs:210:0)", +"0x7ff64508640c: alloc::string::impl$44::from (alloc\\src\\string.rs:2758:0)", +"0x7ff64508640c: alloc::string::impl$102::to_string (alloc\\src\\string.rs:2673:0)", +"0x7ff645084c10: socketioxide::io::SocketIoBuilder::new (socketioxide-0.15.1\\src\\io.rs:96:0)", +"0x7ff6452accca: std::env::var_os (std\\src\\env.rs:258:0)", +"0x7ff6452accca: std::env::_var (std\\src\\env.rs:225:0)", +"0x7ff6452accca: std::env::var (std\\src\\env.rs:221:0)", +"0x7ff6452accca: std::backtrace::Backtrace::enabled (std\\src\\backtrace.rs:263:0)", +"0x7ff6452accca: std::backtrace::Backtrace::capture (std\\src\\backtrace.rs:293:0)", +"0x7ff644f47ed9: anyhow::context::ext::impl$0::ext_context (anyhow-1.0.93\\src\\backtrace.rs:27:0)", +"0x7ff644fa7891: anyhow::context::impl$0::context (anyhow-1.0.93\\src\\context.rs:54:0)", +"0x7ff644f4bbbb: horizon_server::server::start::async_fn$0 (src\\server\\mod.rs:215:0)", +"0x7ff6450507b5: hashbrown::raw::RawTableInner::reserve_rehash_inner (src\\raw\\mod.rs:2950:0)", +"0x7ff6450507b5: hashbrown::raw::RawTable,horizon_plugin_api::LoadedPlugin>,alloc::alloc::Global>::reserve_rehash,horizon_plugin_api::LoadedPlugin>,alloc::alloc::Global,hashbrown::map::make_hasher::closure_env$0,horizon_plugin (src\\raw\\mod.rs:1231:0)", +"0x7ff645052108: hashbrown::raw::RawTable,horizon_plugin_api::LoadedPlugin>,alloc::alloc::Global>::reserve,horizon_plugin_api::LoadedPlugin>,alloc::alloc::Global,hashbrown::map::make_hasher::closure_env$0,horizon_plugin_api::L (src\\raw\\mod.rs:1179:0)", +"0x7ff645051959: hashbrown::raw::RawTable,horizon_plugin_api::LoadedPlugin>,alloc::alloc::Global>::find_or_find_insert_slot,horizon_plugin_api::LoadedPlugin>,alloc::alloc::Global,hashbrown::map::equivalent_key::closure_env$0,r (src\\raw\\mod.rs:1413:0)", +"0x7ff644f4b962: horizon_server::server::start::async_fn$0 (src\\server\\mod.rs:213:0)", +"0x7ff644f52b54: alloc::boxed::impl$0::new (alloc\\src\\boxed.rs:257:0)", +"0x7ff644f52b54: alloc::sync::Arc >,alloc::alloc::Global>::new > > (alloc\\src\\sync.rs:387:0)", +"0x7ff644f82fe3: engineioxide::service::EngineIoService,axum::routing::route::Route > >::with_config_inner >,so (src\\service\\mod.rs:85:0)", +"0x7ff644f83386: socketioxide::service::SocketIoService >,socketioxide::adapter::LocalAdapter>::with_client > > (socketioxide-0.15.1\\src\\service.rs:139:0)", +"0x7ff644f1a941: socketioxide::layer::impl$2::layer >,socketioxide::adapter::LocalAdapter> (socketioxide-0.15.1\\src\\layer.rs:64:0)", +"0x7ff644f1a389: tower_layer::impl$0::layer,axum::routing::route::Route > > (tower-layer-0.3.3\\src\\lib.rs:110:0)", +"0x7ff644f4bb7c: horizon_server::server::start::async_fn$0 (src\\server\\mod.rs:217:0)", +"0x7ff644f52926: alloc::boxed::impl$0::new (alloc\\src\\boxed.rs:257:0)", +"0x7ff644f52926: alloc::sync::Arc::new (alloc\\src\\sync.rs:387:0)", +"0x7ff644f359d1: horizon_server::server::config::server_config::closure$2 (src\\server\\config.rs:26:0)", +"0x7ff644f70811: std::sync::once_lock::impl$0::get_or_init::closure$0,horizon_server::server::config::server_config::closure_env$2> (src\\sync\\once_lock.rs:304:0)", +"0x7ff644f70579: std::sync::once_lock::impl$0::initialize::closure$0,std::sync::once_lock::impl$0::get_or_init::closure_env$0,std::sync::once_lock::impl$0::get_or_init::closure_env$0::grow_one (alloc\\src\\raw_vec.rs:567:0)", +"0x7ff644f80ced: alloc::raw_vec::RawVec,alloc::alloc::Global>::grow_one,alloc::alloc::Global> (alloc\\src\\raw_vec.rs:349:0)", +"0x7ff644f4eed8: alloc::vec::Vec,alloc::alloc::Global>::push,alloc::alloc::Global> (src\\vec\\mod.rs:2009:0)", +"0x7ff644f49c16: horizon_server::server::HorizonServer::spawn_thread (src\\server\\mod.rs:72:0)", +"0x7ff645139e72: serde::de::impls::impl$6::visit_str (src\\de\\impls.rs:607:0)", +"0x7ff644f012cf: hashbrown::map::HashMap > >,std::hash::random::RandomState,alloc::alloc::Global>::reserve (hashbrown-0.14.5\\src\\map.rs:1106:0)", +"0x7ff644f012cf: hashbrown::map::impl$94::extend > >,std::hash::random::RandomState,alloc::alloc::Global,core::iter::adapters::map::Map > >::new > (anyhow-1.0.93\\src\\error.rs:247:0)", +"0x7ff644fa1c85: anyhow::Error::from_context (anyhow-1.0.93\\src\\error.rs:200:0)", +"0x7ff644f47f1f: anyhow::context::ext::impl$0::ext_context (anyhow-1.0.93\\src\\context.rs:28:0)", +"0x7ff644f2b3a3: alloc::boxed::impl$0::new (alloc\\src\\boxed.rs:257:0)", +"0x7ff644f2b3a3: axum::boxed::impl$4::clone_box > (axum-0.7.9\\src\\boxed.rs:82:0)", +"0x7ff645127859: axum::boxed::impl$2::clone,enum2$ > (axum-0.7.9\\src\\boxed.rs:52:0)", +"0x7ff64512d74f: axum::routing::method_routing::impl$8::clone,enum2$ > (src\\routing\\method_routing.rs:1273:0)", +"0x7ff644f2f10c: axum::routing::method_routing::impl$4::on_endpoint::set_endpoint,enum2$ > (src\\routing\\method_routing.rs:841:0)", +"0x7ff644f2f2be: axum::routing::method_routing::MethodRouter,enum2$ >::on_endpoint,enum2$ > (src\\routing\\method_routing.rs:848:0)", +"0x7ff645280c22: colored::control::ShouldColorize::from_env (colored-2.1.0\\src\\control.rs:107:0)", +"0x7ff644f523a6: alloc::boxed::impl$0::new (alloc\\src\\boxed.rs:257:0)", +"0x7ff644f523a6: alloc::sync::Arc,alloc::alloc::Global>::new > (alloc\\src\\sync.rs:387:0)", +"0x7ff644f499e4: horizon_server::server::Server::new (src\\server\\mod.rs:52:0)", +"0x7ff645280c38: colored::control::ShouldColorize::from_env (colored-2.1.0\\src\\control.rs:108:0)", +"0x7ff644f33828: axum::routing::Router >::layer,socketioxide::layer::SocketIoLayer > (src\\routing\\mod.rs:112:0)", +"0x7ff644f4b373: horizon_server::server::start::async_fn$0 (src\\server\\mod.rs:203:0)", +"0x7ff644f4b9bb: horizon_server::server::start::async_fn$0 (src\\server\\mod.rs:213:0)", +"0x7ff644f4c5c2: horizon_server::server::start::async_fn$0::closure$1 (src\\server\\mod.rs:174:0)", +"0x7ff644f61345: enum2$ > > >::map >,alloc::string::String,horizon_server: (core\\src\\option.rs:1105:0)", +"0x7ff644f4b13d: horizon_server::server::start::async_fn$0 (src\\server\\mod.rs:172:0)", +"0x7ff645438247: alloc::raw_vec::RawVecInner::grow_amortized (alloc\\src\\raw_vec.rs:658:0)", +"0x7ff645438247: alloc::raw_vec::impl$5::reserve::do_reserve_and_handle (alloc\\src\\raw_vec.rs:554:0)", +"0x7ff6452c4ac8: alloc::raw_vec::RawVecInner::reserve (alloc\\src\\raw_vec.rs:560:0)", +"0x7ff6452c4ac8: alloc::raw_vec::RawVec::reserve (alloc\\src\\raw_vec.rs:341:0)", +"0x7ff6452c4ac8: alloc::vec::Vec::reserve (src\\vec\\mod.rs:973:0)", +"0x7ff6452c4ac8: alloc::vec::Vec::append_elements (src\\vec\\mod.rs:2155:0)", +"0x7ff6452c4ac8: alloc::vec::spec_extend::impl$4::spec_extend (src\\vec\\spec_extend.rs:55:0)", +"0x7ff6452c4ac8: alloc::vec::Vec::extend_from_slice (src\\vec\\mod.rs:2606:0)", +"0x7ff6452c4ac8: alloc::string::String::push_str (alloc\\src\\string.rs:1064:0)", +"0x7ff6452c4ac8: alloc::string::impl$57::write_str (alloc\\src\\string.rs:2964:0)", +"0x7ff644fe5302: alloc::string::impl$21::fmt (alloc\\src\\string.rs:2376:0)", +"0x7ff6452cb359: core::fmt::rt::Argument::fmt (src\\fmt\\rt.rs:177:0)", +"0x7ff6452cb359: core::fmt::write (src\\fmt\\mod.rs:1178:0)", +"0x7ff644f2c55f: alloc::boxed::impl$0::new (alloc\\src\\boxed.rs:257:0)", +"0x7ff644f2c55f: axum::boxed::BoxedIntoRoute,enum2$ >::map,enum2$,axum::routing::method_routing::impl$4::layer::closure_env$0,enum2$,socketioxide::layer::SocketIoLay (axum-0.7.9\\src\\boxed.rs:39:0)", +"0x7ff644f4b5cd: horizon_server::server::start::async_fn$0 (src\\server\\mod.rs:208:0)", +"0x7ff64529cf4d: alloc::alloc::impl$1::allocate (alloc\\src\\alloc.rs:241:0)", +"0x7ff645297bb6: alloc::raw_vec::finish_grow (alloc\\src\\raw_vec.rs:776:0)", +"0x7ff64529849b: alloc::raw_vec::RawVecInner::grow_amortized (alloc\\src\\raw_vec.rs:658:0)", +"0x7ff645297d2a: alloc::raw_vec::RawVecInner::grow_one (alloc\\src\\raw_vec.rs:567:0)", +"0x7ff645297d2a: alloc::raw_vec::RawVec::grow_one (alloc\\src\\raw_vec.rs:349:0)", +"0x7ff64529789a: alloc::vec::Vec::push (src\\vec\\mod.rs:2009:0)", +"0x7ff645297182: alloc::string::String::push (alloc\\src\\string.rs:1357:0)", +"0x7ff644fa1df8: alloc::boxed::impl$0::new (alloc\\src\\boxed.rs:257:0)", +"0x7ff644fa1df8: anyhow::Error::construct,anyhow::Error> > (anyhow-1.0.93\\src\\error.rs:247:0)", +"0x7ff644fa1d93: anyhow::Error::context > (anyhow-1.0.93\\src\\error.rs:348:0)", +"0x7ff644fa1af8: anyhow::context::ext::impl$1::ext_context > (anyhow-1.0.93\\src\\context.rs:37:0)", +"0x7ff644fa79ca: anyhow::context::impl$0::context,anyhow::Error,ref$ > (anyhow-1.0.93\\src\\context.rs:54:0)", +"0x7ff644f4ce22: horizon_server::main::async_block$0 (server\\src\\main.rs:63:0)", +"0x7ff6452accfa: std::env::var_os (std\\src\\env.rs:258:0)", +"0x7ff6452accfa: std::env::_var (std\\src\\env.rs:225:0)", +"0x7ff6452accfa: std::env::var (std\\src\\env.rs:221:0)", +"0x7ff6452accfa: std::backtrace::Backtrace::enabled (std\\src\\backtrace.rs:265:0)", +"0x7ff6452accfa: std::backtrace::Backtrace::capture (std\\src\\backtrace.rs:293:0)", +"0x7ff64523106d: alloc::alloc::impl$1::allocate (alloc\\src\\alloc.rs:241:0)", +"0x7ff64522fb0c: alloc::raw_vec::RawVecInner::try_allocate_in (alloc\\src\\raw_vec.rs:478:0)", +"0x7ff64522fc7b: alloc::raw_vec::RawVecInner::with_capacity_in (alloc\\src\\raw_vec.rs:425:0)", +"0x7ff64522efc3: alloc::raw_vec::RawVec::with_capacity_in (alloc\\src\\raw_vec.rs:202:0)", +"0x7ff64522efc3: alloc::vec::Vec::with_capacity_in (src\\vec\\mod.rs:698:0)", +"0x7ff64522efc3: alloc::slice::hack::impl$1::to_vec (alloc\\src\\slice.rs:161:0)", +"0x7ff64521210c: alloc::str::impl$4::to_owned (alloc\\src\\str.rs:210:0)", +"0x7ff64521210c: alloc::string::impl$44::from (alloc\\src\\string.rs:2758:0)", +"0x7ff6451f6bab: core::convert::impl$3::into,alloc::string::String> (src\\convert\\mod.rs:759:0)", +"0x7ff644f011af: hashbrown::map::HashMap > >,std::hash::random::RandomState,alloc::alloc::Global>::reserve (hashbrown-0.14.5\\src\\map.rs:1106:0)", +"0x7ff644f011af: hashbrown::map::impl$94::extend > >,std::hash::random::RandomState,alloc::alloc::Global,core::iter::adapters::map::Map,alloc::alloc::Global> >,alloc::alloc::Global>::reserve_rehash,alloc::alloc::Global> >,alloc::alloc::Global>::reserve,alloc::alloc::Global> >,alloc::alloc::Global>::find_or_find_insert_slot Result> { Ok(SERVER_CONFIG.get_or_init(|| Arc::new(config)).clone()) } -#[derive(Debug, Serialize, Deserialize, Copy, Clone)] +#[derive(Debug, Serialize, Deserialize)] pub struct ServerConfig { pub players_per_pool: u32, pub num_thread_pools: u32, + pub address: String, + pub port: u16, } impl ServerConfig { @@ -37,6 +39,8 @@ impl ServerConfig { Self { players_per_pool: 5000, num_thread_pools: 60, + address: "0.0.0.0".to_string(), + port: 3000, } } fn log_level() -> String { diff --git a/server/src/server/mod.rs b/server/src/server/mod.rs index ac0fe11..4163b9f 100644 --- a/server/src/server/mod.rs +++ b/server/src/server/mod.rs @@ -38,7 +38,7 @@ mod event_rep; // Horizon Server Struct //----------------------------------------------------------------------------- pub struct HorizonServer { - config: ServerConfig, + config: Arc, threads: RwLock>>, } @@ -60,7 +60,7 @@ impl Server { impl HorizonServer { fn new() -> Result { Ok(Self { - config: *config::server_config()?, + config: config::server_config().expect("Failed to load server config"), threads: RwLock::new(Vec::new()), }) } @@ -166,7 +166,17 @@ pub async fn start() -> anyhow::Result<()> { let server = Server::new()?; let thread_count = config::SERVER_CONFIG .get() - .map(|config| config.num_thread_pools) + .map(|config: &Arc| config.num_thread_pools) + .unwrap(); + + let address = config::SERVER_CONFIG + .get() + .map(|config: &Arc| config.address.clone()) + .unwrap(); + + let port = config::SERVER_CONFIG + .get() + .map(|config: &Arc| config.port) .unwrap(); // Start 10 threads initially for handling player connections @@ -194,17 +204,17 @@ pub async fn start() -> anyhow::Result<()> { .route("/", get(|| async { "Horizon Server Running" })) .layer(layer); // Start the server - let address = "0.0.0.0:3000"; - log_info!(LOGGER, "SOCKET NET", "Starting server on {}", address); + let full_address = format!("{}:{}", address.to_string(), port.to_string()); + log_info!(LOGGER, "SOCKET NET", "Starting server on {}:{}", address, port); futures::future::join_all(spawn_futures).await; log_info!(LOGGER, "SERVER", "Spawned {} threads", thread_count); let elapsed = start_time.elapsed(); log_info!(LOGGER, "SERVER", "Server initialization took {:?}", elapsed); - let listener = tokio::net::TcpListener::bind(&address) + let listener = tokio::net::TcpListener::bind(&full_address) .await - .context(format!("Failed to bind to {}", address))?; + .context(format!("Failed to bind to {}", full_address))?; axum::serve(listener, app) .await .context("Failed to start server")?; diff --git a/server_config.json b/server_config.json new file mode 100644 index 0000000..73c0271 --- /dev/null +++ b/server_config.json @@ -0,0 +1,6 @@ +{ + "players_per_pool": 1000, + "num_thread_pools": 64, + "address": "0.0.0.0", + "port": 4567 +} \ No newline at end of file From 7223f9e2ce1ad016f0efdb6d4e05af74be46db21 Mon Sep 17 00:00:00 2001 From: "Tristan Poland (Trident_For_U)" <34868944+tristanpoland@users.noreply.github.com> Date: Tue, 3 Dec 2024 13:57:04 -0500 Subject: [PATCH 04/41] Removed D-Hat Allocator --- Cargo.lock | 29 ----------------------------- server/Cargo.toml | 1 - server/src/main.rs | 5 ----- 3 files changed, 35 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a767300..8045739 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -455,22 +455,6 @@ version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" -[[package]] -name = "dhat" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98cd11d84628e233de0ce467de10b8633f4ddaecafadefc86e13b84b8739b827" -dependencies = [ - "backtrace", - "lazy_static", - "mintex", - "parking_lot", - "rustc-hash", - "serde", - "serde_json", - "thousands", -] - [[package]] name = "digest" version = "0.10.7" @@ -792,7 +776,6 @@ dependencies = [ "anyhow", "axum", "ctrlc", - "dhat", "env_logger", "futures", "horizon_data_types 0.4.0", @@ -1145,12 +1128,6 @@ dependencies = [ "adler2", ] -[[package]] -name = "mintex" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bec4598fddb13cc7b528819e697852653252b760f1228b7642679bf2ff2cd07" - [[package]] name = "mio" version = "1.0.3" @@ -1883,12 +1860,6 @@ dependencies = [ "syn", ] -[[package]] -name = "thousands" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bf63baf9f5039dadc247375c29eb13706706cfde997d0330d05aa63a77d8820" - [[package]] name = "thread_local" version = "1.1.8" diff --git a/server/Cargo.toml b/server/Cargo.toml index 88328a9..8df2b61 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -20,7 +20,6 @@ horizon_logger = "0.1.0" once_cell = "1.20.2" horizon_data_types = "0.4.0" rmpv = "1.3.0" -dhat = "0.3.3" ctrlc = { version = "3.4.5", features = ["termination"] } parking_lot = "0.12.3" rayon = "1.10.0" diff --git a/server/src/main.rs b/server/src/main.rs index ccf420d..d6da634 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -22,9 +22,6 @@ // Caznix // // License: Apache-2.0 // //=============================================================================// -#[global_allocator] -static ALLOC: dhat::Alloc = dhat::Alloc; - static CTRL_C_HANDLER: Once = Once::new(); use std::sync::Once; use once_cell::sync::Lazy; @@ -51,7 +48,6 @@ pub static LOGGER: Lazy = Lazy::new(|| { async fn main() -> Result<()> { //collision::main(); - let mut _profiler = Some(dhat::Profiler::new_heap()); splash(); let config_init_time = std::time::Instant::now(); //let server_config: std::sync::Arc = server_config().context("Failed to obtain server config")?; @@ -72,7 +68,6 @@ async fn main() -> Result<()> { terminating = true; println!("Exit"); - drop(_profiler.take()); std::process::exit(0); } From 6ec30150c2663de1fff96ed525df0a9d1834f62d Mon Sep 17 00:00:00 2001 From: "Tristan Poland (Trident_For_U)" <34868944+tristanpoland@users.noreply.github.com> Date: Tue, 3 Dec 2024 14:00:56 -0500 Subject: [PATCH 05/41] Update .gitignore --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 25d2b88..167ed9d 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,7 @@ target/ # Remove Cargo.lock from gitignore if creating an executable, leave it for libraries # More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html - +server/cargo.lock # These are backup files generated by rustfmt **/*.rs.bk From 0bb590c46a4a13f21a858c1b605c1980408d8be7 Mon Sep 17 00:00:00 2001 From: "Tristan Poland (Trident_For_U)" <34868944+tristanpoland@users.noreply.github.com> Date: Tue, 3 Dec 2024 14:01:45 -0500 Subject: [PATCH 06/41] Delete Cargo.lock --- Cargo.lock | 2401 ---------------------------------------------------- 1 file changed, 2401 deletions(-) delete mode 100644 Cargo.lock diff --git a/Cargo.lock b/Cargo.lock deleted file mode 100644 index 8045739..0000000 --- a/Cargo.lock +++ /dev/null @@ -1,2401 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "PebbleVault" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8db0aab8248c160fa4adc33c3e915cabc6e6674884dd8dae685706e4bd6c8aa" -dependencies = [ - "bindgen", - "colored", - "ez_logging", - "indicatif", - "lazy_static", - "libc", - "rand", - "rstar", - "rusqlite", - "serde", - "serde_json", - "tempfile", - "uuid", -] - -[[package]] -name = "addr2line" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler2" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" - -[[package]] -name = "ahash" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" -dependencies = [ - "cfg-if", - "once_cell", - "version_check", - "zerocopy", -] - -[[package]] -name = "aho-corasick" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" -dependencies = [ - "memchr", -] - -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - -[[package]] -name = "anstream" -version = "0.6.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" -dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "is_terminal_polyfill", - "utf8parse", -] - -[[package]] -name = "anstyle" -version = "1.0.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" - -[[package]] -name = "anstyle-parse" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" -dependencies = [ - "utf8parse", -] - -[[package]] -name = "anstyle-query" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" -dependencies = [ - "windows-sys 0.59.0", -] - -[[package]] -name = "anstyle-wincon" -version = "3.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125" -dependencies = [ - "anstyle", - "windows-sys 0.59.0", -] - -[[package]] -name = "anyhow" -version = "1.0.93" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775" - -[[package]] -name = "approx" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6" -dependencies = [ - "num-traits", -] - -[[package]] -name = "async-trait" -version = "0.1.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "autocfg" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" - -[[package]] -name = "axum" -version = "0.7.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f" -dependencies = [ - "async-trait", - "axum-core", - "bytes", - "futures-util", - "http", - "http-body", - "http-body-util", - "hyper", - "hyper-util", - "itoa", - "matchit 0.7.3", - "memchr", - "mime", - "percent-encoding", - "pin-project-lite", - "rustversion", - "serde", - "serde_json", - "serde_path_to_error", - "serde_urlencoded", - "sync_wrapper 1.0.2", - "tokio", - "tower", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "axum-core" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" -dependencies = [ - "async-trait", - "bytes", - "futures-util", - "http", - "http-body", - "http-body-util", - "mime", - "pin-project-lite", - "rustversion", - "sync_wrapper 1.0.2", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "backtrace" -version = "0.3.74" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" -dependencies = [ - "addr2line", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", - "windows-targets 0.52.6", -] - -[[package]] -name = "base64" -version = "0.22.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" - -[[package]] -name = "bincode" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" -dependencies = [ - "serde", -] - -[[package]] -name = "bindgen" -version = "0.69.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088" -dependencies = [ - "bitflags", - "cexpr", - "clang-sys", - "itertools", - "lazy_static", - "lazycell", - "log", - "prettyplease", - "proc-macro2", - "quote", - "regex", - "rustc-hash", - "shlex", - "syn", - "which", -] - -[[package]] -name = "bitflags" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" - -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array", -] - -[[package]] -name = "bumpalo" -version = "3.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" - -[[package]] -name = "bytemuck" -version = "1.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b37c88a63ffd85d15b406896cc343916d7cf57838a847b3a6f2ca5d39a5695a" - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - -[[package]] -name = "bytes" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" -dependencies = [ - "serde", -] - -[[package]] -name = "cc" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f34d93e62b03caf570cccc334cbc6c2fceca82f39211051345108adcba3eebdc" -dependencies = [ - "shlex", -] - -[[package]] -name = "cexpr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" -dependencies = [ - "nom", -] - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "cfg_aliases" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" - -[[package]] -name = "chrono" -version = "0.4.38" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" -dependencies = [ - "android-tzdata", - "iana-time-zone", - "js-sys", - "num-traits", - "wasm-bindgen", - "windows-targets 0.52.6", -] - -[[package]] -name = "clang-sys" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" -dependencies = [ - "glob", - "libc", - "libloading", -] - -[[package]] -name = "colorchoice" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" - -[[package]] -name = "colored" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbf2150cce219b664a8a70df7a1f933836724b503f8a413af9365b4dcc4d90b8" -dependencies = [ - "lazy_static", - "windows-sys 0.48.0", -] - -[[package]] -name = "console" -version = "0.15.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" -dependencies = [ - "encode_unicode", - "lazy_static", - "libc", - "unicode-width 0.1.14", - "windows-sys 0.52.0", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" - -[[package]] -name = "cpufeatures" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" -dependencies = [ - "libc", -] - -[[package]] -name = "crossbeam-deque" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" -dependencies = [ - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" - -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "ctrlc" -version = "3.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90eeab0aa92f3f9b4e87f258c72b139c207d251f9cbc1080a0086b86a8870dd3" -dependencies = [ - "nix", - "windows-sys 0.59.0", -] - -[[package]] -name = "data-encoding" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer", - "crypto-common", -] - -[[package]] -name = "either" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" - -[[package]] -name = "encode_unicode" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" - -[[package]] -name = "engineioxide" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec84aea019c24ae0cae29a6306b1b9b6bd91a4c950542d804b742435ed797f0c" -dependencies = [ - "base64", - "bytes", - "futures-core", - "futures-util", - "http", - "http-body", - "http-body-util", - "hyper", - "hyper-util", - "pin-project-lite", - "rand", - "serde", - "serde_json", - "smallvec", - "thiserror", - "tokio", - "tokio-tungstenite", - "tower-layer", - "tower-service", -] - -[[package]] -name = "env_filter" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f2c92ceda6ceec50f43169f9ee8424fe2db276791afde7b2cd8bc084cb376ab" -dependencies = [ - "log", - "regex", -] - -[[package]] -name = "env_logger" -version = "0.11.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d" -dependencies = [ - "anstream", - "anstyle", - "env_filter", - "humantime", - "log", -] - -[[package]] -name = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - -[[package]] -name = "errno" -version = "0.3.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" -dependencies = [ - "libc", - "windows-sys 0.59.0", -] - -[[package]] -name = "ez_logging" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee4ade5b849d2c9c543d236cbf4f5e4760e242e47c8977d58d1087259c68a523" -dependencies = [ - "chrono", -] - -[[package]] -name = "fallible-iterator" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" - -[[package]] -name = "fallible-streaming-iterator" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" - -[[package]] -name = "fastrand" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4" - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "form_urlencoded" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "futures" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-channel" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" -dependencies = [ - "futures-core", - "futures-sink", -] - -[[package]] -name = "futures-core" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" - -[[package]] -name = "futures-executor" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-io" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" - -[[package]] -name = "futures-macro" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "futures-sink" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" - -[[package]] -name = "futures-task" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" - -[[package]] -name = "futures-util" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" -dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-macro", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", -] - -[[package]] -name = "getrandom" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - -[[package]] -name = "gimli" -version = "0.31.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" - -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - -[[package]] -name = "hash32" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47d60b12902ba28e2730cd37e95b8c9223af2808df9e902d4df49588d1470606" -dependencies = [ - "byteorder", -] - -[[package]] -name = "hashbrown" -version = "0.14.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" -dependencies = [ - "ahash", -] - -[[package]] -name = "hashbrown" -version = "0.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" - -[[package]] -name = "hashlink" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af" -dependencies = [ - "hashbrown 0.14.5", -] - -[[package]] -name = "heapless" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bfb9eb618601c89945a70e254898da93b13be0388091d42117462b265bb3fad" -dependencies = [ - "hash32", - "stable_deref_trait", -] - -[[package]] -name = "home" -version = "0.5.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "horizon-plugin-api" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be8a5ded0da09b87361bfc215a7512a63cdf6091b23d1612d575f7305778e981" -dependencies = [ - "socketioxide", -] - -[[package]] -name = "horizon-server" -version = "0.13.0" -dependencies = [ - "PebbleVault", - "anyhow", - "axum", - "ctrlc", - "env_logger", - "futures", - "horizon_data_types 0.4.0", - "horizon_logger", - "lazy_static", - "nalgebra", - "once_cell", - "parking_lot", - "plugin_api", - "rayon", - "rmpv", - "rstar", - "serde", - "serde_json", - "socketioxide", - "tokio", - "uuid", -] - -[[package]] -name = "horizon_data_types" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eed398874caaec1768e6d58d66b130413132c4f3a07d45679e27549c87657e29" -dependencies = [ - "bincode", - "nalgebra", - "serde", - "serde_json", - "socketioxide", - "tokio", - "uuid", -] - -[[package]] -name = "horizon_data_types" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8f3c413e1051396fffb4da30445e4a29f6c8a6e06b4670dd1b20049266d9d42" -dependencies = [ - "bincode", - "nalgebra", - "serde", - "serde_json", - "socketioxide", - "tokio", - "uuid", -] - -[[package]] -name = "horizon_logger" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "361fc38675b9dfd676b1903234fe2ea80ef930dccf236269291e552af7c01a28" -dependencies = [ - "chrono", - "colored", - "once_cell", - "serde", - "serde_json", - "tracing", - "tracing-subscriber", -] - -[[package]] -name = "http" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http-body" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" -dependencies = [ - "bytes", - "http", -] - -[[package]] -name = "http-body-util" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" -dependencies = [ - "bytes", - "futures-util", - "http", - "http-body", - "pin-project-lite", -] - -[[package]] -name = "httparse" -version = "1.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" - -[[package]] -name = "httpdate" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" - -[[package]] -name = "humantime" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" - -[[package]] -name = "hyper" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97818827ef4f364230e16705d4706e2897df2bb60617d6ca15d598025a3c481f" -dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "http", - "http-body", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "smallvec", - "tokio", -] - -[[package]] -name = "hyper-util" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" -dependencies = [ - "bytes", - "futures-util", - "http", - "http-body", - "hyper", - "pin-project-lite", - "tokio", - "tower-service", -] - -[[package]] -name = "iana-time-zone" -version = "0.1.61" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "wasm-bindgen", - "windows-core", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - -[[package]] -name = "indexmap" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" -dependencies = [ - "equivalent", - "hashbrown 0.15.2", -] - -[[package]] -name = "indicatif" -version = "0.17.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbf675b85ed934d3c67b5c5469701eec7db22689d0a2139d856e0925fa28b281" -dependencies = [ - "console", - "number_prefix", - "portable-atomic", - "unicode-width 0.2.0", - "web-time", -] - -[[package]] -name = "is_terminal_polyfill" -version = "1.70.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" - -[[package]] -name = "itertools" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" - -[[package]] -name = "js-sys" -version = "0.3.73" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb15147158e79fd8b8afd0252522769c4f48725460b37338544d8379d94fc8f9" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "lazy_static" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" - -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" - -[[package]] -name = "libc" -version = "0.2.167" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09d6582e104315a817dff97f75133544b2e094ee22447d2acf4a74e189ba06fc" - -[[package]] -name = "libloading" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" -dependencies = [ - "cfg-if", - "windows-targets 0.52.6", -] - -[[package]] -name = "libm" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" - -[[package]] -name = "libsqlite3-sys" -version = "0.30.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e99fb7a497b1e3339bc746195567ed8d3e24945ecd636e3619d20b9de9e9149" -dependencies = [ - "cc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "linux-raw-sys" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" - -[[package]] -name = "lock_api" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" -dependencies = [ - "autocfg", - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" - -[[package]] -name = "matchers" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" -dependencies = [ - "regex-automata 0.1.10", -] - -[[package]] -name = "matchit" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" - -[[package]] -name = "matchit" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd0aa4b8ca861b08d68afc8702af3250776898c1508b278e1da9d01e01d4b45c" - -[[package]] -name = "matrixmultiply" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9380b911e3e96d10c1f415da0876389aaf1b56759054eeb0de7df940c456ba1a" -dependencies = [ - "autocfg", - "rawpointer", -] - -[[package]] -name = "memchr" -version = "2.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" - -[[package]] -name = "mime" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - -[[package]] -name = "miniz_oxide" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" -dependencies = [ - "adler2", -] - -[[package]] -name = "mio" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" -dependencies = [ - "libc", - "wasi", - "windows-sys 0.52.0", -] - -[[package]] -name = "nalgebra" -version = "0.33.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26aecdf64b707efd1310e3544d709c5c0ac61c13756046aaaba41be5c4f66a3b" -dependencies = [ - "approx", - "matrixmultiply", - "nalgebra-macros", - "num-complex", - "num-rational", - "num-traits", - "serde", - "simba", - "typenum", -] - -[[package]] -name = "nalgebra-macros" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "254a5372af8fc138e36684761d3c0cdb758a4410e938babcff1c860ce14ddbfc" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "nix" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" -dependencies = [ - "bitflags", - "cfg-if", - "cfg_aliases", - "libc", -] - -[[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - -[[package]] -name = "nu-ansi-term" -version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" -dependencies = [ - "overload", - "winapi", -] - -[[package]] -name = "num-bigint" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" -dependencies = [ - "num-integer", - "num-traits", -] - -[[package]] -name = "num-complex" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" -dependencies = [ - "num-traits", - "serde", -] - -[[package]] -name = "num-integer" -version = "0.1.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" -dependencies = [ - "num-traits", -] - -[[package]] -name = "num-rational" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" -dependencies = [ - "num-bigint", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" -dependencies = [ - "autocfg", - "libm", -] - -[[package]] -name = "number_prefix" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" - -[[package]] -name = "object" -version = "0.36.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" -dependencies = [ - "memchr", -] - -[[package]] -name = "once_cell" -version = "1.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" - -[[package]] -name = "overload" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" - -[[package]] -name = "parking_lot" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-targets 0.52.6", -] - -[[package]] -name = "paste" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" - -[[package]] -name = "pathdiff" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3" - -[[package]] -name = "percent-encoding" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" - -[[package]] -name = "pin-project-lite" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "pkg-config" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" - -[[package]] -name = "player_lib" -version = "0.1.0" -dependencies = [ - "PebbleVault", - "horizon-plugin-api", - "horizon_data_types 0.4.0", - "socketioxide", -] - -[[package]] -name = "plugin_api" -version = "0.3.0" -dependencies = [ - "async-trait", - "horizon-plugin-api", - "horizon_data_types 0.3.0", - "pathdiff", - "player_lib", - "socketioxide", - "stars_beyond_plugin", - "test_plugin", - "tokio", - "toml_edit", - "uuid", -] - -[[package]] -name = "portable-atomic" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "280dc24453071f1b63954171985a0b0d30058d287960968b9b2aca264c8d4ee6" - -[[package]] -name = "ppv-lite86" -version = "0.2.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" -dependencies = [ - "zerocopy", -] - -[[package]] -name = "prettyplease" -version = "0.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" -dependencies = [ - "proc-macro2", - "syn", -] - -[[package]] -name = "proc-macro2" -version = "1.0.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quote" -version = "1.0.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha", - "rand_core", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom", -] - -[[package]] -name = "rawpointer" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" - -[[package]] -name = "rayon" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" -dependencies = [ - "either", - "rayon-core", -] - -[[package]] -name = "rayon-core" -version = "1.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" -dependencies = [ - "crossbeam-deque", - "crossbeam-utils", -] - -[[package]] -name = "redox_syscall" -version = "0.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" -dependencies = [ - "bitflags", -] - -[[package]] -name = "regex" -version = "1.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata 0.4.9", - "regex-syntax 0.8.5", -] - -[[package]] -name = "regex-automata" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" -dependencies = [ - "regex-syntax 0.6.29", -] - -[[package]] -name = "regex-automata" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax 0.8.5", -] - -[[package]] -name = "regex-syntax" -version = "0.6.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" - -[[package]] -name = "regex-syntax" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" - -[[package]] -name = "rmp" -version = "0.8.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "228ed7c16fa39782c3b3468e974aec2795e9089153cd08ee2e9aefb3613334c4" -dependencies = [ - "byteorder", - "num-traits", - "paste", -] - -[[package]] -name = "rmpv" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58450723cd9ee93273ce44a20b6ec4efe17f8ed2e3631474387bfdecf18bb2a9" -dependencies = [ - "num-traits", - "rmp", -] - -[[package]] -name = "rstar" -version = "0.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "421400d13ccfd26dfa5858199c30a5d76f9c54e0dba7575273025b43c5175dbb" -dependencies = [ - "heapless", - "num-traits", - "smallvec", -] - -[[package]] -name = "rusqlite" -version = "0.32.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7753b721174eb8ff87a9a0e799e2d7bc3749323e773db92e0984debb00019d6e" -dependencies = [ - "bitflags", - "fallible-iterator", - "fallible-streaming-iterator", - "hashlink", - "libsqlite3-sys", - "smallvec", -] - -[[package]] -name = "rustc-demangle" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" - -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - -[[package]] -name = "rustix" -version = "0.38.41" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7f649912bc1495e167a6edee79151c84b1bad49748cb4f1f1167f459f6224f6" -dependencies = [ - "bitflags", - "errno", - "libc", - "linux-raw-sys", - "windows-sys 0.52.0", -] - -[[package]] -name = "rustversion" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" - -[[package]] -name = "ryu" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" - -[[package]] -name = "safe_arch" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3460605018fdc9612bce72735cba0d27efbcd9904780d44c7e3a9948f96148a" -dependencies = [ - "bytemuck", -] - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "serde" -version = "1.0.215" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.215" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "serde_json" -version = "1.0.133" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" -dependencies = [ - "itoa", - "memchr", - "ryu", - "serde", -] - -[[package]] -name = "serde_path_to_error" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af99884400da37c88f5e9146b7f1fd0fbcae8f6eec4e9da38b67d05486f814a6" -dependencies = [ - "itoa", - "serde", -] - -[[package]] -name = "serde_urlencoded" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" -dependencies = [ - "form_urlencoded", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "sha1" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - -[[package]] -name = "sharded-slab" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" -dependencies = [ - "lazy_static", -] - -[[package]] -name = "shlex" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" - -[[package]] -name = "simba" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3a386a501cd104797982c15ae17aafe8b9261315b5d07e3ec803f2ea26be0fa" -dependencies = [ - "approx", - "num-complex", - "num-traits", - "paste", - "wide", -] - -[[package]] -name = "slab" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] - -[[package]] -name = "smallvec" -version = "1.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" - -[[package]] -name = "socket2" -version = "0.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "socketioxide" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a9ce59f845cfea2fe24cc7adbd512268893ee07bde899ae6477569dbc42dff3" -dependencies = [ - "bytes", - "engineioxide", - "futures-core", - "futures-util", - "http", - "http-body", - "hyper", - "matchit 0.8.5", - "pin-project-lite", - "rustversion", - "serde", - "socketioxide-core", - "socketioxide-parser-common", - "thiserror", - "tokio", - "tower-layer", - "tower-service", -] - -[[package]] -name = "socketioxide-core" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82826d9a1efb2b201e7d12d231f98870f768d98d02452eb642bca0587a8d51f0" -dependencies = [ - "bytes", - "engineioxide", - "serde", - "thiserror", -] - -[[package]] -name = "socketioxide-parser-common" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9a20b64f78a6d093d73d4d166b5bfc8b5096069865c59cee67b3aafac77eaac" -dependencies = [ - "bytes", - "itoa", - "serde", - "serde_json", - "socketioxide-core", -] - -[[package]] -name = "stable_deref_trait" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" - -[[package]] -name = "stars_beyond_plugin" -version = "0.1.0" -dependencies = [ - "horizon-plugin-api", - "horizon_data_types 0.3.0", - "socketioxide", -] - -[[package]] -name = "syn" -version = "2.0.90" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "sync_wrapper" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" - -[[package]] -name = "sync_wrapper" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" - -[[package]] -name = "tempfile" -version = "3.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" -dependencies = [ - "cfg-if", - "fastrand", - "once_cell", - "rustix", - "windows-sys 0.59.0", -] - -[[package]] -name = "test_plugin" -version = "0.1.0" -dependencies = [ - "horizon-plugin-api", - "horizon_data_types 0.3.0", - "socketioxide", -] - -[[package]] -name = "thiserror" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "thread_local" -version = "1.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" -dependencies = [ - "cfg-if", - "once_cell", -] - -[[package]] -name = "tokio" -version = "1.41.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22cfb5bee7a6a52939ca9224d6ac897bb669134078daa8735560897f69de4d33" -dependencies = [ - "backtrace", - "bytes", - "libc", - "mio", - "pin-project-lite", - "socket2", - "tokio-macros", - "windows-sys 0.52.0", -] - -[[package]] -name = "tokio-macros" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "tokio-tungstenite" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edc5f74e248dc973e0dbb7b74c7e0d6fcc301c694ff50049504004ef4d0cdcd9" -dependencies = [ - "futures-util", - "log", - "tokio", - "tungstenite", -] - -[[package]] -name = "toml_datetime" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" - -[[package]] -name = "toml_edit" -version = "0.22.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" -dependencies = [ - "indexmap", - "toml_datetime", - "winnow", -] - -[[package]] -name = "tower" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2873938d487c3cfb9aed7546dc9f2711d867c9f90c46b889989a2cb84eba6b4f" -dependencies = [ - "futures-core", - "futures-util", - "pin-project-lite", - "sync_wrapper 0.1.2", - "tokio", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "tower-layer" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" - -[[package]] -name = "tower-service" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" - -[[package]] -name = "tracing" -version = "0.1.41" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" -dependencies = [ - "log", - "pin-project-lite", - "tracing-attributes", - "tracing-core", -] - -[[package]] -name = "tracing-attributes" -version = "0.1.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "tracing-core" -version = "0.1.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" -dependencies = [ - "once_cell", - "valuable", -] - -[[package]] -name = "tracing-log" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" -dependencies = [ - "log", - "once_cell", - "tracing-core", -] - -[[package]] -name = "tracing-subscriber" -version = "0.3.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" -dependencies = [ - "matchers", - "nu-ansi-term", - "once_cell", - "regex", - "sharded-slab", - "smallvec", - "thread_local", - "tracing", - "tracing-core", - "tracing-log", -] - -[[package]] -name = "tungstenite" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18e5b8366ee7a95b16d32197d0b2604b43a0be89dc5fac9f8e96ccafbaedda8a" -dependencies = [ - "byteorder", - "bytes", - "data-encoding", - "http", - "httparse", - "log", - "rand", - "sha1", - "thiserror", - "utf-8", -] - -[[package]] -name = "typenum" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" - -[[package]] -name = "unicode-ident" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" - -[[package]] -name = "unicode-width" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" - -[[package]] -name = "unicode-width" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" - -[[package]] -name = "utf-8" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" - -[[package]] -name = "utf8parse" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" - -[[package]] -name = "uuid" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" -dependencies = [ - "getrandom", - "serde", -] - -[[package]] -name = "valuable" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" - -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - -[[package]] -name = "version_check" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wasm-bindgen" -version = "0.2.96" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21d3b25c3ea1126a2ad5f4f9068483c2af1e64168f847abe863a526b8dbfe00b" -dependencies = [ - "cfg-if", - "once_cell", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.96" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52857d4c32e496dc6537646b5b117081e71fd2ff06de792e3577a150627db283" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.96" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "920b0ffe069571ebbfc9ddc0b36ba305ef65577c94b06262ed793716a1afd981" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.96" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf59002391099644be3524e23b781fa43d2be0c5aa0719a18c0731b9d195cab6" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.96" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5047c5392700766601942795a436d7d2599af60dcc3cc1248c9120bfb0827b0" - -[[package]] -name = "web-time" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "which" -version = "4.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" -dependencies = [ - "either", - "home", - "once_cell", - "rustix", -] - -[[package]] -name = "wide" -version = "0.7.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58e6db2670d2be78525979e9a5f9c69d296fd7d670549fe9ebf70f8708cb5019" -dependencies = [ - "bytemuck", - "safe_arch", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows-core" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" -dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", -] - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-sys" -version = "0.59.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" -dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", -] - -[[package]] -name = "windows-targets" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" -dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" - -[[package]] -name = "winnow" -version = "0.6.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" -dependencies = [ - "memchr", -] - -[[package]] -name = "zerocopy" -version = "0.7.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" -dependencies = [ - "byteorder", - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.7.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] From 33e366cf5430d0cc52569d98363f1d97a5483817 Mon Sep 17 00:00:00 2001 From: "Tristan Poland (Trident_For_U)" <34868944+tristanpoland@users.noreply.github.com> Date: Tue, 3 Dec 2024 14:04:49 -0500 Subject: [PATCH 07/41] Updated gitignore --- .gitignore | 169 ++--------------------------------------------------- 1 file changed, 4 insertions(+), 165 deletions(-) diff --git a/.gitignore b/.gitignore index 167ed9d..c034290 100644 --- a/.gitignore +++ b/.gitignore @@ -16,172 +16,10 @@ server/cargo.lock # MSVC Windows builds of rustc generate these, which store debugging information *.pdb -########## -# Python # -########## +######################## +# By Horizon Community # +######################## -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -wheels/ -share/python-wheels/ -*.egg-info/ -.installed.cfg -*.egg -MANIFEST - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.nox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*.cover -*.py,cover -.hypothesis/ -.pytest_cache/ -cover/ - -# Translations -*.mo -*.pot - -# Django stuff: -*.log -local_settings.py -db.sqlite3 -db.sqlite3-journal - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ - -# PyBuilder -.pybuilder/ -target/ - -# Jupyter Notebook -.ipynb_checkpoints - -# IPython -profile_default/ -ipython_config.py - -# pyenv -# For a library or package, you might want to ignore these files since the code is -# intended to run in multiple environments; otherwise, check them in: -# .python-version - -# pipenv -# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. -# However, in case of collaboration, if having platform-specific dependencies or dependencies -# having no cross-platform support, pipenv may install dependencies that don't work, or not -# install all needed dependencies. -#Pipfile.lock - -# poetry -# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. -# This is especially recommended for binary packages to ensure reproducibility, and is more -# commonly ignored for libraries. -# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control -#poetry.lock - -# pdm -# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. -#pdm.lock -# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it -# in version control. -# https://pdm.fming.dev/latest/usage/project/#working-with-version-control -.pdm.toml -.pdm-python -.pdm-build/ - -# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm -__pypackages__/ - -# Celery stuff -celerybeat-schedule -celerybeat.pid - -# SageMath parsed files -*.sage.py - -# Environments -.env -.venv -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ -.dmypy.json -dmypy.json - -# Pyre type checker -.pyre/ - -# pytype static type analyzer -.pytype/ - -# Cython debug symbols -cython_debug/ - -# PyCharm -# JetBrains specific template is maintained in a separate JetBrains.gitignore that can -# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore -# and can be added to the global gitignore or merged into this file. For a more nuclear -# option (not recommended) you can uncomment the following to ignore the entire idea folder. -#.idea/ data raw_points.txt voronoi_edges.txt @@ -190,3 +28,4 @@ voronoi_edges.txt load_test.db-journal /deps /.cargo +Cargo.lock From a441691d44ed842a6719ebd5f07ac07eb60bedee Mon Sep 17 00:00:00 2001 From: "Tristan Poland (Trident_For_U)" <34868944+tristanpoland@users.noreply.github.com> Date: Tue, 3 Dec 2024 14:05:19 -0500 Subject: [PATCH 08/41] Update .gitignore --- .gitignore | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index c034290..3d4014e 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,7 @@ target/ # Remove Cargo.lock from gitignore if creating an executable, leave it for libraries # More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html -server/cargo.lock +server/Cargo.lock # These are backup files generated by rustfmt **/*.rs.bk @@ -28,4 +28,4 @@ voronoi_edges.txt load_test.db-journal /deps /.cargo -Cargo.lock +Cargo.lock \ No newline at end of file From 2c350785ca473bba3a8e0aa471e2289e612defb9 Mon Sep 17 00:00:00 2001 From: "Tristan Poland (Trident_For_U)" <34868944+tristanpoland@users.noreply.github.com> Date: Tue, 3 Dec 2024 14:22:43 -0500 Subject: [PATCH 09/41] Added vault_lib to core, Created a Pebblevault region for spatial data about the game world --- server/Cargo.toml | 1 + server/src/server/event_rep/structs.rs | 39 +-- server/src/server/mod.rs | 3 +- server/src/server/vault_lib/mod.rs | 344 +++++++++++++++++++++++++ 4 files changed, 360 insertions(+), 27 deletions(-) create mode 100644 server/src/server/vault_lib/mod.rs diff --git a/server/Cargo.toml b/server/Cargo.toml index 8df2b61..4053605 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -28,6 +28,7 @@ PebbleVault = "0.6.1" uuid = "1.11.0" nalgebra = "0.33.2" rstar = "0.12.2" +horizon-plugin-api = "0.1.7" # ADD ANY CUSTOM DEPENDENCIES BELOW diff --git a/server/src/server/event_rep/structs.rs b/server/src/server/event_rep/structs.rs index 0019ea6..f3d853f 100644 --- a/server/src/server/event_rep/structs.rs +++ b/server/src/server/event_rep/structs.rs @@ -2,38 +2,26 @@ use socketioxide::extract::SocketRef; use serde::{Serialize, Deserialize}; use socketioxide::extract::Data; use horizon_data_types::Vec3D; -use PebbleVault::VaultManager; +use uuid::Uuid; use std::sync::{Arc, Mutex}; use once_cell::sync::Lazy; +use crate::server::vault_lib; +pub use horizon_plugin_api::Plugin; -static VAULT_MANAGER: Lazy>>> = - Lazy::new(|| { - let vault_manager = VaultManager::new("./pv-horizon-plugin-data").expect("Failed to create VaultManager"); - Arc::new(Mutex::new(vault_manager)) - }); - -/// Custom data structure for PebbleVault objects -/// -/// This struct represents the custom data associated with each spatial object -/// in the PebbleVault system. It can be extended or modified to suit specific -/// game or application needs. -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] -pub struct PebbleVaultCustomData { - /// Name of the object - pub name: String, - /// Custom value associated with the object - pub value: i32, -} +use super::super::vault_lib::PluginAPI; -pub struct EventManager<'a, T: Clone + Serialize + for<'de> Deserialize<'de> + PartialEq + Sized> { - vault_ref: &'a mut PebbleVault::VaultManager, +pub struct EventManager{ + vault_ref: Uuid, } -impl<'a, T: Clone + Serialize + for<'de> Deserialize<'de> + PartialEq + Sized> EventManager<'a, T> { - pub fn new(pebble_vault_ref: &'a mut PebbleVault::VaultManager) -> Self { +impl EventManager { + pub fn new() -> Self { + let vault_lib = ::new(); + let region = vault_lib.create_or_load_region([0.0,0.0,0.0], 100000000.0).expect("Failed to create or load region"); + Self { - vault_ref: pebble_vault_ref + vault_ref: region, } } @@ -82,6 +70,5 @@ impl Event { } pub fn test() { - let mut vault_manager = VAULT_MANAGER.lock().unwrap(); - let mut evt_manager = EventManager::new(&mut *vault_manager); + let mut evt_manager = EventManager::new(); } \ No newline at end of file diff --git a/server/src/server/mod.rs b/server/src/server/mod.rs index 4163b9f..16fbba4 100644 --- a/server/src/server/mod.rs +++ b/server/src/server/mod.rs @@ -30,7 +30,8 @@ use std::collections::HashMap; use std::sync::Arc; use tokio::sync::Mutex; pub mod config; -mod event_rep; +pub mod event_rep; +pub mod vault_lib; // Server state management diff --git a/server/src/server/vault_lib/mod.rs b/server/src/server/vault_lib/mod.rs new file mode 100644 index 0000000..0d16649 --- /dev/null +++ b/server/src/server/vault_lib/mod.rs @@ -0,0 +1,344 @@ +use std::collections::HashMap; +pub use horizon_plugin_api::{Plugin, Pluginstate, LoadedPlugin}; +use serde::{Serialize, Deserialize}; +use PebbleVault::{VaultManager, SpatialObject, VaultRegion}; +use std::sync::{Arc, Mutex}; +use uuid::Uuid; +use once_cell::sync::Lazy; + +/// VaultManager instance for the PebbleVault plugin +static VAULT_MANAGER: Lazy>>> = + Lazy::new(|| { + let vault_manager = VaultManager::new("./pv-horizon-plugin-data").expect("Failed to create VaultManager"); + Arc::new(Mutex::new(vault_manager)) + }); + + +/// Custom data structure for PebbleVault objects +/// +/// This struct represents the custom data associated with each spatial object +/// in the PebbleVault system. It can be extended or modified to suit specific +/// game or application needs. +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +pub struct PebbleVaultCustomData { + /// Name of the object + pub name: String, + /// Custom value associated with the object + pub value: i32, +} + +// Define both required traits +pub trait PluginAPI { + fn new() -> Plugin; + fn persist_to_disk(&self) -> Result<(), String>; + fn get_region(&self, region_id: Uuid) -> Option>>>; + fn transfer_player(&self, player_uuid: Uuid, from_region_id: Uuid, to_region_id: Uuid) -> Result<(), String>; + fn update_object(&self, object: &SpatialObject) -> Result<(), String>; + fn get_object(&self, object_id: Uuid) -> Result>, String>; + fn remove_object(&self, object_id: Uuid) -> Result<(), String>; + fn add_object(&self, region_id: Uuid, uuid: Uuid, object_type: &str, x: f64, y: f64, z: f64, custom_data: PebbleVaultCustomData) -> Result<(), String>; + fn query_region(&self, region_id: Uuid, min_x: f64, min_y: f64, min_z: f64, max_x: f64, max_y: f64, max_z: f64) -> Result>, String>; + fn create_or_load_region(&self, center: [f64; 3], radius: f64) -> Result; + fn thing(&self) -> String; +} + +pub trait PluginConstruct { + fn new(plugins: HashMap<&'static str, LoadedPlugin>) -> Plugin; +} + +// Implement constructor +impl PluginConstruct for Plugin { + fn new(plugins: HashMap<&'static str, LoadedPlugin>) -> Plugin { + println!("Initializing PebbleVault plugin"); + Plugin {} + } +} + +// Implement the trait for Plugin +impl PluginAPI for Plugin { + // Add the thing() method implementation + fn thing(&self) -> String { + self.create_or_load_region([0.0,0.0,0.0], 1000.0).expect("Failure"); + + "No String to return".to_string() + } + + /// Creates a new region or loads an existing one + /// + /// This method creates a new spatial region in the PebbleVault system or + /// loads an existing one if it already exists. + /// + /// # Arguments + /// + /// * `center` - Center coordinates of the region [x, y, z] + /// * `radius` - Radius of the region + /// + /// # Returns + /// + /// A Result containing the UUID of the created or loaded region, or an error string + /// + /// # Examples + /// + /// ``` + /// # use pebble_vault::PebbleVault; + /// # let pebble_vault = PebbleVault::new().unwrap(); + /// let center = [0.0, 0.0, 0.0]; + /// let radius = 1000.0; + /// let region_id = pebble_vault.create_or_load_region(center, radius).expect("Failed to create region"); + /// println!("Created region with ID: {}", region_id); + /// ``` + fn create_or_load_region(&self, center: [f64; 3], radius: f64) -> Result { + VAULT_MANAGER.lock().unwrap().create_or_load_region(center, radius) + } + + /// Queries a region for objects within a bounding box + /// + /// This method searches for objects within the specified bounding box in a given region. + /// + /// # Arguments + /// + /// * `region_id` - UUID of the region to query + /// * `min_x` - Minimum x-coordinate of the bounding box + /// * `min_y` - Minimum y-coordinate of the bounding box + /// * `min_z` - Minimum z-coordinate of the bounding box + /// * `max_x` - Maximum x-coordinate of the bounding box + /// * `max_y` - Maximum y-coordinate of the bounding box + /// * `max_z` - Maximum z-coordinate of the bounding box + /// + /// # Returns + /// + /// A Result containing a vector of SpatialObjects or an error string + /// + /// # Examples + /// + /// ``` + /// # use pebble_vault::PebbleVault; + /// # use uuid::Uuid; + /// # let pebble_vault = PebbleVault::new().unwrap(); + /// # let region_id = pebble_vault.create_or_load_region([0.0, 0.0, 0.0], 1000.0).unwrap(); + /// let objects = pebble_vault.query_region(region_id, -100.0, -100.0, -100.0, 100.0, 100.0, 100.0) + /// .expect("Failed to query region"); + /// println!("Found {} objects in the region", objects.len()); + /// ``` + fn query_region(&self, region_id: Uuid, min_x: f64, min_y: f64, min_z: f64, max_x: f64, max_y: f64, max_z: f64) -> Result>, String> { + VAULT_MANAGER.lock().unwrap().query_region(region_id, min_x, min_y, min_z, max_x, max_y, max_z) + } + + /// Adds a new object to a region + /// + /// This method adds a new spatial object to the specified region in the PebbleVault system. + /// + /// # Arguments + /// + /// * `region_id` - UUID of the region to add the object to + /// * `uuid` - UUID of the new object + /// * `object_type` - Type of the object (e.g., "player", "item") + /// * `x` - X-coordinate of the object + /// * `y` - Y-coordinate of the object + /// * `z` - Z-coordinate of the object + /// * `custom_data` - Custom data associated with the object + /// + /// # Returns + /// + /// A Result indicating success or an error string + /// + /// # Examples + /// + /// ``` + /// # use pebble_vault::{PebbleVault, PebbleVaultCustomData}; + /// # use uuid::Uuid; + /// # let pebble_vault = PebbleVault::new().unwrap(); + /// # let region_id = pebble_vault.create_or_load_region([0.0, 0.0, 0.0], 1000.0).unwrap(); + /// let object_id = Uuid::new_v4(); + /// let custom_data = PebbleVaultCustomData { + /// name: "Example Object".to_string(), + /// value: 42, + /// }; + /// pebble_vault.add_object(region_id, object_id, "item", 10.0, 20.0, 30.0, custom_data) + /// .expect("Failed to add object"); + /// println!("Added object with ID: {}", object_id); + /// ``` + fn add_object(&self, region_id: Uuid, uuid: Uuid, object_type: &str, x: f64, y: f64, z: f64, custom_data: PebbleVaultCustomData) -> Result<(), String> { + VAULT_MANAGER.lock().unwrap().add_object(region_id, uuid, object_type, x, y, z, Arc::new(custom_data)) + } + + /// Removes an object from its region and the persistent database + /// + /// This method removes a spatial object from the PebbleVault system. + /// + /// # Arguments + /// + /// * `object_id` - UUID of the object to remove + /// + /// # Returns + /// + /// A Result indicating success or an error string + /// + /// # Examples + /// + /// ``` + /// # use pebble_vault::{PebbleVault, PebbleVaultCustomData}; + /// # use uuid::Uuid; + /// # let pebble_vault = PebbleVault::new().unwrap(); + /// # let region_id = pebble_vault.create_or_load_region([0.0, 0.0, 0.0], 1000.0).unwrap(); + /// # let object_id = Uuid::new_v4(); + /// # let custom_data = PebbleVaultCustomData { name: "Example Object".to_string(), value: 42 }; + /// # pebble_vault.add_object(region_id, object_id, "item", 10.0, 20.0, 30.0, custom_data).unwrap(); + /// pebble_vault.remove_object(object_id).expect("Failed to remove object"); + /// println!("Removed object with ID: {}", object_id); + /// ``` + fn remove_object(&self, object_id: Uuid) -> Result<(), String> { + VAULT_MANAGER.lock().unwrap().remove_object(object_id) + } + + /// Gets a reference to an object by its ID + /// + /// This method retrieves a spatial object from the PebbleVault system by its UUID. + /// + /// # Arguments + /// + /// * `object_id` - UUID of the object to retrieve + /// + /// # Returns + /// + /// A Result containing an Option with the SpatialObject if found, or an error string + /// + /// # Examples + /// + /// ``` + /// # use pebble_vault::{PebbleVault, PebbleVaultCustomData}; + /// # use uuid::Uuid; + /// # let pebble_vault = PebbleVault::new().unwrap(); + /// # let region_id = pebble_vault.create_or_load_region([0.0, 0.0, 0.0], 1000.0).unwrap(); + /// # let object_id = Uuid::new_v4(); + /// # let custom_data = PebbleVaultCustomData { name: "Example Object".to_string(), value: 42 }; + /// # pebble_vault.add_object(region_id, object_id, "item", 10.0, 20.0, 30.0, custom_data).unwrap(); + /// if let Ok(Some(object)) = pebble_vault.get_object(object_id) { + /// println!("Found object: {:?}", object); + /// } else { + /// println!("Object not found"); + /// } + /// ``` + fn get_object(&self, object_id: Uuid) -> Result>, String> { + VAULT_MANAGER.lock().unwrap().get_object(object_id) + } + + /// Updates an existing object in the VaultManager's in-memory storage + /// + /// This method updates the data of an existing spatial object in the PebbleVault system. + /// + /// # Arguments + /// + /// * `object` - A reference to the updated SpatialObject + /// + /// # Returns + /// + /// A Result indicating success or an error string + /// + /// # Examples + /// + /// ``` + /// # use pebble_vault::{PebbleVault, PebbleVaultCustomData}; + /// # use uuid::Uuid; + /// # let pebble_vault = PebbleVault::new().unwrap(); + /// # let region_id = pebble_vault.create_or_load_region([0.0, 0.0, 0.0], 1000.0).unwrap(); + /// # let object_id = Uuid::new_v4(); + /// # let custom_data = PebbleVaultCustomData { name: "Example Object".to_string(), value: 42 }; + /// # pebble_vault.add_object(region_id, object_id, "item", 10.0, 20.0, 30.0, custom_data).unwrap(); + /// if let Ok(Some(mut object)) = pebble_vault.get_object(object_id) { + /// object.point = [15.0, 25.0, 35.0]; + /// pebble_vault.update_object(&object).expect("Failed to update object"); + /// println!("Updated object position"); + /// } + /// ``` + fn update_object(&self, object: &SpatialObject) -> Result<(), String> { + VAULT_MANAGER.lock().unwrap().update_object(object) + } + + /// Transfers a player (object) from one region to another + /// + /// This method moves a spatial object (typically a player) from one region to another + /// in the PebbleVault system. + /// + /// # Arguments + /// + /// * `player_uuid` - UUID of the player to transfer + /// * `from_region_id` - UUID of the source region + /// * `to_region_id` - UUID of the destination region + /// + /// # Returns + /// + /// A Result indicating success or an error string + /// + /// # Examples + /// + /// ``` + /// # use pebble_vault::{PebbleVault, PebbleVaultCustomData}; + /// # use uuid::Uuid; + /// # let pebble_vault = PebbleVault::new().unwrap(); + /// # let region1_id = pebble_vault.create_or_load_region([0.0, 0.0, 0.0], 1000.0).unwrap(); + /// # let region2_id = pebble_vault.create_or_load_region([2000.0, 0.0, 0.0], 1000.0).unwrap(); + /// # let player_id = Uuid::new_v4(); + /// # let custom_data = PebbleVaultCustomData { name: "Player".to_string(), value: 100 }; + /// # pebble_vault.add_object(region1_id, player_id, "player", 10.0, 20.0, 30.0, custom_data).unwrap(); + /// pebble_vault.transfer_player(player_id, region1_id, region2_id) + /// .expect("Failed to transfer player"); + /// println!("Transferred player to new region"); + /// ``` + fn transfer_player(&self, player_uuid: Uuid, from_region_id: Uuid, to_region_id: Uuid) -> Result<(), String> { + VAULT_MANAGER.lock().unwrap().transfer_player(player_uuid, from_region_id, to_region_id) + } + + /// Persists all in-memory databases to disk + /// + /// This method saves all spatial data from memory to the persistent storage. + /// + /// # Returns + /// + /// A Result indicating success or an error string + /// + /// # Examples + /// + /// ``` + /// # use pebble_vault::PebbleVault; + /// # let pebble_vault = PebbleVault::new().unwrap(); + /// pebble_vault.persist_to_disk().expect("Failed to persist data"); + /// println!("Data persisted to disk"); + /// ``` + fn persist_to_disk(&self) -> Result<(), String> { + VAULT_MANAGER.lock().unwrap().persist_to_disk() + } + + /// Gets a reference to a region by its ID + /// + /// This method retrieves a reference to a spatial region in the PebbleVault system. + /// + /// # Arguments + /// + /// * `region_id` - UUID of the region to retrieve + /// + /// # Returns + /// + /// An Option containing a reference to the region if found, or None if not found + /// + /// # Examples + /// + /// ``` + /// # use pebble_vault::PebbleVault; + /// # use uuid::Uuid; + /// # let pebble_vault = PebbleVault::new().unwrap(); + /// # let region_id = pebble_vault.create_or_load_region([0.0, 0.0, 0.0], 1000.0).unwrap(); + /// if let Some(region) = pebble_vault.get_region(region_id) { + /// println!("Found region: {:?}", region); + /// } else { + /// println!("Region not found"); + /// } + /// ``` + fn get_region(&self, region_id: Uuid) -> Option>>> { + VAULT_MANAGER.lock().unwrap().get_region(region_id) + } + + fn new() -> Plugin { + Plugin{} + } +} \ No newline at end of file From 0f8c0d38a0ff8828dc2d9e45a202386fa7e868c9 Mon Sep 17 00:00:00 2001 From: "Tristan Poland (Trident_For_U)" <34868944+tristanpoland@users.noreply.github.com> Date: Tue, 3 Dec 2024 14:25:40 -0500 Subject: [PATCH 10/41] Create README.md --- server/src/server/vault_lib/README.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 server/src/server/vault_lib/README.md diff --git a/server/src/server/vault_lib/README.md b/server/src/server/vault_lib/README.md new file mode 100644 index 0000000..853fef1 --- /dev/null +++ b/server/src/server/vault_lib/README.md @@ -0,0 +1,3 @@ +# Vault Library + +The Vault Library is a core component of Horizon. It is responsible for storing and managing the game world's physical state in 3D space. This includes information about game objects, player states, and other essential data required for the game to function correctly. \ No newline at end of file From 8ca2bcf64ebb14d7db024db3f0d43dd50993f78e Mon Sep 17 00:00:00 2001 From: "Tristan Poland (Trident_For_U)" <34868944+tristanpoland@users.noreply.github.com> Date: Tue, 3 Dec 2024 14:58:48 -0500 Subject: [PATCH 11/41] Partial proof of concept chronos implementation. (Uses Unsafe to help generate a thread as we cant Impl Drop for Plugin externally) --- Cargo.toml | 4 +- plugin_api/Cargo.toml | 1 + plugin_api/src/plugin_imports.rs | 1 + plugins/chronos_plugin/Cargo.toml | 9 ++ plugins/chronos_plugin/src/lib.rs | 179 ++++++++++++++++++++++++++++++ plugins/test_plugin/Cargo.toml | 2 +- 6 files changed, 193 insertions(+), 3 deletions(-) create mode 100644 plugins/chronos_plugin/Cargo.toml create mode 100644 plugins/chronos_plugin/src/lib.rs diff --git a/Cargo.toml b/Cargo.toml index 78efcc3..6601c8e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace] -members = ["server","plugin_api"] +members = ["server","plugin_api", "plugins/chronos_plugin"] resolver = "2" [profile.dev] @@ -12,4 +12,4 @@ lto = "off" [profile.release] codegen-units = 1 -lto = "fat" \ No newline at end of file +lto = "fat" diff --git a/plugin_api/Cargo.toml b/plugin_api/Cargo.toml index 6f4decf..2202292 100644 --- a/plugin_api/Cargo.toml +++ b/plugin_api/Cargo.toml @@ -22,6 +22,7 @@ horizon-plugin-api = "0.1.7" # # ###### BEGIN AUTO-GENERATED PLUGIN DEPENDENCIES - DO NOT EDIT THIS SECTION ###### +chronos_plugin = { path = "../plugins/chronos_plugin", version = "0.1.0" } player_lib = { path = "../plugins/player_lib", version = "0.1.0" } stars_beyond_plugin = { path = "../plugins/stars_beyond", version = "0.1.0" } test_plugin = { path = "../plugins/test_plugin", version = "0.1.0" } diff --git a/plugin_api/src/plugin_imports.rs b/plugin_api/src/plugin_imports.rs index f2c062e..a54de08 100644 --- a/plugin_api/src/plugin_imports.rs +++ b/plugin_api/src/plugin_imports.rs @@ -7,6 +7,7 @@ use std::collections::HashMap; // Invoke the macro with all discovered plugins pub fn load_plugins() -> HashMap<&'static str, LoadedPlugin> { let plugins = crate::load_plugins!( + chronos_plugin, player_lib, stars_beyond_plugin, test_plugin diff --git a/plugins/chronos_plugin/Cargo.toml b/plugins/chronos_plugin/Cargo.toml new file mode 100644 index 0000000..a40ebb6 --- /dev/null +++ b/plugins/chronos_plugin/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "chronos_plugin" +version = "0.1.0" +edition = "2021" + +[dependencies] +horizon-plugin-api = "0.1.7" +horizon_data_types = "0.4.0" +socketioxide = "0.15.1" \ No newline at end of file diff --git a/plugins/chronos_plugin/src/lib.rs b/plugins/chronos_plugin/src/lib.rs new file mode 100644 index 0000000..eb1d0c8 --- /dev/null +++ b/plugins/chronos_plugin/src/lib.rs @@ -0,0 +1,179 @@ +use std::sync::{RwLock, Arc, atomic::{AtomicBool, Ordering}}; +use std::collections::HashMap; +use std::time::{SystemTime, UNIX_EPOCH, Duration}; + +// Import the plugin API publicly to allow the API to make calls against this plugin +pub use horizon_plugin_api::{Plugin, LoadedPlugin}; + +// Time configuration constants +const MINUTES_PER_HOUR: i32 = 60; +const HOURS_PER_DAY: i32 = 24; + +// Global state using static +static mut TIME_STATE: Option>> = None; +static mut TIME_THREAD_RUNNING: Option> = None; + +#[derive(Clone, Copy, Debug)] +pub enum TimeMode { + RealTime(f64), // Multiplier relative to real time + Virtual(f64), // Ticks per second for virtual time + Paused, +} + +struct TimeState { + current_hour: i32, + current_minute: i32, + mode: TimeMode, + start_time: u64, +} + +impl TimeState { + fn new() -> Self { + Self { + current_hour: 6, // Start at 6 AM + current_minute: 0, + mode: TimeMode::Paused, + start_time: SystemTime::now() + .duration_since(UNIX_EPOCH) + .unwrap() + .as_secs(), + } + } +} + +pub trait PluginConstruct { + fn new(plugins: HashMap<&'static str, LoadedPlugin>) -> Plugin; +} + +// Implement constructor for Plugin +impl PluginConstruct for Plugin { + fn new(_plugins: HashMap<&'static str, LoadedPlugin>) -> Plugin { + Self::start_time_server(); + Plugin {} + } +} + +pub trait PluginAPI { + fn start_time_server(); + fn request_time(&self) -> (i32, i32); + fn set_time(&self, hour: i32, minute: i32); + fn set_time_mode(&self, mode: TimeMode); + fn get_time_mode(&self) -> TimeMode; + fn is_daytime(&self) -> bool; + fn get_time_of_day(&self) -> String; +} + +// Implement the PluginAPI trait for Plugin +impl PluginAPI for Plugin { + fn start_time_server() { + unsafe { + if TIME_STATE.is_none() { + TIME_STATE = Some(Arc::new(RwLock::new(TimeState::new()))); + TIME_THREAD_RUNNING = Some(Arc::new(AtomicBool::new(true))); + + if let (Some(time_state), Some(thread_running)) = + (TIME_STATE.as_ref(), TIME_THREAD_RUNNING.as_ref()) { + let time_state = time_state.clone(); + let thread_running = thread_running.clone(); + + std::thread::spawn(move || { + while thread_running.load(Ordering::SeqCst) { + let mut state = time_state.write().unwrap(); + + match state.mode { + TimeMode::RealTime(multiplier) => { + let elapsed_real_seconds = SystemTime::now() + .duration_since(UNIX_EPOCH) + .unwrap() + .as_secs() - state.start_time; + + let elapsed_game_seconds = (elapsed_real_seconds as f64 * multiplier) as i32; + let total_minutes = elapsed_game_seconds / 60; + + state.current_minute = total_minutes % MINUTES_PER_HOUR; + state.current_hour = (total_minutes / MINUTES_PER_HOUR) % HOURS_PER_DAY; + }, + TimeMode::Virtual(ticks_per_second) => { + state.current_minute += 1; + if state.current_minute >= MINUTES_PER_HOUR { + state.current_minute = 0; + state.current_hour = (state.current_hour + 1) % HOURS_PER_DAY; + } + drop(state); // Release lock before sleeping + std::thread::sleep(Duration::from_secs_f64(1.0 / ticks_per_second)); + }, + TimeMode::Paused => { + drop(state); // Release lock before sleeping + std::thread::sleep(Duration::from_millis(100)); + } + } + } + }); + } + } + } + } + + fn request_time(&self) -> (i32, i32) { + unsafe { + if let Some(time_state) = &TIME_STATE { + let state = time_state.read().unwrap(); + (state.current_hour, state.current_minute) + } else { + (0, 0) + } + } + } + + fn set_time(&self, hour: i32, minute: i32) { + unsafe { + if let Some(time_state) = &TIME_STATE { + let mut state = time_state.write().unwrap(); + state.current_hour = hour.clamp(0, HOURS_PER_DAY - 1); + state.current_minute = minute.clamp(0, MINUTES_PER_HOUR - 1); + } + } + } + + fn set_time_mode(&self, mode: TimeMode) { + unsafe { + if let Some(time_state) = &TIME_STATE { + let mut state = time_state.write().unwrap(); + state.mode = mode; + + if matches!(mode, TimeMode::RealTime(_)) { + state.start_time = SystemTime::now() + .duration_since(UNIX_EPOCH) + .unwrap() + .as_secs(); + } + } + } + } + + fn get_time_mode(&self) -> TimeMode { + unsafe { + if let Some(time_state) = &TIME_STATE { + let state = time_state.read().unwrap(); + state.mode + } else { + TimeMode::Paused + } + } + } + + fn is_daytime(&self) -> bool { + let (hour, _) = self.request_time(); + hour >= 6 && hour < 18 + } + + fn get_time_of_day(&self) -> String { + let (hour, _) = self.request_time(); + match hour { + 5..=8 => "Dawn".to_string(), + 9..=16 => "Day".to_string(), + 17..=20 => "Dusk".to_string(), + _ => "Night".to_string(), + } + } +} \ No newline at end of file diff --git a/plugins/test_plugin/Cargo.toml b/plugins/test_plugin/Cargo.toml index 15887b3..8c45d25 100644 --- a/plugins/test_plugin/Cargo.toml +++ b/plugins/test_plugin/Cargo.toml @@ -5,5 +5,5 @@ edition = "2021" [dependencies] horizon-plugin-api = "0.1.7" -horizon_data_types = "0.3.0" +horizon_data_types = "0.4.0" socketioxide = "0.15.1" From 7ed8932a7a6cc5a145e0e42082d971249428721d Mon Sep 17 00:00:00 2001 From: "Tristan Poland (Trident_For_U)" <34868944+tristanpoland@users.noreply.github.com> Date: Tue, 3 Dec 2024 15:02:16 -0500 Subject: [PATCH 12/41] Update lib.rs --- plugins/chronos_plugin/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/chronos_plugin/src/lib.rs b/plugins/chronos_plugin/src/lib.rs index eb1d0c8..967e250 100644 --- a/plugins/chronos_plugin/src/lib.rs +++ b/plugins/chronos_plugin/src/lib.rs @@ -66,6 +66,7 @@ pub trait PluginAPI { // Implement the PluginAPI trait for Plugin impl PluginAPI for Plugin { fn start_time_server() { + println!("Chronos active: WARNING: This plugin is still in proof of concept stage and has the potential to leak resources."); unsafe { if TIME_STATE.is_none() { TIME_STATE = Some(Arc::new(RwLock::new(TimeState::new()))); From 25802dc10a5199256a8fbf455a5e54ea7751a953 Mon Sep 17 00:00:00 2001 From: Caznix Date: Tue, 3 Dec 2024 16:44:22 -0500 Subject: [PATCH 13/41] Refactor chronos to no longer be unsafe Co-authored-by: Tristan Poland (Trident_For_U) --- .vscode/settings.json | 2 +- plugins/chronos_plugin/Cargo.toml | 4 +- plugins/chronos_plugin/src/lib.rs | 163 +++++++++++++++--------------- 3 files changed, 84 insertions(+), 85 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 76e0f65..9eb0816 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -2,5 +2,5 @@ "LineNumberDeco.enableRainbow": false, "CodeGPT.apiKey": "Ollama", "LineNumberDeco.enableRelativeLine": false, - "rust-analyzer.checkOnSave": false + "rust-analyzer.checkOnSave": true } \ No newline at end of file diff --git a/plugins/chronos_plugin/Cargo.toml b/plugins/chronos_plugin/Cargo.toml index a40ebb6..cf924c4 100644 --- a/plugins/chronos_plugin/Cargo.toml +++ b/plugins/chronos_plugin/Cargo.toml @@ -6,4 +6,6 @@ edition = "2021" [dependencies] horizon-plugin-api = "0.1.7" horizon_data_types = "0.4.0" -socketioxide = "0.15.1" \ No newline at end of file +lazy_static = "1.5.0" +parking_lot = "0.12.3" +socketioxide = "0.15.1" diff --git a/plugins/chronos_plugin/src/lib.rs b/plugins/chronos_plugin/src/lib.rs index 967e250..ed61ec4 100644 --- a/plugins/chronos_plugin/src/lib.rs +++ b/plugins/chronos_plugin/src/lib.rs @@ -1,6 +1,10 @@ -use std::sync::{RwLock, Arc, atomic::{AtomicBool, Ordering}}; + +use std::sync::{Arc, atomic::{AtomicBool, Ordering}}; +use parking_lot::RwLock; use std::collections::HashMap; use std::time::{SystemTime, UNIX_EPOCH, Duration}; +use std::sync::OnceLock; +use lazy_static::lazy_static; // Import the plugin API publicly to allow the API to make calls against this plugin pub use horizon_plugin_api::{Plugin, LoadedPlugin}; @@ -10,8 +14,22 @@ const MINUTES_PER_HOUR: i32 = 60; const HOURS_PER_DAY: i32 = 24; // Global state using static -static mut TIME_STATE: Option>> = None; -static mut TIME_THREAD_RUNNING: Option> = None; +//static mut TIME_STATE: Option>> = None; + + +lazy_static! { + static ref TIME_STATE: OnceLock>> = OnceLock::new(); + static ref TIME_THREAD_RUNNING: AtomicBool = AtomicBool::new(false); +} + +fn time_state() -> Arc> { + let timestate = TIME_STATE.get_or_init(|| { + Arc::new(RwLock::new(TimeState::new())) + }); + return timestate.clone(); +} + + #[derive(Clone, Copy, Debug)] pub enum TimeMode { @@ -29,6 +47,7 @@ struct TimeState { impl TimeState { fn new() -> Self { + println!("Creating new TimeState"); Self { current_hour: 6, // Start at 6 AM current_minute: 0, @@ -66,106 +85,84 @@ pub trait PluginAPI { // Implement the PluginAPI trait for Plugin impl PluginAPI for Plugin { fn start_time_server() { - println!("Chronos active: WARNING: This plugin is still in proof of concept stage and has the potential to leak resources."); - unsafe { - if TIME_STATE.is_none() { - TIME_STATE = Some(Arc::new(RwLock::new(TimeState::new()))); - TIME_THREAD_RUNNING = Some(Arc::new(AtomicBool::new(true))); - - if let (Some(time_state), Some(thread_running)) = - (TIME_STATE.as_ref(), TIME_THREAD_RUNNING.as_ref()) { - let time_state = time_state.clone(); - let thread_running = thread_running.clone(); - - std::thread::spawn(move || { - while thread_running.load(Ordering::SeqCst) { - let mut state = time_state.write().unwrap(); + + if let Some(time_state) = TIME_STATE.get() { + let time_state = time_state.clone(); + let thread_running = TIME_THREAD_RUNNING.load(Ordering::SeqCst); + + std::thread::spawn(move || { + while thread_running { + let mut state = time_state.write(); + match state.mode { + TimeMode::RealTime(multiplier) => { + let elapsed_real_seconds = SystemTime::now() + .duration_since(UNIX_EPOCH) + .unwrap() + .as_secs() - state.start_time; + + let elapsed_game_seconds = (elapsed_real_seconds as f64 * multiplier) as i32; + let total_minutes = elapsed_game_seconds / 60; - match state.mode { - TimeMode::RealTime(multiplier) => { - let elapsed_real_seconds = SystemTime::now() - .duration_since(UNIX_EPOCH) - .unwrap() - .as_secs() - state.start_time; - - let elapsed_game_seconds = (elapsed_real_seconds as f64 * multiplier) as i32; - let total_minutes = elapsed_game_seconds / 60; - - state.current_minute = total_minutes % MINUTES_PER_HOUR; - state.current_hour = (total_minutes / MINUTES_PER_HOUR) % HOURS_PER_DAY; - }, - TimeMode::Virtual(ticks_per_second) => { - state.current_minute += 1; - if state.current_minute >= MINUTES_PER_HOUR { - state.current_minute = 0; - state.current_hour = (state.current_hour + 1) % HOURS_PER_DAY; - } - drop(state); // Release lock before sleeping - std::thread::sleep(Duration::from_secs_f64(1.0 / ticks_per_second)); - }, - TimeMode::Paused => { - drop(state); // Release lock before sleeping - std::thread::sleep(Duration::from_millis(100)); - } + state.current_minute = total_minutes % MINUTES_PER_HOUR; + state.current_hour = (total_minutes / MINUTES_PER_HOUR) % HOURS_PER_DAY; + }, + TimeMode::Virtual(ticks_per_second) => { + state.current_minute += 1; + if state.current_minute >= MINUTES_PER_HOUR { + state.current_minute = 0; + state.current_hour = (state.current_hour + 1) % HOURS_PER_DAY; } + drop(state); // Release lock before sleeping + std::thread::sleep(Duration::from_secs_f64(1.0 / ticks_per_second)); + }, + TimeMode::Paused => { + drop(state); // Release lock before sleeping + std::thread::sleep(Duration::from_millis(100)); } - }); + } } - } + }); } } fn request_time(&self) -> (i32, i32) { - unsafe { - if let Some(time_state) = &TIME_STATE { - let state = time_state.read().unwrap(); - (state.current_hour, state.current_minute) - } else { - (0, 0) - } - } + let binding = time_state(); + let time_state = binding.read(); + return (time_state.current_hour, time_state.current_minute); } fn set_time(&self, hour: i32, minute: i32) { - unsafe { - if let Some(time_state) = &TIME_STATE { - let mut state = time_state.write().unwrap(); - state.current_hour = hour.clamp(0, HOURS_PER_DAY - 1); - state.current_minute = minute.clamp(0, MINUTES_PER_HOUR - 1); - } - } - } - fn set_time_mode(&self, mode: TimeMode) { - unsafe { - if let Some(time_state) = &TIME_STATE { - let mut state = time_state.write().unwrap(); - state.mode = mode; - - if matches!(mode, TimeMode::RealTime(_)) { - state.start_time = SystemTime::now() - .duration_since(UNIX_EPOCH) - .unwrap() - .as_secs(); - } - } - } + let binding = time_state(); + let mut time_state = binding.write(); + time_state.current_hour = hour; + time_state.current_minute = minute; } + fn get_time_mode(&self) -> TimeMode { - unsafe { - if let Some(time_state) = &TIME_STATE { - let state = time_state.read().unwrap(); - state.mode - } else { - TimeMode::Paused - } + let time_state = time_state().read().mode; + match time_state { + TimeMode::RealTime(real_time) => TimeMode::RealTime(real_time), + TimeMode::Virtual(virt_time) => TimeMode::Virtual(virt_time), + TimeMode::Paused => TimeMode::Paused, } } + fn set_time_mode(&self, mode: TimeMode) { + let binding = time_state(); + let mut time_state = binding.write(); + time_state.mode = mode; + } + fn is_daytime(&self) -> bool { let (hour, _) = self.request_time(); - hour >= 6 && hour < 18 + match hour { + 5..=8 => true, + 9..=16 => true, + 17..=20 => true, + _ => false, + } } fn get_time_of_day(&self) -> String { From a7124834716916b175c15341129aa379067b8ba1 Mon Sep 17 00:00:00 2001 From: "Tristan Poland (Trident_For_U)" <34868944+tristanpoland@users.noreply.github.com> Date: Wed, 4 Dec 2024 12:55:44 -0500 Subject: [PATCH 14/41] Added plugin startup time tracking --- plugin_api/build.rs | 3 +- plugin_api/src/lib.rs | 22 ++++++++-- plugin_api/src/plugin_imports.rs | 4 +- server/src/server/mod.rs | 70 ++++++++++++++++++++------------ 4 files changed, 68 insertions(+), 31 deletions(-) diff --git a/plugin_api/build.rs b/plugin_api/build.rs index e67f859..e3d7a98 100644 --- a/plugin_api/build.rs +++ b/plugin_api/build.rs @@ -176,10 +176,11 @@ fn generate_imports_file(plugin_paths: &[(String, String, String)], out_dir: &Pa writeln!(file, "// Do not edit this file manually!\n")?; writeln!(file, "use horizon_plugin_api::LoadedPlugin;")?; writeln!(file, "use std::collections::HashMap;\n")?; + writeln!(file, "use std::time::Duration;\n")?; // Use the macro with discovered plugins writeln!(file, "// Invoke the macro with all discovered plugins")?; - writeln!(file, "pub fn load_plugins() -> HashMap<&'static str, LoadedPlugin> {{")?; + writeln!(file, "pub fn load_plugins() -> (HashMap<&'static str, LoadedPlugin>, HashMap<&'static str, Duration>) {{")?; write!(file, " let plugins = crate::load_plugins!(")?; // Add each plugin to the macro invocation diff --git a/plugin_api/src/lib.rs b/plugin_api/src/lib.rs index 3c44ec3..f40469b 100644 --- a/plugin_api/src/lib.rs +++ b/plugin_api/src/lib.rs @@ -1,5 +1,6 @@ use std::collections::HashMap; -pub use horizon_plugin_api::{Plugin, Pluginstate, Version, get_plugin}; +pub use horizon_plugin_api::{Plugin, Pluginstate, Version, LoadedPlugin}; +use std::time::Duration; pub mod plugin_macro; pub mod plugin_imports; @@ -20,19 +21,32 @@ macro_rules! load_plugins { ($($plugin:ident),* $(,)?) => { { let mut plugins = HashMap::new(); + let mut timings = HashMap::new(); $( + let start = std::time::Instant::now(); plugins.insert( stringify!($plugin), LoadedPlugin { instance: <$plugin::Plugin as $plugin::PluginConstruct>::new(plugins.clone()), } ); + timings.insert(stringify!($plugin), start.elapsed()); )* - plugins + (plugins, timings) } }; } +#[macro_export] +macro_rules! get_plugin { + ($name:ident, $plugins:expr) => { + $plugins + .0.get(stringify!($name)) + .map(|p| &p.instance as &dyn $name::PluginAPI) + .expect(&format!("Plugin {} not found", stringify!($name))) + }; +} + impl PluginManager { /// Allow instantiation of the ``PluginManager`` struct pub fn new() -> PluginManager { @@ -55,10 +69,12 @@ impl PluginManager { self.plugins } - pub fn load_all(&self) { + pub fn load_all(&self) -> (HashMap<&'static str, LoadedPlugin>, HashMap<&'static str, Duration>) { let plugins = plugin_imports::load_plugins(); let my_test_plugin = get_plugin!(test_plugin, plugins); let result = my_test_plugin.thing(); + + plugins } } diff --git a/plugin_api/src/plugin_imports.rs b/plugin_api/src/plugin_imports.rs index a54de08..75b4af4 100644 --- a/plugin_api/src/plugin_imports.rs +++ b/plugin_api/src/plugin_imports.rs @@ -4,8 +4,10 @@ use horizon_plugin_api::LoadedPlugin; use std::collections::HashMap; +use std::time::Duration; + // Invoke the macro with all discovered plugins -pub fn load_plugins() -> HashMap<&'static str, LoadedPlugin> { +pub fn load_plugins() -> (HashMap<&'static str, LoadedPlugin>, HashMap<&'static str, Duration>) { let plugins = crate::load_plugins!( chronos_plugin, player_lib, diff --git a/server/src/server/mod.rs b/server/src/server/mod.rs index 16fbba4..d44e448 100644 --- a/server/src/server/mod.rs +++ b/server/src/server/mod.rs @@ -19,6 +19,8 @@ use anyhow::{Context, Result}; use axum::{routing::get, Router}; use config::ServerConfig; use horizon_data_types::Player; +use horizon_plugin_api::LoadedPlugin; +use std::time::Duration; use horizon_logger::{log_critical, log_debug, log_error, log_info, log_warn}; use parking_lot::RwLock; use plugin_api::{Plugin, Pluginstate}; @@ -41,6 +43,7 @@ pub mod vault_lib; pub struct HorizonServer { config: Arc, threads: RwLock>>, + total_timings: RwLock>, } struct Server { @@ -63,17 +66,28 @@ impl HorizonServer { Ok(Self { config: config::server_config().expect("Failed to load server config"), threads: RwLock::new(Vec::new()), + total_timings: RwLock::new(HashMap::new()), }) } fn spawn_thread(&self) -> Result { let thread = HorizonThread::new(); + let plugins_loaddata = thread.plugins_loaddata.clone(); let thread_id = { let mut threads = self.threads.write(); threads.push(thread.into()); threads.len() - 1 }; + plugins_loaddata.0.iter().for_each(|(name, _)| { + plugins_loaddata.1.get(name).map(|duration| { + let mut total_timings = self.total_timings.write(); + total_timings.entry(name.to_string()) + .and_modify(|e| *e += *duration) + .or_insert(*duration); + }); + }); + Ok(thread_id) } } @@ -83,6 +97,7 @@ impl HorizonServer { //----------------------------------------------------------------------------- struct HorizonThread { players: Mutex>, + plugins_loaddata: (HashMap<&'static str, LoadedPlugin>, HashMap<&'static str, Duration>), plugins: HashMap, handle: tokio::task::JoinHandle<()>, } @@ -90,11 +105,12 @@ struct HorizonThread { impl HorizonThread { fn new() -> Self { let plugin_manager = plugin_api::PluginManager::new(); - plugin_manager.load_all(); + let plugins_loaddata = &plugin_manager.load_all(); let plugins = plugin_manager.get_plugins(); Self { players: Mutex::new(Vec::new()), plugins: plugins, + plugins_loaddata: plugins_loaddata.clone(), handle: tokio::spawn(async move { loop { tokio::time::sleep(std::time::Duration::from_secs(10)).await; @@ -163,7 +179,6 @@ pub async fn start() -> anyhow::Result<()> { let start_time = std::time::Instant::now(); let (layer, io) = SocketIo::new_layer(); - // Initialize server state so we can spawn threads let server = Server::new()?; let thread_count = config::SERVER_CONFIG .get() @@ -180,38 +195,41 @@ pub async fn start() -> anyhow::Result<()> { .map(|config: &Arc| config.port) .unwrap(); - // Start 10 threads initially for handling player connections - let mut count = 0; - //let handles = Vec::new(); - - let mut handles = vec![]; - let spawn_futures: Vec<_> = (0..thread_count).map(|_| { - let server_instance = server.get_instance(); - { - let mut value = handles.clone(); + // Create futures for spawning threads + let spawn_futures: Vec<_> = (0..thread_count) + .map(|_| { + let server_instance = server.get_instance(); async move { - if let Ok(thread_id) = server_instance.read().spawn_thread() { - value.push(thread_id); - } + server_instance.read().spawn_thread() } - } - }).collect(); + }) + .collect(); + + // Wait for all threads to complete spawning + let thread_results = futures::future::join_all(spawn_futures).await; + + // Now that all threads have completed, we can safely access timing data + { + let total_timings = server.instance.read().total_timings.read().clone(); + total_timings.iter().for_each(|(name, duration)| { + log_info!(LOGGER, "SERVER", "Plugin {} took {:?}", name, duration); + }); + } + + log_info!(LOGGER, "SERVER", "Spawned {} threads", thread_count); + let elapsed = start_time.elapsed(); + log_info!(LOGGER, "SERVER", "Server initialization took {:?}", elapsed); - // Configure socket namespaces + // Configure socket namespaces and start server io.ns("/", on_connect); io.ns("/custom", on_connect); - // Build the application with routes + let app = Router::new() .route("/", get(|| async { "Horizon Server Running" })) .layer(layer); - // Start the server - let full_address = format!("{}:{}", address.to_string(), port.to_string()); - log_info!(LOGGER, "SOCKET NET", "Starting server on {}:{}", address, port); - futures::future::join_all(spawn_futures).await; - log_info!(LOGGER, "SERVER", "Spawned {} threads", thread_count); - let elapsed = start_time.elapsed(); - log_info!(LOGGER, "SERVER", "Server initialization took {:?}", elapsed); + let full_address = format!("{}:{}", address, port); + log_info!(LOGGER, "SOCKET NET", "Starting server on {}", full_address); let listener = tokio::net::TcpListener::bind(&full_address) .await @@ -220,4 +238,4 @@ pub async fn start() -> anyhow::Result<()> { .await .context("Failed to start server")?; Ok(()) -} +} \ No newline at end of file From dab0fa244725b8aab37558f163e9830a2915a1bc Mon Sep 17 00:00:00 2001 From: "Tristan Poland (Trident_For_U)" <34868944+tristanpoland@users.noreply.github.com> Date: Thu, 5 Dec 2024 21:04:10 -0500 Subject: [PATCH 15/41] Working on unreal adapter --- .vscode/settings.json | 2 +- Cargo.lock | 1157 +++++++---------- Cargo.toml | 56 +- {plugin-api => plugin_api}/Cargo.lock | 0 {plugin-api => plugin_api}/Cargo.toml | 11 +- {plugin-api => plugin_api}/build.rs | 7 +- .../diagrams/API.dwawio.drawio | 0 {plugin-api => plugin_api}/gen_uuid.sh | 0 {plugin-api => plugin_api}/src/components.rs | 0 {plugin-api => plugin_api}/src/lib.rs | 21 +- .../src/plugin_imports.rs | 7 +- .../src/plugin_macro.rs | 0 plugins.zip | Bin 5594 -> 0 bytes plugins/pebble_vault/Cargo.toml | 14 - plugins/pebble_vault/src/lib.rs | 339 ----- plugins/stars_beyond/Cargo.lock | 947 -------------- plugins/stars_beyond/Cargo.toml | 2 +- plugins/stars_beyond/src/lib.rs | 2 - plugins/test_plugin/Cargo.lock | 947 -------------- plugins/test_plugin/Cargo.toml | 9 - plugins/test_plugin/src/lib.rs | 45 - plugins/unreal_adapter_horizon/.gitignore | 21 + plugins/unreal_adapter_horizon/Cargo.toml | 9 + plugins/unreal_adapter_horizon/LICENSE | 201 +++ plugins/unreal_adapter_horizon/README.md | 5 + plugins/unreal_adapter_horizon/src/lib.rs | 45 + server/Cargo.toml | 37 + server/src/collision.rs | 239 ++++ server/src/main.rs | 84 ++ server/src/server/config.rs | 46 + server/src/server/event_rep/mod.rs | 70 + server/src/server/event_rep/structs.rs | 87 ++ server/src/server/mod.rs | 235 ++++ {src => server/src}/splash.rs | 27 +- src/config.rs | 18 - src/macros.rs | 28 - src/main.rs | 311 ----- src/players.rs | 583 --------- src/plugin_manager.rs | 207 --- 39 files changed, 1619 insertions(+), 4200 deletions(-) rename {plugin-api => plugin_api}/Cargo.lock (100%) rename {plugin-api => plugin_api}/Cargo.toml (64%) rename {plugin-api => plugin_api}/build.rs (98%) rename {plugin-api => plugin_api}/diagrams/API.dwawio.drawio (100%) rename {plugin-api => plugin_api}/gen_uuid.sh (100%) rename {plugin-api => plugin_api}/src/components.rs (100%) rename {plugin-api => plugin_api}/src/lib.rs (70%) rename {plugin-api => plugin_api}/src/plugin_imports.rs (79%) rename {plugin-api => plugin_api}/src/plugin_macro.rs (100%) delete mode 100644 plugins.zip delete mode 100644 plugins/pebble_vault/Cargo.toml delete mode 100644 plugins/pebble_vault/src/lib.rs delete mode 100644 plugins/stars_beyond/Cargo.lock delete mode 100644 plugins/test_plugin/Cargo.lock delete mode 100644 plugins/test_plugin/Cargo.toml delete mode 100644 plugins/test_plugin/src/lib.rs create mode 100644 plugins/unreal_adapter_horizon/.gitignore create mode 100644 plugins/unreal_adapter_horizon/Cargo.toml create mode 100644 plugins/unreal_adapter_horizon/LICENSE create mode 100644 plugins/unreal_adapter_horizon/README.md create mode 100644 plugins/unreal_adapter_horizon/src/lib.rs create mode 100644 server/Cargo.toml create mode 100644 server/src/collision.rs create mode 100644 server/src/main.rs create mode 100644 server/src/server/config.rs create mode 100644 server/src/server/event_rep/mod.rs create mode 100644 server/src/server/event_rep/structs.rs create mode 100644 server/src/server/mod.rs rename {src => server/src}/splash.rs (78%) delete mode 100644 src/config.rs delete mode 100644 src/macros.rs delete mode 100644 src/main.rs delete mode 100644 src/players.rs delete mode 100644 src/plugin_manager.rs diff --git a/.vscode/settings.json b/.vscode/settings.json index 76e0f65..9eb0816 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -2,5 +2,5 @@ "LineNumberDeco.enableRainbow": false, "CodeGPT.apiKey": "Ollama", "LineNumberDeco.enableRelativeLine": false, - "rust-analyzer.checkOnSave": false + "rust-analyzer.checkOnSave": true } \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index 8fbe569..8c97014 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,34 +1,12 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 4 - -[[package]] -name = "Horizon" -version = "0.13.0" -dependencies = [ - "horizon_data_types", - "horizon_logger", - "libloading", - "mimalloc", - "notify", - "once_cell", - "plugin-api", - "rayon", - "serde", - "serde_json", - "serde_yaml", - "socketioxide", - "tokio", - "tracing", - "uuid", - "viz", -] +version = 3 [[package]] name = "PebbleVault" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8db0aab8248c160fa4adc33c3e915cabc6e6674884dd8dae685706e4bd6c8aa" +checksum = "4e2e009433eb77bdcedb67253b01e2ad845560088f89025b207b05d708e12218" dependencies = [ "bindgen", "colored", @@ -47,53 +25,18 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.21.0" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ "gimli", ] [[package]] -name = "adler" -version = "1.0.2" +name = "adler2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - -[[package]] -name = "aead" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" -dependencies = [ - "crypto-common", - "generic-array", -] - -[[package]] -name = "aes" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" -dependencies = [ - "cfg-if", - "cipher", - "cpufeatures", -] - -[[package]] -name = "aes-gcm" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" -dependencies = [ - "aead", - "aes", - "cipher", - "ctr", - "ghash", - "subtle", -] +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" [[package]] name = "ahash" @@ -131,6 +74,61 @@ dependencies = [ "libc", ] +[[package]] +name = "anstream" +version = "0.6.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" + +[[package]] +name = "anstyle-parse" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" +dependencies = [ + "windows-sys 0.59.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125" +dependencies = [ + "anstyle", + "windows-sys 0.59.0", +] + +[[package]] +name = "anyhow" +version = "1.0.94" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1fd03a028ef38ba2276dce7e33fcd6369c158a1bca17946c4b1b701891c1ff7" + [[package]] name = "approx" version = "0.5.1" @@ -151,39 +149,82 @@ dependencies = [ "syn", ] -[[package]] -name = "atomic-waker" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" - [[package]] name = "autocfg" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" +[[package]] +name = "axum" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f" +dependencies = [ + "async-trait", + "axum-core", + "bytes", + "futures-util", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-util", + "itoa", + "matchit 0.7.3", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "rustversion", + "serde", + "serde_json", + "serde_path_to_error", + "serde_urlencoded", + "sync_wrapper 1.0.2", + "tokio", + "tower", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "axum-core" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" +dependencies = [ + "async-trait", + "bytes", + "futures-util", + "http", + "http-body", + "http-body-util", + "mime", + "pin-project-lite", + "rustversion", + "sync_wrapper 1.0.2", + "tower-layer", + "tower-service", + "tracing", +] + [[package]] name = "backtrace" -version = "0.3.71" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", "miniz_oxide", "object", "rustc-demangle", + "windows-targets 0.52.6", ] -[[package]] -name = "base64" -version = "0.21.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" - [[package]] name = "base64" version = "0.22.1" @@ -205,7 +246,7 @@ version = "0.69.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088" dependencies = [ - "bitflags 2.6.0", + "bitflags", "cexpr", "clang-sys", "itertools", @@ -222,12 +263,6 @@ dependencies = [ "which", ] -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - [[package]] name = "bitflags" version = "2.6.0" @@ -251,9 +286,9 @@ checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "bytemuck" -version = "1.19.0" +version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8334215b81e418a0a7bdb8ef0849474f40bb10c8b71f1c4ed315cff49f32494d" +checksum = "8b37c88a63ffd85d15b406896cc343916d7cf57838a847b3a6f2ca5d39a5695a" [[package]] name = "byteorder" @@ -263,18 +298,18 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" +checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" dependencies = [ "serde", ] [[package]] name = "cc" -version = "1.1.31" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f" +checksum = "f34d93e62b03caf570cccc334cbc6c2fceca82f39211051345108adcba3eebdc" dependencies = [ "shlex", ] @@ -294,6 +329,12 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + [[package]] name = "chrono" version = "0.4.38" @@ -308,16 +349,6 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "cipher" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" -dependencies = [ - "crypto-common", - "inout", -] - [[package]] name = "clang-sys" version = "1.8.1" @@ -329,6 +360,12 @@ dependencies = [ "libloading", ] +[[package]] +name = "colorchoice" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" + [[package]] name = "colored" version = "2.1.0" @@ -348,25 +385,10 @@ dependencies = [ "encode_unicode", "lazy_static", "libc", - "unicode-width", + "unicode-width 0.1.14", "windows-sys 0.52.0", ] -[[package]] -name = "cookie" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ddef33a339a91ea89fb53151bd0a4689cfce27055c291dfa69945475d22c747" -dependencies = [ - "aes-gcm", - "base64 0.22.1", - "percent-encoding", - "rand", - "subtle", - "time", - "version_check", -] - [[package]] name = "core-foundation-sys" version = "0.8.7" @@ -375,9 +397,9 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.14" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" +checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" dependencies = [ "libc", ] @@ -414,17 +436,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", - "rand_core", "typenum", ] [[package]] -name = "ctr" -version = "0.9.2" +name = "ctrlc" +version = "3.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" +checksum = "90eeab0aa92f3f9b4e87f258c72b139c207d251f9cbc1080a0086b86a8870dd3" dependencies = [ - "cipher", + "nix", + "windows-sys 0.59.0", ] [[package]] @@ -434,12 +456,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" [[package]] -name = "deranged" -version = "0.3.11" +name = "dhat" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +checksum = "98cd11d84628e233de0ce467de10b8633f4ddaecafadefc86e13b84b8739b827" dependencies = [ - "powerfmt", + "backtrace", + "lazy_static", + "mintex", + "parking_lot", + "rustc-hash", + "serde", + "serde_json", + "thousands", ] [[package]] @@ -470,7 +499,7 @@ version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec84aea019c24ae0cae29a6306b1b9b6bd91a4c950542d804b742435ed797f0c" dependencies = [ - "base64 0.22.1", + "base64", "bytes", "futures-core", "futures-util", @@ -491,6 +520,29 @@ dependencies = [ "tower-service", ] +[[package]] +name = "env_filter" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f2c92ceda6ceec50f43169f9ee8424fe2db276791afde7b2cd8bc084cb376ab" +dependencies = [ + "log", + "regex", +] + +[[package]] +name = "env_logger" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d" +dependencies = [ + "anstream", + "anstyle", + "env_filter", + "humantime", + "log", +] + [[package]] name = "equivalent" version = "1.0.1" @@ -499,19 +551,19 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.9" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "ez_logging" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c115264dbaee9b97540606301524ee972121f157a734c6a455b7bb15581bb2e8" +checksum = "ee4ade5b849d2c9c543d236cbf4f5e4760e242e47c8977d58d1087259c68a523" dependencies = [ "chrono", ] @@ -534,41 +586,12 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4" -[[package]] -name = "filetime" -version = "0.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586" -dependencies = [ - "cfg-if", - "libc", - "libredox", - "windows-sys 0.59.0", -] - [[package]] name = "fnv" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" -[[package]] -name = "form-data" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c9f1255b81bd56192c67475eefa322f44b85440030547cea7664fd5dc248964" -dependencies = [ - "bytes", - "futures-util", - "http", - "httparse", - "memchr", - "mime", - "serde", - "thiserror", - "tracing", -] - [[package]] name = "form_urlencoded" version = "1.2.1" @@ -579,12 +602,18 @@ dependencies = [ ] [[package]] -name = "fsevent-sys" -version = "4.1.0" +name = "futures" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76ee7a02da4d231650c7cea31349b889be2f45ddb3ef3032d2ec8185f6313fd2" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ - "libc", + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", ] [[package]] @@ -594,6 +623,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", + "futures-sink", ] [[package]] @@ -602,6 +632,17 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" +[[package]] +name = "futures-executor" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + [[package]] name = "futures-io" version = "0.3.31" @@ -637,6 +678,7 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ + "futures-channel", "futures-core", "futures-io", "futures-macro", @@ -669,21 +711,11 @@ dependencies = [ "wasi", ] -[[package]] -name = "ghash" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1" -dependencies = [ - "opaque-debug", - "polyval", -] - [[package]] name = "gimli" -version = "0.28.1" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "glob" @@ -691,25 +723,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" -[[package]] -name = "h2" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" -dependencies = [ - "atomic-waker", - "bytes", - "fnv", - "futures-core", - "futures-sink", - "http", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", -] - [[package]] name = "hash32" version = "0.3.1" @@ -730,9 +743,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.0" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" [[package]] name = "hashlink" @@ -743,30 +756,6 @@ dependencies = [ "hashbrown 0.14.5", ] -[[package]] -name = "headers" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "322106e6bd0cba2d5ead589ddb8150a13d7c4217cf80d7c4f682ca994ccc6aa9" -dependencies = [ - "base64 0.21.7", - "bytes", - "headers-core", - "http", - "httpdate", - "mime", - "sha1", -] - -[[package]] -name = "headers-core" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54b4a22553d4242c49fddb9ba998a99962b5cc6f22cb5a3482bec22522403ce4" -dependencies = [ - "http", -] - [[package]] name = "heapless" version = "0.8.0" @@ -777,12 +766,6 @@ dependencies = [ "stable_deref_trait", ] -[[package]] -name = "hermit-abi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" - [[package]] name = "home" version = "0.5.9" @@ -794,18 +777,47 @@ dependencies = [ [[package]] name = "horizon-plugin-api" -version = "0.1.7" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be8a5ded0da09b87361bfc215a7512a63cdf6091b23d1612d575f7305778e981" +checksum = "1d996c0f558406a4a8e977a4647b6a01b8f1af1f37e9f2206be290db024d5ea4" dependencies = [ "socketioxide", ] +[[package]] +name = "horizon-server" +version = "0.13.0" +dependencies = [ + "PebbleVault", + "anyhow", + "axum", + "ctrlc", + "dhat", + "env_logger", + "futures", + "horizon-plugin-api", + "horizon_data_types", + "horizon_logger", + "lazy_static", + "nalgebra", + "once_cell", + "parking_lot", + "plugin_api", + "rayon", + "rmpv", + "rstar", + "serde", + "serde_json", + "socketioxide", + "tokio", + "uuid", +] + [[package]] name = "horizon_data_types" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eed398874caaec1768e6d58d66b130413132c4f3a07d45679e27549c87657e29" +checksum = "d8f3c413e1051396fffb4da30445e4a29f6c8a6e06b4670dd1b20049266d9d42" dependencies = [ "bincode", "nalgebra", @@ -833,9 +845,9 @@ dependencies = [ [[package]] name = "http" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea" dependencies = [ "bytes", "fnv", @@ -877,16 +889,21 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" +[[package]] +name = "humantime" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" + [[package]] name = "hyper" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbbff0a806a4728c99295b254c8838933b5b082d75e3cb70c8dab21fdfbcfa9a" +checksum = "97818827ef4f364230e16705d4706e2897df2bb60617d6ca15d598025a3c481f" dependencies = [ "bytes", "futures-channel", "futures-util", - "h2", "http", "http-body", "httparse", @@ -899,9 +916,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ "bytes", "futures-util", @@ -910,6 +927,7 @@ dependencies = [ "hyper", "pin-project-lite", "tokio", + "tower-service", ] [[package]] @@ -937,64 +955,32 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" +checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" dependencies = [ "equivalent", - "hashbrown 0.15.0", + "hashbrown 0.15.2", ] [[package]] name = "indicatif" -version = "0.17.8" +version = "0.17.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "763a5a8f45087d6bcea4222e7b72c291a054edf80e4ef6efd2a4979878c7bea3" +checksum = "cbf675b85ed934d3c67b5c5469701eec7db22689d0a2139d856e0925fa28b281" dependencies = [ "console", - "instant", "number_prefix", "portable-atomic", - "unicode-width", + "unicode-width 0.2.0", + "web-time", ] [[package]] -name = "inotify" -version = "0.10.2" +name = "is_terminal_polyfill" +version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdd168d97690d0b8c412d6b6c10360277f4d7ee495c5d0d5d5fe0854923255cc" -dependencies = [ - "bitflags 1.3.2", - "inotify-sys", - "libc", -] - -[[package]] -name = "inotify-sys" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e05c02b5e89bff3b946cedeca278abc628fe811e604f027c45a8aa3cf793d0eb" -dependencies = [ - "libc", -] - -[[package]] -name = "inout" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" -dependencies = [ - "generic-array", -] - -[[package]] -name = "instant" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" -dependencies = [ - "cfg-if", -] +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "itertools" @@ -1007,39 +993,20 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.11" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" [[package]] name = "js-sys" -version = "0.3.72" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" +checksum = "a865e038f7f6ed956f788f0d7d60c541fff74c7bd74272c5d4cf15c63743e705" dependencies = [ + "once_cell", "wasm-bindgen", ] -[[package]] -name = "kqueue" -version = "1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7447f1ca1b7b563588a205fe93dea8df60fd981423a768bc1c0ded35ed147d0c" -dependencies = [ - "kqueue-sys", - "libc", -] - -[[package]] -name = "kqueue-sys" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed9625ffda8729b85e45cf04090035ac368927b8cebc34898e7c120f52e4838b" -dependencies = [ - "bitflags 1.3.2", - "libc", -] - [[package]] name = "lazy_static" version = "1.5.0" @@ -1054,15 +1021,15 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.161" +version = "0.2.167" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" +checksum = "09d6582e104315a817dff97f75133544b2e094ee22447d2acf4a74e189ba06fc" [[package]] name = "libloading" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" +checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" dependencies = [ "cfg-if", "windows-targets 0.52.6", @@ -1074,27 +1041,6 @@ version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" -[[package]] -name = "libmimalloc-sys" -version = "0.1.39" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23aa6811d3bd4deb8a84dde645f943476d13b248d818edcf8ce0b2f37f036b44" -dependencies = [ - "cc", - "libc", -] - -[[package]] -name = "libredox" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" -dependencies = [ - "bitflags 2.6.0", - "libc", - "redox_syscall", -] - [[package]] name = "libsqlite3-sys" version = "0.30.1" @@ -1112,6 +1058,16 @@ version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +[[package]] +name = "lock_api" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +dependencies = [ + "autocfg", + "scopeguard", +] + [[package]] name = "log" version = "0.4.22" @@ -1129,9 +1085,15 @@ dependencies = [ [[package]] name = "matchit" -version = "0.8.4" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" +checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" + +[[package]] +name = "matchit" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd0aa4b8ca861b08d68afc8702af3250776898c1508b278e1da9d01e01d4b45c" [[package]] name = "matrixmultiply" @@ -1149,15 +1111,6 @@ version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" -[[package]] -name = "mimalloc" -version = "0.1.43" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68914350ae34959d83f732418d51e2427a794055d0b9529f48259ac07af65633" -dependencies = [ - "libmimalloc-sys", -] - [[package]] name = "mime" version = "0.3.17" @@ -1172,31 +1125,35 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.4" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" dependencies = [ - "adler", + "adler2", ] +[[package]] +name = "mintex" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bec4598fddb13cc7b528819e697852653252b760f1228b7642679bf2ff2cd07" + [[package]] name = "mio" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" +checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" dependencies = [ - "hermit-abi", "libc", - "log", "wasi", "windows-sys 0.52.0", ] [[package]] name = "nalgebra" -version = "0.33.1" +version = "0.33.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bf139e93ad757869338ad85239cb1d6c067b23b94e5846e637ca6328ee4be60" +checksum = "26aecdf64b707efd1310e3544d709c5c0ac61c13756046aaaba41be5c4f66a3b" dependencies = [ "approx", "matrixmultiply", @@ -1221,41 +1178,25 @@ dependencies = [ ] [[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - -[[package]] -name = "notify" -version = "7.0.0" +name = "nix" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c533b4c39709f9ba5005d8002048266593c1cfaf3c5f0739d5b8ab0c6c504009" +checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" dependencies = [ - "bitflags 2.6.0", - "filetime", - "fsevent-sys", - "inotify", - "kqueue", + "bitflags", + "cfg-if", + "cfg_aliases", "libc", - "log", - "mio", - "notify-types", - "walkdir", - "windows-sys 0.52.0", ] [[package]] -name = "notify-types" -version = "1.0.0" +name = "nom" +version = "7.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7393c226621f817964ffb3dc5704f9509e107a8b024b489cc2c1b217378785df" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" dependencies = [ - "instant", + "memchr", + "minimal-lexical", ] [[package]] @@ -1288,12 +1229,6 @@ dependencies = [ "serde", ] -[[package]] -name = "num-conv" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" - [[package]] name = "num-integer" version = "0.1.46" @@ -1332,9 +1267,9 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "object" -version = "0.32.2" +version = "0.36.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" dependencies = [ "memchr", ] @@ -1345,12 +1280,6 @@ version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" -[[package]] -name = "opaque-debug" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" - [[package]] name = "overload" version = "0.1.1" @@ -1358,39 +1287,39 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] -name = "paste" -version = "1.0.15" +name = "parking_lot" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" +dependencies = [ + "lock_api", + "parking_lot_core", +] [[package]] -name = "path-tree" -version = "0.8.1" +name = "parking_lot_core" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c7fabb0b56aba5d2eb3fa9b1547c187f21f8c051295a7b97a50be6a9332f4cb" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ + "cfg-if", + "libc", + "redox_syscall", "smallvec", + "windows-targets 0.52.6", ] [[package]] -name = "pathdiff" -version = "0.2.2" +name = "paste" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d61c5ce1153ab5b689d0c074c4e7fc613e942dfb7dd9eea5ab202d2ad91fe361" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] -name = "pebblevault_plugin" -version = "0.1.0" -dependencies = [ - "PebbleVault", - "async-trait", - "horizon-plugin-api", - "horizon_data_types", - "horizon_logger", - "once_cell", - "serde", - "uuid", -] +name = "pathdiff" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3" [[package]] name = "percent-encoding" @@ -1400,9 +1329,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" [[package]] name = "pin-utils" @@ -1417,45 +1346,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] -name = "plugin-api" +name = "plugin_api" version = "0.3.0" dependencies = [ "async-trait", "horizon-plugin-api", "horizon_data_types", "pathdiff", - "pebblevault_plugin", "socketioxide", "stars_beyond_plugin", - "test_plugin", "tokio", "toml_edit", + "unreal_adapter_horizon", "uuid", ] -[[package]] -name = "polyval" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" -dependencies = [ - "cfg-if", - "cpufeatures", - "opaque-debug", - "universal-hash", -] - [[package]] name = "portable-atomic" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" - -[[package]] -name = "powerfmt" -version = "0.2.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" +checksum = "280dc24453071f1b63954171985a0b0d30058d287960968b9b2aca264c8d4ee6" [[package]] name = "ppv-lite86" @@ -1478,9 +1388,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.89" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] @@ -1556,7 +1466,7 @@ version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" dependencies = [ - "bitflags 2.6.0", + "bitflags", ] [[package]] @@ -1567,7 +1477,7 @@ checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.8", + "regex-automata 0.4.9", "regex-syntax 0.8.5", ] @@ -1582,9 +1492,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", @@ -1604,12 +1514,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] -name = "rfc7239" -version = "0.1.1" +name = "rmp" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b106a85eeb5b0336d16d6a20eab857f92861d4fbb1eb9a239866fb98fb6a1063" +checksum = "228ed7c16fa39782c3b3468e974aec2795e9089153cd08ee2e9aefb3613334c4" dependencies = [ - "uncased", + "byteorder", + "num-traits", + "paste", +] + +[[package]] +name = "rmpv" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58450723cd9ee93273ce44a20b6ec4efe17f8ed2e3631474387bfdecf18bb2a9" +dependencies = [ + "num-traits", + "rmp", ] [[package]] @@ -1629,7 +1551,7 @@ version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7753b721174eb8ff87a9a0e799e2d7bc3749323e773db92e0984debb00019d6e" dependencies = [ - "bitflags 2.6.0", + "bitflags", "fallible-iterator", "fallible-streaming-iterator", "hashlink", @@ -1651,11 +1573,11 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustix" -version = "0.38.40" +version = "0.38.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99e4ea3e1cdc4b559b8e5650f9c8e5998e3e5c1343b4eaf034565f32318d63c0" +checksum = "d7f649912bc1495e167a6edee79151c84b1bad49748cb4f1f1167f459f6224f6" dependencies = [ - "bitflags 2.6.0", + "bitflags", "errno", "libc", "linux-raw-sys", @@ -1684,28 +1606,25 @@ dependencies = [ ] [[package]] -name = "same-file" -version = "1.0.6" +name = "scopeguard" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "serde" -version = "1.0.214" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f55c3193aca71c12ad7890f1785d2b73e1b9f63a0bbc353c08ef26fe03fc56b5" +checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.214" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" +checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" dependencies = [ "proc-macro2", "quote", @@ -1714,9 +1633,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.132" +version = "1.0.133" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" +checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" dependencies = [ "itoa", "memchr", @@ -1725,38 +1644,25 @@ dependencies = [ ] [[package]] -name = "serde_urlencoded" -version = "0.7.1" +name = "serde_path_to_error" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +checksum = "af99884400da37c88f5e9146b7f1fd0fbcae8f6eec4e9da38b67d05486f814a6" dependencies = [ - "form_urlencoded", "itoa", - "ryu", "serde", ] [[package]] -name = "serde_yaml" -version = "0.9.34+deprecated" +name = "serde_urlencoded" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ - "indexmap", + "form_urlencoded", "itoa", "ryu", "serde", - "unsafe-libyaml", -] - -[[package]] -name = "sessions-core" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f714658e945893aadd2cb9fea079d0713c795aa13a7960b3a13eeabd9bb1636f" -dependencies = [ - "serde", - "serde_json", ] [[package]] @@ -1815,9 +1721,9 @@ checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "socket2" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" dependencies = [ "libc", "windows-sys 0.52.0", @@ -1836,7 +1742,7 @@ dependencies = [ "http", "http-body", "hyper", - "matchit", + "matchit 0.8.5", "pin-project-lite", "rustversion", "serde", @@ -1888,17 +1794,11 @@ dependencies = [ "socketioxide", ] -[[package]] -name = "subtle" -version = "2.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" - [[package]] name = "syn" -version = "2.0.82" +version = "2.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83540f837a8afc019423a8edb95b52a8effe46957ee402287f4292fae35be021" +checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" dependencies = [ "proc-macro2", "quote", @@ -1907,9 +1807,15 @@ dependencies = [ [[package]] name = "sync_wrapper" -version = "1.0.1" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + +[[package]] +name = "sync_wrapper" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" [[package]] name = "tempfile" @@ -1924,35 +1830,32 @@ dependencies = [ "windows-sys 0.59.0", ] -[[package]] -name = "test_plugin" -version = "0.1.0" -dependencies = [ - "horizon-plugin-api", - "horizon_data_types", - "socketioxide", -] - [[package]] name = "thiserror" -version = "1.0.65" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d11abd9594d9b38965ef50805c5e469ca9cc6f197f883f717e0269a3057b3d5" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.65" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae71770322cbd277e69d762a16c444af02aa0575ac0d174f0b9562d3b37f8602" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", "syn", ] +[[package]] +name = "thousands" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bf63baf9f5039dadc247375c29eb13706706cfde997d0330d05aa63a77d8820" + [[package]] name = "thread_local" version = "1.1.8" @@ -1963,42 +1866,11 @@ dependencies = [ "once_cell", ] -[[package]] -name = "time" -version = "0.3.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" -dependencies = [ - "deranged", - "itoa", - "num-conv", - "powerfmt", - "serde", - "time-core", - "time-macros", -] - -[[package]] -name = "time-core" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" - -[[package]] -name = "time-macros" -version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" -dependencies = [ - "num-conv", - "time-core", -] - [[package]] name = "tokio" -version = "1.41.0" +version = "1.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "145f3413504347a2be84393cc8a7d2fb4d863b375909ea59f2158261aa258bbb" +checksum = "5cec9b21b0450273377fc97bd4c33a8acffc8c996c987a7c5b319a0083707551" dependencies = [ "backtrace", "bytes", @@ -2033,19 +1905,6 @@ dependencies = [ "tungstenite", ] -[[package]] -name = "tokio-util" -version = "0.7.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", - "tokio", -] - [[package]] name = "toml_datetime" version = "0.6.8" @@ -2063,6 +1922,22 @@ dependencies = [ "winnow", ] +[[package]] +name = "tower" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2873938d487c3cfb9aed7546dc9f2711d867c9f90c46b889989a2cb84eba6b4f" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper 0.1.2", + "tokio", + "tower-layer", + "tower-service", + "tracing", +] + [[package]] name = "tower-layer" version = "0.3.3" @@ -2077,10 +1952,11 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" -version = "0.1.40" +version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ + "log", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -2088,9 +1964,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.27" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", @@ -2099,9 +1975,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.32" +version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" dependencies = [ "once_cell", "valuable", @@ -2120,9 +1996,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.18" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" dependencies = [ "matchers", "nu-ansi-term", @@ -2160,20 +2036,11 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" -[[package]] -name = "uncased" -version = "0.9.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1b88fcfe09e89d3866a5c11019378088af2d24c3fbd4f0543f96b479ec90697" -dependencies = [ - "version_check", -] - [[package]] name = "unicode-ident" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" +checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" [[package]] name = "unicode-width" @@ -2182,20 +2049,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" [[package]] -name = "universal-hash" -version = "0.5.1" +name = "unicode-width" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" -dependencies = [ - "crypto-common", - "subtle", -] +checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" [[package]] -name = "unsafe-libyaml" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" +name = "unreal_adapter_horizon" +version = "0.1.0" +dependencies = [ + "horizon-plugin-api", + "horizon_data_types", + "socketioxide", +] [[package]] name = "utf-8" @@ -2203,6 +2069,12 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + [[package]] name = "uuid" version = "1.11.0" @@ -2231,70 +2103,6 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" -[[package]] -name = "viz" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8435965cbe3cfe67bf609d968a8a644c65ef4f2cc58a55755d52ae25d1c9e0ec" -dependencies = [ - "hyper", - "hyper-util", - "tokio", - "tokio-util", - "tracing", - "viz-core", - "viz-router", -] - -[[package]] -name = "viz-core" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b937e019273f25198ec5a5eecd1cfb66e3ffedf31023bf90b03d75429759b74a" -dependencies = [ - "async-trait", - "bytes", - "cookie", - "form-data", - "futures-util", - "headers", - "http", - "http-body", - "http-body-util", - "hyper", - "hyper-util", - "mime", - "rfc7239", - "serde", - "serde_json", - "serde_urlencoded", - "sessions-core", - "sync_wrapper", - "thiserror", -] - -[[package]] -name = "viz-router" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5eb8ab7d9e2e564f0398e755c32b7b9f4bc2aa0d48d3be7663cfe91ccc9b17d" -dependencies = [ - "path-tree", - "serde", - "thiserror", - "viz-core", -] - -[[package]] -name = "walkdir" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" -dependencies = [ - "same-file", - "winapi-util", -] - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -2303,9 +2111,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.95" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" +checksum = "d15e63b4482863c109d70a7b8706c1e364eb6ea449b201a76c5b89cedcec2d5c" dependencies = [ "cfg-if", "once_cell", @@ -2314,9 +2122,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.95" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" +checksum = "8d36ef12e3aaca16ddd3f67922bc63e48e953f126de60bd33ccc0101ef9998cd" dependencies = [ "bumpalo", "log", @@ -2329,9 +2137,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.95" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" +checksum = "705440e08b42d3e4b36de7d66c944be628d579796b8090bfa3471478a2260051" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2339,9 +2147,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.95" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" +checksum = "98c9ae5a76e46f4deecd0f0255cc223cfa18dc9b261213b8aa0c7b36f61b3f1d" dependencies = [ "proc-macro2", "quote", @@ -2352,9 +2160,19 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.95" +version = "0.2.97" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ee99da9c5ba11bd675621338ef6fa52296b76b83305e9b6e5c77d4c286d6d49" + +[[package]] +name = "web-time" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] [[package]] name = "which" @@ -2370,9 +2188,9 @@ dependencies = [ [[package]] name = "wide" -version = "0.7.28" +version = "0.7.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b828f995bf1e9622031f8009f8481a85406ce1f4d4588ff746d872043e855690" +checksum = "58e6db2670d2be78525979e9a5f9c69d296fd7d670549fe9ebf70f8708cb5019" dependencies = [ "bytemuck", "safe_arch", @@ -2394,15 +2212,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -[[package]] -name = "winapi-util" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" -dependencies = [ - "windows-sys 0.59.0", -] - [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" diff --git a/Cargo.toml b/Cargo.toml index c05af4d..78efcc3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,47 +1,15 @@ -[package] -name = "Horizon" -version = "0.13.0" -edition = "2021" - -[dependencies] -serde = "1.0.214" -serde_json = "1.0.128" -socketioxide = "0.15.1" -tokio = { version = "1.37.0", features = ["rt", "net", "rt-multi-thread"] } -tracing = "0.1.40" -viz = "0.9.0" -uuid = "1.10.0" -libloading = "0.8.5" -notify = "7.0.0" -horizon_data_types = "0.3.0" -plugin-api = { version = "0.3.0", path = "./plugin-api" } -rayon = "1.10.0" -horizon_logger = "0.1.0" -once_cell = "1.20.2" -serde_yaml = "0.9.34" - -[target.'cfg(target_os = "linux")'.dependencies] -mimalloc = "0.1.43" - -[[bin]] -name = "horizon" -path = "src/main.rs" +[workspace] +members = ["server","plugin_api"] +resolver = "2" + +[profile.dev] +codegen-units = 32 +incremental = true +debug-assertions = false +overflow-checks = false +opt-level = 0 +lto = "off" [profile.release] -opt-level = 3 -lto = "fat" -codegen-units = 1 -panic = "abort" -strip = true - -[profile.profiling] -inherits = "release" -debug = true -strip = false - - - -[profile.release.package."*"] -opt-level = 3 -strip = true codegen-units = 1 +lto = "fat" \ No newline at end of file diff --git a/plugin-api/Cargo.lock b/plugin_api/Cargo.lock similarity index 100% rename from plugin-api/Cargo.lock rename to plugin_api/Cargo.lock diff --git a/plugin-api/Cargo.toml b/plugin_api/Cargo.toml similarity index 64% rename from plugin-api/Cargo.toml rename to plugin_api/Cargo.toml index 8f9f874..4cfb9fb 100644 --- a/plugin-api/Cargo.toml +++ b/plugin_api/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "plugin-api" +name = "plugin_api" version = "0.3.0" authors = ["Tristan Poland "] description = "Horizon Plugins API" @@ -12,17 +12,16 @@ pathdiff = "0.2.2" [dependencies] async-trait = "0.1.83" -horizon_data_types = "0.3.0" -tokio = { version = "1.37.0", features = ["rt", "net", "rt-multi-thread"] } +horizon_data_types = "0.4.0" +tokio = { version = "1.41.1", features = ["rt", "net", "rt-multi-thread"] } uuid = "1.11.0" socketioxide = "0.15.0" -horizon-plugin-api = "0.1.7" +horizon-plugin-api = "0.1.9" # # # # ###### BEGIN AUTO-GENERATED PLUGIN DEPENDENCIES - DO NOT EDIT THIS SECTION ###### -pebblevault_plugin = { path = "../plugins/pebble_vault", version = "0.1.0" } stars_beyond_plugin = { path = "../plugins/stars_beyond", version = "0.1.0" } -test_plugin = { path = "../plugins/test_plugin", version = "0.1.0" } +unreal_adapter_horizon = { path = "../plugins/unreal_adapter_horizon", version = "0.1.0" } ###### END AUTO-GENERATED PLUGIN DEPENDENCIES ###### diff --git a/plugin-api/build.rs b/plugin_api/build.rs similarity index 98% rename from plugin-api/build.rs rename to plugin_api/build.rs index e67f859..71daaf4 100644 --- a/plugin-api/build.rs +++ b/plugin_api/build.rs @@ -176,7 +176,12 @@ fn generate_imports_file(plugin_paths: &[(String, String, String)], out_dir: &Pa writeln!(file, "// Do not edit this file manually!\n")?; writeln!(file, "use horizon_plugin_api::LoadedPlugin;")?; writeln!(file, "use std::collections::HashMap;\n")?; - + for (i, (name, _, _)) in plugin_paths.iter().enumerate() { + write!(file, "pub use {};\n", name)?; + } + writeln!(file, "\n"); + + // Use the macro with discovered plugins writeln!(file, "// Invoke the macro with all discovered plugins")?; writeln!(file, "pub fn load_plugins() -> HashMap<&'static str, LoadedPlugin> {{")?; diff --git a/plugin-api/diagrams/API.dwawio.drawio b/plugin_api/diagrams/API.dwawio.drawio similarity index 100% rename from plugin-api/diagrams/API.dwawio.drawio rename to plugin_api/diagrams/API.dwawio.drawio diff --git a/plugin-api/gen_uuid.sh b/plugin_api/gen_uuid.sh similarity index 100% rename from plugin-api/gen_uuid.sh rename to plugin_api/gen_uuid.sh diff --git a/plugin-api/src/components.rs b/plugin_api/src/components.rs similarity index 100% rename from plugin-api/src/components.rs rename to plugin_api/src/components.rs diff --git a/plugin-api/src/lib.rs b/plugin_api/src/lib.rs similarity index 70% rename from plugin-api/src/lib.rs rename to plugin_api/src/lib.rs index e847112..86c3099 100644 --- a/plugin-api/src/lib.rs +++ b/plugin_api/src/lib.rs @@ -1,5 +1,5 @@ use std::collections::HashMap; -use horizon_plugin_api::{Plugin, Pluginstate, Version, get_plugin}; +pub use horizon_plugin_api::{Plugin, Pluginstate, Version, get_plugin, LoadedPlugin}; pub mod plugin_macro; pub mod plugin_imports; @@ -27,7 +27,6 @@ macro_rules! load_plugins { instance: <$plugin::Plugin as $plugin::PluginConstruct>::new(plugins.clone()), } ); - println!("Loaded plugin: {}", stringify!($plugin)); )* plugins } @@ -56,14 +55,20 @@ impl PluginManager { self.plugins } - pub fn load_all(&self) { + pub fn load_all(&self) -> HashMap { let plugins = plugin_imports::load_plugins(); - let my_test_plugin = get_plugin!(test_plugin, plugins); - let result = my_test_plugin.thing(); - println!("{}", result); + //let my_test_plugin = get_plugin!(test_plugin, plugins); + //let result = my_test_plugin.thing(); - - let my_vault = get_plugin!(pebblevault_plugin, plugins); + let mut loaded_plugins = HashMap::new(); + for (name, (state, plugin)) in &self.plugins { + if *state == Pluginstate::ACTIVE { + loaded_plugins.insert(name.clone(), LoadedPlugin { + instance: plugin.clone(), + }); + } + } + loaded_plugins } } diff --git a/plugin-api/src/plugin_imports.rs b/plugin_api/src/plugin_imports.rs similarity index 79% rename from plugin-api/src/plugin_imports.rs rename to plugin_api/src/plugin_imports.rs index 2bc01fa..a62858e 100644 --- a/plugin-api/src/plugin_imports.rs +++ b/plugin_api/src/plugin_imports.rs @@ -4,12 +4,15 @@ use horizon_plugin_api::LoadedPlugin; use std::collections::HashMap; +pub use stars_beyond_plugin; +pub use unreal_adapter_horizon; + + // Invoke the macro with all discovered plugins pub fn load_plugins() -> HashMap<&'static str, LoadedPlugin> { let plugins = crate::load_plugins!( - pebblevault_plugin, stars_beyond_plugin, - test_plugin + unreal_adapter_horizon ); plugins } diff --git a/plugin-api/src/plugin_macro.rs b/plugin_api/src/plugin_macro.rs similarity index 100% rename from plugin-api/src/plugin_macro.rs rename to plugin_api/src/plugin_macro.rs diff --git a/plugins.zip b/plugins.zip deleted file mode 100644 index 6e4df50d453eab9314515dc0902f8002f77251ad..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5594 zcmbtYdpOhm8{Ql;XR&gKN+o7UB8dnkGpi-1LK^05)6C23Q123wP!1(gPL;e!4y#lM z<$Q?zDsK$M&oLsWO5X2Rt!vZvUaIGh*{-?n=lR~x{d_+6Gc1~u3l0H8G(_j{;+t2ZAIV{nJ>Cjp z$b(^fxZl(EnNVvs3$=P`aB0N^_D@8dd~_qUT3v*;AqOv&w&^tP-sFK@_@p#!_m?KU z%GU=p0(a;YRu%5qY8F8e&;La+W8@^AkX>FTwLrl(B7RUcH5wvsamaUcj8}+OGzKCil>12i7 zTeF*kiQBbk$S|vlOL&=?)sGE!zj;(-5MpUWK6Qk%i9>5mv2O>Lyj>f`N8-_n49);} zt7DtgXm<6`KB@OR%bsl+j_OWnM>}rx-y8K|v&p%aR4AOBl~AZwlX}ovaLtwB9QVem&o10QYsSXsv1C*qgvQ722z|PMUyR~tBZb2c}{cO4<(dxTj!bbK8)OGAvhmqu0*lDOJ z*(10(!i$!CttK=h8TI0$GhWV7ui=dIHlGv+6^w3{OBJr>{hkBI_g~hZ*_cip9^bK| zvJ`{6oz$H6vf&nCUe~2t4Cnf~yX}V9xgOa`>{+g0Ae{sp=K@Admoe zzrQG?xQ)kPsz3o?5v+v-eDR}@=;bjB3A~J190Z(;nLr#4@C69=)QT;UtTPEuaQxL7 zjQ~=uXASsM#M(va^Kony*gHdc-E-*fhJe5BpT%~NrM%5*x$q)mc_G?<*JjoR)khvP za96PmaB$e!jj$%agI?Mkovk8ASmUrh!(WKfAr*@>GL)Rbco~uB-j!(Iu-E7bEeqec zw)bzLe_l-mm27%=IZ+oBq5dj85f7kruzc1%SpeiI$>zbBTf%m>M@_)lUJwru4xc|S zbVD5L+tTv_nC*|+Rqu)-Gv(#9_SO$f`O9`C&gbX3YLtDQ?^aoONduhMsM=t)qJVHr zXKj+1qfc#J3kS8J#4r~V{4TK6D!#e<&Gq3OXbW?@R^Z)6dYVpjd54vDoS0m3QOO+kVLC9?uO(cyI=!;=|(yNBO? z^xpK=Np9Nfb6I;`OC(~H<7K>nl&oe^rQ4H^8C@tyvmhEO1p$Zz$z(4`M&AJ5KQ1IZ z-s2Z1-4tl(x+QJu*IA9(6@O^<@^265^559$7s{T}}BRh`7%3$|JvS#6bUZK~4qX<_aH%}SB$asuMbo{ZMhCabv$ z`86dc_rSHsLTZiCYB?^v$v_@X{0E|YIV#F1l)wZu@M@Z_r@^Ntr zIzkz$0|S)@HBa}ch3Kt=ei}N}pp!4(Q|=c1CAvasu(AtsqvV)QXVq}qHlIn{*n>HB z{zCQJkAjuYkTlB1+>2jSm_0vzSh((u*8ukQI_f70&pV?!upM1<865Aaq3va>`_nCN zhweaL`g}&=$b~Duvt^BuQ->2ZUDq~BC%Je`x9eyK%UB+Lw0N-`^87n+=jp^E5#dZxJL}-6O>oljCI8(LHPAsyxWf>G>^aK6ZHycFO%~m z^C0tFd*AVFe{TH#Z2swFq^n?QT6(u)6hYcDtL|{yjELSm5HS7sSdeZ+M$F2?**NnnncnIPwHF5}MqooHD|^Uf zwHw|EnYe)F>=+pdLAk)nBQwz`m+jrL>X1*dw{vNBdPh}=g;yfOpUm~*E(H8<`>kdN zaaYqJ;{F<MpUoM#2 z%V_LDQ%DagC7Ml!U!scMZAQNfZVU9FQdGEEKakh5&j0^v2{UnFE0*M0wwGomj?u_6 z6Zeu$hTkF%B#Q24nThk`Vf{c$h-2fG|BE=#8`EP!zh_CFWjkeN-Wbg$=#}X~rKrJ} zALLtt-=dAtbAbky9#jfHFY9c-EjPwPY(byI$DC%lc8-}eMgs*JI(kqk6)f?8i!(;+ z0D3ZdP${1LtR7~G(AaDMbfM8t0>+z+kuoZUCcvC!d8P!5<_6{t{M}6yA_Pd4Dg=J| E7ocw=?EnA( diff --git a/plugins/pebble_vault/Cargo.toml b/plugins/pebble_vault/Cargo.toml deleted file mode 100644 index 0103698..0000000 --- a/plugins/pebble_vault/Cargo.toml +++ /dev/null @@ -1,14 +0,0 @@ -[package] -name = "pebblevault_plugin" -version = "0.1.0" -edition = "2021" - -[dependencies] -PebbleVault = "0.6.1" -async-trait = "0.1.83" -horizon-plugin-api = "0.1.7" -horizon_data_types = "0.3.0" -horizon_logger = "0.1.0" -once_cell = "1.20.2" -serde = "1.0.214" -uuid = "1.11.0" diff --git a/plugins/pebble_vault/src/lib.rs b/plugins/pebble_vault/src/lib.rs deleted file mode 100644 index 1b81efa..0000000 --- a/plugins/pebble_vault/src/lib.rs +++ /dev/null @@ -1,339 +0,0 @@ -use std::collections::HashMap; -pub use horizon_plugin_api::{Plugin, Pluginstate, LoadedPlugin}; -use serde::{Serialize, Deserialize}; -use PebbleVault::{VaultManager, SpatialObject, VaultRegion}; -use std::sync::{Arc, Mutex}; -use uuid::Uuid; -use once_cell::sync::Lazy; - -/// VaultManager instance for the PebbleVault plugin -static VAULT_MANAGER: Lazy>>> = - Lazy::new(|| { - let vault_manager = VaultManager::new("./pv-horizon-plugin-data").expect("Failed to create VaultManager"); - Arc::new(Mutex::new(vault_manager)) - }); - - -/// Custom data structure for PebbleVault objects -/// -/// This struct represents the custom data associated with each spatial object -/// in the PebbleVault system. It can be extended or modified to suit specific -/// game or application needs. -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] -pub struct PebbleVaultCustomData { - /// Name of the object - pub name: String, - /// Custom value associated with the object - pub value: i32, -} - -// Define both required traits -pub trait PluginAPI { - fn persist_to_disk(&self) -> Result<(), String>; - fn get_region(&self, region_id: Uuid) -> Option>>>; - fn transfer_player(&self, player_uuid: Uuid, from_region_id: Uuid, to_region_id: Uuid) -> Result<(), String>; - fn update_object(&self, object: &SpatialObject) -> Result<(), String>; - fn get_object(&self, object_id: Uuid) -> Result>, String>; - fn remove_object(&self, object_id: Uuid) -> Result<(), String>; - fn add_object(&self, region_id: Uuid, uuid: Uuid, object_type: &str, x: f64, y: f64, z: f64, custom_data: PebbleVaultCustomData) -> Result<(), String>; - fn query_region(&self, region_id: Uuid, min_x: f64, min_y: f64, min_z: f64, max_x: f64, max_y: f64, max_z: f64) -> Result>, String>; - fn create_or_load_region(&self, center: [f64; 3], radius: f64) -> Result; - fn thing(&self) -> String; -} - -pub trait PluginConstruct { - fn new(plugins: HashMap<&'static str, LoadedPlugin>) -> Plugin; -} - -// Implement constructor -impl PluginConstruct for Plugin { - fn new(plugins: HashMap<&'static str, LoadedPlugin>) -> Plugin { - println!("Initializing PebbleVault plugin"); - Plugin {} - } -} - -// Implement the trait for Plugin -impl PluginAPI for Plugin { - // Add the thing() method implementation - fn thing(&self) -> String { - self.create_or_load_region([0.0,0.0,0.0], 1000.0).expect("Failure"); - - "No String to return".to_string() - } - - /// Creates a new region or loads an existing one - /// - /// This method creates a new spatial region in the PebbleVault system or - /// loads an existing one if it already exists. - /// - /// # Arguments - /// - /// * `center` - Center coordinates of the region [x, y, z] - /// * `radius` - Radius of the region - /// - /// # Returns - /// - /// A Result containing the UUID of the created or loaded region, or an error string - /// - /// # Examples - /// - /// ``` - /// # use pebble_vault::PebbleVault; - /// # let pebble_vault = PebbleVault::new().unwrap(); - /// let center = [0.0, 0.0, 0.0]; - /// let radius = 1000.0; - /// let region_id = pebble_vault.create_or_load_region(center, radius).expect("Failed to create region"); - /// println!("Created region with ID: {}", region_id); - /// ``` - fn create_or_load_region(&self, center: [f64; 3], radius: f64) -> Result { - VAULT_MANAGER.lock().unwrap().create_or_load_region(center, radius) - } - - /// Queries a region for objects within a bounding box - /// - /// This method searches for objects within the specified bounding box in a given region. - /// - /// # Arguments - /// - /// * `region_id` - UUID of the region to query - /// * `min_x` - Minimum x-coordinate of the bounding box - /// * `min_y` - Minimum y-coordinate of the bounding box - /// * `min_z` - Minimum z-coordinate of the bounding box - /// * `max_x` - Maximum x-coordinate of the bounding box - /// * `max_y` - Maximum y-coordinate of the bounding box - /// * `max_z` - Maximum z-coordinate of the bounding box - /// - /// # Returns - /// - /// A Result containing a vector of SpatialObjects or an error string - /// - /// # Examples - /// - /// ``` - /// # use pebble_vault::PebbleVault; - /// # use uuid::Uuid; - /// # let pebble_vault = PebbleVault::new().unwrap(); - /// # let region_id = pebble_vault.create_or_load_region([0.0, 0.0, 0.0], 1000.0).unwrap(); - /// let objects = pebble_vault.query_region(region_id, -100.0, -100.0, -100.0, 100.0, 100.0, 100.0) - /// .expect("Failed to query region"); - /// println!("Found {} objects in the region", objects.len()); - /// ``` - fn query_region(&self, region_id: Uuid, min_x: f64, min_y: f64, min_z: f64, max_x: f64, max_y: f64, max_z: f64) -> Result>, String> { - VAULT_MANAGER.lock().unwrap().query_region(region_id, min_x, min_y, min_z, max_x, max_y, max_z) - } - - /// Adds a new object to a region - /// - /// This method adds a new spatial object to the specified region in the PebbleVault system. - /// - /// # Arguments - /// - /// * `region_id` - UUID of the region to add the object to - /// * `uuid` - UUID of the new object - /// * `object_type` - Type of the object (e.g., "player", "item") - /// * `x` - X-coordinate of the object - /// * `y` - Y-coordinate of the object - /// * `z` - Z-coordinate of the object - /// * `custom_data` - Custom data associated with the object - /// - /// # Returns - /// - /// A Result indicating success or an error string - /// - /// # Examples - /// - /// ``` - /// # use pebble_vault::{PebbleVault, PebbleVaultCustomData}; - /// # use uuid::Uuid; - /// # let pebble_vault = PebbleVault::new().unwrap(); - /// # let region_id = pebble_vault.create_or_load_region([0.0, 0.0, 0.0], 1000.0).unwrap(); - /// let object_id = Uuid::new_v4(); - /// let custom_data = PebbleVaultCustomData { - /// name: "Example Object".to_string(), - /// value: 42, - /// }; - /// pebble_vault.add_object(region_id, object_id, "item", 10.0, 20.0, 30.0, custom_data) - /// .expect("Failed to add object"); - /// println!("Added object with ID: {}", object_id); - /// ``` - fn add_object(&self, region_id: Uuid, uuid: Uuid, object_type: &str, x: f64, y: f64, z: f64, custom_data: PebbleVaultCustomData) -> Result<(), String> { - VAULT_MANAGER.lock().unwrap().add_object(region_id, uuid, object_type, x, y, z, Arc::new(custom_data)) - } - - /// Removes an object from its region and the persistent database - /// - /// This method removes a spatial object from the PebbleVault system. - /// - /// # Arguments - /// - /// * `object_id` - UUID of the object to remove - /// - /// # Returns - /// - /// A Result indicating success or an error string - /// - /// # Examples - /// - /// ``` - /// # use pebble_vault::{PebbleVault, PebbleVaultCustomData}; - /// # use uuid::Uuid; - /// # let pebble_vault = PebbleVault::new().unwrap(); - /// # let region_id = pebble_vault.create_or_load_region([0.0, 0.0, 0.0], 1000.0).unwrap(); - /// # let object_id = Uuid::new_v4(); - /// # let custom_data = PebbleVaultCustomData { name: "Example Object".to_string(), value: 42 }; - /// # pebble_vault.add_object(region_id, object_id, "item", 10.0, 20.0, 30.0, custom_data).unwrap(); - /// pebble_vault.remove_object(object_id).expect("Failed to remove object"); - /// println!("Removed object with ID: {}", object_id); - /// ``` - fn remove_object(&self, object_id: Uuid) -> Result<(), String> { - VAULT_MANAGER.lock().unwrap().remove_object(object_id) - } - - /// Gets a reference to an object by its ID - /// - /// This method retrieves a spatial object from the PebbleVault system by its UUID. - /// - /// # Arguments - /// - /// * `object_id` - UUID of the object to retrieve - /// - /// # Returns - /// - /// A Result containing an Option with the SpatialObject if found, or an error string - /// - /// # Examples - /// - /// ``` - /// # use pebble_vault::{PebbleVault, PebbleVaultCustomData}; - /// # use uuid::Uuid; - /// # let pebble_vault = PebbleVault::new().unwrap(); - /// # let region_id = pebble_vault.create_or_load_region([0.0, 0.0, 0.0], 1000.0).unwrap(); - /// # let object_id = Uuid::new_v4(); - /// # let custom_data = PebbleVaultCustomData { name: "Example Object".to_string(), value: 42 }; - /// # pebble_vault.add_object(region_id, object_id, "item", 10.0, 20.0, 30.0, custom_data).unwrap(); - /// if let Ok(Some(object)) = pebble_vault.get_object(object_id) { - /// println!("Found object: {:?}", object); - /// } else { - /// println!("Object not found"); - /// } - /// ``` - fn get_object(&self, object_id: Uuid) -> Result>, String> { - VAULT_MANAGER.lock().unwrap().get_object(object_id) - } - - /// Updates an existing object in the VaultManager's in-memory storage - /// - /// This method updates the data of an existing spatial object in the PebbleVault system. - /// - /// # Arguments - /// - /// * `object` - A reference to the updated SpatialObject - /// - /// # Returns - /// - /// A Result indicating success or an error string - /// - /// # Examples - /// - /// ``` - /// # use pebble_vault::{PebbleVault, PebbleVaultCustomData}; - /// # use uuid::Uuid; - /// # let pebble_vault = PebbleVault::new().unwrap(); - /// # let region_id = pebble_vault.create_or_load_region([0.0, 0.0, 0.0], 1000.0).unwrap(); - /// # let object_id = Uuid::new_v4(); - /// # let custom_data = PebbleVaultCustomData { name: "Example Object".to_string(), value: 42 }; - /// # pebble_vault.add_object(region_id, object_id, "item", 10.0, 20.0, 30.0, custom_data).unwrap(); - /// if let Ok(Some(mut object)) = pebble_vault.get_object(object_id) { - /// object.point = [15.0, 25.0, 35.0]; - /// pebble_vault.update_object(&object).expect("Failed to update object"); - /// println!("Updated object position"); - /// } - /// ``` - fn update_object(&self, object: &SpatialObject) -> Result<(), String> { - VAULT_MANAGER.lock().unwrap().update_object(object) - } - - /// Transfers a player (object) from one region to another - /// - /// This method moves a spatial object (typically a player) from one region to another - /// in the PebbleVault system. - /// - /// # Arguments - /// - /// * `player_uuid` - UUID of the player to transfer - /// * `from_region_id` - UUID of the source region - /// * `to_region_id` - UUID of the destination region - /// - /// # Returns - /// - /// A Result indicating success or an error string - /// - /// # Examples - /// - /// ``` - /// # use pebble_vault::{PebbleVault, PebbleVaultCustomData}; - /// # use uuid::Uuid; - /// # let pebble_vault = PebbleVault::new().unwrap(); - /// # let region1_id = pebble_vault.create_or_load_region([0.0, 0.0, 0.0], 1000.0).unwrap(); - /// # let region2_id = pebble_vault.create_or_load_region([2000.0, 0.0, 0.0], 1000.0).unwrap(); - /// # let player_id = Uuid::new_v4(); - /// # let custom_data = PebbleVaultCustomData { name: "Player".to_string(), value: 100 }; - /// # pebble_vault.add_object(region1_id, player_id, "player", 10.0, 20.0, 30.0, custom_data).unwrap(); - /// pebble_vault.transfer_player(player_id, region1_id, region2_id) - /// .expect("Failed to transfer player"); - /// println!("Transferred player to new region"); - /// ``` - fn transfer_player(&self, player_uuid: Uuid, from_region_id: Uuid, to_region_id: Uuid) -> Result<(), String> { - VAULT_MANAGER.lock().unwrap().transfer_player(player_uuid, from_region_id, to_region_id) - } - - /// Persists all in-memory databases to disk - /// - /// This method saves all spatial data from memory to the persistent storage. - /// - /// # Returns - /// - /// A Result indicating success or an error string - /// - /// # Examples - /// - /// ``` - /// # use pebble_vault::PebbleVault; - /// # let pebble_vault = PebbleVault::new().unwrap(); - /// pebble_vault.persist_to_disk().expect("Failed to persist data"); - /// println!("Data persisted to disk"); - /// ``` - fn persist_to_disk(&self) -> Result<(), String> { - VAULT_MANAGER.lock().unwrap().persist_to_disk() - } - - /// Gets a reference to a region by its ID - /// - /// This method retrieves a reference to a spatial region in the PebbleVault system. - /// - /// # Arguments - /// - /// * `region_id` - UUID of the region to retrieve - /// - /// # Returns - /// - /// An Option containing a reference to the region if found, or None if not found - /// - /// # Examples - /// - /// ``` - /// # use pebble_vault::PebbleVault; - /// # use uuid::Uuid; - /// # let pebble_vault = PebbleVault::new().unwrap(); - /// # let region_id = pebble_vault.create_or_load_region([0.0, 0.0, 0.0], 1000.0).unwrap(); - /// if let Some(region) = pebble_vault.get_region(region_id) { - /// println!("Found region: {:?}", region); - /// } else { - /// println!("Region not found"); - /// } - /// ``` - fn get_region(&self, region_id: Uuid) -> Option>>> { - VAULT_MANAGER.lock().unwrap().get_region(region_id) - } -} \ No newline at end of file diff --git a/plugins/stars_beyond/Cargo.lock b/plugins/stars_beyond/Cargo.lock deleted file mode 100644 index 2792740..0000000 --- a/plugins/stars_beyond/Cargo.lock +++ /dev/null @@ -1,947 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "addr2line" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler2" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" - -[[package]] -name = "approx" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6" -dependencies = [ - "num-traits", -] - -[[package]] -name = "autocfg" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" - -[[package]] -name = "backtrace" -version = "0.3.74" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" -dependencies = [ - "addr2line", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", - "windows-targets", -] - -[[package]] -name = "base64" -version = "0.22.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" - -[[package]] -name = "bincode" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" -dependencies = [ - "serde", -] - -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array", -] - -[[package]] -name = "bytemuck" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8334215b81e418a0a7bdb8ef0849474f40bb10c8b71f1c4ed315cff49f32494d" - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - -[[package]] -name = "bytes" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" -dependencies = [ - "serde", -] - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "cpufeatures" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" -dependencies = [ - "libc", -] - -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "data-encoding" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer", - "crypto-common", -] - -[[package]] -name = "engineioxide" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec84aea019c24ae0cae29a6306b1b9b6bd91a4c950542d804b742435ed797f0c" -dependencies = [ - "base64", - "bytes", - "futures-core", - "futures-util", - "http", - "http-body", - "http-body-util", - "hyper", - "hyper-util", - "pin-project-lite", - "rand", - "serde", - "serde_json", - "smallvec", - "thiserror", - "tokio", - "tokio-tungstenite", - "tower-layer", - "tower-service", -] - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "futures-core" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" - -[[package]] -name = "futures-sink" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" - -[[package]] -name = "futures-task" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" - -[[package]] -name = "futures-util" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" -dependencies = [ - "futures-core", - "futures-sink", - "futures-task", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", -] - -[[package]] -name = "getrandom" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - -[[package]] -name = "gimli" -version = "0.31.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" - -[[package]] -name = "hermit-abi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" - -[[package]] -name = "horizon-plugin-api" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1963e8c31937cdd74c102cb92559c1ad9fb9b9aa2f49fef732136339672c47ef" - -[[package]] -name = "horizon_data_types" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eed398874caaec1768e6d58d66b130413132c4f3a07d45679e27549c87657e29" -dependencies = [ - "bincode", - "nalgebra", - "serde", - "serde_json", - "socketioxide", - "tokio", - "uuid", -] - -[[package]] -name = "http" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http-body" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" -dependencies = [ - "bytes", - "http", -] - -[[package]] -name = "http-body-util" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" -dependencies = [ - "bytes", - "futures-util", - "http", - "http-body", - "pin-project-lite", -] - -[[package]] -name = "httparse" -version = "1.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" - -[[package]] -name = "hyper" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbbff0a806a4728c99295b254c8838933b5b082d75e3cb70c8dab21fdfbcfa9a" -dependencies = [ - "bytes", - "http", - "http-body", - "tokio", -] - -[[package]] -name = "hyper-util" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" -dependencies = [ - "bytes", - "futures-util", - "http", - "http-body", - "hyper", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "itoa" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" - -[[package]] -name = "libc" -version = "0.2.162" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18d287de67fe55fd7e1581fe933d965a5a9477b38e949cfa9f8574ef01506398" - -[[package]] -name = "log" -version = "0.4.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" - -[[package]] -name = "matchit" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" - -[[package]] -name = "matrixmultiply" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9380b911e3e96d10c1f415da0876389aaf1b56759054eeb0de7df940c456ba1a" -dependencies = [ - "autocfg", - "rawpointer", -] - -[[package]] -name = "memchr" -version = "2.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" - -[[package]] -name = "miniz_oxide" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" -dependencies = [ - "adler2", -] - -[[package]] -name = "mio" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" -dependencies = [ - "hermit-abi", - "libc", - "wasi", - "windows-sys", -] - -[[package]] -name = "nalgebra" -version = "0.33.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26aecdf64b707efd1310e3544d709c5c0ac61c13756046aaaba41be5c4f66a3b" -dependencies = [ - "approx", - "matrixmultiply", - "nalgebra-macros", - "num-complex", - "num-rational", - "num-traits", - "serde", - "simba", - "typenum", -] - -[[package]] -name = "nalgebra-macros" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "254a5372af8fc138e36684761d3c0cdb758a4410e938babcff1c860ce14ddbfc" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "num-bigint" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" -dependencies = [ - "num-integer", - "num-traits", -] - -[[package]] -name = "num-complex" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" -dependencies = [ - "num-traits", - "serde", -] - -[[package]] -name = "num-integer" -version = "0.1.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" -dependencies = [ - "num-traits", -] - -[[package]] -name = "num-rational" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" -dependencies = [ - "num-bigint", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" -dependencies = [ - "autocfg", -] - -[[package]] -name = "object" -version = "0.36.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" -dependencies = [ - "memchr", -] - -[[package]] -name = "paste" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" - -[[package]] -name = "pin-project-lite" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "ppv-lite86" -version = "0.2.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" -dependencies = [ - "zerocopy", -] - -[[package]] -name = "proc-macro2" -version = "1.0.89" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quote" -version = "1.0.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha", - "rand_core", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom", -] - -[[package]] -name = "rawpointer" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" - -[[package]] -name = "rustc-demangle" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" - -[[package]] -name = "rustversion" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" - -[[package]] -name = "ryu" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" - -[[package]] -name = "safe_arch" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3460605018fdc9612bce72735cba0d27efbcd9904780d44c7e3a9948f96148a" -dependencies = [ - "bytemuck", -] - -[[package]] -name = "serde" -version = "1.0.214" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f55c3193aca71c12ad7890f1785d2b73e1b9f63a0bbc353c08ef26fe03fc56b5" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.214" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "serde_json" -version = "1.0.132" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" -dependencies = [ - "itoa", - "memchr", - "ryu", - "serde", -] - -[[package]] -name = "sha1" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - -[[package]] -name = "simba" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3a386a501cd104797982c15ae17aafe8b9261315b5d07e3ec803f2ea26be0fa" -dependencies = [ - "approx", - "num-complex", - "num-traits", - "paste", - "wide", -] - -[[package]] -name = "slab" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] - -[[package]] -name = "smallvec" -version = "1.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" - -[[package]] -name = "socket2" -version = "0.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" -dependencies = [ - "libc", - "windows-sys", -] - -[[package]] -name = "socketioxide" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a9ce59f845cfea2fe24cc7adbd512268893ee07bde899ae6477569dbc42dff3" -dependencies = [ - "bytes", - "engineioxide", - "futures-core", - "futures-util", - "http", - "http-body", - "hyper", - "matchit", - "pin-project-lite", - "rustversion", - "serde", - "socketioxide-core", - "socketioxide-parser-common", - "thiserror", - "tokio", - "tower-layer", - "tower-service", -] - -[[package]] -name = "socketioxide-core" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82826d9a1efb2b201e7d12d231f98870f768d98d02452eb642bca0587a8d51f0" -dependencies = [ - "bytes", - "engineioxide", - "serde", - "thiserror", -] - -[[package]] -name = "socketioxide-parser-common" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9a20b64f78a6d093d73d4d166b5bfc8b5096069865c59cee67b3aafac77eaac" -dependencies = [ - "bytes", - "itoa", - "serde", - "serde_json", - "socketioxide-core", -] - -[[package]] -name = "syn" -version = "2.0.87" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "test_plugin" -version = "0.1.0" -dependencies = [ - "horizon-plugin-api", - "horizon_data_types", - "socketioxide", -] - -[[package]] -name = "thiserror" -version = "1.0.68" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02dd99dc800bbb97186339685293e1cc5d9df1f8fae2d0aecd9ff1c77efea892" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.68" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7c61ec9a6f64d2793d8a45faba21efbe3ced62a886d44c36a009b2b519b4c7e" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "tokio" -version = "1.41.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22cfb5bee7a6a52939ca9224d6ac897bb669134078daa8735560897f69de4d33" -dependencies = [ - "backtrace", - "bytes", - "libc", - "mio", - "pin-project-lite", - "socket2", - "windows-sys", -] - -[[package]] -name = "tokio-tungstenite" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edc5f74e248dc973e0dbb7b74c7e0d6fcc301c694ff50049504004ef4d0cdcd9" -dependencies = [ - "futures-util", - "log", - "tokio", - "tungstenite", -] - -[[package]] -name = "tower-layer" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" - -[[package]] -name = "tower-service" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" - -[[package]] -name = "tungstenite" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18e5b8366ee7a95b16d32197d0b2604b43a0be89dc5fac9f8e96ccafbaedda8a" -dependencies = [ - "byteorder", - "bytes", - "data-encoding", - "http", - "httparse", - "log", - "rand", - "sha1", - "thiserror", - "utf-8", -] - -[[package]] -name = "typenum" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" - -[[package]] -name = "unicode-ident" -version = "1.0.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" - -[[package]] -name = "utf-8" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" - -[[package]] -name = "uuid" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" -dependencies = [ - "getrandom", - "serde", -] - -[[package]] -name = "version_check" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wide" -version = "0.7.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b828f995bf1e9622031f8009f8481a85406ce1f4d4588ff746d872043e855690" -dependencies = [ - "bytemuck", - "safe_arch", -] - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-targets" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" - -[[package]] -name = "zerocopy" -version = "0.7.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" -dependencies = [ - "byteorder", - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.7.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] diff --git a/plugins/stars_beyond/Cargo.toml b/plugins/stars_beyond/Cargo.toml index 6bbb822..7e04e1c 100644 --- a/plugins/stars_beyond/Cargo.toml +++ b/plugins/stars_beyond/Cargo.toml @@ -5,5 +5,5 @@ edition = "2021" [dependencies] horizon-plugin-api = "0.1.7" -horizon_data_types = "0.3.0" +horizon_data_types = "0.4.0" socketioxide = "0.15.1" diff --git a/plugins/stars_beyond/src/lib.rs b/plugins/stars_beyond/src/lib.rs index 8ede6e4..0ba0323 100644 --- a/plugins/stars_beyond/src/lib.rs +++ b/plugins/stars_beyond/src/lib.rs @@ -20,8 +20,6 @@ pub trait PluginConstruct { // Implement constructor separately impl PluginConstruct for Plugin { fn new(plugins: HashMap<&'static str, LoadedPlugin>) -> Plugin { - println!("Hello from the test plugin!!!!!"); - Plugin {} } diff --git a/plugins/test_plugin/Cargo.lock b/plugins/test_plugin/Cargo.lock deleted file mode 100644 index 2792740..0000000 --- a/plugins/test_plugin/Cargo.lock +++ /dev/null @@ -1,947 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "addr2line" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler2" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" - -[[package]] -name = "approx" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6" -dependencies = [ - "num-traits", -] - -[[package]] -name = "autocfg" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" - -[[package]] -name = "backtrace" -version = "0.3.74" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" -dependencies = [ - "addr2line", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", - "windows-targets", -] - -[[package]] -name = "base64" -version = "0.22.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" - -[[package]] -name = "bincode" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" -dependencies = [ - "serde", -] - -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array", -] - -[[package]] -name = "bytemuck" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8334215b81e418a0a7bdb8ef0849474f40bb10c8b71f1c4ed315cff49f32494d" - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - -[[package]] -name = "bytes" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" -dependencies = [ - "serde", -] - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "cpufeatures" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" -dependencies = [ - "libc", -] - -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "data-encoding" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer", - "crypto-common", -] - -[[package]] -name = "engineioxide" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec84aea019c24ae0cae29a6306b1b9b6bd91a4c950542d804b742435ed797f0c" -dependencies = [ - "base64", - "bytes", - "futures-core", - "futures-util", - "http", - "http-body", - "http-body-util", - "hyper", - "hyper-util", - "pin-project-lite", - "rand", - "serde", - "serde_json", - "smallvec", - "thiserror", - "tokio", - "tokio-tungstenite", - "tower-layer", - "tower-service", -] - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "futures-core" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" - -[[package]] -name = "futures-sink" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" - -[[package]] -name = "futures-task" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" - -[[package]] -name = "futures-util" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" -dependencies = [ - "futures-core", - "futures-sink", - "futures-task", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", -] - -[[package]] -name = "getrandom" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - -[[package]] -name = "gimli" -version = "0.31.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" - -[[package]] -name = "hermit-abi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" - -[[package]] -name = "horizon-plugin-api" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1963e8c31937cdd74c102cb92559c1ad9fb9b9aa2f49fef732136339672c47ef" - -[[package]] -name = "horizon_data_types" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eed398874caaec1768e6d58d66b130413132c4f3a07d45679e27549c87657e29" -dependencies = [ - "bincode", - "nalgebra", - "serde", - "serde_json", - "socketioxide", - "tokio", - "uuid", -] - -[[package]] -name = "http" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http-body" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" -dependencies = [ - "bytes", - "http", -] - -[[package]] -name = "http-body-util" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" -dependencies = [ - "bytes", - "futures-util", - "http", - "http-body", - "pin-project-lite", -] - -[[package]] -name = "httparse" -version = "1.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" - -[[package]] -name = "hyper" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbbff0a806a4728c99295b254c8838933b5b082d75e3cb70c8dab21fdfbcfa9a" -dependencies = [ - "bytes", - "http", - "http-body", - "tokio", -] - -[[package]] -name = "hyper-util" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" -dependencies = [ - "bytes", - "futures-util", - "http", - "http-body", - "hyper", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "itoa" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" - -[[package]] -name = "libc" -version = "0.2.162" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18d287de67fe55fd7e1581fe933d965a5a9477b38e949cfa9f8574ef01506398" - -[[package]] -name = "log" -version = "0.4.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" - -[[package]] -name = "matchit" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" - -[[package]] -name = "matrixmultiply" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9380b911e3e96d10c1f415da0876389aaf1b56759054eeb0de7df940c456ba1a" -dependencies = [ - "autocfg", - "rawpointer", -] - -[[package]] -name = "memchr" -version = "2.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" - -[[package]] -name = "miniz_oxide" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" -dependencies = [ - "adler2", -] - -[[package]] -name = "mio" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" -dependencies = [ - "hermit-abi", - "libc", - "wasi", - "windows-sys", -] - -[[package]] -name = "nalgebra" -version = "0.33.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26aecdf64b707efd1310e3544d709c5c0ac61c13756046aaaba41be5c4f66a3b" -dependencies = [ - "approx", - "matrixmultiply", - "nalgebra-macros", - "num-complex", - "num-rational", - "num-traits", - "serde", - "simba", - "typenum", -] - -[[package]] -name = "nalgebra-macros" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "254a5372af8fc138e36684761d3c0cdb758a4410e938babcff1c860ce14ddbfc" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "num-bigint" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" -dependencies = [ - "num-integer", - "num-traits", -] - -[[package]] -name = "num-complex" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" -dependencies = [ - "num-traits", - "serde", -] - -[[package]] -name = "num-integer" -version = "0.1.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" -dependencies = [ - "num-traits", -] - -[[package]] -name = "num-rational" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" -dependencies = [ - "num-bigint", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" -dependencies = [ - "autocfg", -] - -[[package]] -name = "object" -version = "0.36.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" -dependencies = [ - "memchr", -] - -[[package]] -name = "paste" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" - -[[package]] -name = "pin-project-lite" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "ppv-lite86" -version = "0.2.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" -dependencies = [ - "zerocopy", -] - -[[package]] -name = "proc-macro2" -version = "1.0.89" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quote" -version = "1.0.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha", - "rand_core", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom", -] - -[[package]] -name = "rawpointer" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" - -[[package]] -name = "rustc-demangle" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" - -[[package]] -name = "rustversion" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" - -[[package]] -name = "ryu" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" - -[[package]] -name = "safe_arch" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3460605018fdc9612bce72735cba0d27efbcd9904780d44c7e3a9948f96148a" -dependencies = [ - "bytemuck", -] - -[[package]] -name = "serde" -version = "1.0.214" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f55c3193aca71c12ad7890f1785d2b73e1b9f63a0bbc353c08ef26fe03fc56b5" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.214" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "serde_json" -version = "1.0.132" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" -dependencies = [ - "itoa", - "memchr", - "ryu", - "serde", -] - -[[package]] -name = "sha1" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - -[[package]] -name = "simba" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3a386a501cd104797982c15ae17aafe8b9261315b5d07e3ec803f2ea26be0fa" -dependencies = [ - "approx", - "num-complex", - "num-traits", - "paste", - "wide", -] - -[[package]] -name = "slab" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] - -[[package]] -name = "smallvec" -version = "1.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" - -[[package]] -name = "socket2" -version = "0.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" -dependencies = [ - "libc", - "windows-sys", -] - -[[package]] -name = "socketioxide" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a9ce59f845cfea2fe24cc7adbd512268893ee07bde899ae6477569dbc42dff3" -dependencies = [ - "bytes", - "engineioxide", - "futures-core", - "futures-util", - "http", - "http-body", - "hyper", - "matchit", - "pin-project-lite", - "rustversion", - "serde", - "socketioxide-core", - "socketioxide-parser-common", - "thiserror", - "tokio", - "tower-layer", - "tower-service", -] - -[[package]] -name = "socketioxide-core" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82826d9a1efb2b201e7d12d231f98870f768d98d02452eb642bca0587a8d51f0" -dependencies = [ - "bytes", - "engineioxide", - "serde", - "thiserror", -] - -[[package]] -name = "socketioxide-parser-common" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9a20b64f78a6d093d73d4d166b5bfc8b5096069865c59cee67b3aafac77eaac" -dependencies = [ - "bytes", - "itoa", - "serde", - "serde_json", - "socketioxide-core", -] - -[[package]] -name = "syn" -version = "2.0.87" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "test_plugin" -version = "0.1.0" -dependencies = [ - "horizon-plugin-api", - "horizon_data_types", - "socketioxide", -] - -[[package]] -name = "thiserror" -version = "1.0.68" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02dd99dc800bbb97186339685293e1cc5d9df1f8fae2d0aecd9ff1c77efea892" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.68" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7c61ec9a6f64d2793d8a45faba21efbe3ced62a886d44c36a009b2b519b4c7e" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "tokio" -version = "1.41.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22cfb5bee7a6a52939ca9224d6ac897bb669134078daa8735560897f69de4d33" -dependencies = [ - "backtrace", - "bytes", - "libc", - "mio", - "pin-project-lite", - "socket2", - "windows-sys", -] - -[[package]] -name = "tokio-tungstenite" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edc5f74e248dc973e0dbb7b74c7e0d6fcc301c694ff50049504004ef4d0cdcd9" -dependencies = [ - "futures-util", - "log", - "tokio", - "tungstenite", -] - -[[package]] -name = "tower-layer" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" - -[[package]] -name = "tower-service" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" - -[[package]] -name = "tungstenite" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18e5b8366ee7a95b16d32197d0b2604b43a0be89dc5fac9f8e96ccafbaedda8a" -dependencies = [ - "byteorder", - "bytes", - "data-encoding", - "http", - "httparse", - "log", - "rand", - "sha1", - "thiserror", - "utf-8", -] - -[[package]] -name = "typenum" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" - -[[package]] -name = "unicode-ident" -version = "1.0.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" - -[[package]] -name = "utf-8" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" - -[[package]] -name = "uuid" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" -dependencies = [ - "getrandom", - "serde", -] - -[[package]] -name = "version_check" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wide" -version = "0.7.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b828f995bf1e9622031f8009f8481a85406ce1f4d4588ff746d872043e855690" -dependencies = [ - "bytemuck", - "safe_arch", -] - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-targets" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" - -[[package]] -name = "zerocopy" -version = "0.7.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" -dependencies = [ - "byteorder", - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.7.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] diff --git a/plugins/test_plugin/Cargo.toml b/plugins/test_plugin/Cargo.toml deleted file mode 100644 index 15887b3..0000000 --- a/plugins/test_plugin/Cargo.toml +++ /dev/null @@ -1,9 +0,0 @@ -[package] -name = "test_plugin" -version = "0.1.0" -edition = "2021" - -[dependencies] -horizon-plugin-api = "0.1.7" -horizon_data_types = "0.3.0" -socketioxide = "0.15.1" diff --git a/plugins/test_plugin/src/lib.rs b/plugins/test_plugin/src/lib.rs deleted file mode 100644 index c701575..0000000 --- a/plugins/test_plugin/src/lib.rs +++ /dev/null @@ -1,45 +0,0 @@ -use horizon_data_types::Player; -use socketioxide::extract::SocketRef; -pub use horizon_plugin_api::{Plugin, Pluginstate, LoadedPlugin}; -use std::sync::RwLock; -use std::sync::Arc; -use std::collections::HashMap; - -// Define the trait properly -pub trait PluginAPI { - fn thing(&self) -> String; - fn player_joined(&self, socket: SocketRef, players: Arc>>); -} - -pub trait PluginConstruct { - // If you want default implementations, mark them with 'default' - fn new(plugins: HashMap<&'static str, LoadedPlugin>) -> Plugin; - -} - -// Implement constructor separately -impl PluginConstruct for Plugin { - fn new(plugins: HashMap<&'static str, LoadedPlugin>) -> Plugin { - println!("Hello from the test plugin!!!!!"); - - Plugin {} - } - -} - -// Implement the trait for Plugin -impl PluginAPI for Plugin { - // Add the thing() method implementation - fn thing(&self) -> String { - "Hello from specific plugin implementation!".to_string() - } - - fn player_joined(&self, socket: SocketRef, players: Arc>>) { - setup_listeners(socket, players); - } -} - - -fn setup_listeners(socket: SocketRef, players: Arc>>) { - socket.on("foo", || println!("bar")); -} \ No newline at end of file diff --git a/plugins/unreal_adapter_horizon/.gitignore b/plugins/unreal_adapter_horizon/.gitignore new file mode 100644 index 0000000..d01bd1a --- /dev/null +++ b/plugins/unreal_adapter_horizon/.gitignore @@ -0,0 +1,21 @@ +# Generated by Cargo +# will have compiled files and executables +debug/ +target/ + +# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries +# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html +Cargo.lock + +# These are backup files generated by rustfmt +**/*.rs.bk + +# MSVC Windows builds of rustc generate these, which store debugging information +*.pdb + +# RustRover +# JetBrains specific template is maintained in a separate JetBrains.gitignore that can +# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore +# and can be added to the global gitignore or merged into this file. For a more nuclear +# option (not recommended) you can uncomment the following to ignore the entire idea folder. +#.idea/ \ No newline at end of file diff --git a/plugins/unreal_adapter_horizon/Cargo.toml b/plugins/unreal_adapter_horizon/Cargo.toml new file mode 100644 index 0000000..4078f9d --- /dev/null +++ b/plugins/unreal_adapter_horizon/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "unreal_adapter_horizon" +version = "0.1.0" +edition = "2021" + +[dependencies] +horizon-plugin-api = "0.1.9" +horizon_data_types = "0.4.0" +socketioxide = "0.15.1" diff --git a/plugins/unreal_adapter_horizon/LICENSE b/plugins/unreal_adapter_horizon/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/plugins/unreal_adapter_horizon/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/plugins/unreal_adapter_horizon/README.md b/plugins/unreal_adapter_horizon/README.md new file mode 100644 index 0000000..5c11802 --- /dev/null +++ b/plugins/unreal_adapter_horizon/README.md @@ -0,0 +1,5 @@ +# Horizon-Plugin-Template +A generic template for Horizon Game Server plugins + +## Usage +To make a new Horizon plugin repo in your GitHub account or org click [Here](https://github.com/new?template_name=Horizon-Plugin-Template&template_owner=Far-Beyond-Dev) diff --git a/plugins/unreal_adapter_horizon/src/lib.rs b/plugins/unreal_adapter_horizon/src/lib.rs new file mode 100644 index 0000000..08e739b --- /dev/null +++ b/plugins/unreal_adapter_horizon/src/lib.rs @@ -0,0 +1,45 @@ +// Welcome to the Horizon Plugin Template! This is the entry point for your plugin. +// Things to keep in mind: +// - The PluginAPI trait is the interface between your plugin and the server, it can be customized to your needs +// - The PluginConstruct trait is the constructor for your plugin, this is pre-defined and should not ever be changed +// - The Plugin struct is the main struct for your plugin +// - The PluginAPI trait is implemented for the Plugin struct +// - The PluginConstruct trait is implemented for the Plugin struct + + +use horizon_data_types::Player; +use socketioxide::extract::SocketRef; +pub use horizon_plugin_api::{Plugin, Pluginstate, LoadedPlugin}; +use std::sync::RwLock; +use std::sync::Arc; +use std::collections::HashMap; + +// Define the trait properly +pub trait PluginAPI { + fn player_joined(&self, socket: SocketRef, player: Arc); +} + +pub trait PluginConstruct { + // If you want default implementations, mark them with 'default' + fn new(plugins: HashMap<&'static str, LoadedPlugin>) -> Plugin; + +} + +// Implement constructor separately +impl PluginConstruct for Plugin { + fn new(plugins: HashMap<&'static str, LoadedPlugin>) -> Plugin { + Plugin {} + } +} + +// Implement the trait for Plugin +impl PluginAPI for Plugin { + fn player_joined(&self, socket: SocketRef, player: Arc) { + setup_listeners(socket, player); + } +} + + +fn setup_listeners(socket: SocketRef, player: Arc) { + socket.on("foo", || println!("bar")); +} \ No newline at end of file diff --git a/server/Cargo.toml b/server/Cargo.toml new file mode 100644 index 0000000..d8f78ae --- /dev/null +++ b/server/Cargo.toml @@ -0,0 +1,37 @@ +[package] +name = "horizon-server" +version = "0.13.0" +edition = "2021" + +[dependencies] +# PLUGIN API, DO NOT REMOVE +plugin_api = {path = "../plugin_api/"} + +# DEFAULT DEPENDENCIES +anyhow = "1.0.93" +axum = "0.7.9" +env_logger = "0.11.5" +lazy_static = "1.5.0" +serde = { version = "1.0.215", features = ["derive"] } +serde_json = "1.0.133" +socketioxide = "0.15.1" +tokio = { version = "1.41.1", features = ["rt-multi-thread"] } +horizon_logger = "0.1.0" +once_cell = "1.20.2" +horizon_data_types = "0.4.0" +rmpv = "1.3.0" +dhat = "0.3.3" +ctrlc = { version = "3.4.5", features = ["termination"] } +parking_lot = "0.12.3" +rayon = "1.10.0" +futures = "0.3.31" +PebbleVault = "0.6.1" +uuid = "1.11.0" +nalgebra = "0.33.2" +rstar = "0.12.2" +horizon-plugin-api = "0.1.9" + +# ADD ANY CUSTOM DEPENDENCIES BELOW + +# END CUSTOM DEPENDENCIES + diff --git a/server/src/collision.rs b/server/src/collision.rs new file mode 100644 index 0000000..8a06484 --- /dev/null +++ b/server/src/collision.rs @@ -0,0 +1,239 @@ +use std::collections::HashMap; +use std::time::{Instant, Duration}; +use std::thread; +use nalgebra::Point3; +use rstar::{RTree, RTreeObject, AABB}; + +// Spatial wrapper for spheres to work with R-tree +#[derive(Debug, Clone)] +struct SpatialSphere { + id: usize, + center: Point3, + radius: f32, +} + +impl RTreeObject for SpatialSphere { + type Envelope = AABB<[f32; 3]>; + + fn envelope(&self) -> Self::Envelope { + AABB::from_corners( + [ + self.center.x - self.radius, + self.center.y - self.radius, + self.center.z - self.radius + ], + [ + self.center.x + self.radius, + self.center.y + self.radius, + self.center.z + self.radius + ], + ) + } +} + +// We'll use Arc to make our callbacks shareable and cloneable +use std::sync::Arc; +type CallbackFn = Arc; + +// Sphere with event handling +#[derive(Clone)] +struct Sphere { + center: Point3, + radius: f32, + on_enter: CallbackFn, + on_exit: CallbackFn, + contains_player: bool, +} + +impl Sphere { + fn check_position(&mut self, position: Point3) -> bool { + let dx = position.x - self.center.x; + let dy = position.y - self.center.y; + let dz = position.z - self.center.z; + let is_inside = dx * dx + dy * dy + dz * dz <= self.radius * self.radius; + + let state_changed = is_inside != self.contains_player; + + if state_changed { + if is_inside { + (self.on_enter)(); + } else { + (self.on_exit)(); + } + self.contains_player = is_inside; + } + + state_changed + } +} + +pub struct SphereSystem { + spheres: HashMap, + spatial_index: RTree, + next_id: usize, +} + +impl SphereSystem { + pub fn new() -> Self { + Self { + spheres: HashMap::new(), + spatial_index: RTree::new(), + next_id: 0, + } + } + + pub fn add_sphere( + &mut self, + center: Point3, + radius: f32, + on_enter: impl Fn() + Send + Sync + 'static, + on_exit: impl Fn() + Send + Sync + 'static, + ) -> usize { + let id = self.next_id; + self.next_id += 1; + + let sphere = Sphere { + center, + radius, + on_enter: Arc::new(on_enter), + on_exit: Arc::new(on_exit), + contains_player: false, + }; + + // Add to both storage and spatial index + let spatial = SpatialSphere { id, center, radius }; + self.spatial_index.insert(spatial); + self.spheres.insert(id, sphere); + + id + } + + pub fn remove_sphere(&mut self, id: usize) { + if self.spheres.remove(&id).is_some() { + // Create a new R-tree without the removed sphere + let spheres: Vec<_> = self.spatial_index + .iter() + .filter(|s| s.id != id) + .cloned() + .collect(); + self.spatial_index = RTree::bulk_load(spheres); + } + } + + pub fn update_position(&mut self, position: Point3) { + // Create a bounding box for the query with a small margin + // Use a larger query box based on the maximum sphere radius (8.0) + let query_box = AABB::from_corners( + [ + position.x - 10.0, // Increased from 1.0 to catch nearby spheres + position.y - 10.0, + position.z - 10.0 + ], + [ + position.x + 10.0, + position.y + 10.0, + position.z + 10.0 + ], + ); + + // Get only spheres that could possibly contain the point + let nearby_spheres: Vec<_> = self.spatial_index + .locate_in_envelope(&query_box) + .map(|spatial| spatial.id) + .collect(); + + // Update only nearby spheres + for &id in &nearby_spheres { + if let Some(sphere) = self.spheres.get_mut(&id) { + sphere.check_position(position); + } + } + } + + // Bulk insertion method for better performance when adding many spheres + pub fn bulk_add_spheres( + &mut self, + spheres: Vec<(Point3, f32, Arc, Arc)> + ) { + let mut spatial_spheres = Vec::with_capacity(spheres.len()); + + for (center, radius, on_enter, on_exit) in spheres { + let id = self.next_id; + self.next_id += 1; + + let sphere = Sphere { + center, + radius, + on_enter, + on_exit, + contains_player: false, + }; + + spatial_spheres.push(SpatialSphere { id, center, radius }); + self.spheres.insert(id, sphere); + } + + // Bulk load into R-tree + self.spatial_index = RTree::bulk_load(spatial_spheres); + } + + // Method to help with testing/debugging + #[cfg(test)] + pub fn sphere_count(&self) -> usize { + self.spheres.len() + } +} + +pub fn main() { + let mut system = SphereSystem::new(); + + // Add some test spheres in a grid pattern + for x in 0..10 { + for y in 0..10 { + for z in 0..10 { + let pos = Point3::new(x as f32 * 1.0, y as f32 * 1.0, z as f32 * 1.0); + system.add_sphere( + pos, + 8.0, // radius + { + let pos = pos; + move || println!("Entered sphere at position ({:.1}, {:.1}, {:.1})", + pos.x, pos.y, pos.z) + }, + { + let pos = pos; + move || println!("Left sphere at position ({:.1}, {:.1}, {:.1})", + pos.x, pos.y, pos.z) + } + ); + } + } + } + + println!("Moving player in 3D figure-8 pattern..."); + println!("Press Ctrl+C to stop"); + + let start_time = Instant::now(); + let movement_speed = 0.1; // Adjust this to change movement speed + + loop { + let elapsed = start_time.elapsed().as_secs_f32(); + + // Create a figure-8 pattern in 3D space + // Adjust the movement to intersect with our grid of spheres + let x = 20.0 + (30.0 * (elapsed * movement_speed).sin()); + let y = 20.0 + (30.0 * (elapsed * movement_speed * 2.0).sin()); + let z = 20.0 + (30.0 * (elapsed * movement_speed).cos()); + + let position = Point3::new(x, y, z); + system.update_position(position); + + // Sleep briefly to control update rate + thread::sleep(Duration::from_millis(16)); // ~60 FPS + + // Optional: print current position periodically + if elapsed as i32 % 5 == 0 { + println!("Player position: ({:.1}, {:.1}, {:.1})", x, y, z); + } + } +} \ No newline at end of file diff --git a/server/src/main.rs b/server/src/main.rs new file mode 100644 index 0000000..ccf420d --- /dev/null +++ b/server/src/main.rs @@ -0,0 +1,84 @@ +//=============================================================================// +// Horizon Game Server - Core Implementation // +//=============================================================================// +// A high-performance, multithreaded game server using Socket.IO for real-time // +// communication. Features include: // +// // +// - Scalable thread pool architecture supporting up to 32,000 concurrent // +// players // +// - Dynamic player connection management with automatic load balancing // +// - Integrated plugin system for extensible functionality // +// - Comprehensive logging and monitoring // +// - Real-time Socket.IO event handling // +// - Graceful error handling and connection management // +// // +// Structure: // +// - Player connections are distributed across multiple thread pools // +// - Each pool manages up to 1000 players independently // +// - Message passing system for inter-thread communication // +// - Asynchronous event handling using Tokio runtime // +// // +// Authors: Tristan James Poland, Thiago M. R. Goulart, Michael Houston, // +// Caznix // +// License: Apache-2.0 // +//=============================================================================// +#[global_allocator] +static ALLOC: dhat::Alloc = dhat::Alloc; + +static CTRL_C_HANDLER: Once = Once::new(); +use std::sync::Once; +use once_cell::sync::Lazy; +use server::{config::server_config, start}; +use splash::splash; +use anyhow::{Context, Result}; +use horizon_logger::{HorizonLogger, log_info, log_debug, log_warn, log_error, log_critical}; +mod server; +mod splash; +mod collision; + +//------------------------------------------------------------------------------ +// Global Logger Configuration +//------------------------------------------------------------------------------ + +/// Global logger instance using lazy initialization +/// This ensures the logger is only created when first accessed +pub static LOGGER: Lazy = Lazy::new(|| { + let logger = HorizonLogger::new(); + logger +}); + +#[tokio::main] +async fn main() -> Result<()> { + //collision::main(); + + let mut _profiler = Some(dhat::Profiler::new_heap()); + splash(); + let config_init_time = std::time::Instant::now(); + //let server_config: std::sync::Arc = server_config().context("Failed to obtain server config")?; + log_info!(LOGGER, "INIT", "Server config loaded in {:#?}", config_init_time.elapsed()); + + let init_time = std::time::Instant::now(); + + // Start the server + server::start().await.context("Failed to start server")?; + + + let mut terminating: bool = false; + + CTRL_C_HANDLER.call_once(|| { + // Register the Ctrl+C handler + ctrlc::set_handler(move || { + if !terminating { + terminating = true; + + println!("Exit"); + drop(_profiler.take()); + std::process::exit(0); + + } + }, + + ).expect("Failed to handle Ctrl+C"); + }); + Ok(()) +} diff --git a/server/src/server/config.rs b/server/src/server/config.rs new file mode 100644 index 0000000..ff9f726 --- /dev/null +++ b/server/src/server/config.rs @@ -0,0 +1,46 @@ +use anyhow::{Context, Result}; +use env_logger::Logger; +use horizon_logger::log_warn; +use lazy_static::lazy_static; +use serde::{Deserialize, Serialize}; +use std::{ + fs, + sync::{Arc, OnceLock}, +}; + +use crate::LOGGER; + +lazy_static! { + pub static ref SERVER_CONFIG: OnceLock> = OnceLock::new(); +} + +pub fn server_config() -> Result> { + let config_path = std::env::var("SERVER_CONFIG_PATH").unwrap_or_else(|_| "./server_config.json".to_string()); + let config = match fs::read_to_string(&config_path) { + Ok(config_str) => serde_json::from_str(&config_str).with_context(|| format!("Failed to parse {}", config_path))?, + Err(e) => { + log_warn!(LOGGER, "SERVER", "Failed to read {}: {}", config_path, e); + ServerConfig::new() + } + }; + Ok(SERVER_CONFIG.get_or_init(|| Arc::new(config)).clone()) +} + +#[derive(Debug, Serialize, Deserialize, Copy, Clone)] +pub struct ServerConfig { + pub players_per_pool: u32, + pub num_thread_pools: u32, +} + +impl ServerConfig { + fn new() -> Self { + Self { + players_per_pool: 5000, + num_thread_pools: 60, + } + } + fn log_level() -> String { + String::from("info") + } + +} \ No newline at end of file diff --git a/server/src/server/event_rep/mod.rs b/server/src/server/event_rep/mod.rs new file mode 100644 index 0000000..9e559be --- /dev/null +++ b/server/src/server/event_rep/mod.rs @@ -0,0 +1,70 @@ +use uuid::Uuid; +use rayon::prelude::*; +use horizon_data_types::Vec3D; + + +mod structs; + +struct Actor { + name: String, + location: Vec3D, + uuid: Uuid, + has_collision: bool, + replication: bool, + replication_distance: f64, +} + +impl Actor { + fn new(name: &str, has_collision: bool) -> Self { + Self { + name: name.to_string(), + location: Vec3D { x: 0.0, y: 0.0, z: 0.0 }, + uuid: Uuid::new_v4(), + has_collision, + replication: false, + replication_distance: 0.0, + } + } + + fn check_collision(&self, other_actor: &Actor) -> bool { + // Check collision between self and other + // Return true if collision detected, false otherwise + let dx = self.location.x - other_actor.location.x; + let dy = self.location.y - other_actor.location.y; + let dz = self.location.z - other_actor.location.z; + let distance = (dx * dx + dy * dy + dz * dz).sqrt(); + return distance < other_actor.replication_distance; + } +} + +fn main() { + let actors = vec![ + Actor::new("Actor1", true), + Actor::new("Actor2", false), + Actor::new("Actor3", true), + // Add more actors as needed + ]; + + let collidable_actors: Vec<&Actor> = actors.iter().filter(|actor| actor.has_collision).collect(); + + collidable_actors.par_iter().enumerate().for_each(|(i, actor1)| { + collidable_actors.iter().skip(i + 1).for_each(|actor2| { + if actor1.check_collision(actor2) { + println!("Collision detected between {} and {}", actor1.name, actor2.name); + } + }); + }); +} + + +fn get_overlapping_colissions(main_actor: Actor, actors: Vec) -> Vec { + let mut overlapping_collisions = Vec::new(); + + //for other_actor in actors { + // if actor.check_collision(&other_actor) { + // overlapping_collisions.push(other_actor.uuid); + // } + //} + + overlapping_collisions +} \ No newline at end of file diff --git a/server/src/server/event_rep/structs.rs b/server/src/server/event_rep/structs.rs new file mode 100644 index 0000000..5ba36f4 --- /dev/null +++ b/server/src/server/event_rep/structs.rs @@ -0,0 +1,87 @@ +use socketioxide::extract::SocketRef; +use serde::{Serialize, Deserialize}; +use socketioxide::extract::Data; +use horizon_data_types::Vec3D; +use PebbleVault::VaultManager; +use std::sync::{Arc, Mutex}; +use once_cell::sync::Lazy; + +static VAULT_MANAGER: Lazy>>> = + Lazy::new(|| { + let vault_manager = VaultManager::new("./pv-horizon-plugin-data").expect("Failed to create VaultManager"); + Arc::new(Mutex::new(vault_manager)) + }); + +/// Custom data structure for PebbleVault objects +/// +/// This struct represents the custom data associated with each spatial object +/// in the PebbleVault system. It can be extended or modified to suit specific +/// game or application needs. +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +pub struct PebbleVaultCustomData { + /// Name of the object + pub name: String, + /// Custom value associated with the object + pub value: i32, +} + + +pub struct EventManager<'a, T: Clone + Serialize + for<'de> Deserialize<'de> + PartialEq + Sized> { + vault_ref: &'a mut PebbleVault::VaultManager, +} + +impl<'a, T: Clone + Serialize + for<'de> Deserialize<'de> + PartialEq + Sized> EventManager<'a, T> { + pub fn new(pebble_vault_ref: &'a mut PebbleVault::VaultManager) -> Self { + Self { + vault_ref: pebble_vault_ref + } + } + + pub fn create_event(&mut self, instigator: SocketRef, origin: Vec3D, radius: f64, data: Data) { + let event = Event::new(instigator, origin, radius, data); + + let event_uuid = uuid::Uuid::new_v4(); + + let sockets: Vec = Vec::new(); + + for socket in sockets { + let _ = socket.join(event_uuid.to_string()); + } + + + + // Query against Pebblevault to find all clients in range + event.broadcast(); + } +} + +pub struct Event { + instigator: SocketRef, + origin: Vec3D, + radius: f64, + data: Data, +} + +impl Event { + pub fn new(instigator: SocketRef, origin: Vec3D, radius: f64, data: Data) -> Self { + Self { + instigator, + origin, + radius, + data, + } + } + + pub fn get_instigator(&self) -> &SocketRef { + &self.instigator + } + + pub fn broadcast(&self) { + // Broadcast the event to all clients in range + } +} + +pub fn test() { + let mut vault_manager = VAULT_MANAGER.lock().unwrap(); + let mut evt_manager = EventManager::new(&mut *vault_manager); +} \ No newline at end of file diff --git a/server/src/server/mod.rs b/server/src/server/mod.rs new file mode 100644 index 0000000..4982def --- /dev/null +++ b/server/src/server/mod.rs @@ -0,0 +1,235 @@ +//----------------------------------------------------------------------------- +// Multi-Threaded SocketIO Server Implementation +// - Manages multiple threads for handling player connections +// - Uses SocketIO for real-time communication with clients +// - Configurable server settings +// - Logging with Horizon Logger +// - Server state management with lazy_static +// - Horizon Server and Horizon Thread structs +// - Socket event handlers for message and ack events +// - Server startup with axum web framework +// - Server configuration with config module +// +//----------------------------------------------------------------------------- +// Written by: Tristan James Poland, and Caznix +//----------------------------------------------------------------------------- + +use crate::LOGGER; +use anyhow::{Context, Result}; +use axum::{routing::get, Router}; +use config::ServerConfig; +use horizon_data_types::Player; +use horizon_logger::{log_critical, log_debug, log_error, log_info, log_warn}; +use parking_lot::RwLock; +use plugin_api::{Plugin, Pluginstate}; +use horizon_plugin_api::LoadedPlugin; +use socketioxide::{ + extract::{AckSender, Data, SocketRef}, + SocketIo, +}; +use std::collections::HashMap; +use std::sync::Arc; +use tokio::sync::Mutex; +use uuid::Uuid; +pub mod config; +mod event_rep; +use plugin_api::plugin_imports::*; + +// Server state management + +//----------------------------------------------------------------------------- +// Horizon Server Struct +//----------------------------------------------------------------------------- +pub struct HorizonServer { + config: ServerConfig, + threads: RwLock>>, +} + +struct Server { + instance: Arc>, +} + +impl Server { + fn new() -> Result { + Ok(Self { + instance: Arc::new(RwLock::new(HorizonServer::new()?)), + }) + } + fn get_instance(&self) -> Arc> { + Arc::clone(&self.instance) + } +} + +impl HorizonServer { + fn new() -> Result { + Ok(Self { + config: *config::server_config()?, + threads: RwLock::new(Vec::new()), + }) + } + + fn spawn_thread(&self) -> Result { + let thread = HorizonThread::new(); + let thread_id = { + let mut threads = self.threads.write(); + threads.push(thread.into()); + threads.len() - 1 + }; + + Ok(thread_id) + } +} + +//----------------------------------------------------------------------------- +// Horizon Thread Structhorizon_plugin_api::Plugin +//----------------------------------------------------------------------------- +struct HorizonThread { + players: Mutex>, + plugins: HashMap, + handle: tokio::task::JoinHandle<()>, +} + +impl HorizonThread { + fn new() -> Self { + let plugin_manager = plugin_api::PluginManager::new(); + let plugins = plugin_manager.load_all(); + Self { + players: Mutex::new(Vec::new()), + plugins, + handle: tokio::spawn(async move { + loop { + tokio::time::sleep(std::time::Duration::from_secs(10)).await; + } + }), + } + } + + fn id(&self) -> usize { + self.players + .try_lock() + .map(|players| players.len()) + .unwrap_or(usize::MAX) + } + + async fn add_player(&self, player: Player) -> Result<()> { + let mut players = self.players.lock().await; + players.push(player); + Ok(()) + } + + // async fn remove_player(&self, player_id: &str) -> Result { + // let mut players = self.players.lock().await; + // if let Some(pos) = players.iter().position(|p| p.id == player_id) { + // players.remove(pos); + // Ok(true) + // } else { + // Ok(false) + // } + // } +} + +//----------------------------------------------------------------------------- +// Socket event handlers +//----------------------------------------------------------------------------- +async fn handle_socket_message(socket: SocketRef, Data(data): Data) { + log_debug!(LOGGER, "SOCKET EVENT", "Received message"); + if let Err(e) = socket.emit("message-back", &data) { + log_error!(LOGGER, "SOCKET EVENT", "Failed to send message back: {}", e); + } +} + +async fn handle_socket_ack(Data(data): Data, ack: AckSender) { + log_debug!(LOGGER, "SOCKET EVENT", "Received message with ack"); + if let Err(e) = ack.send(&data) { + log_error!(LOGGER, "SOCKET EVENT", "Failed to send ack: {}", e); + } +} + +fn on_connect(server: Server, socket: SocketRef, Data(data): Data) { + log_info!(LOGGER, "SOCKET NET", "New connection from {}", socket.id); + + if let Err(e) = socket.emit("auth", &data) { + log_error!(LOGGER, "SOCKET NET", "Failed to send auth: {}", e); + return; + } + + // TODO: Implement proper thread management via round robin + let threadid = 0; + + let server_instance = server.get_instance(); + let server_instance_read = server_instance.read(); + let threads = server_instance_read.threads.read(); + + socket.on("message", handle_socket_message); + socket.on("message-with-ack", handle_socket_ack); + + let player = horizon_data_types::Player::new( + socket.clone(), + Uuid::new_v4() + ); + + let target_thread = Arc::clone(&threads[threadid]); + target_thread.add_player(player.clone()); + + let player_arc: Arc = Arc::new(player); + let unreal_adapter = plugin_api::get_plugin!(unreal_adapter_horizon, target_thread.plugins); + unreal_adapter.player_joined(socket, player_arc); + + +} + +//----------------------------------------------------------------------------- +// Server startup +//----------------------------------------------------------------------------- +pub async fn start() -> anyhow::Result<()> { + let start_time = std::time::Instant::now(); + + let (layer, io) = SocketIo::new_layer(); + // Initialize server state so we can spawn threads + let server = Server::new()?; + let thread_count = config::SERVER_CONFIG + .get() + .map(|config| config.num_thread_pools) + .unwrap(); + + // Start 10 threads initially for handling player connections + let mut count = 0; + //let handles = Vec::new(); + + let mut handles = vec![]; + let spawn_futures: Vec<_> = (0..thread_count).map(|_| { + let server_instance = server.get_instance(); + { + let mut value = handles.clone(); + async move { + if let Ok(thread_id) = server_instance.read().spawn_thread() { + value.push(thread_id); + } + } + } + }).collect(); + + // Configure socket namespaces + // io.ns("/", on_connect); + // io.ns("/custom", on_connect); + // Build the application with routes + let app = Router::new() + .route("/", get(|| async { "Horizon Server Running" })) + .layer(layer); + // Start the server + let address = "0.0.0.0:3000"; + log_info!(LOGGER, "SOCKET NET", "Starting server on {}", address); + + futures::future::join_all(spawn_futures).await; + log_info!(LOGGER, "SERVER", "Spawned {} threads", thread_count); + let elapsed = start_time.elapsed(); + log_info!(LOGGER, "SERVER", "Server initialization took {:?}", elapsed); + + let listener = tokio::net::TcpListener::bind(&address) + .await + .context(format!("Failed to bind to {}", address))?; + axum::serve(listener, app) + .await + .context("Failed to start server")?; + Ok(()) +} diff --git a/src/splash.rs b/server/src/splash.rs similarity index 78% rename from src/splash.rs rename to server/src/splash.rs index d4763d3..114967c 100644 --- a/src/splash.rs +++ b/server/src/splash.rs @@ -1,14 +1,15 @@ -pub fn splash() { - let splash_screen = r#" - ___ ___ ________ ________ ___ ________ ________ ________ -|\ \|\ \|\ __ \|\ __ \|\ \|\_____ \|\ __ \|\ ___ \ -\ \ \\\ \ \ \|\ \ \ \|\ \ \ \\|___/ /\ \ \|\ \ \ \\ \ \ - \ \ __ \ \ \\\ \ \ _ _\ \ \ / / /\ \ \\\ \ \ \\ \ \ - \ \ \ \ \ \ \\\ \ \ \\ \\ \ \ / /_/__\ \ \\\ \ \ \\ \ \ - \ \__\ \__\ \_______\ \__\\ _\\ \__\\________\ \_______\ \__\\ \__\ - \|__|\|__|\|_______|\|__|\|__|\|__|\|_______|\|_______|\|__| \|__| - The future is distributed - > Version 0.0.12 < - "#; - println!("{}", splash_screen); +pub fn splash() { + const VERSION: &str = env!("CARGO_PKG_VERSION"); + let splash_screen = format!(r#" + ___ ___ ________ ________ ___ ________ ________ ________ +|\ \|\ \|\ __ \|\ __ \|\ \|\_____ \|\ __ \|\ ___ \ +\ \ \\\ \ \ \|\ \ \ \|\ \ \ \\|___/ /\ \ \|\ \ \ \\ \ \ + \ \ __ \ \ \\\ \ \ _ _\ \ \ / / /\ \ \\\ \ \ \\ \ \ + \ \ \ \ \ \ \\\ \ \ \\ \\ \ \ / /_/__\ \ \\\ \ \ \\ \ \ + \ \__\ \__\ \_______\ \__\\ _\\ \__\\________\ \_______\ \__\\ \__\ + \|__|\|__|\|_______|\|__|\|__|\|__|\|_______|\|_______|\|__| \|__| + The future is distributed + > Version {VERSION} < + "#); + println!("{}", splash_screen); } \ No newline at end of file diff --git a/src/config.rs b/src/config.rs deleted file mode 100644 index 8e6469b..0000000 --- a/src/config.rs +++ /dev/null @@ -1,18 +0,0 @@ -use serde::Deserialize; -use std::fs; - -#[derive(Deserialize)] -pub struct Config { - pub players_per_pool: usize, - pub num_thread_pools: usize, - pub log_level: String, -} - -impl Config { - pub fn from_file(file_path: &str) -> Self { - let config_str = fs::read_to_string(file_path) - .expect("Failed to read configuration file"); - serde_yaml::from_str(&config_str) - .expect("Failed to parse configuration file") - } -} \ No newline at end of file diff --git a/src/macros.rs b/src/macros.rs deleted file mode 100644 index 45c2cde..0000000 --- a/src/macros.rs +++ /dev/null @@ -1,28 +0,0 @@ -/// Append .on to a **mutable** SocketRef to keep everything concise. -/// -/// The first parameter is the variable itself; a socketioxide::extract::SocketRef type. -/// The second value is the endpoint, eg "/". -/// The third value is the function to be called. -/// -/// # Example -/// -/// ```rust -/// define_event!(socket, // where socket is a socketioxide::extract::SocketRef type -/// "/", hello_world(), -/// "/function", function()); -/// ``` -/// -/// Note: this example does not compile because you may not have such variables or functions. -/// This is just an example of how it's meant to be used. -#[macro_export] -macro_rules! define_event { - ($app:expr, $($path:expr, $handler:expr),* $(,)?) => { - $( - { - let app = &$app; // Borrow $app - let handler = $handler.clone(); //define handler within the macro's scope - app.on($path, move || { handler }); - } - )* - }; -} \ No newline at end of file diff --git a/src/main.rs b/src/main.rs deleted file mode 100644 index 1983f72..0000000 --- a/src/main.rs +++ /dev/null @@ -1,311 +0,0 @@ -//============================================================================== -// Horizon Game Server - Core Implementation -//============================================================================== -// A high-performance, multithreaded game server using Socket.IO for real-time -// communication. Features include: -// -// - Scalable thread pool architecture supporting up to 32,000 concurrent players -// - Dynamic player connection management with automatic load balancing -// - Integrated plugin system for extensible functionality -// - Comprehensive logging and monitoring -// - Real-time Socket.IO event handling -// - Graceful error handling and connection management -// -// Structure: -// - Player connections are distributed across multiple thread pools -// - Each pool manages up to 1000 players independently -// - Message passing system for inter-thread communication -// - Asynchronous event handling using Tokio runtime -// -// Authors: Tristan James Poland, Thiago M. R. Goulart, Michael Houston -// License: Apache-2.0 -//============================================================================== - -use horizon_data_types::*; -use horizon_logger::{HorizonLogger, log_info, log_debug, log_warn, log_error, log_critical}; -use serde_json::Value; -use socketioxide::extract::{Data, SocketRef}; -use std::sync::{Arc, RwLock}; -use std::thread; -use std::time::Instant; -use tokio::runtime::Runtime; -use tokio::sync::mpsc; -use uuid::Uuid; -use viz::{handler::ServiceHandler, serve, Body, Request, Response, Result, Router}; -use once_cell::sync::Lazy; -use plugin_api; -use serde::Deserialize; -use std::fs; - -mod config; -mod players; -mod splash; - -use config::Config; - -//------------------------------------------------------------------------------ -// Global Logger Configuration -//------------------------------------------------------------------------------ - -/// Global logger instance using lazy initialization -/// This ensures the logger is only created when first accessed -static CONFIG: Lazy = Lazy::new(|| { - config::Config::from_file("config.yml") -}); - -static LOGGER: Lazy = Lazy::new(|| { - let logger = HorizonLogger::new(); - log_info!(logger, "INIT", "Horizon logger initialized with level: {}", CONFIG.log_level); - logger -}); - -//------------------------------------------------------------------------------ -// Thread Pool Structure -//------------------------------------------------------------------------------ - -/// Represents a thread pool that manages a subset of connected players -/// Uses Arc and RwLock for safe concurrent access across threads -#[derive(Clone)] -struct PlayerThreadPool { - /// Starting index for this pool's player range - start_index: usize, - /// Ending index for this pool's player range - end_index: usize, - /// Thread-safe vector containing the players managed by this pool - players: Arc>>, - /// Channel sender for sending messages to the pool's message handler - sender: mpsc::Sender, - /// Thread-safe logger instance for this pool - logger: Arc, -} - -/// Messages that can be processed by the player thread pools -enum PlayerMessage { - /// Message for adding a new player with their socket and initial data - NewPlayer(SocketRef, Value), - /// Message for removing a player using their UUID - RemovePlayer(Uuid), -} - -//------------------------------------------------------------------------------ -// Main Server Structure -//------------------------------------------------------------------------------ - -/// Main server structure that manages multiple player thread pools -/// Handles incoming connections and distributes them across available pools -#[derive(Clone)] -struct HorizonServer { - // Config Values - players_per_pool: usize, // Number of players per pool - num_thread_pools: usize, // Number of thread pools - - /// Vector of thread pools, wrapped in Arc for thread-safe sharing - thread_pools: Arc>>, - /// Tokio runtime for handling async operations - runtime: Arc, - /// Server-wide logger instance - logger: Arc, -} - -impl HorizonServer { - /// Creates a new instance of the Horizon Server - /// Initializes the thread pools and sets up message handling for each - fn new(players_per_pool: usize, num_thread_pools: usize) -> Self { - let runtime = Arc::new(Runtime::new().unwrap()); - let mut thread_pools = Vec::new(); - let logger = Arc::new(HorizonLogger::new()); - - log_info!(logger, "SERVER", "Initializing Horizon Server"); - - // Initialize thread pools - for i in 0..num_thread_pools { - let start_index = i * players_per_pool; - let end_index = start_index + players_per_pool; - - // Create message channel for this pool - let (sender, mut receiver) = mpsc::channel(100); - let players = Arc::new(RwLock::new(Vec::new())); - - let pool = Arc::new(PlayerThreadPool { - start_index, - end_index, - players: players.clone(), - sender, - logger: logger.clone(), - }); - - // Initialize plugin system for this pool - let my_manager = plugin_api::PluginManager::new(); - my_manager.load_all(); - - // Spawn dedicated thread for handling this pool's messages - let pool_clone = pool.clone(); - thread::spawn(move || { - let rt = Runtime::new().unwrap(); - rt.block_on(async move { - while let Some(msg) = receiver.recv().await { - Self::handle_message(msg, &pool_clone).await; - } - }); - }); - - log_debug!(logger, "THREAD_POOL", "Initialized pool {} with range {}-{}", - i, start_index, end_index); - - thread_pools.push(pool); - } - - HorizonServer { - players_per_pool, - num_thread_pools, - thread_pools: Arc::new(thread_pools), - runtime, - logger, - } - } - - /// Handles incoming messages for a specific thread pool - /// Processes player connections and disconnections - async fn handle_message(msg: PlayerMessage, pool: &PlayerThreadPool) { - match msg { - // Handle new player connection - PlayerMessage::NewPlayer(socket, data) => { - // Confirm connection to client - socket.emit("connected", &true).ok(); - - log_info!(pool.logger, "CONNECTION", "Player {} connected successfully", - socket.id.as_str()); - - let id = socket.id.as_str(); - let player: Player = Player::new(socket.clone(), Uuid::new_v4()); - - // Initialize player-specific handlers - players::init(socket.clone(), pool.players.clone()); - - // Add player to pool - pool.players.write().unwrap().push(player.clone()); - - log_debug!(pool.logger, "PLAYER", "Player {} (UUID: {}) added to pool", - id, player.id); - log_debug!(pool.logger, "SOCKET", "Socket.IO namespace: {:?}, id: {:?}", - socket.ns(), socket.id); - - // Send initialization events to client - if let Err(e) = socket.emit("preplay", &true) { - log_warn!(pool.logger, "EVENT", "Failed to emit preplay event: {}", e); - } - - if let Err(e) = socket.emit("beginplay", &true) { - log_warn!(pool.logger, "EVENT", "Failed to emit beginplay event: {}", e); - } - }, - // Handle player removal - PlayerMessage::RemovePlayer(player_id) => { - let mut players = pool.players.write().unwrap(); - if let Some(pos) = players.iter().position(|p| p.id == player_id) { - players.remove(pos); - log_info!(pool.logger, "PLAYER", "Player {} removed from pool", player_id); - } else { - log_warn!(pool.logger, "PLAYER", "Failed to find player {} for removal", - player_id); - } - } - } - } - - /// Handles new incoming socket connections - /// Assigns the connection to the first available thread pool - async fn handle_new_connection(&self, socket: SocketRef, data: Data) { - match self.thread_pools.iter().find(|pool| { - let players = pool.players.read().unwrap(); - players.len() < self.players_per_pool - }) { - Some(selected_pool) => { - log_info!(self.logger, "CONNECTION", - "Assigning connection {} to thread pool {}", - socket.id.to_string(), - selected_pool.start_index / self.players_per_pool); - - if let Err(e) = selected_pool.sender - .send(PlayerMessage::NewPlayer(socket, data.0)).await { - log_error!(self.logger, "CONNECTION", - "Failed to assign player to pool: {}", e); - } - }, - None => { - log_critical!(self.logger, "CAPACITY", - "All thread pools are full! Cannot accept new connection"); - } - } - } - - /// Starts the server and begins listening for connections - /// Sets up Socket.IO and HTTP routing - async fn start(self) { - // Initialize Socket.IO service - let (svc, io) = socketioxide::SocketIo::new_svc(); - - let server = self.clone(); - // Configure root namespace handler - io.ns("/", move |socket: SocketRef, data: Data| { - let server = server.clone(); - async move { - server.handle_new_connection(socket, data).await; - } - }); - - // Set up HTTP routing - let app = Router::new() - .get("/", redirect_to_master_panel) - .any("/*", ServiceHandler::new(svc)); - - // Start server on port 3000 - match tokio::net::TcpListener::bind("0.0.0.0:3000").await { - Ok(listener) => { - log_info!(self.logger, "SERVER", - "Multithreaded server listening on 0.0.0.0:3000"); - - if let Err(e) = serve(listener, app).await { - log_critical!(self.logger, "SERVER", "Server error: {}", e); - } - }, - Err(e) => { - log_critical!(self.logger, "SERVER", - "Failed to bind to port 3000: {}", e); - } - } - } -} - -/// HTTP handler for redirecting browser access to the master panel -async fn redirect_to_master_panel(_req: Request) -> Result { - let response = Response::builder() - .status(302) - .header("Location", "https://youtu.be/dQw4w9WgXcQ") - .body(Body::empty()) - .unwrap(); - - log_info!(LOGGER, "HTTP", "Browser access redirected to master dashboard"); - Ok(response) -} - -/// Main entry point for the Horizon Server -#[tokio::main] -async fn main() -> Result<(), Box> { - let init_time = Instant::now(); - let players_per_pool = CONFIG.players_per_pool; - let num_thread_pools = CONFIG.num_thread_pools; - - // Initialize logging system - horizon_logger::init(); - splash::splash(); - log_info!(LOGGER, "STARTUP", "Horizon Server starting..."); - - // Create and start server instance with configuration values - let server = HorizonServer::new(players_per_pool, num_thread_pools); - log_info!(LOGGER, "STARTUP", "Server startup completed in {:?}", init_time.elapsed()); - - server.start().await; - - Ok(()) -} \ No newline at end of file diff --git a/src/players.rs b/src/players.rs deleted file mode 100644 index e4913f9..0000000 --- a/src/players.rs +++ /dev/null @@ -1,583 +0,0 @@ -use serde_json::{json, Value}; -use serde::Serialize; -use horizon_logger::{HorizonLogger, log_info, log_debug, log_warn, log_error, log_critical, LogLevel}; -use socketioxide::extract::{Data, SocketRef}; -use std::fmt::Debug; -use std::sync::RwLock; -use std::sync::Arc; -use tracing::{debug, info}; -use std::time::{Duration, Instant}; -use horizon_data_types::*; -use rayon::*; //We need all the Rayon!!!! -use iter::IntoParallelIterator; -use iter::ParallelIterator; -use iter::IntoParallelRefIterator; - -// impl Default for MoveActionValue { -// fn default() -> Self { -// MoveActionValue { x: 0.0, y: 0.0 } -// } -// } - -pub fn init(socket: SocketRef, players: Arc>>) { - ///////////////////////////////////////////////////////////// - // Register some additional custom events with our // - // socket server. Your custom events will be // - // registered here as well as in the ./events/mod.rs // - // file // - ///////////////////////////////////////////////////////////// - - let players_disconnect = players.clone(); - let logger: Arc = Arc::new(HorizonLogger::new()); - - let temp_logger: Arc = logger.clone(); - socket.on_disconnect(move |s| { - on_disconnect(s, players_disconnect.clone(), temp_logger) - }); - - // Register events for player interactions - let players_clone = Arc::clone(&players); - let temp_logger: Arc = logger.clone(); - - socket.on("updatePlayerLocation", move |s, d| - update_player_location(s, d, players_clone.clone(), temp_logger), - ); - - let players_clone = Arc::clone(&players); - socket.on("playerJump", move |s: SocketRef, d: Data| { - player_jump(s, d) - }); - - let players_clone = Arc::clone(&players); - socket.on("playerWalkToggle", move |s: SocketRef, d: Data| { - player_walk_toggle(s, d) - }); - - let players_clone = Arc::clone(&players); - let temp_logger: Arc = logger.clone(); - socket.on("getOnlinePlayers", move |s| - get_online_players(s, players_clone.clone(), temp_logger), - ); - - let players_clone = Arc::clone(&players); - let temp_logger: Arc = logger.clone(); - - socket.on("getPlayersWithLocations", move |s, d: Data| - get_players_with_locations(s, d, players_clone.clone(), temp_logger), - ); - - let players_clone = Arc::clone(&players); - socket.on("broadcastMessage", move |d| - broadcast_message(d, players_clone.clone()), - ); - - // Register events using the socketioxide API directly - let players_clone: Arc>> = Arc::clone(&players); - let temp_logger: Arc = logger.clone(); - - socket.on("updatePlayerLocation", move |s: SocketRef, d: Data| { - update_player_location(s, d, players_clone.clone(), temp_logger) - }); - - let players_clone = Arc::clone(&players); - let temp_logger: Arc = logger.clone(); - socket.on("getOnlinePlayers", move |s: SocketRef| { - get_online_players(s, players_clone.clone(), temp_logger) - }); - - let players_clone = Arc::clone(&players); - socket.on("getPlayersWithLocations", move |s: SocketRef, d: Data| { - get_players_with_locations(s, d, players_clone.clone(), logger.clone()) - }); - - let players_clone = Arc::clone(&players); - socket.on("broadcastMessage", move |d: Data| { - broadcast_message(d, players_clone.clone()) - }); -} - -pub fn on_disconnect(socket: SocketRef, players: Arc>>, logger: Arc) { - if let Some(mut players) = players.write().log(&logger, LogLevel::WARN, "I/O Error", "Acquiring ReadWriteLock failed") { - if let Some(index) = players.iter().position(|p| p.socket.id == socket.id) { - players.remove(index); - log_info!(logger, "CONNECTION", "Player {} disconnected, and cleaned up successfully", socket.id) - } else { - log_info!(logger, "CONNECTION", "Player {} successfully, but cleanup failed due to a corrupted player state. (This could be caused by plugins registering fake players improperly)", socket.id) - } - } -} - -/// Updates the location and related information of a player based on received data. -/// -/// This function processes incoming data about a player's position, rotation, scale, and movement, -/// updating the corresponding player's information in the shared players collection. -/// -/// # Arguments -/// -/// * `socket` - A reference to the WebSocket connection for the client sending the update. -/// * `data` - The data received with the event, expected to contain player transform information. -/// * `players` - A thread-safe reference to the collection of all players in the game. -/// -/// # Behavior -/// -/// 1. Logs the received event data for debugging purposes. -/// 2. Attempts to extract the "transform" object from the received data. -/// 3. If successful, it locks the shared players collection and finds the player matching the socket ID. -/// 4. For the found player, it updates the following information: -/// - Transform (rotation, translation, scale3D, and location) -/// - Move Action Value (player's movement input) -/// - Control Rotation -/// 5. Prints debug information about the updated player. -/// 6. Sends a reply to the client with the received data. -/// -/// # Error Handling -/// -/// - Prints error messages if: -/// - The transform data structure is invalid -/// - The player is not found -/// - The location data cannot be parsed -/// -/// # Note -/// -/// This function assumes specific data structures for the incoming data and may fail silently -/// if the expected fields are missing or in an unexpected format. -pub fn update_player_location(socket: SocketRef, data: Data, players: Arc>>, logger: Arc) { - println!("Received event: UpdatePlayerLocation with data: {:?}", data.0); - - let player_data = &data.0; // This is going to by the Json data - if let Some(mut players) = players.write().log(&logger, LogLevel::WARN, "I/O Error", "Acquiring ReadWriteLock failed") { - if let Some(player) = players.iter_mut().find(|p| p.socket.id == socket.id) { - // Update control rotation - if let Some(control_rotation) = player_data.get("controlRotation") { - player.controlRotation = Some(Vec3D { - x: control_rotation["x"].as_f64().unwrap_or(0.0), - y: control_rotation["y"].as_f64().unwrap_or(0.0), - z: control_rotation["z"].as_f64().unwrap_or(0.0), - }); - } - - // Update root position - if let Some(root_position) = player_data.get("rootPosition") { - let new_position = Translation { - x: root_position["x"].as_f64().unwrap_or(0.0), - y: root_position["y"].as_f64().unwrap_or(0.0), - z: root_position["z"].as_f64().unwrap_or(0.0), - }; - player.transform.get_or_insert(Transform::default()).location = Some(new_position); - } - - // Update root rotation - if let Some(root_rotation) = player_data.get("rootRotation") { - let new_rotation = Rotation { - x: root_rotation["x"].as_f64().unwrap_or(0.0), - y: root_rotation["y"].as_f64().unwrap_or(0.0), - z: root_rotation["z"].as_f64().unwrap_or(0.0), - w: 1.0, // Assuming w is not provided in the data - }; - player.transform.get_or_insert(Transform::default()).rotation = Some(new_rotation); - } - - // Update root velocity - if let Some(root_velocity) = player_data.get("rootVelocity") { - player.root_velocity = Some(Vec3D { - x: root_velocity["x"].as_f64().unwrap_or(0.0), - y: root_velocity["y"].as_f64().unwrap_or(0.0), - z: root_velocity["z"].as_f64().unwrap_or(0.0), - }); - } - - // Update key bone data - if let Some(key_bone_data) = player_data.get("keyBoneData").and_then(|v| v.as_array()) { - let key_joints: Vec = key_bone_data.into_par_iter() - .filter_map(|bone| { - Some(Vec3D { - x: bone["x"].as_f64()?, - y: bone["y"].as_f64()?, - z: bone["z"].as_f64()?, - }) - }) - .collect(); - // You might want to store this key_joints data in your Player struct - } - - // Process trajectory path - if let Some(trajectory) = player_data.get("trajectoryPath").and_then(|v| v.as_array()) { - let path: Vec = trajectory.into_par_iter() - .filter_map(|point| { - Some(TrajectoryPoint { - accumulated_seconds: point["accumulatedSeconds"].as_f64()?, - facing: Rotation { - w: point["facing"]["w"].as_f64()?, - x: point["facing"]["x"].as_f64()?, - y: point["facing"]["y"].as_f64()?, - z: point["facing"]["z"].as_f64()?, - }, - position: Translation { - x: point["position"]["x"].as_f64()?, - y: point["position"]["y"].as_f64()?, - z: point["position"]["z"].as_f64()?, - }, - }) - }) - .collect(); - // Store this path in your Player struct for prediction and smoothing - player.trajectory_path = Some(path); - } - - println!("Updated player state: {:?}", player); - } else { - println!("Player not found: {}", socket.id); - } - - - // Send a reply containing the correct data. This will only happen if and only if the player data is writeable - socket.emit("messageBack", &json!({ - "status": "success", - "message": "Player location updated successfully" - })).ok(); - } else { - // Send a reply containing the correct data. This will happen if the player data isn't writeable - socket.emit("messageBack", &json!({ - "status": "failure", - "message": "Player location update failed" - })).ok(); - } -} - -/// Retrieves and sends a list of online players to a connected client. -/// -/// This function gathers the IDs of all currently connected players and sends them -/// to the requesting client via a WebSocket connection. -/// -/// # Arguments -/// -/// * `socket` - A reference to the WebSocket connection for the client requesting the data. -/// * `players` - A thread-safe reference to the collection of all players in the game. -/// -/// # Behavior -/// -/// 1. Logs an info message about responding with the online players list. -/// 2. Acquires a lock on the shared players collection. -/// 3. Constructs a JSON array containing the ID of each connected player. -/// 4. Logs the constructed JSON array for debugging purposes. -/// 5. Emits an "onlinePlayers" event to the requesting client with the JSON data. -/// -/// # Note -/// -/// This function only sends the IDs of the players, not any additional information. -/// -/// # Errors -/// -/// While the function itself doesn't return a Result, it silently ignores any errors -/// that occur when emitting the event to the socket. -pub fn get_online_players(socket: SocketRef, players: Arc>>, logger: Arc) { - info!("Responding with online players list"); - let players = players.read(); // previously write but it only requires read-only access - - if let Some(players) = players.log(&logger, LogLevel::WARN, "I/O Error", "Acquiring ReadWriteLock failed ") { - let online_players_json = serde_json::to_value( - players - .par_iter() - .map(|player| json!({ "id": player.socket.id })) - .collect::>(), - ) - .map_err(|e|{eprintln!("Failed to get json for online players: {}",e)}); - debug!("Player Array as JSON: {:#?}", online_players_json); - socket.emit("onlinePlayers", &online_players_json).ok(); - } else { - let error_data: Value = json!({ - "message": "Failed to read player data. Please try again later.", - "code": "LOCK_READ_FAILURE" - }); - let _ = socket.emit("error", &error_data); - } -} - -/// Retrieves and sends player locations and related information to a connected client. -/// -/// This function is responsible for gathering data about all players, including their -/// positions, rotations, and movement information, and sending it to a specific client -/// via a WebSocket connection. -/// -/// # Arguments -/// -/// * `socket` - A reference to the WebSocket connection for the client requesting the data. -/// * `data` - The data received with the event (currently unused in the function body). -/// * `players` - A thread-safe reference to the collection of all players in the game. -/// -/// # Behavior -/// -/// 1. Logs an info message about responding with the players and locations list. -/// 2. Acquires a lock on the shared players collection. -/// 3. Prints the received event data for debugging purposes. -/// 4. Constructs a JSON representation of each player's data, including: -/// - Player ID -/// - Transform (likely position and orientation) -/// - Move Action Value (possibly related to current movement state) -/// - Rotation (player's current rotation) -/// 5. Serializes the collected player data into a JSON value. -/// 6. Emits a "playersWithLocations" event to the requesting client with the serialized data. -/// -/// # Note -/// -/// This function assumes that all players have valid data for transform, moveActionValue, -/// and controlRotation. It may panic if these values are None. -/// -/// # Errors -/// -/// While the function itself doesn't return a Result, it silently ignores any errors -/// that occur when emitting the event to the socket. - -#[derive(Serialize)] -struct PlayersResponse { - players: Vec -} - -pub fn get_players_with_locations(socket: SocketRef, data: Data, players: Arc>>, logger: Arc) { - println!("Responding with players and locations list"); - let players = players.read(); // Previously write now read - - if let Some(players) = players.log(&logger, LogLevel::WARN, "I/O Error", "Acquiring ReadWrite Lock failed") { - println!("Received event with data: {:?}", data.0); - - let players_with_locations_json: Vec = players - .par_iter() // Convert to parallel iterator faster searching - .map(|player| { - json!({ - "Id": player.id, - "Root Position": player.transform.as_ref().and_then(|t| t.location.as_ref()), - "Root Rotation": player.transform.as_ref().and_then(|t| t.rotation.as_ref()), - "Root Velocity": player.root_velocity, - "Control Rotation": player.controlRotation, - // "Move Action Value": player.moveActionValue, - "Trajectory Path": player.trajectory_path.as_ref().map(|path| - path.iter().take(10).map(|point| json!({ - "accumulatedSeconds": point.accumulated_seconds, - "facing": point.facing, - "position": point.position, - })).collect::>() - ), - "KeyJoints": player.key_joints, - "AnimationState": player.animation_state, - "IsActive": player.is_active, - "LastUpdateTime": player.last_update.elapsed().as_secs_f64(), - }) - }) - .collect(); - - println!("Number of players: {}", players_with_locations_json.len()); - - // Create the response with a "players" field - let response = PlayersResponse { - players: players_with_locations_json - }; - - // Serialize the response - - if let Some(response_json) = serde_json::to_value(response).log(&logger, LogLevel::ERROR, "SERIALIZATION", "JSON Parsing Error") { - println!("Sending players data: {:?}", response_json); - println!("JSON string being sent: {}", serde_json::to_string(&response_json).unwrap()); // Should not fail. It's the inverse function of to_value - - let _ = socket.emit("playersWithLocations", &response_json); - } else { - let error_data: Value = json!({ - "message": "Failed parse json data", - "code": "Serialization error" - }); - - let _ = socket.emit("error", &error_data); // Take a look - } - } else { - let error_data: Value = json!({ - "message": "Failed to read player data. Please try again later.", - "code": "LOCK_READ_FAILURE" - }); - - let _ = socket.emit("error", &error_data); - } -} - -pub fn broadcast_message(data: Data, players: Arc>>) { - if let Ok(players_guard) = players.read() { - // Access the Vec's elements through .iter() - for player in players_guard.iter() { - player.socket.emit("broadcastMessage", &data.0).ok(); - } - } -} - -fn player_jump(socket: SocketRef, data: Data) { - // Process the jump event - // You might want to update the player's state or notify other players - - // Emit the playerJumped event - socket.emit("playerJumped", &true).expect("Failed to emit playerJumped event"); -} - -fn player_walk_toggle(socket: SocketRef, data: Data) { - // Process the jump event - // You might want to update the player's state or notify other players - - // Emit the playerJumped event - socket.emit("playerWalkToggled", &true).expect("Failed to emit playerWalkToggled event"); -} - -pub async fn cleanup_inactive_players(players: Arc>>, logger: Arc) { - let inactive_threshold = Duration::from_secs(60); // 1 minute - - loop { - tokio::time::sleep(Duration::from_secs(30)).await; // Run every 30 seconds - - if let Some(mut players) = players.write().log(&logger, LogLevel::WARN, "CLEANUP", "Starting cleanup of inactive players") { - let now = Instant::now(); - - players.retain(|player| { - if !player.is_active && now.duration_since(player.last_update) > inactive_threshold { - println!("Removing inactive player: {}", player.socket.id); - false // Remove the player - } else { - true // Keep the player - } - }); - } - } -} - - -/////////////////////////////////////////////////////// -// Parsing Functions // -// These functions assist in parsing common data // -// fields out of JSON objects. Eventually, when // -// Horizon's internal systems transition to binary, // -// these will be updated accordingly. // -/////////////////////////////////////////////////////// - -/// Parses a rotation from a JSON Value into individual components. -/// -/// # Arguments -/// -/// * `parse` - A reference to a JSON Value containing rotation data. -/// -/// # Returns -/// -/// A tuple of four `f64` values representing (w, x, y, z) components of the rotation. -/// -/// # Behavior -/// -/// - Attempts to extract "w", "x", "y", and "z" fields from the input JSON. -/// - If any field is missing or invalid, it defaults to 0.0 for that component. -/// -/// # Note -/// -/// This function is designed to work with quaternion representations of rotations. -fn parse_rotation(parse: &Value) -> (f64, f64, f64, f64) { - ( - parse_f64(&parse["w"]).unwrap_or(0.0), - parse_f64(&parse["x"]).unwrap_or(0.0), - parse_f64(&parse["y"]).unwrap_or(0.0), - parse_f64(&parse["z"]).unwrap_or(0.0), - ) -} - -/// Parses a 3D vector from a JSON Value into individual components. -/// -/// # Arguments -/// -/// * `parse` - A reference to a JSON Value containing 3D vector data. -/// -/// # Returns -/// -/// A tuple of three `f64` values representing (x, y, z) components of the vector. -/// -/// # Behavior -/// -/// - Attempts to extract "x", "y", and "z" fields from the input JSON. -/// - If any field is missing or invalid, it defaults to 0.0 for that component. -/// -/// # Note -/// -/// This function is commonly used for parsing position or scale data in 3D space. -fn parse_xyz(parse: &Value) -> (f64, f64, f64) { - ( - parse_f64(&parse["x"]).unwrap_or(0.0), - parse_f64(&parse["y"]).unwrap_or(0.0), - parse_f64(&parse["z"]).unwrap_or(0.0), - ) -} - -/// Parses a 2D vector from a JSON Value into individual components. -/// -/// # Arguments -/// -/// * `parse` - A reference to a JSON Value containing 2D vector data. -/// -/// # Returns -/// -/// A tuple of two `f64` values representing (x, y) components of the vector. -/// -/// # Behavior -/// -/// - Attempts to extract "x" and "y" fields from the input JSON. -/// - If any field is missing or invalid, it defaults to 0.0 for that component. -/// -/// # Note -/// -/// This function is commonly used for parsing 2D coordinates or movement vectors. -fn parse_xy(parse: &Value) -> (f64, f64) { - ( - parse_f64(&parse["x"]).unwrap_or(0.0), - parse_f64(&parse["y"]).unwrap_or(0.0), - ) -} - -/// Attempts to parse a single f64 value from a JSON Value. -/// -/// # Arguments -/// -/// * `n` - A reference to a JSON Value expected to contain a number. -/// -/// # Returns -/// -/// A `Result` containing either the parsed `f64` value or an `std::io::Error`. -/// -/// # Errors -/// -/// Returns an `std::io::Error` with kind `InvalidData` if the value cannot be parsed as an f64. -/// -/// # Note -/// -/// This function is used internally by other parsing functions to handle individual numeric values. -fn parse_f64(n: &Value) -> Result { - n.as_f64().ok_or_else(|| std::io::Error::new(std::io::ErrorKind::InvalidData, "Invalid f64 value")) -} - - -trait Logging{ - /// Logs an error from a `Result` if it is `Err` using the provided `HorizonLogger`. - /// - /// # Arguments - /// * `logger` - The logger instance to use. - /// * `log_level` - The severity level for logging. - /// * `kind` - The component or context identifier. - /// * `msg` - The custom message to log. - /// - /// # Returns - /// * `Option` - `Some(T)` if `Ok`, otherwise `None`. - fn log(self, logger: &HorizonLogger, log_level: LogLevel, kind: &str, msg: &str) -> Option; -} - -impl Logging for Result { - fn log(self, logger: &HorizonLogger, log_level: LogLevel, kind: &str, msg: &str) -> Option { - if let Err(err) = &self { - match log_level { - LogLevel::DEBUG => log_debug!(logger, kind, "{}: {:?}", msg, err), - LogLevel::INFO => log_info!(logger, kind, "{}: {:?}", msg, err), - LogLevel::WARN => log_warn!(logger, kind, "{}: {:?}", msg, err), - LogLevel::ERROR => log_error!(logger, kind, "{}: {:?}", msg, err), - LogLevel::CRITICAL => log_critical!(logger, kind, "{}: {:?}", msg, err), - } - } - - self.ok() - } -} diff --git a/src/plugin_manager.rs b/src/plugin_manager.rs deleted file mode 100644 index a9ee29a..0000000 --- a/src/plugin_manager.rs +++ /dev/null @@ -1,207 +0,0 @@ -use libloading::{Library, Symbol}; -use std::collections::HashMap; -use std::path::Path; -use std::path::PathBuf; -use std::sync::Arc; -use notify::{Watcher,RecursiveMode, Config, PollWatcher, Event, Error, EventKind}; -use std::sync::mpsc::{channel, Receiver}; -// use crate::plugin_api::{Plugin, PluginCreateFn, PluginMetadata}; -use std::ffi::OsStr; -use std::sync::{RwLock, RwLockReadGuard}; -use std::ops::Deref; - -// pub struct PluginManager { -// plugins: Arc>>>, -// libraries: Arc>>, -// } - - -impl PluginManager { - pub fn new() -> Self { - PluginManager { - plugins: Arc::new(RwLock::new(HashMap::new())), - libraries: Arc::new(RwLock::new(HashMap::new())), - } - } - - pub fn contains_plugin(&self, plugin_name: &str) -> bool { - self.plugins.read().unwrap().contains_key(plugin_name) - } - - pub fn add_plugin(&self, name: String, plugin: Box) { - self.plugins.write().unwrap().insert(name, plugin); - } - - // get a ref to a plugin - pub fn get_plugin<'a>(&'a self, name: &str) -> Option + 'a> { - struct PluginRef<'a> { - guard: std::sync::RwLockReadGuard<'a, HashMap>>, - name: String, - } - - impl<'a> std::ops::Deref for PluginRef<'a> { - type Target = dyn Plugin; - - fn deref(&self) -> &Self::Target { - self.guard.get(&self.name).unwrap().as_ref() - } - } - - let guard = self.plugins.read().unwrap(); - if guard.contains_key(name) { - Some(PluginRef { - guard, - name: name.to_string(), - }) - } else { - None - } - } - - pub unsafe fn load_plugin>(&self, path: P) -> Result<(), String> { - let path: &OsStr = path.as_ref().as_os_str(); - - let lib = Library::new(path).map_err(|e| e.to_string())?; - - let metadata: Symbol PluginMetadata> = lib.get(b"get_plugin_metadata") - .map_err(|e| e.to_string())?; - let create: Symbol = lib.get(b"create_plugin") - .map_err(|e| e.to_string())?; - - let plugin_metadata = metadata(); - let plugin_name = plugin_metadata.name.clone(); - - if self.plugins.read().unwrap().contains_key(&plugin_name) { - return Err(format!("Plugin '{}' is already loaded.", plugin_name)); - } - - let plugin = create(); - - println!( - "Loaded plugin: {} (v{})", - plugin_metadata.name, plugin_metadata.version - ); - - // Removed unnecessary boxing - self.plugins.write().unwrap().insert(plugin_name.clone(), plugin); - self.libraries.write().unwrap().insert(plugin_name, lib); - - Ok(()) - } - - pub fn unload_plugin(&self, name: &str) -> Result<(), String> { - if self.plugins.write().unwrap().remove(name).is_some() { - if let Some(lib) = self.libraries.write().unwrap().remove(name) { - drop(lib); - println!("Unloaded Plugin: {}", name); - Ok(()) - } else { - Err(format!("Error: Library for plugin '{}' not found, but plugin was removed. This is an inconsistent state.", name)) - } - } else { - Err(format!("Error: Plugin '{}' is not loaded.", name)) - } - } - - pub unsafe fn reload_plugin>(&mut self, path: P, name: &str) -> Result<(), String> { - self.unload_plugin(name)?; - self.load_plugin(path)?; - println!("Reloaded plugin: {}", name); - Ok(()) - } - - pub fn execute_plugin(&self, name: &str) { - if let Some(plugin) = self.plugins.read().unwrap().get(name) { - plugin.execute(); - } else { - println!("Plugin with name '{}' not found.", name); - } - } - - - /// Loads all plugins from the specified directory. - pub unsafe fn load_plugins_from_directory>(&mut self, directory: P) -> Result<(), String> { - let dir_path = directory.as_ref(); - if !dir_path.is_dir() { - return Err(format!("{} is not a valid Directory.", dir_path.display())); - } - - let entries = std::fs::read_dir(dir_path).map_err(|e| e.to_string())?; - - for entry in entries { - if let Ok(entry) = entry { - let path = entry.path(); - if self.is_plugin_file(&path) { - if let Err(e) = self.load_plugin(&path) { - eprintln!("Failt do load plugin from {}: {}", path.display(), e); - } - } - } - } - Ok(()) - } - - /// Checks if a given file is in the correct format to be a plugin - fn is_plugin_file(&self, path: &PathBuf) -> bool { - if let Some(extension) = path.extension() { - let ext = extension.to_string_lossy().to_lowercase(); - ext == "dll" || ext == "so" || ext == "dylib" - } else { - false - } - } - - /// Monitors the plugin directory for changes and reloads plugins as needed. - pub fn monitor_directory_for_changes>(&mut self, directory: P) -> Result>, String> { - let dir_path = directory.as_ref(); - if !dir_path.is_dir() { - return Err(format!("{} is not a valid directory.", dir_path.display())); - } - - let (tx, rx) = channel(); - // let mut watcher = watcher(tx, Duration::from_secs(2)).map_err(|e| e.to_string())?; - let mut watcher = match PollWatcher::new(tx, Config::default()) { - Ok(w) => w, - Err(e) => return Err(format!("Error on watcher {}", e)) - }; - watcher.watch(dir_path, RecursiveMode::NonRecursive).map_err(|e| e.to_string())?; - - Ok(rx) - } - - /// Handles the events received from the directory mon and reloads plugins as needed - pub unsafe fn handle_directory_events(&mut self, rx: Receiver>) { - loop { - match rx.recv() { - Ok(Ok(event)) => match event.kind { - EventKind::Create(_) | EventKind::Modify(_) => { - let path = event.paths.get(0).cloned(); - if let Some(path) = path { - if self.is_plugin_file(&path) { - let name = path.file_stem().unwrap().to_string_lossy().to_string(); - if self.reload_plugin(&path, &name).is_err() { - println!("Failed to reload plugin '{}'", name); - } - } - } - }, - EventKind::Remove(_) => { - let path = event.paths.get(0).cloned(); - if let Some(path) = path { - if self.is_plugin_file(&path) { - let name = path.file_stem().unwrap().to_string_lossy().to_string(); - if self.unload_plugin(&name).is_err() { - println!("Failed to unload plugin '{}'", name); - } - } - } - }, - _ => println!("Other event: {:?}", event), - }, - Ok(Err(e)) => println!("Error: {:?}", e), - Err(e) => println!("Channel receive error: {:?}", e), - } - } - - } -} \ No newline at end of file From 3997c9f8c6f700ac52ff07fb7e0047c4ca3174cb Mon Sep 17 00:00:00 2001 From: "Tristan Poland (Trident_For_U)" <34868944+tristanpoland@users.noreply.github.com> Date: Thu, 5 Dec 2024 21:04:16 -0500 Subject: [PATCH 16/41] Delete Cargo.lock --- plugins/pebble_vault/Cargo.lock | 1815 ------------------------------- 1 file changed, 1815 deletions(-) delete mode 100644 plugins/pebble_vault/Cargo.lock diff --git a/plugins/pebble_vault/Cargo.lock b/plugins/pebble_vault/Cargo.lock deleted file mode 100644 index 2539636..0000000 --- a/plugins/pebble_vault/Cargo.lock +++ /dev/null @@ -1,1815 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "PebbleVault" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8db0aab8248c160fa4adc33c3e915cabc6e6674884dd8dae685706e4bd6c8aa" -dependencies = [ - "bindgen", - "colored", - "ez_logging", - "indicatif", - "lazy_static", - "libc", - "rand", - "rstar", - "rusqlite", - "serde", - "serde_json", - "tempfile", - "uuid", -] - -[[package]] -name = "addr2line" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler2" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" - -[[package]] -name = "ahash" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" -dependencies = [ - "cfg-if", - "once_cell", - "version_check", - "zerocopy", -] - -[[package]] -name = "aho-corasick" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" -dependencies = [ - "memchr", -] - -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - -[[package]] -name = "approx" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6" -dependencies = [ - "num-traits", -] - -[[package]] -name = "async-trait" -version = "0.1.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "autocfg" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" - -[[package]] -name = "backtrace" -version = "0.3.74" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" -dependencies = [ - "addr2line", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", - "windows-targets 0.52.6", -] - -[[package]] -name = "base64" -version = "0.22.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" - -[[package]] -name = "bincode" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" -dependencies = [ - "serde", -] - -[[package]] -name = "bindgen" -version = "0.69.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088" -dependencies = [ - "bitflags", - "cexpr", - "clang-sys", - "itertools", - "lazy_static", - "lazycell", - "log", - "prettyplease", - "proc-macro2", - "quote", - "regex", - "rustc-hash", - "shlex", - "syn", - "which", -] - -[[package]] -name = "bitflags" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" - -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array", -] - -[[package]] -name = "bumpalo" -version = "3.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" - -[[package]] -name = "bytemuck" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8334215b81e418a0a7bdb8ef0849474f40bb10c8b71f1c4ed315cff49f32494d" - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - -[[package]] -name = "bytes" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" -dependencies = [ - "serde", -] - -[[package]] -name = "cc" -version = "1.1.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baee610e9452a8f6f0a1b6194ec09ff9e2d85dea54432acdae41aa0761c95d70" -dependencies = [ - "shlex", -] - -[[package]] -name = "cexpr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" -dependencies = [ - "nom", -] - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "chrono" -version = "0.4.38" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" -dependencies = [ - "android-tzdata", - "iana-time-zone", - "js-sys", - "num-traits", - "wasm-bindgen", - "windows-targets 0.52.6", -] - -[[package]] -name = "clang-sys" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" -dependencies = [ - "glob", - "libc", - "libloading", -] - -[[package]] -name = "colored" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbf2150cce219b664a8a70df7a1f933836724b503f8a413af9365b4dcc4d90b8" -dependencies = [ - "lazy_static", - "windows-sys 0.48.0", -] - -[[package]] -name = "console" -version = "0.15.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" -dependencies = [ - "encode_unicode", - "lazy_static", - "libc", - "unicode-width", - "windows-sys 0.52.0", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" - -[[package]] -name = "cpufeatures" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" -dependencies = [ - "libc", -] - -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "data-encoding" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer", - "crypto-common", -] - -[[package]] -name = "either" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" - -[[package]] -name = "encode_unicode" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" - -[[package]] -name = "engineioxide" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec84aea019c24ae0cae29a6306b1b9b6bd91a4c950542d804b742435ed797f0c" -dependencies = [ - "base64", - "bytes", - "futures-core", - "futures-util", - "http", - "http-body", - "http-body-util", - "hyper", - "hyper-util", - "pin-project-lite", - "rand", - "serde", - "serde_json", - "smallvec", - "thiserror", - "tokio", - "tokio-tungstenite", - "tower-layer", - "tower-service", -] - -[[package]] -name = "errno" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "ez_logging" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c115264dbaee9b97540606301524ee972121f157a734c6a455b7bb15581bb2e8" -dependencies = [ - "chrono", -] - -[[package]] -name = "fallible-iterator" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" - -[[package]] -name = "fallible-streaming-iterator" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" - -[[package]] -name = "fastrand" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "futures-core" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" - -[[package]] -name = "futures-sink" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" - -[[package]] -name = "futures-task" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" - -[[package]] -name = "futures-util" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" -dependencies = [ - "futures-core", - "futures-sink", - "futures-task", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", -] - -[[package]] -name = "getrandom" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - -[[package]] -name = "gimli" -version = "0.31.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" - -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - -[[package]] -name = "hash32" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47d60b12902ba28e2730cd37e95b8c9223af2808df9e902d4df49588d1470606" -dependencies = [ - "byteorder", -] - -[[package]] -name = "hashbrown" -version = "0.14.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" -dependencies = [ - "ahash", -] - -[[package]] -name = "hashlink" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af" -dependencies = [ - "hashbrown", -] - -[[package]] -name = "heapless" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bfb9eb618601c89945a70e254898da93b13be0388091d42117462b265bb3fad" -dependencies = [ - "hash32", - "stable_deref_trait", -] - -[[package]] -name = "hermit-abi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" - -[[package]] -name = "home" -version = "0.5.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "horizon-plugin-api" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be8a5ded0da09b87361bfc215a7512a63cdf6091b23d1612d575f7305778e981" -dependencies = [ - "socketioxide", -] - -[[package]] -name = "horizon_data_types" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eed398874caaec1768e6d58d66b130413132c4f3a07d45679e27549c87657e29" -dependencies = [ - "bincode", - "nalgebra", - "serde", - "serde_json", - "socketioxide", - "tokio", - "uuid", -] - -[[package]] -name = "horizon_logger" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "361fc38675b9dfd676b1903234fe2ea80ef930dccf236269291e552af7c01a28" -dependencies = [ - "chrono", - "colored", - "once_cell", - "serde", - "serde_json", - "tracing", - "tracing-subscriber", -] - -[[package]] -name = "http" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http-body" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" -dependencies = [ - "bytes", - "http", -] - -[[package]] -name = "http-body-util" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" -dependencies = [ - "bytes", - "futures-util", - "http", - "http-body", - "pin-project-lite", -] - -[[package]] -name = "httparse" -version = "1.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" - -[[package]] -name = "hyper" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbbff0a806a4728c99295b254c8838933b5b082d75e3cb70c8dab21fdfbcfa9a" -dependencies = [ - "bytes", - "http", - "http-body", - "tokio", -] - -[[package]] -name = "hyper-util" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" -dependencies = [ - "bytes", - "futures-util", - "http", - "http-body", - "hyper", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "iana-time-zone" -version = "0.1.61" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "wasm-bindgen", - "windows-core", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - -[[package]] -name = "indicatif" -version = "0.17.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "763a5a8f45087d6bcea4222e7b72c291a054edf80e4ef6efd2a4979878c7bea3" -dependencies = [ - "console", - "instant", - "number_prefix", - "portable-atomic", - "unicode-width", -] - -[[package]] -name = "instant" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "itertools" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" - -[[package]] -name = "js-sys" -version = "0.3.72" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "lazy_static" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" - -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" - -[[package]] -name = "libc" -version = "0.2.162" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18d287de67fe55fd7e1581fe933d965a5a9477b38e949cfa9f8574ef01506398" - -[[package]] -name = "libloading" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" -dependencies = [ - "cfg-if", - "windows-targets 0.52.6", -] - -[[package]] -name = "libm" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" - -[[package]] -name = "libsqlite3-sys" -version = "0.30.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e99fb7a497b1e3339bc746195567ed8d3e24945ecd636e3619d20b9de9e9149" -dependencies = [ - "cc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "linux-raw-sys" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" - -[[package]] -name = "log" -version = "0.4.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" - -[[package]] -name = "matchers" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" -dependencies = [ - "regex-automata 0.1.10", -] - -[[package]] -name = "matchit" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" - -[[package]] -name = "matrixmultiply" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9380b911e3e96d10c1f415da0876389aaf1b56759054eeb0de7df940c456ba1a" -dependencies = [ - "autocfg", - "rawpointer", -] - -[[package]] -name = "memchr" -version = "2.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" - -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - -[[package]] -name = "miniz_oxide" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" -dependencies = [ - "adler2", -] - -[[package]] -name = "mio" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" -dependencies = [ - "hermit-abi", - "libc", - "wasi", - "windows-sys 0.52.0", -] - -[[package]] -name = "nalgebra" -version = "0.33.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26aecdf64b707efd1310e3544d709c5c0ac61c13756046aaaba41be5c4f66a3b" -dependencies = [ - "approx", - "matrixmultiply", - "nalgebra-macros", - "num-complex", - "num-rational", - "num-traits", - "serde", - "simba", - "typenum", -] - -[[package]] -name = "nalgebra-macros" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "254a5372af8fc138e36684761d3c0cdb758a4410e938babcff1c860ce14ddbfc" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - -[[package]] -name = "nu-ansi-term" -version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" -dependencies = [ - "overload", - "winapi", -] - -[[package]] -name = "num-bigint" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" -dependencies = [ - "num-integer", - "num-traits", -] - -[[package]] -name = "num-complex" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" -dependencies = [ - "num-traits", - "serde", -] - -[[package]] -name = "num-integer" -version = "0.1.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" -dependencies = [ - "num-traits", -] - -[[package]] -name = "num-rational" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" -dependencies = [ - "num-bigint", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" -dependencies = [ - "autocfg", - "libm", -] - -[[package]] -name = "number_prefix" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" - -[[package]] -name = "object" -version = "0.36.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" -dependencies = [ - "memchr", -] - -[[package]] -name = "once_cell" -version = "1.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" - -[[package]] -name = "overload" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" - -[[package]] -name = "paste" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" - -[[package]] -name = "pebblevault_plugin" -version = "0.1.0" -dependencies = [ - "PebbleVault", - "async-trait", - "horizon-plugin-api", - "horizon_data_types", - "horizon_logger", - "once_cell", - "serde", - "socketioxide", - "uuid", -] - -[[package]] -name = "pin-project-lite" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "pkg-config" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" - -[[package]] -name = "portable-atomic" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" - -[[package]] -name = "ppv-lite86" -version = "0.2.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" -dependencies = [ - "zerocopy", -] - -[[package]] -name = "prettyplease" -version = "0.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" -dependencies = [ - "proc-macro2", - "syn", -] - -[[package]] -name = "proc-macro2" -version = "1.0.89" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quote" -version = "1.0.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha", - "rand_core", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom", -] - -[[package]] -name = "rawpointer" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" - -[[package]] -name = "regex" -version = "1.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata 0.4.8", - "regex-syntax 0.8.5", -] - -[[package]] -name = "regex-automata" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" -dependencies = [ - "regex-syntax 0.6.29", -] - -[[package]] -name = "regex-automata" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax 0.8.5", -] - -[[package]] -name = "regex-syntax" -version = "0.6.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" - -[[package]] -name = "regex-syntax" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" - -[[package]] -name = "rstar" -version = "0.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "421400d13ccfd26dfa5858199c30a5d76f9c54e0dba7575273025b43c5175dbb" -dependencies = [ - "heapless", - "num-traits", - "smallvec", -] - -[[package]] -name = "rusqlite" -version = "0.32.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7753b721174eb8ff87a9a0e799e2d7bc3749323e773db92e0984debb00019d6e" -dependencies = [ - "bitflags", - "fallible-iterator", - "fallible-streaming-iterator", - "hashlink", - "libsqlite3-sys", - "smallvec", -] - -[[package]] -name = "rustc-demangle" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" - -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - -[[package]] -name = "rustix" -version = "0.38.39" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "375116bee2be9ed569afe2154ea6a99dfdffd257f533f187498c2a8f5feaf4ee" -dependencies = [ - "bitflags", - "errno", - "libc", - "linux-raw-sys", - "windows-sys 0.52.0", -] - -[[package]] -name = "rustversion" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" - -[[package]] -name = "ryu" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" - -[[package]] -name = "safe_arch" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3460605018fdc9612bce72735cba0d27efbcd9904780d44c7e3a9948f96148a" -dependencies = [ - "bytemuck", -] - -[[package]] -name = "serde" -version = "1.0.214" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f55c3193aca71c12ad7890f1785d2b73e1b9f63a0bbc353c08ef26fe03fc56b5" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.214" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "serde_json" -version = "1.0.132" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" -dependencies = [ - "itoa", - "memchr", - "ryu", - "serde", -] - -[[package]] -name = "sha1" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - -[[package]] -name = "sharded-slab" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" -dependencies = [ - "lazy_static", -] - -[[package]] -name = "shlex" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" - -[[package]] -name = "simba" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3a386a501cd104797982c15ae17aafe8b9261315b5d07e3ec803f2ea26be0fa" -dependencies = [ - "approx", - "num-complex", - "num-traits", - "paste", - "wide", -] - -[[package]] -name = "slab" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] - -[[package]] -name = "smallvec" -version = "1.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" - -[[package]] -name = "socket2" -version = "0.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "socketioxide" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a9ce59f845cfea2fe24cc7adbd512268893ee07bde899ae6477569dbc42dff3" -dependencies = [ - "bytes", - "engineioxide", - "futures-core", - "futures-util", - "http", - "http-body", - "hyper", - "matchit", - "pin-project-lite", - "rustversion", - "serde", - "socketioxide-core", - "socketioxide-parser-common", - "thiserror", - "tokio", - "tower-layer", - "tower-service", -] - -[[package]] -name = "socketioxide-core" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82826d9a1efb2b201e7d12d231f98870f768d98d02452eb642bca0587a8d51f0" -dependencies = [ - "bytes", - "engineioxide", - "serde", - "thiserror", -] - -[[package]] -name = "socketioxide-parser-common" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9a20b64f78a6d093d73d4d166b5bfc8b5096069865c59cee67b3aafac77eaac" -dependencies = [ - "bytes", - "itoa", - "serde", - "serde_json", - "socketioxide-core", -] - -[[package]] -name = "stable_deref_trait" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" - -[[package]] -name = "syn" -version = "2.0.87" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "tempfile" -version = "3.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" -dependencies = [ - "cfg-if", - "fastrand", - "once_cell", - "rustix", - "windows-sys 0.59.0", -] - -[[package]] -name = "thiserror" -version = "1.0.68" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02dd99dc800bbb97186339685293e1cc5d9df1f8fae2d0aecd9ff1c77efea892" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.68" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7c61ec9a6f64d2793d8a45faba21efbe3ced62a886d44c36a009b2b519b4c7e" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "thread_local" -version = "1.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" -dependencies = [ - "cfg-if", - "once_cell", -] - -[[package]] -name = "tokio" -version = "1.41.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22cfb5bee7a6a52939ca9224d6ac897bb669134078daa8735560897f69de4d33" -dependencies = [ - "backtrace", - "bytes", - "libc", - "mio", - "pin-project-lite", - "socket2", - "windows-sys 0.52.0", -] - -[[package]] -name = "tokio-tungstenite" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edc5f74e248dc973e0dbb7b74c7e0d6fcc301c694ff50049504004ef4d0cdcd9" -dependencies = [ - "futures-util", - "log", - "tokio", - "tungstenite", -] - -[[package]] -name = "tower-layer" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" - -[[package]] -name = "tower-service" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" - -[[package]] -name = "tracing" -version = "0.1.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" -dependencies = [ - "pin-project-lite", - "tracing-attributes", - "tracing-core", -] - -[[package]] -name = "tracing-attributes" -version = "0.1.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "tracing-core" -version = "0.1.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" -dependencies = [ - "once_cell", - "valuable", -] - -[[package]] -name = "tracing-log" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" -dependencies = [ - "log", - "once_cell", - "tracing-core", -] - -[[package]] -name = "tracing-subscriber" -version = "0.3.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" -dependencies = [ - "matchers", - "nu-ansi-term", - "once_cell", - "regex", - "sharded-slab", - "smallvec", - "thread_local", - "tracing", - "tracing-core", - "tracing-log", -] - -[[package]] -name = "tungstenite" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18e5b8366ee7a95b16d32197d0b2604b43a0be89dc5fac9f8e96ccafbaedda8a" -dependencies = [ - "byteorder", - "bytes", - "data-encoding", - "http", - "httparse", - "log", - "rand", - "sha1", - "thiserror", - "utf-8", -] - -[[package]] -name = "typenum" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" - -[[package]] -name = "unicode-ident" -version = "1.0.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" - -[[package]] -name = "unicode-width" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" - -[[package]] -name = "utf-8" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" - -[[package]] -name = "uuid" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" -dependencies = [ - "getrandom", - "serde", -] - -[[package]] -name = "valuable" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" - -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - -[[package]] -name = "version_check" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wasm-bindgen" -version = "0.2.95" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" -dependencies = [ - "cfg-if", - "once_cell", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.95" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.95" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.95" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.95" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" - -[[package]] -name = "which" -version = "4.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" -dependencies = [ - "either", - "home", - "once_cell", - "rustix", -] - -[[package]] -name = "wide" -version = "0.7.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b828f995bf1e9622031f8009f8481a85406ce1f4d4588ff746d872043e855690" -dependencies = [ - "bytemuck", - "safe_arch", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows-core" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" -dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", -] - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-sys" -version = "0.59.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" -dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", -] - -[[package]] -name = "windows-targets" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" -dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" - -[[package]] -name = "zerocopy" -version = "0.7.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" -dependencies = [ - "byteorder", - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.7.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] From 97cfcbff8a32c078ca6600ea2486c0ff961792ff Mon Sep 17 00:00:00 2001 From: "Tristan Poland (Trident_For_U)" <34868944+tristanpoland@users.noreply.github.com> Date: Thu, 5 Dec 2024 21:37:26 -0500 Subject: [PATCH 17/41] Fixed function signature --- plugins/unreal_adapter_horizon/src/lib.rs | 3 ++- server/src/server/mod.rs | 19 +++++++++++++------ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/plugins/unreal_adapter_horizon/src/lib.rs b/plugins/unreal_adapter_horizon/src/lib.rs index 08e739b..6a04bd1 100644 --- a/plugins/unreal_adapter_horizon/src/lib.rs +++ b/plugins/unreal_adapter_horizon/src/lib.rs @@ -35,7 +35,8 @@ impl PluginConstruct for Plugin { // Implement the trait for Plugin impl PluginAPI for Plugin { fn player_joined(&self, socket: SocketRef, player: Arc) { - setup_listeners(socket, player); + setup_listeners(socket.clone(), player); + println!("Welcome Player {} to Unreal Engine Server!", socket.id.to_string()); } } diff --git a/server/src/server/mod.rs b/server/src/server/mod.rs index 4982def..7f9ce3d 100644 --- a/server/src/server/mod.rs +++ b/server/src/server/mod.rs @@ -34,6 +34,13 @@ use uuid::Uuid; pub mod config; mod event_rep; use plugin_api::plugin_imports::*; +use lazy_static::lazy_static; + + +lazy_static! { + static ref SERVER: Server = Server::new().unwrap(); +} + // Server state management @@ -145,7 +152,7 @@ async fn handle_socket_ack(Data(data): Data, ack: AckSender) } } -fn on_connect(server: Server, socket: SocketRef, Data(data): Data) { +fn on_connect(socket: SocketRef, Data(data): Data) { log_info!(LOGGER, "SOCKET NET", "New connection from {}", socket.id); if let Err(e) = socket.emit("auth", &data) { @@ -156,7 +163,7 @@ fn on_connect(server: Server, socket: SocketRef, Data(data): Data anyhow::Result<()> { let (layer, io) = SocketIo::new_layer(); // Initialize server state so we can spawn threads - let server = Server::new()?; + let thread_count = config::SERVER_CONFIG .get() .map(|config| config.num_thread_pools) @@ -198,7 +205,7 @@ pub async fn start() -> anyhow::Result<()> { let mut handles = vec![]; let spawn_futures: Vec<_> = (0..thread_count).map(|_| { - let server_instance = server.get_instance(); + let server_instance = SERVER.get_instance(); { let mut value = handles.clone(); async move { @@ -210,8 +217,8 @@ pub async fn start() -> anyhow::Result<()> { }).collect(); // Configure socket namespaces - // io.ns("/", on_connect); - // io.ns("/custom", on_connect); + io.ns("/", on_connect); + io.ns("/custom", on_connect); // Build the application with routes let app = Router::new() .route("/", get(|| async { "Horizon Server Running" })) From 45ef09c0ac410958d38cd5f5acee01bd0c17edba Mon Sep 17 00:00:00 2001 From: "Tristan Poland (Trident_For_U)" <34868944+tristanpoland@users.noreply.github.com> Date: Thu, 5 Dec 2024 22:32:59 -0500 Subject: [PATCH 18/41] Sanity check --- dhat-heap.json | 722 ++++++++++++++++++++++++++++++++++++++ server/server_config.json | 4 + server/src/server/mod.rs | 46 ++- server_config.json | 4 + 4 files changed, 761 insertions(+), 15 deletions(-) create mode 100644 dhat-heap.json create mode 100644 server/server_config.json create mode 100644 server_config.json diff --git a/dhat-heap.json b/dhat-heap.json new file mode 100644 index 0000000..1e1207f --- /dev/null +++ b/dhat-heap.json @@ -0,0 +1,722 @@ +{ +"dhatFileVersion": 2, +"mode": "rust-heap", +"verb": "Allocated", +"bklt": true, +"bkacc": false, +"tu": "µs", +"Mtu": "s", +"tuth": 10, +"cmd": "target/debug/horizon-server", +"pid": 9184, +"tg": 16615, +"te": 52252, +"pps": [ +{ +"tb": 33, +"tbk": 1, +"tl": 21601, +"mb": 33, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 33, +"ebk": 1, +"fs": [ +1, +2, +3, +4, +5, +6, +7, +8, +9, +10, +11, +12, +13, +14 +] +}, +{ +"tb": 10, +"tbk": 1, +"tl": 7661, +"mb": 10, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +15, +16, +17, +18, +19, +20, +21, +22, +23, +24, +25, +26, +27, +28 +] +}, +{ +"tb": 31, +"tbk": 3, +"tl": 18, +"mb": 18, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +29, +30, +31, +32, +33, +34, +35, +36, +37, +38, +39, +40, +41, +42 +] +}, +{ +"tb": 49, +"tbk": 4, +"tl": 645, +"mb": 49, +"mbk": 4, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +1, +2, +3, +4, +5, +6, +43, +44, +45, +46, +47, +48, +49 +] +}, +{ +"tb": 80, +"tbk": 16, +"tl": 10, +"mb": 8, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +50, +51, +52, +53, +54, +55, +56, +57, +58, +59, +60, +61, +62 +] +}, +{ +"tb": 1024, +"tbk": 1, +"tl": 46626, +"mb": 1024, +"mbk": 1, +"gb": 1024, +"gbk": 1, +"eb": 1024, +"ebk": 1, +"fs": [ +63, +64, +65, +66, +67, +68, +69, +70, +71, +72, +73, +74, +75, +76, +77, +78, +79, +80, +81, +82, +83, +84, +85 +] +}, +{ +"tb": 3552, +"tbk": 1, +"tl": 108, +"mb": 3552, +"mbk": 1, +"gb": 3552, +"gbk": 1, +"eb": 0, +"ebk": 0, +"fs": [ +86, +87, +88, +89, +90, +91, +92, +93, +94, +95, +96, +97, +98, +99 +] +}, +{ +"tb": 48, +"tbk": 1, +"tl": 19498, +"mb": 48, +"mbk": 1, +"gb": 48, +"gbk": 1, +"eb": 0, +"ebk": 0, +"fs": [ +29, +30, +31, +32, +33, +34, +35, +36, +100, +101, +102, +103 +] +}, +{ +"tb": 23, +"tbk": 1, +"tl": 21816, +"mb": 23, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 23, +"ebk": 1, +"fs": [ +50, +104, +105, +106, +107, +108, +109, +110 +] +}, +{ +"tb": 56, +"tbk": 1, +"tl": 4931, +"mb": 56, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 56, +"ebk": 1, +"fs": [ +111, +112, +113, +114, +115, +116, +117, +118, +119, +120, +121 +] +}, +{ +"tb": 8, +"tbk": 1, +"tl": 104, +"mb": 8, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +50, +104, +105, +122, +123, +124, +125 +] +}, +{ +"tb": 1182, +"tbk": 1, +"tl": 2909, +"mb": 1182, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +29, +30, +31, +32, +33, +34, +35, +36, +100, +101, +102, +126, +85 +] +}, +{ +"tb": 4, +"tbk": 1, +"tl": 21606, +"mb": 4, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 4, +"ebk": 1, +"fs": [ +1, +2, +3, +4, +5, +6, +7, +8, +9, +10, +11, +12, +13, +127 +] +}, +{ +"tb": 8, +"tbk": 1, +"tl": 5, +"mb": 8, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +86, +87, +128, +129, +130, +131, +132, +133, +134, +135, +136, +137, +138, +139, +140, +141, +142, +143 +] +}, +{ +"tb": 360, +"tbk": 1, +"tl": 6567, +"mb": 360, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +144, +145, +146, +147, +148, +149, +150, +151 +] +}, +{ +"tb": 16, +"tbk": 1, +"tl": 4941, +"mb": 16, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 16, +"ebk": 1, +"fs": [ +152, +153, +154, +155, +115, +116, +117, +118, +119, +120 +] +}, +{ +"tb": 96, +"tbk": 1, +"tl": 35637, +"mb": 96, +"mbk": 1, +"gb": 96, +"gbk": 1, +"eb": 96, +"ebk": 1, +"fs": [ +156, +157, +158, +159, +160, +161, +162, +163 +] +}, +{ +"tb": 12, +"tbk": 2, +"tl": 12, +"mb": 8, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +29, +30, +31, +32, +33, +34, +35, +36, +37, +38, +39, +164, +41, +42 +] +}, +{ +"tb": 56, +"tbk": 3, +"tl": 20, +"mb": 32, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 0, +"ebk": 0, +"fs": [ +156, +165, +166, +167, +168, +169, +170 +] +}, +{ +"tb": 320, +"tbk": 1, +"tl": 21585, +"mb": 320, +"mbk": 1, +"gb": 0, +"gbk": 0, +"eb": 320, +"ebk": 1, +"fs": [ +1, +171, +172, +173, +174, +175, +176 +] +}, +{ +"tb": 3776, +"tbk": 1, +"tl": 35655, +"mb": 3776, +"mbk": 1, +"gb": 3776, +"gbk": 1, +"eb": 3776, +"ebk": 1, +"fs": [ +156, +157, +158, +177, +178, +179, +180, +163 +] +} +], +"ftbl": [ +"[root]", +"0x5621a5102d19: ::allocate (alloc/src/alloc.rs:241:9)", +"0x5621a51044d1: alloc::raw_vec::RawVecInner::try_allocate_in (alloc/src/raw_vec.rs:478:41)", +"0x5621a5104acf: alloc::raw_vec::RawVecInner::with_capacity_in (alloc/src/raw_vec.rs:425:15)", +"0x5621a5104fe0: alloc::raw_vec::RawVec::with_capacity_in (alloc/src/raw_vec.rs:202:20)", +"0x5621a5104fe0: alloc::vec::Vec::with_capacity_in (src/vec/mod.rs:698:20)", +"0x5621a5104fe0: ::to_vec (alloc/src/slice.rs:161:25)", +"0x5621a50f4cad: alloc::slice::hack::to_vec (alloc/src/slice.rs:110:9)", +"0x5621a50f4cad: alloc::slice::::to_vec_in (alloc/src/slice.rs:477:9)", +"0x5621a50f4cad: alloc::slice::::to_vec (alloc/src/slice.rs:452:14)", +"0x5621a50f4cad: alloc::slice::::to_owned (alloc/src/slice.rs:859:14)", +"0x5621a50f4cad: alloc::str::::to_owned (alloc/src/str.rs:210:62)", +"0x5621a50f4cad: >::from (alloc/src/string.rs:2758:11)", +"0x5621a50f4cad: ::to_string (alloc/src/string.rs:2673:21)", +"0x5621a50f4556: horizon_logger::HorizonLogger::log (horizon_logger-0.1.0/src/lib.rs:110:22)", +"0x5621a503b479: ::allocate (alloc/src/alloc.rs:241:9)", +"0x5621a5039f91: alloc::raw_vec::RawVecInner::try_allocate_in (alloc/src/raw_vec.rs:478:41)", +"0x5621a503a0ff: alloc::raw_vec::RawVecInner::with_capacity_in (alloc/src/raw_vec.rs:425:15)", +"0x5621a503ac10: alloc::raw_vec::RawVec::with_capacity_in (alloc/src/raw_vec.rs:202:20)", +"0x5621a503ac10: alloc::vec::Vec::with_capacity_in (src/vec/mod.rs:698:20)", +"0x5621a503ac10: ::to_vec (alloc/src/slice.rs:161:25)", +"0x5621a4f13e3d: alloc::slice::hack::to_vec (alloc/src/slice.rs:110:9)", +"0x5621a4f13e3d: alloc::slice::::to_vec_in (alloc/src/slice.rs:477:9)", +"0x5621a4f13e3d: alloc::slice::::to_vec (alloc/src/slice.rs:452:14)", +"0x5621a4f13e3d: alloc::slice::::to_owned (alloc/src/slice.rs:859:14)", +"0x5621a4f13e3d: alloc::str::::to_owned (alloc/src/str.rs:210:62)", +"0x5621a4f13e3d: >::from (alloc/src/string.rs:2758:11)", +"0x5621a4f13e3d: ::to_string (alloc/src/string.rs:2673:21)", +"0x5621a4f12758: socketioxide::io::SocketIoBuilder::new (socketioxide-0.15.1/src/io.rs:96:74)", +"0x5621a51b3528: ::allocate (alloc/src/alloc.rs:241:9)", +"0x5621a51b3528: alloc::raw_vec::RawVecInner::try_allocate_in (alloc/src/raw_vec.rs:478:41)", +"0x5621a51b3528: alloc::raw_vec::RawVecInner::with_capacity_in (alloc/src/raw_vec.rs:425:15)", +"0x5621a51b3528: alloc::raw_vec::RawVec::with_capacity_in (alloc/src/raw_vec.rs:202:20)", +"0x5621a51b3528: alloc::vec::Vec::with_capacity_in (src/vec/mod.rs:698:20)", +"0x5621a51b3528: alloc::vec::Vec::with_capacity (src/vec/mod.rs:480:9)", +"0x5621a51b3528: alloc::string::String::with_capacity (alloc/src/string.rs:489:23)", +"0x5621a51b3528: alloc::fmt::format::format_inner (alloc/src/fmt.rs:635:26)", +"0x5621a51058f0: alloc::fmt::format::{{closure}} (alloc/src/fmt.rs:642:34)", +"0x5621a510524e: core::option::Option::map_or_else (core/src/option.rs:1211:21)", +"0x5621a50f5b99: alloc::fmt::format (alloc/src/fmt.rs:642:5)", +"0x5621a50f3e82: horizon_logger::HorizonLogger::log (horizon_logger-0.1.0/src/lib.rs:92:27)", +"0x5621a50f3bc8: horizon_logger::HorizonLogger::info (horizon_logger-0.1.0/src/lib.rs:71:9)", +"0x5621a4ce836a: horizon_server::main::{{closure}} (server/src/main.rs:58:5)", +"0x5621a50f504d: alloc::slice::hack::to_vec (alloc/src/slice.rs:110:9)", +"0x5621a50f504d: alloc::slice::::to_vec_in (alloc/src/slice.rs:477:9)", +"0x5621a50f504d: alloc::slice::::to_vec (alloc/src/slice.rs:452:14)", +"0x5621a50f504d: alloc::slice::::to_owned (alloc/src/slice.rs:859:14)", +"0x5621a50f504d: alloc::str::::to_owned (alloc/src/str.rs:210:62)", +"0x5621a50f504d: >::from (alloc/src/string.rs:2758:11)", +"0x5621a50f6410: <&str as colored::Colorize>::color (colored-2.1.0/src/lib.rs:560:20)", +"0x5621a5126eb9: ::allocate (alloc/src/alloc.rs:241:9)", +"0x5621a5126181: alloc::raw_vec::RawVecInner::try_allocate_in (alloc/src/raw_vec.rs:478:41)", +"0x5621a51262ef: alloc::raw_vec::RawVecInner::with_capacity_in (alloc/src/raw_vec.rs:425:15)", +"0x5621a512c500: alloc::raw_vec::RawVec::with_capacity_in (alloc/src/raw_vec.rs:202:20)", +"0x5621a512c500: alloc::vec::Vec::with_capacity_in (src/vec/mod.rs:698:20)", +"0x5621a512c500: ::to_vec (alloc/src/slice.rs:161:25)", +"0x5621a512772d: alloc::slice::hack::to_vec (alloc/src/slice.rs:110:9)", +"0x5621a512772d: alloc::slice::::to_vec_in (alloc/src/slice.rs:477:9)", +"0x5621a512772d: alloc::slice::::to_vec (alloc/src/slice.rs:452:14)", +"0x5621a512772d: alloc::slice::::to_owned (alloc/src/slice.rs:859:14)", +"0x5621a512772d: alloc::str::::to_owned (alloc/src/str.rs:210:62)", +"0x5621a512772d: >::from (alloc/src/string.rs:2758:11)", +"0x5621a5127913: colored::ColoredString::compute_style (colored-2.1.0/src/lib.rs:400:23)", +"0x5621a5195842: ::allocate (alloc/src/alloc.rs:241:9)", +"0x5621a5195842: alloc::raw_vec::RawVecInner::try_allocate_in (alloc/src/raw_vec.rs:478:41)", +"0x5621a5195842: alloc::raw_vec::RawVecInner::with_capacity_in (alloc/src/raw_vec.rs:425:15)", +"0x5621a5195842: alloc::raw_vec::RawVec::with_capacity_in (alloc/src/raw_vec.rs:202:20)", +"0x5621a5195842: alloc::vec::Vec::with_capacity_in (src/vec/mod.rs:698:20)", +"0x5621a5195842: alloc::vec::Vec::with_capacity (src/vec/mod.rs:480:9)", +"0x5621a5195842: std::io::buffered::bufwriter::BufWriter::with_capacity (io/buffered/bufwriter.rs:112:33)", +"0x5621a5195842: std::io::buffered::linewriter::LineWriter::with_capacity (io/buffered/linewriter.rs:110:29)", +"0x5621a5195842: std::io::buffered::linewriter::LineWriter::new (io/buffered/linewriter.rs:90:9)", +"0x5621a5195842: std::io::stdio::stdout::{{closure}} (src/io/stdio.rs:671:61)", +"0x5621a5195842: std::sync::once_lock::OnceLock::get_or_init::{{closure}} (src/sync/once_lock.rs:304:50)", +"0x5621a5195842: std::sync::once_lock::OnceLock::initialize::{{closure}} (src/sync/once_lock.rs:511:19)", +"0x5621a5195842: std::sync::once::Once::call_once_force::{{closure}} (src/sync/once.rs:217:40)", +"0x5621a4c9ee83: std::sys::sync::once::futex::Once::call (sync/once/futex.rs:168:21)", +"0x5621a4c9e563: std::sync::once::Once::call_once_force (src/sync/once.rs:217:9)", +"0x5621a4c9e563: std::sync::once_lock::OnceLock::initialize (src/sync/once_lock.rs:510:9)", +"0x5621a51918d4: std::sync::once_lock::OnceLock::get_or_try_init (src/sync/once_lock.rs:390:9)", +"0x5621a51918d4: std::sync::once_lock::OnceLock::get_or_init (src/sync/once_lock.rs:304:15)", +"0x5621a51918d4: std::io::stdio::stdout (src/io/stdio.rs:671:14)", +"0x5621a51918d4: std::io::stdio::print_to (src/io/stdio.rs:1116:21)", +"0x5621a51918d4: std::io::stdio::_print (src/io/stdio.rs:1226:5)", +"0x5621a4dd80ab: horizon_server::splash::splash (server/src/splash.rs:14:5)", +"0x5621a4ce8039: horizon_server::main::{{closure}} (server/src/main.rs:55:5)", +"0x5621a4de166a: ::alloc (dhat-0.3.3/src/lib.rs:1176:9)", +"0x5621a4d6b8a3: __rust_alloc (server/src/main.rs:26:15)", +"0x5621a517b71f: alloc::raw_vec::finish_grow (alloc/src/raw_vec.rs:0:0)", +"0x5621a518f11f: alloc::raw_vec::RawVecInner::grow_exact (alloc/src/raw_vec.rs:680:19)", +"0x5621a518f11f: alloc::raw_vec::RawVecInner::try_reserve_exact (alloc/src/raw_vec.rs:602:13)", +"0x5621a518f11f: alloc::raw_vec::RawVec::try_reserve_exact (alloc/src/raw_vec.rs:385:9)", +"0x5621a518f11f: alloc::vec::Vec::try_reserve_exact (src/vec/mod.rs:1083:18)", +"0x5621a518f11f: std::fs::read::inner (std/src/fs.rs:264:15)", +"0x5621a513ef14: std::fs::read (std/src/fs.rs:268:5)", +"0x5621a5149e02: chrono::offset::local::tz_info::timezone::TimeZone::from_posix_tz (local/tz_info/timezone.rs:42:40)", +"0x5621a5149cb8: chrono::offset::local::tz_info::timezone::TimeZone::local (local/tz_info/timezone.rs:31:21)", +"0x5621a513e34d: chrono::offset::local::inner::current_zone (offset/local/unix.rs:103:5)", +"0x5621a513e29e: ::default (offset/local/unix.rs:97:19)", +"0x5621a5140bc2: core::ops::function::FnOnce::call_once (src/ops/function.rs:250:5)", +"0x5621a4eb6760: alloc::fmt::format::{{closure}} (alloc/src/fmt.rs:642:34)", +"0x5621a4eb6b8e: core::option::Option::map_or_else (core/src/option.rs:1211:21)", +"0x5621a4d96789: alloc::fmt::format (alloc/src/fmt.rs:642:5)", +"0x5621a4ce82cf: horizon_server::main::{{closure}} (server/src/main.rs:58:5)", +"0x5621a5125372: alloc::raw_vec::finish_grow (alloc/src/raw_vec.rs:776:9)", +"0x5621a5125bf1: alloc::raw_vec::RawVecInner::grow_amortized (alloc/src/raw_vec.rs:658:19)", +"0x5621a51263e3: alloc::raw_vec::RawVecInner::reserve::do_reserve_and_handle (alloc/src/raw_vec.rs:554:31)", +"0x5621a5124278: alloc::raw_vec::RawVecInner::reserve (alloc/src/raw_vec.rs:560:13)", +"0x5621a5124278: alloc::raw_vec::RawVec::reserve (alloc/src/raw_vec.rs:341:20)", +"0x5621a5124278: alloc::vec::Vec::reserve (src/vec/mod.rs:973:18)", +"0x5621a5123c5b: alloc::vec::Vec::append_elements (src/vec/mod.rs:2155:9)", +"0x5621a51a6f7d: alloc::alloc::exchange_malloc (alloc/src/alloc.rs:330:18)", +"0x5621a51a6f7d: alloc::boxed::Box::new (alloc/src/boxed.rs:257:9)", +"0x5621a51a6f7d: panic_unwind::imp::panic (panic_unwind/src/gcc.rs:62:21)", +"0x5621a51a6f7d: __rust_start_panic (panic_unwind/src/lib.rs:99:5)", +"0x5621a5197a0e: rust_panic (std/src/panicking.rs:858:25)", +"0x5621a5197840: std::panicking::rust_panic_with_hook (std/src/panicking.rs:822:5)", +"0x5621a5197483: std::panicking::begin_panic_handler::{{closure}} (std/src/panicking.rs:664:13)", +"0x5621a51962e9: std::sys::backtrace::__rust_end_short_backtrace (src/sys/backtrace.rs:170:18)", +"0x5621a5197144: rust_begin_unwind (std/src/panicking.rs:662:5)", +"0x5621a4c9fdd3: core::panicking::panic_fmt (core/src/panicking.rs:74:14)", +"0x5621a4c9fe5c: core::panicking::panic (core/src/panicking.rs:148:5)", +"0x5621a51254d5: alloc::raw_vec::RawVecInner::grow_one (alloc/src/raw_vec.rs:567:27)", +"0x5621a51254d5: alloc::raw_vec::RawVec::grow_one (alloc/src/raw_vec.rs:349:20)", +"0x5621a5124153: alloc::vec::Vec::push (src/vec/mod.rs:2009:13)", +"0x5621a50f4da4: alloc::string::String::push (alloc/src/string.rs:1357:18)", +"0x5621a4dd7fc6: horizon_server::splash::splash (server/src/splash.rs:3:25)", +"0x5621a50f450b: horizon_logger::HorizonLogger::log (horizon_logger-0.1.0/src/lib.rs:109:24)", +"0x5621a51b309f: alloc::raw_vec::finish_grow (alloc/src/raw_vec.rs:0:0)", +"0x5621a51b301c: alloc::raw_vec::RawVecInner::grow_amortized (alloc/src/raw_vec.rs:658:19)", +"0x5621a51b301c: alloc::raw_vec::RawVecInner::grow_one (alloc/src/raw_vec.rs:567:27)", +"0x5621a51b301c: alloc::raw_vec::RawVec::grow_one (alloc/src/raw_vec.rs:349:20)", +"0x5621a51b39b9: alloc::vec::Vec::push (src/vec/mod.rs:2009:13)", +"0x5621a51b39b9: alloc::string::String::push (alloc/src/string.rs:1357:18)", +"0x5621a51b3cc9: ::write_char (alloc/src/string.rs:2970:9)", +"0x5621a51badcf: core::fmt::Formatter::padding (src/fmt/mod.rs:1497:13)", +"0x5621a51badcf: core::fmt::Formatter::pad (src/fmt/mod.rs:1466:40)", +"0x5621a5105961: <&T as core::fmt::Display>::fmt (src/fmt/mod.rs:2382:62)", +"0x5621a51ba36d: core::fmt::rt::Argument::fmt (src/fmt/rt.rs:177:76)", +"0x5621a51ba36d: core::fmt::run (src/fmt/mod.rs:1228:14)", +"0x5621a51ba36d: core::fmt::write (src/fmt/mod.rs:1195:26)", +"0x5621a51b355b: <&mut W as core::fmt::Write::write_fmt::SpecWriteFmt>::spec_write_fmt (src/fmt/mod.rs:226:21)", +"0x5621a51b355b: core::fmt::Write::write_fmt (src/fmt/mod.rs:231:9)", +"0x5621a51b355b: alloc::fmt::format::format_inner (alloc/src/fmt.rs:637:14)", +"0x5621a4d07f42: alloc::alloc::exchange_malloc (alloc/src/alloc.rs:330:18)", +"0x5621a4d0b446: alloc::boxed::Box::new (alloc/src/boxed.rs:257:9)", +"0x5621a4d0b446: alloc::sync::Arc::new (alloc/src/sync.rs:387:25)", +"0x5621a4d50321: socketioxide::layer::SocketIoLayer::from_config (socketioxide-0.15.1/src/layer.rs:48:22)", +"0x5621a4d46354: socketioxide::io::SocketIoBuilder::build_layer (socketioxide-0.15.1/src/io.rs:230:31)", +"0x5621a4ce6976: socketioxide::io::SocketIo::new_layer (socketioxide-0.15.1/src/io.rs:311:9)", +"0x5621a4ce6976: horizon_server::server::start::{{closure}} (src/server/mod.rs:194:23)", +"0x5621a4ce8465: horizon_server::main::{{closure}} (server/src/main.rs:63:21)", +"0x5621a51973b8: alloc::alloc::exchange_malloc (alloc/src/alloc.rs:330:18)", +"0x5621a51973b8: alloc::boxed::Box::new (alloc/src/boxed.rs:257:9)", +"0x5621a51973b8: ::take_box (std/src/panicking.rs:642:27)", +"0x5621a51a6f5d: __rust_start_panic (panic_unwind/src/lib.rs:97:33)", +"0x5621a5159279: ::allocate (alloc/src/alloc.rs:241:9)", +"0x5621a51585a1: alloc::raw_vec::RawVecInner::try_allocate_in (alloc/src/raw_vec.rs:478:41)", +"0x5621a515870f: alloc::raw_vec::RawVecInner::with_capacity_in (alloc/src/raw_vec.rs:425:15)", +"0x5621a51363de: alloc::raw_vec::RawVec::with_capacity_in (alloc/src/raw_vec.rs:202:20)", +"0x5621a51363de: alloc::vec::Vec::with_capacity_in (src/vec/mod.rs:698:20)", +"0x5621a51363de: alloc::vec::Vec::with_capacity (src/vec/mod.rs:480:9)", +"0x5621a5153239: chrono::offset::local::tz_info::parser::parse (local/tz_info/parser.rs:36:32)", +"0x5621a514a75a: chrono::offset::local::tz_info::timezone::TimeZone::from_tz_data (local/tz_info/timezone.rs:99:9)", +"0x5621a50f4079: horizon_logger::HorizonLogger::log (horizon_logger-0.1.0/src/lib.rs:95:35)", +"0x5621a5157782: alloc::raw_vec::finish_grow (alloc/src/raw_vec.rs:776:9)", +"0x5621a5158011: alloc::raw_vec::RawVecInner::grow_amortized (alloc/src/raw_vec.rs:658:19)", +"0x5621a5142c75: alloc::raw_vec::RawVecInner::grow_one (alloc/src/raw_vec.rs:567:27)", +"0x5621a5142c75: alloc::raw_vec::RawVec::grow_one (alloc/src/raw_vec.rs:349:20)", +"0x5621a51366d3: alloc::vec::Vec::push (src/vec/mod.rs:2009:13)", +"0x5621a5142984: alloc::string::String::push (alloc/src/string.rs:1357:18)", +"0x5621a5103552: alloc::raw_vec::finish_grow (alloc/src/raw_vec.rs:776:9)", +"0x5621a5103f41: alloc::raw_vec::RawVecInner::grow_amortized (alloc/src/raw_vec.rs:658:19)", +"0x5621a50f6029: alloc::raw_vec::RawVecInner::grow_one (alloc/src/raw_vec.rs:567:27)", +"0x5621a50f6029: alloc::raw_vec::RawVec::grow_one (alloc/src/raw_vec.rs:349:20)", +"0x5621a50f4a2f: alloc::vec::Vec::push (src/vec/mod.rs:2009:13)", +"0x5621a50f4752: horizon_logger::HorizonLogger::log (horizon_logger-0.1.0/src/lib.rs:114:13)", +"0x5621a513633e: alloc::raw_vec::RawVec::with_capacity_in (alloc/src/raw_vec.rs:202:20)", +"0x5621a513633e: alloc::vec::Vec::with_capacity_in (src/vec/mod.rs:698:20)", +"0x5621a513633e: alloc::vec::Vec::with_capacity (src/vec/mod.rs:480:9)", +"0x5621a5153062: chrono::offset::local::tz_info::parser::parse (local/tz_info/parser.rs:26:27)" +] +} \ No newline at end of file diff --git a/server/server_config.json b/server/server_config.json new file mode 100644 index 0000000..00c081a --- /dev/null +++ b/server/server_config.json @@ -0,0 +1,4 @@ +{ + "players_per_pool": 1000, + "num_thread_pools": 64 +} \ No newline at end of file diff --git a/server/src/server/mod.rs b/server/src/server/mod.rs index 7f9ce3d..7052233 100644 --- a/server/src/server/mod.rs +++ b/server/src/server/mod.rs @@ -16,7 +16,7 @@ use crate::LOGGER; use anyhow::{Context, Result}; -use axum::{routing::get, Router}; +use axum::{routing::get, serve, Router}; use config::ServerConfig; use horizon_data_types::Player; use horizon_logger::{log_critical, log_debug, log_error, log_info, log_warn}; @@ -27,7 +27,7 @@ use socketioxide::{ extract::{AckSender, Data, SocketRef}, SocketIo, }; -use std::collections::HashMap; +use std::{collections::HashMap, os::windows::thread}; use std::sync::Arc; use tokio::sync::Mutex; use uuid::Uuid; @@ -80,8 +80,10 @@ impl HorizonServer { let thread_id = { let mut threads = self.threads.write(); threads.push(thread.into()); - threads.len() - 1 + let id = threads.len() - 1; + id }; + Ok(thread_id) } @@ -105,7 +107,7 @@ impl HorizonThread { plugins, handle: tokio::spawn(async move { loop { - tokio::time::sleep(std::time::Duration::from_secs(10)).await; + tokio::time::sleep(std::time::Duration::from_millis(10)).await; } }), } @@ -153,7 +155,9 @@ async fn handle_socket_ack(Data(data): Data, ack: AckSender) } fn on_connect(socket: SocketRef, Data(data): Data) { - log_info!(LOGGER, "SOCKET NET", "New connection from {}", socket.id); + //socket.on("connect", |socket: SocketRef, _| { + // log_info!(LOGGER, "SOCKET NET", "New connection from {}", socket.id); + //}); if let Err(e) = socket.emit("auth", &data) { log_error!(LOGGER, "SOCKET NET", "Failed to send auth: {}", e); @@ -197,28 +201,39 @@ pub async fn start() -> anyhow::Result<()> { let thread_count = config::SERVER_CONFIG .get() .map(|config| config.num_thread_pools) - .unwrap(); + .unwrap_or_default(); + let thread_count = 32; + + println!("Preparing to start {} threads", thread_count); // Start 10 threads initially for handling player connections - let mut count = 0; + //let handles = Vec::new(); - let mut handles = vec![]; + let handles = Arc::new(Mutex::new(Vec::new())); + let server_instance = &SERVER.get_instance(); let spawn_futures: Vec<_> = (0..thread_count).map(|_| { - let server_instance = SERVER.get_instance(); - { - let mut value = handles.clone(); - async move { - if let Ok(thread_id) = server_instance.read().spawn_thread() { - value.push(thread_id); - } + println!("Spawning thread"); + + let handles = handles.clone(); + async move { + if let Ok(thread_id) = server_instance.read().spawn_thread() { + println!("Attempting to obtain handles lock"); + handles.lock().await.push(thread_id); + println!("Handle lock obtained"); + + println!("Thread spawned: {}", thread_id); + } else { + println!("Failed to spawn thread"); } } }).collect(); + // Configure socket namespaces io.ns("/", on_connect); io.ns("/custom", on_connect); + println!("Accepting socket connections"); // Build the application with routes let app = Router::new() .route("/", get(|| async { "Horizon Server Running" })) @@ -228,6 +243,7 @@ pub async fn start() -> anyhow::Result<()> { log_info!(LOGGER, "SOCKET NET", "Starting server on {}", address); futures::future::join_all(spawn_futures).await; + log_info!(LOGGER, "SERVER", "Spawned {} threads", thread_count); let elapsed = start_time.elapsed(); log_info!(LOGGER, "SERVER", "Server initialization took {:?}", elapsed); diff --git a/server_config.json b/server_config.json new file mode 100644 index 0000000..00c081a --- /dev/null +++ b/server_config.json @@ -0,0 +1,4 @@ +{ + "players_per_pool": 1000, + "num_thread_pools": 64 +} \ No newline at end of file From 6d2be688f338157bd6dd640ef5ed82c90d6ac0d9 Mon Sep 17 00:00:00 2001 From: "Tristan Poland (Trident_For_U)" <34868944+tristanpoland@users.noreply.github.com> Date: Thu, 5 Dec 2024 22:38:08 -0500 Subject: [PATCH 19/41] Update mod.rs --- server/src/server/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/server/mod.rs b/server/src/server/mod.rs index 7052233..4eaa9cb 100644 --- a/server/src/server/mod.rs +++ b/server/src/server/mod.rs @@ -27,7 +27,7 @@ use socketioxide::{ extract::{AckSender, Data, SocketRef}, SocketIo, }; -use std::{collections::HashMap, os::windows::thread}; +use std::{collections::HashMap}; use std::sync::Arc; use tokio::sync::Mutex; use uuid::Uuid; @@ -156,7 +156,7 @@ async fn handle_socket_ack(Data(data): Data, ack: AckSender) fn on_connect(socket: SocketRef, Data(data): Data) { //socket.on("connect", |socket: SocketRef, _| { - // log_info!(LOGGER, "SOCKET NET", "New connection from {}", socket.id); + log_info!(LOGGER, "SOCKET NET", "New connection from {}", socket.id); //}); if let Err(e) = socket.emit("auth", &data) { From a2b22b8d100efef446a8dc247369b044bb78a2d8 Mon Sep 17 00:00:00 2001 From: "Tristan Poland (Trident_For_U)" <34868944+tristanpoland@users.noreply.github.com> Date: Thu, 5 Dec 2024 23:57:45 -0500 Subject: [PATCH 20/41] Compile patching --- Cargo.lock | 11 +++++++++++ plugin_api/Cargo.toml | 1 + plugin_api/src/plugin_imports.rs | 2 ++ 3 files changed, 14 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index 8c97014..d1adcf3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1345,6 +1345,16 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" +[[package]] +name = "player_lib" +version = "0.1.0" +dependencies = [ + "PebbleVault", + "horizon-plugin-api", + "horizon_data_types", + "socketioxide", +] + [[package]] name = "plugin_api" version = "0.3.0" @@ -1353,6 +1363,7 @@ dependencies = [ "horizon-plugin-api", "horizon_data_types", "pathdiff", + "player_lib", "socketioxide", "stars_beyond_plugin", "tokio", diff --git a/plugin_api/Cargo.toml b/plugin_api/Cargo.toml index 4cfb9fb..edf71d8 100644 --- a/plugin_api/Cargo.toml +++ b/plugin_api/Cargo.toml @@ -22,6 +22,7 @@ horizon-plugin-api = "0.1.9" # # ###### BEGIN AUTO-GENERATED PLUGIN DEPENDENCIES - DO NOT EDIT THIS SECTION ###### +player_lib = { path = "../plugins/player_lib", version = "0.1.0" } stars_beyond_plugin = { path = "../plugins/stars_beyond", version = "0.1.0" } unreal_adapter_horizon = { path = "../plugins/unreal_adapter_horizon", version = "0.1.0" } ###### END AUTO-GENERATED PLUGIN DEPENDENCIES ###### diff --git a/plugin_api/src/plugin_imports.rs b/plugin_api/src/plugin_imports.rs index a62858e..5afa9d3 100644 --- a/plugin_api/src/plugin_imports.rs +++ b/plugin_api/src/plugin_imports.rs @@ -4,6 +4,7 @@ use horizon_plugin_api::LoadedPlugin; use std::collections::HashMap; +pub use player_lib; pub use stars_beyond_plugin; pub use unreal_adapter_horizon; @@ -11,6 +12,7 @@ pub use unreal_adapter_horizon; // Invoke the macro with all discovered plugins pub fn load_plugins() -> HashMap<&'static str, LoadedPlugin> { let plugins = crate::load_plugins!( + player_lib, stars_beyond_plugin, unreal_adapter_horizon ); From 0c154bf53c2bfb3215c6f889368500cee08b8889 Mon Sep 17 00:00:00 2001 From: "Tristan Poland (Trident_For_U)" <34868944+tristanpoland@users.noreply.github.com> Date: Fri, 6 Dec 2024 00:03:50 -0500 Subject: [PATCH 21/41] Update plugin_imports.rs --- plugin_api/src/plugin_imports.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugin_api/src/plugin_imports.rs b/plugin_api/src/plugin_imports.rs index 5afa9d3..0feeeea 100644 --- a/plugin_api/src/plugin_imports.rs +++ b/plugin_api/src/plugin_imports.rs @@ -4,6 +4,7 @@ use horizon_plugin_api::LoadedPlugin; use std::collections::HashMap; +pub use chronos_plugin; pub use player_lib; pub use stars_beyond_plugin; pub use unreal_adapter_horizon; @@ -12,6 +13,7 @@ pub use unreal_adapter_horizon; // Invoke the macro with all discovered plugins pub fn load_plugins() -> HashMap<&'static str, LoadedPlugin> { let plugins = crate::load_plugins!( + chronos_plugin, player_lib, stars_beyond_plugin, unreal_adapter_horizon From cbc1e33717866122232f773c0209ead0946d364e Mon Sep 17 00:00:00 2001 From: Nils Kristians Ramps-Rampans <49234603+SafeShows@users.noreply.github.com> Date: Fri, 6 Dec 2024 07:31:17 +0200 Subject: [PATCH 22/41] Debugging get_plugin!() macro --- plugin_api/src/plugin_imports.rs | 4 +- server/src/server/mod.rs | 66 ++++++++++++++++---------------- 2 files changed, 34 insertions(+), 36 deletions(-) diff --git a/plugin_api/src/plugin_imports.rs b/plugin_api/src/plugin_imports.rs index 0feeeea..3fa52c4 100644 --- a/plugin_api/src/plugin_imports.rs +++ b/plugin_api/src/plugin_imports.rs @@ -5,8 +5,8 @@ use horizon_plugin_api::LoadedPlugin; use std::collections::HashMap; pub use chronos_plugin; -pub use player_lib; pub use stars_beyond_plugin; +pub use player_lib; pub use unreal_adapter_horizon; @@ -14,8 +14,8 @@ pub use unreal_adapter_horizon; pub fn load_plugins() -> HashMap<&'static str, LoadedPlugin> { let plugins = crate::load_plugins!( chronos_plugin, - player_lib, stars_beyond_plugin, + player_lib, unreal_adapter_horizon ); plugins diff --git a/server/src/server/mod.rs b/server/src/server/mod.rs index 4eaa9cb..ceaca2d 100644 --- a/server/src/server/mod.rs +++ b/server/src/server/mod.rs @@ -20,28 +20,26 @@ use axum::{routing::get, serve, Router}; use config::ServerConfig; use horizon_data_types::Player; use horizon_logger::{log_critical, log_debug, log_error, log_info, log_warn}; +use horizon_plugin_api::LoadedPlugin; use parking_lot::RwLock; use plugin_api::{Plugin, Pluginstate}; -use horizon_plugin_api::LoadedPlugin; use socketioxide::{ extract::{AckSender, Data, SocketRef}, SocketIo, }; -use std::{collections::HashMap}; +use std::collections::HashMap; use std::sync::Arc; use tokio::sync::Mutex; use uuid::Uuid; pub mod config; mod event_rep; -use plugin_api::plugin_imports::*; use lazy_static::lazy_static; - +use plugin_api::plugin_imports::*; lazy_static! { static ref SERVER: Server = Server::new().unwrap(); } - // Server state management //----------------------------------------------------------------------------- @@ -83,7 +81,6 @@ impl HorizonServer { let id = threads.len() - 1; id }; - Ok(thread_id) } @@ -156,7 +153,7 @@ async fn handle_socket_ack(Data(data): Data, ack: AckSender) fn on_connect(socket: SocketRef, Data(data): Data) { //socket.on("connect", |socket: SocketRef, _| { - log_info!(LOGGER, "SOCKET NET", "New connection from {}", socket.id); + log_info!(LOGGER, "SOCKET NET", "New connection from {}", socket.id); //}); if let Err(e) = socket.emit("auth", &data) { @@ -170,23 +167,23 @@ fn on_connect(socket: SocketRef, Data(data): Data) { let server_instance = SERVER.get_instance(); let server_instance_read = server_instance.read(); let threads = server_instance_read.threads.read(); - + socket.on("message", handle_socket_message); socket.on("message-with-ack", handle_socket_ack); - let player = horizon_data_types::Player::new( - socket.clone(), - Uuid::new_v4() - ); - + let player = horizon_data_types::Player::new(socket.clone(), Uuid::new_v4()); + let target_thread = Arc::clone(&threads[threadid]); target_thread.add_player(player.clone()); - - let player_arc: Arc = Arc::new(player); - let unreal_adapter = plugin_api::get_plugin!(unreal_adapter_horizon, target_thread.plugins); - unreal_adapter.player_joined(socket, player_arc); - + let player_arc: Arc = Arc::new(player); + //let unreal_adapter = plugin_api::get_plugin!(player_lib, target_thread.plugins); + let unreal_adapter = target_thread + .plugins + .get(stringify!(player_lib)) + .map(|p| &p.instance as &dyn player_lib::Plugin::PluginAPI) + .expect(&format!("Plugin {} not found", stringify!(player_lib))); + // unreal_adapter.player_joined(socket, player_arc); } //----------------------------------------------------------------------------- @@ -212,23 +209,24 @@ pub async fn start() -> anyhow::Result<()> { let handles = Arc::new(Mutex::new(Vec::new())); let server_instance = &SERVER.get_instance(); - let spawn_futures: Vec<_> = (0..thread_count).map(|_| { - println!("Spawning thread"); - - let handles = handles.clone(); - async move { - if let Ok(thread_id) = server_instance.read().spawn_thread() { - println!("Attempting to obtain handles lock"); - handles.lock().await.push(thread_id); - println!("Handle lock obtained"); - - println!("Thread spawned: {}", thread_id); - } else { - println!("Failed to spawn thread"); + let spawn_futures: Vec<_> = (0..thread_count) + .map(|_| { + println!("Spawning thread"); + + let handles = handles.clone(); + async move { + if let Ok(thread_id) = server_instance.read().spawn_thread() { + println!("Attempting to obtain handles lock"); + handles.lock().await.push(thread_id); + println!("Handle lock obtained"); + + println!("Thread spawned: {}", thread_id); + } else { + println!("Failed to spawn thread"); + } } - } - }).collect(); - + }) + .collect(); // Configure socket namespaces io.ns("/", on_connect); From a6e7f119a61df091235b665d4c1f2e845dd1f82e Mon Sep 17 00:00:00 2001 From: "Tristan Poland (Trident_For_U)" <34868944+tristanpoland@users.noreply.github.com> Date: Fri, 6 Dec 2024 00:49:04 -0500 Subject: [PATCH 23/41] Potential macro patch --- plugin_api/src/plugin_imports.rs | 4 ++-- plugins/player_lib/Cargo.toml | 1 + plugins/player_lib/src/lib.rs | 10 +++++----- plugins/unreal_adapter_horizon/Cargo.toml | 1 + plugins/unreal_adapter_horizon/src/lib.rs | 2 +- server/src/server/mod.rs | 11 ++++++----- 6 files changed, 16 insertions(+), 13 deletions(-) diff --git a/plugin_api/src/plugin_imports.rs b/plugin_api/src/plugin_imports.rs index 3fa52c4..0feeeea 100644 --- a/plugin_api/src/plugin_imports.rs +++ b/plugin_api/src/plugin_imports.rs @@ -5,8 +5,8 @@ use horizon_plugin_api::LoadedPlugin; use std::collections::HashMap; pub use chronos_plugin; -pub use stars_beyond_plugin; pub use player_lib; +pub use stars_beyond_plugin; pub use unreal_adapter_horizon; @@ -14,8 +14,8 @@ pub use unreal_adapter_horizon; pub fn load_plugins() -> HashMap<&'static str, LoadedPlugin> { let plugins = crate::load_plugins!( chronos_plugin, - stars_beyond_plugin, player_lib, + stars_beyond_plugin, unreal_adapter_horizon ); plugins diff --git a/plugins/player_lib/Cargo.toml b/plugins/player_lib/Cargo.toml index 9334359..e62dcc4 100644 --- a/plugins/player_lib/Cargo.toml +++ b/plugins/player_lib/Cargo.toml @@ -8,3 +8,4 @@ PebbleVault = "0.6.1" horizon-plugin-api = "0.1.7" horizon_data_types = "0.4.0" socketioxide = "0.15.1" +parking_lot = "0.12.3" diff --git a/plugins/player_lib/src/lib.rs b/plugins/player_lib/src/lib.rs index 48a9508..5861713 100644 --- a/plugins/player_lib/src/lib.rs +++ b/plugins/player_lib/src/lib.rs @@ -2,14 +2,14 @@ use horizon_data_types::Player; use socketioxide::extract::SocketRef; pub use horizon_plugin_api::{Plugin, Pluginstate, LoadedPlugin}; use socketioxide::packet::Str; -use std::sync::RwLock; +use parking_lot::RwLock; use std::sync::Arc; use std::collections::HashMap; use PebbleVault; // Define the trait properly pub trait PluginAPI { - fn player_joined(&self, socket: SocketRef, players: Arc>>); + fn player_joined(&self, socket: SocketRef, player: Arc>); } pub trait PluginConstruct { @@ -32,8 +32,8 @@ impl PluginConstruct for Plugin { // Implement the trait for Plugin impl PluginAPI for Plugin { - fn player_joined(&self, socket: SocketRef, players: Arc>>) { - setup_listeners(socket, players); + fn player_joined(&self, socket: SocketRef, player: Arc>) { + setup_listeners(socket, player); } } @@ -85,6 +85,6 @@ impl PlayerAPI for Player { -fn setup_listeners(socket: SocketRef, players: Arc>>) { +fn setup_listeners(socket: SocketRef, players: Arc>) { socket.on("foo", || println!("bar")); } \ No newline at end of file diff --git a/plugins/unreal_adapter_horizon/Cargo.toml b/plugins/unreal_adapter_horizon/Cargo.toml index 4078f9d..ce6d46f 100644 --- a/plugins/unreal_adapter_horizon/Cargo.toml +++ b/plugins/unreal_adapter_horizon/Cargo.toml @@ -6,4 +6,5 @@ edition = "2021" [dependencies] horizon-plugin-api = "0.1.9" horizon_data_types = "0.4.0" +parking_lot = "0.12.3" socketioxide = "0.15.1" diff --git a/plugins/unreal_adapter_horizon/src/lib.rs b/plugins/unreal_adapter_horizon/src/lib.rs index 6a04bd1..59562b0 100644 --- a/plugins/unreal_adapter_horizon/src/lib.rs +++ b/plugins/unreal_adapter_horizon/src/lib.rs @@ -10,7 +10,7 @@ use horizon_data_types::Player; use socketioxide::extract::SocketRef; pub use horizon_plugin_api::{Plugin, Pluginstate, LoadedPlugin}; -use std::sync::RwLock; +use parking_lot::RwLock; use std::sync::Arc; use std::collections::HashMap; diff --git a/server/src/server/mod.rs b/server/src/server/mod.rs index ceaca2d..d511b3a 100644 --- a/server/src/server/mod.rs +++ b/server/src/server/mod.rs @@ -22,6 +22,7 @@ use horizon_data_types::Player; use horizon_logger::{log_critical, log_debug, log_error, log_info, log_warn}; use horizon_plugin_api::LoadedPlugin; use parking_lot::RwLock; +use player_lib::PluginAPI; use plugin_api::{Plugin, Pluginstate}; use socketioxide::{ extract::{AckSender, Data, SocketRef}, @@ -176,14 +177,14 @@ fn on_connect(socket: SocketRef, Data(data): Data) { let target_thread = Arc::clone(&threads[threadid]); target_thread.add_player(player.clone()); - let player_arc: Arc = Arc::new(player); + let player_arc: Arc> = Arc::new(parking_lot::RwLock::new(player)); //let unreal_adapter = plugin_api::get_plugin!(player_lib, target_thread.plugins); let unreal_adapter = target_thread .plugins - .get(stringify!(player_lib)) - .map(|p| &p.instance as &dyn player_lib::Plugin::PluginAPI) - .expect(&format!("Plugin {} not found", stringify!(player_lib))); - // unreal_adapter.player_joined(socket, player_arc); + .get(stringify!(unreal_adapter_horizon)) + .map(|p| &p.instance as &unreal_adapter_horizon::Plugin) + .expect(&format!("Plugin {} not found", stringify!(unreal_adapter_horizon))); + unreal_adapter.player_joined(socket, player_arc); } //----------------------------------------------------------------------------- From 60c9045fa04867af08c8330a0c2ca9f9bccc35a1 Mon Sep 17 00:00:00 2001 From: "Tristan Poland (Trident_For_U)" <34868944+tristanpoland@users.noreply.github.com> Date: Fri, 6 Dec 2024 00:51:42 -0500 Subject: [PATCH 24/41] Update mod.rs --- server/src/server/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/server/mod.rs b/server/src/server/mod.rs index d511b3a..da935a5 100644 --- a/server/src/server/mod.rs +++ b/server/src/server/mod.rs @@ -183,7 +183,7 @@ fn on_connect(socket: SocketRef, Data(data): Data) { .plugins .get(stringify!(unreal_adapter_horizon)) .map(|p| &p.instance as &unreal_adapter_horizon::Plugin) - .expect(&format!("Plugin {} not found", stringify!(unreal_adapter_horizon))); + .unwrap(); unreal_adapter.player_joined(socket, player_arc); } From b8825dbb26b681eda603a0b8004b99c3cbd0e557 Mon Sep 17 00:00:00 2001 From: "Tristan Poland (Trident_For_U)" <34868944+tristanpoland@users.noreply.github.com> Date: Fri, 6 Dec 2024 00:54:40 -0500 Subject: [PATCH 25/41] Update mod.rs --- server/src/server/mod.rs | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/server/src/server/mod.rs b/server/src/server/mod.rs index da935a5..ca0e3b6 100644 --- a/server/src/server/mod.rs +++ b/server/src/server/mod.rs @@ -179,12 +179,17 @@ fn on_connect(socket: SocketRef, Data(data): Data) { let player_arc: Arc> = Arc::new(parking_lot::RwLock::new(player)); //let unreal_adapter = plugin_api::get_plugin!(player_lib, target_thread.plugins); - let unreal_adapter = target_thread - .plugins - .get(stringify!(unreal_adapter_horizon)) - .map(|p| &p.instance as &unreal_adapter_horizon::Plugin) - .unwrap(); - unreal_adapter.player_joined(socket, player_arc); + // let unreal_adapter = + match target_thread + .plugins + .get(stringify!(unreal_adapter_horizon)) + .map(|p| &p.instance as &unreal_adapter_horizon::Plugin) { + Some(plugin) => { + plugin.player_joined(socket, player_arc); + }, + None => {panic!("plugin not found")}, + } + // unreal_adapter.player_joined(socket, player_arc); } //----------------------------------------------------------------------------- From 8bb386fc3ef341e233593bde24cb220555c341af Mon Sep 17 00:00:00 2001 From: "Tristan Poland (Trident_For_U)" <34868944+tristanpoland@users.noreply.github.com> Date: Fri, 6 Dec 2024 00:55:22 -0500 Subject: [PATCH 26/41] Update mod.rs --- server/src/server/mod.rs | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/server/src/server/mod.rs b/server/src/server/mod.rs index ca0e3b6..e7ed15b 100644 --- a/server/src/server/mod.rs +++ b/server/src/server/mod.rs @@ -180,14 +180,30 @@ fn on_connect(socket: SocketRef, Data(data): Data) { let player_arc: Arc> = Arc::new(parking_lot::RwLock::new(player)); //let unreal_adapter = plugin_api::get_plugin!(player_lib, target_thread.plugins); // let unreal_adapter = - match target_thread - .plugins - .get(stringify!(unreal_adapter_horizon)) - .map(|p| &p.instance as &unreal_adapter_horizon::Plugin) { + match target_thread.plugins.get(stringify!(unreal_adapter_horizon)) { Some(plugin) => { - plugin.player_joined(socket, player_arc); + match &plugin.instance as &dyn Plugin { + plugin_instance => { + match plugin_instance.downcast_ref::() { + Some(unreal_plugin) => { + unreal_plugin.player_joined(socket, player_arc); + }, + None => { + log_error!(LOGGER, "PLUGIN", "Failed to downcast plugin instance to unreal_adapter_horizon::Plugin"); + panic!("Failed to downcast plugin instance to unreal_adapter_horizon::Plugin"); + } + } + }, + _ => { + log_error!(LOGGER, "PLUGIN", "Failed to get plugin instance as &dyn Plugin"); + panic!("Failed to get plugin instance as &dyn Plugin"); + } + } }, - None => {panic!("plugin not found")}, + None => { + log_error!(LOGGER, "PLUGIN", "Plugin unreal_adapter_horizon not found"); + panic!("Plugin unreal_adapter_horizon not found"); + } } // unreal_adapter.player_joined(socket, player_arc); } From 78e1b4b21bcb946edfa3e00a3ff2d73e6b33088a Mon Sep 17 00:00:00 2001 From: "Tristan Poland (Trident_For_U)" <34868944+tristanpoland@users.noreply.github.com> Date: Fri, 6 Dec 2024 00:58:04 -0500 Subject: [PATCH 27/41] Update mod.rs --- server/src/server/mod.rs | 35 +++++++++++++---------------------- 1 file changed, 13 insertions(+), 22 deletions(-) diff --git a/server/src/server/mod.rs b/server/src/server/mod.rs index e7ed15b..48d321f 100644 --- a/server/src/server/mod.rs +++ b/server/src/server/mod.rs @@ -180,31 +180,22 @@ fn on_connect(socket: SocketRef, Data(data): Data) { let player_arc: Arc> = Arc::new(parking_lot::RwLock::new(player)); //let unreal_adapter = plugin_api::get_plugin!(player_lib, target_thread.plugins); // let unreal_adapter = - match target_thread.plugins.get(stringify!(unreal_adapter_horizon)) { - Some(plugin) => { - match &plugin.instance as &dyn Plugin { - plugin_instance => { - match plugin_instance.downcast_ref::() { - Some(unreal_plugin) => { - unreal_plugin.player_joined(socket, player_arc); - }, - None => { - log_error!(LOGGER, "PLUGIN", "Failed to downcast plugin instance to unreal_adapter_horizon::Plugin"); - panic!("Failed to downcast plugin instance to unreal_adapter_horizon::Plugin"); - } - } - }, - _ => { - log_error!(LOGGER, "PLUGIN", "Failed to get plugin instance as &dyn Plugin"); - panic!("Failed to get plugin instance as &dyn Plugin"); - } - } - }, + let thread_plugins = target_thread.plugins; + let plugin_name = match thread_plugins.get(stringify!(unreal_adapter_horizon)) { + Some(plugin) => plugin, None => { log_error!(LOGGER, "PLUGIN", "Plugin unreal_adapter_horizon not found"); - panic!("Plugin unreal_adapter_horizon not found"); + return; } - } + }; + let casted_struct = match plugin_name.instance.downcast_ref::() { + Some(plugin) => plugin, + None => { + log_error!(LOGGER, "PLUGIN", "Failed to cast plugin to unreal_adapter_horizon::Plugin"); + return; + } + }; + // unreal_adapter.player_joined(socket, player_arc); } From 6ce2519f5a72e2a5bffb9d541260d6de51ee1970 Mon Sep 17 00:00:00 2001 From: "Tristan Poland (Trident_For_U)" <34868944+tristanpoland@users.noreply.github.com> Date: Fri, 6 Dec 2024 00:59:38 -0500 Subject: [PATCH 28/41] Update mod.rs --- server/src/server/mod.rs | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/server/src/server/mod.rs b/server/src/server/mod.rs index 48d321f..a5424f3 100644 --- a/server/src/server/mod.rs +++ b/server/src/server/mod.rs @@ -180,21 +180,15 @@ fn on_connect(socket: SocketRef, Data(data): Data) { let player_arc: Arc> = Arc::new(parking_lot::RwLock::new(player)); //let unreal_adapter = plugin_api::get_plugin!(player_lib, target_thread.plugins); // let unreal_adapter = - let thread_plugins = target_thread.plugins; - let plugin_name = match thread_plugins.get(stringify!(unreal_adapter_horizon)) { - Some(plugin) => plugin, - None => { - log_error!(LOGGER, "PLUGIN", "Plugin unreal_adapter_horizon not found"); - return; - } - }; - let casted_struct = match plugin_name.instance.downcast_ref::() { - Some(plugin) => plugin, - None => { - log_error!(LOGGER, "PLUGIN", "Failed to cast plugin to unreal_adapter_horizon::Plugin"); - return; - } - }; + let thread_plugins = target_thread.plugins.clone(); + let plugin = match thread_plugins.get(stringify!(unreal_adapter_horizon)) { + Some(plugin) => plugin, + None => { + log_error!(LOGGER, "PLUGIN", "Plugin unreal_adapter_horizon not found"); + return; + } + }; + let casted_struct = &plugin.instance as &unreal_adapter_horizon::Plugin; // unreal_adapter.player_joined(socket, player_arc); } From 51d8c96d3ea50ae8bc41bed3cea297266b3a8fc1 Mon Sep 17 00:00:00 2001 From: "Tristan Poland (Trident_For_U)" <34868944+tristanpoland@users.noreply.github.com> Date: Fri, 6 Dec 2024 01:00:19 -0500 Subject: [PATCH 29/41] Update mod.rs --- server/src/server/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/server/mod.rs b/server/src/server/mod.rs index a5424f3..4fcfef7 100644 --- a/server/src/server/mod.rs +++ b/server/src/server/mod.rs @@ -188,7 +188,7 @@ fn on_connect(socket: SocketRef, Data(data): Data) { return; } }; - let casted_struct = &plugin.instance as &unreal_adapter_horizon::Plugin; + let casted_struct: &unreal_adapter_horizon::Plugin = &plugin.instance; // unreal_adapter.player_joined(socket, player_arc); } From b177ca1f9cbd9006f2f0be9b4e10e9b0aa317db3 Mon Sep 17 00:00:00 2001 From: "Tristan Poland (Trident_For_U)" <34868944+tristanpoland@users.noreply.github.com> Date: Fri, 6 Dec 2024 01:38:39 -0500 Subject: [PATCH 30/41] Fixed plugin loading --- plugin_api/Cargo.toml | 2 +- plugin_api/build.rs | 4 ++-- plugin_api/src/lib.rs | 12 ++++++------ plugin_api/src/plugin_imports.rs | 4 ++-- plugins/chronos_plugin/src/lib.rs | 5 +++-- plugins/player_lib/src/lib.rs | 4 ++-- plugins/stars_beyond/src/lib.rs | 4 ++-- plugins/unreal_adapter_horizon/Cargo.toml | 2 +- plugins/unreal_adapter_horizon/src/lib.rs | 4 ++-- server/Cargo.toml | 2 +- server/src/server/mod.rs | 6 +++++- 11 files changed, 27 insertions(+), 22 deletions(-) diff --git a/plugin_api/Cargo.toml b/plugin_api/Cargo.toml index 8135b71..f92e194 100644 --- a/plugin_api/Cargo.toml +++ b/plugin_api/Cargo.toml @@ -16,7 +16,7 @@ horizon_data_types = "0.4.0" tokio = { version = "1.41.1", features = ["rt", "net", "rt-multi-thread"] } uuid = "1.11.0" socketioxide = "0.15.0" -horizon-plugin-api = "0.1.9" +horizon-plugin-api = "0.1.11" # # # diff --git a/plugin_api/build.rs b/plugin_api/build.rs index 71daaf4..53a8528 100644 --- a/plugin_api/build.rs +++ b/plugin_api/build.rs @@ -174,7 +174,7 @@ fn generate_imports_file(plugin_paths: &[(String, String, String)], out_dir: &Pa // Write the header writeln!(file, "// This file is automatically generated by build.rs")?; writeln!(file, "// Do not edit this file manually!\n")?; - writeln!(file, "use horizon_plugin_api::LoadedPlugin;")?; + writeln!(file, "use horizon_plugin_api::{{Pluginstate, LoadedPlugin, Plugin}};")?; writeln!(file, "use std::collections::HashMap;\n")?; for (i, (name, _, _)) in plugin_paths.iter().enumerate() { write!(file, "pub use {};\n", name)?; @@ -184,7 +184,7 @@ fn generate_imports_file(plugin_paths: &[(String, String, String)], out_dir: &Pa // Use the macro with discovered plugins writeln!(file, "// Invoke the macro with all discovered plugins")?; - writeln!(file, "pub fn load_plugins() -> HashMap<&'static str, LoadedPlugin> {{")?; + writeln!(file, "pub fn load_plugins() -> HashMap {{")?; write!(file, " let plugins = crate::load_plugins!(")?; // Add each plugin to the macro invocation diff --git a/plugin_api/src/lib.rs b/plugin_api/src/lib.rs index 86c3099..34e21ef 100644 --- a/plugin_api/src/lib.rs +++ b/plugin_api/src/lib.rs @@ -11,6 +11,7 @@ const PLUGIN_API_VERSION: Version = Version { hotfix: 0 }; +#[derive(Clone)] pub struct PluginManager { plugins: HashMap } @@ -22,12 +23,11 @@ macro_rules! load_plugins { let mut plugins = HashMap::new(); $( plugins.insert( - stringify!($plugin), - LoadedPlugin { - instance: <$plugin::Plugin as $plugin::PluginConstruct>::new(plugins.clone()), - } + stringify!($plugin).to_string(), + (Pluginstate::ACTIVE, <$plugin::Plugin as $plugin::PluginConstruct>::new(plugins.clone())), ); )* + plugins } }; @@ -55,8 +55,8 @@ impl PluginManager { self.plugins } - pub fn load_all(&self) -> HashMap { - let plugins = plugin_imports::load_plugins(); + pub fn load_all(&mut self) -> HashMap { + self.plugins = plugin_imports::load_plugins(); //let my_test_plugin = get_plugin!(test_plugin, plugins); //let result = my_test_plugin.thing(); diff --git a/plugin_api/src/plugin_imports.rs b/plugin_api/src/plugin_imports.rs index 0feeeea..2966ea1 100644 --- a/plugin_api/src/plugin_imports.rs +++ b/plugin_api/src/plugin_imports.rs @@ -1,7 +1,7 @@ // This file is automatically generated by build.rs // Do not edit this file manually! -use horizon_plugin_api::LoadedPlugin; +use horizon_plugin_api::{Pluginstate, LoadedPlugin, Plugin}; use std::collections::HashMap; pub use chronos_plugin; @@ -11,7 +11,7 @@ pub use unreal_adapter_horizon; // Invoke the macro with all discovered plugins -pub fn load_plugins() -> HashMap<&'static str, LoadedPlugin> { +pub fn load_plugins() -> HashMap { let plugins = crate::load_plugins!( chronos_plugin, player_lib, diff --git a/plugins/chronos_plugin/src/lib.rs b/plugins/chronos_plugin/src/lib.rs index ed61ec4..3094fe7 100644 --- a/plugins/chronos_plugin/src/lib.rs +++ b/plugins/chronos_plugin/src/lib.rs @@ -1,5 +1,6 @@ use std::sync::{Arc, atomic::{AtomicBool, Ordering}}; +use horizon_plugin_api::Pluginstate; use parking_lot::RwLock; use std::collections::HashMap; use std::time::{SystemTime, UNIX_EPOCH, Duration}; @@ -61,12 +62,12 @@ impl TimeState { } pub trait PluginConstruct { - fn new(plugins: HashMap<&'static str, LoadedPlugin>) -> Plugin; + fn new(plugins: HashMap) -> Plugin; } // Implement constructor for Plugin impl PluginConstruct for Plugin { - fn new(_plugins: HashMap<&'static str, LoadedPlugin>) -> Plugin { + fn new(plugins: HashMap) -> Plugin { Self::start_time_server(); Plugin {} } diff --git a/plugins/player_lib/src/lib.rs b/plugins/player_lib/src/lib.rs index 5861713..40835b0 100644 --- a/plugins/player_lib/src/lib.rs +++ b/plugins/player_lib/src/lib.rs @@ -15,13 +15,13 @@ pub trait PluginAPI { pub trait PluginConstruct { fn get_structs(&self) -> Vec<&str>; // If you want default implementations, mark them with 'default' - fn new(plugins: HashMap<&'static str, LoadedPlugin>) -> Plugin; + fn new(plugins: HashMap) -> Plugin; } // Implement constructor separately impl PluginConstruct for Plugin { - fn new(plugins: HashMap<&'static str, LoadedPlugin>) -> Plugin { + fn new(plugins: HashMap) -> Plugin { Plugin {} } diff --git a/plugins/stars_beyond/src/lib.rs b/plugins/stars_beyond/src/lib.rs index 0ba0323..ca9607c 100644 --- a/plugins/stars_beyond/src/lib.rs +++ b/plugins/stars_beyond/src/lib.rs @@ -13,13 +13,13 @@ pub trait PluginAPI { pub trait PluginConstruct { // If you want default implementations, mark them with 'default' - fn new(plugins: HashMap<&'static str, LoadedPlugin>) -> Plugin; + fn new(plugins: HashMap) -> Plugin; } // Implement constructor separately impl PluginConstruct for Plugin { - fn new(plugins: HashMap<&'static str, LoadedPlugin>) -> Plugin { + fn new(plugins: HashMap) -> Plugin { Plugin {} } diff --git a/plugins/unreal_adapter_horizon/Cargo.toml b/plugins/unreal_adapter_horizon/Cargo.toml index ce6d46f..cd67a4d 100644 --- a/plugins/unreal_adapter_horizon/Cargo.toml +++ b/plugins/unreal_adapter_horizon/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" edition = "2021" [dependencies] -horizon-plugin-api = "0.1.9" +horizon-plugin-api = "0.1.11" horizon_data_types = "0.4.0" parking_lot = "0.12.3" socketioxide = "0.15.1" diff --git a/plugins/unreal_adapter_horizon/src/lib.rs b/plugins/unreal_adapter_horizon/src/lib.rs index 59562b0..0de528e 100644 --- a/plugins/unreal_adapter_horizon/src/lib.rs +++ b/plugins/unreal_adapter_horizon/src/lib.rs @@ -21,13 +21,13 @@ pub trait PluginAPI { pub trait PluginConstruct { // If you want default implementations, mark them with 'default' - fn new(plugins: HashMap<&'static str, LoadedPlugin>) -> Plugin; + fn new(plugins: HashMap) -> Plugin; } // Implement constructor separately impl PluginConstruct for Plugin { - fn new(plugins: HashMap<&'static str, LoadedPlugin>) -> Plugin { + fn new(plugins: HashMap) -> Plugin { Plugin {} } } diff --git a/server/Cargo.toml b/server/Cargo.toml index d8f78ae..42de47b 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -29,7 +29,7 @@ PebbleVault = "0.6.1" uuid = "1.11.0" nalgebra = "0.33.2" rstar = "0.12.2" -horizon-plugin-api = "0.1.9" +horizon-plugin-api = "0.1.12" # ADD ANY CUSTOM DEPENDENCIES BELOW diff --git a/server/src/server/mod.rs b/server/src/server/mod.rs index 4fcfef7..b47392d 100644 --- a/server/src/server/mod.rs +++ b/server/src/server/mod.rs @@ -98,8 +98,12 @@ struct HorizonThread { impl HorizonThread { fn new() -> Self { - let plugin_manager = plugin_api::PluginManager::new(); + let mut plugin_manager = plugin_api::PluginManager::new(); let plugins = plugin_manager.load_all(); + + plugins.iter().for_each(|(name, plugin)| { + log_info!(LOGGER, "PLUGIN", "Loaded plugin: {}", name); + }); Self { players: Mutex::new(Vec::new()), plugins, From b572d9f7acc5fd2dcc9c37f2aa1c200cf0dad983 Mon Sep 17 00:00:00 2001 From: "Tristan Poland (Trident_For_U)" <34868944+tristanpoland@users.noreply.github.com> Date: Fri, 6 Dec 2024 01:43:10 -0500 Subject: [PATCH 31/41] Update mod.rs --- server/src/server/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/server/mod.rs b/server/src/server/mod.rs index b47392d..9474acf 100644 --- a/server/src/server/mod.rs +++ b/server/src/server/mod.rs @@ -194,7 +194,7 @@ fn on_connect(socket: SocketRef, Data(data): Data) { }; let casted_struct: &unreal_adapter_horizon::Plugin = &plugin.instance; - // unreal_adapter.player_joined(socket, player_arc); + casted_struct.player_joined(socket, player_arc); } //----------------------------------------------------------------------------- From 0c893be3c7c999bb1ed468dba1c212cd4fd7a44a Mon Sep 17 00:00:00 2001 From: "Tristan Poland (Trident_For_U)" <34868944+tristanpoland@users.noreply.github.com> Date: Fri, 6 Dec 2024 01:45:55 -0500 Subject: [PATCH 32/41] updated --- plugins/player_lib/src/lib.rs | 1 + plugins/unreal_adapter_horizon/src/lib.rs | 2 +- server/src/server/mod.rs | 2 -- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/player_lib/src/lib.rs b/plugins/player_lib/src/lib.rs index 40835b0..775cf0a 100644 --- a/plugins/player_lib/src/lib.rs +++ b/plugins/player_lib/src/lib.rs @@ -33,6 +33,7 @@ impl PluginConstruct for Plugin { // Implement the trait for Plugin impl PluginAPI for Plugin { fn player_joined(&self, socket: SocketRef, player: Arc>) { + println!("player_lib"); setup_listeners(socket, player); } } diff --git a/plugins/unreal_adapter_horizon/src/lib.rs b/plugins/unreal_adapter_horizon/src/lib.rs index 0de528e..a254dae 100644 --- a/plugins/unreal_adapter_horizon/src/lib.rs +++ b/plugins/unreal_adapter_horizon/src/lib.rs @@ -35,8 +35,8 @@ impl PluginConstruct for Plugin { // Implement the trait for Plugin impl PluginAPI for Plugin { fn player_joined(&self, socket: SocketRef, player: Arc) { - setup_listeners(socket.clone(), player); println!("Welcome Player {} to Unreal Engine Server!", socket.id.to_string()); + setup_listeners(socket.clone(), player); } } diff --git a/server/src/server/mod.rs b/server/src/server/mod.rs index 9474acf..858ed99 100644 --- a/server/src/server/mod.rs +++ b/server/src/server/mod.rs @@ -182,8 +182,6 @@ fn on_connect(socket: SocketRef, Data(data): Data) { target_thread.add_player(player.clone()); let player_arc: Arc> = Arc::new(parking_lot::RwLock::new(player)); - //let unreal_adapter = plugin_api::get_plugin!(player_lib, target_thread.plugins); - // let unreal_adapter = let thread_plugins = target_thread.plugins.clone(); let plugin = match thread_plugins.get(stringify!(unreal_adapter_horizon)) { Some(plugin) => plugin, From 25ece55fcc1164e75f1a6255c14378cc5df1857d Mon Sep 17 00:00:00 2001 From: "Tristan Poland (Trident_For_U)" <34868944+tristanpoland@users.noreply.github.com> Date: Fri, 6 Dec 2024 01:47:03 -0500 Subject: [PATCH 33/41] Update mod.rs --- server/src/server/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/server/mod.rs b/server/src/server/mod.rs index 858ed99..932e599 100644 --- a/server/src/server/mod.rs +++ b/server/src/server/mod.rs @@ -190,7 +190,7 @@ fn on_connect(socket: SocketRef, Data(data): Data) { return; } }; - let casted_struct: &unreal_adapter_horizon::Plugin = &plugin.instance; + let casted_struct: &unreal_adapter_horizon::Plugin = &plugin.instance as &unreal_adapter_horizon::Plugin; casted_struct.player_joined(socket, player_arc); } From 746d510e6e49a7945c31f9729d4df67ffc8dbd17 Mon Sep 17 00:00:00 2001 From: "Tristan Poland (Trident_For_U)" <34868944+tristanpoland@users.noreply.github.com> Date: Fri, 6 Dec 2024 01:52:14 -0500 Subject: [PATCH 34/41] Update mod.rs --- server/src/server/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/server/mod.rs b/server/src/server/mod.rs index 932e599..07a7be3 100644 --- a/server/src/server/mod.rs +++ b/server/src/server/mod.rs @@ -190,7 +190,7 @@ fn on_connect(socket: SocketRef, Data(data): Data) { return; } }; - let casted_struct: &unreal_adapter_horizon::Plugin = &plugin.instance as &unreal_adapter_horizon::Plugin; + let casted_struct = &plugin.instance; casted_struct.player_joined(socket, player_arc); } From a86653c9e524b2a258f731d9d0c442f4568159ec Mon Sep 17 00:00:00 2001 From: "Tristan Poland (Trident_For_U)" <34868944+tristanpoland@users.noreply.github.com> Date: Fri, 6 Dec 2024 01:54:51 -0500 Subject: [PATCH 35/41] Update mod.rs --- server/src/server/mod.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server/src/server/mod.rs b/server/src/server/mod.rs index 07a7be3..807caec 100644 --- a/server/src/server/mod.rs +++ b/server/src/server/mod.rs @@ -183,8 +183,10 @@ fn on_connect(socket: SocketRef, Data(data): Data) { let player_arc: Arc> = Arc::new(parking_lot::RwLock::new(player)); let thread_plugins = target_thread.plugins.clone(); - let plugin = match thread_plugins.get(stringify!(unreal_adapter_horizon)) { - Some(plugin) => plugin, + let plugin_name = stringify!(unreal_adapter_horizon); + println!("{:?}", plugin_name); + let plugin = match thread_plugins.get(plugin_name) { + Some(plugin) => plugin, None => { log_error!(LOGGER, "PLUGIN", "Plugin unreal_adapter_horizon not found"); return; From c7c8818c5d80d91713c13c08721e7dfce789b93a Mon Sep 17 00:00:00 2001 From: "Tristan Poland (Trident_For_U)" <34868944+tristanpoland@users.noreply.github.com> Date: Fri, 6 Dec 2024 01:58:12 -0500 Subject: [PATCH 36/41] Tweaks --- plugins/unreal_adapter_horizon/Cargo.toml | 2 +- server/Cargo.toml | 2 +- server/src/server/mod.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/unreal_adapter_horizon/Cargo.toml b/plugins/unreal_adapter_horizon/Cargo.toml index cd67a4d..596febc 100644 --- a/plugins/unreal_adapter_horizon/Cargo.toml +++ b/plugins/unreal_adapter_horizon/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" edition = "2021" [dependencies] -horizon-plugin-api = "0.1.11" +horizon-plugin-api = "0.1.13" horizon_data_types = "0.4.0" parking_lot = "0.12.3" socketioxide = "0.15.1" diff --git a/server/Cargo.toml b/server/Cargo.toml index 42de47b..ffe246d 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -29,7 +29,7 @@ PebbleVault = "0.6.1" uuid = "1.11.0" nalgebra = "0.33.2" rstar = "0.12.2" -horizon-plugin-api = "0.1.12" +horizon-plugin-api = "0.1.13" # ADD ANY CUSTOM DEPENDENCIES BELOW diff --git a/server/src/server/mod.rs b/server/src/server/mod.rs index 807caec..4816059 100644 --- a/server/src/server/mod.rs +++ b/server/src/server/mod.rs @@ -184,7 +184,7 @@ fn on_connect(socket: SocketRef, Data(data): Data) { let player_arc: Arc> = Arc::new(parking_lot::RwLock::new(player)); let thread_plugins = target_thread.plugins.clone(); let plugin_name = stringify!(unreal_adapter_horizon); - println!("{:?}", plugin_name); + println!("{:?}", thread_plugins); let plugin = match thread_plugins.get(plugin_name) { Some(plugin) => plugin, None => { From fc780894b1471a0eee1ffc07d9d81e6e78132829 Mon Sep 17 00:00:00 2001 From: "Tristan Poland (Trident_For_U)" <34868944+tristanpoland@users.noreply.github.com> Date: Fri, 6 Dec 2024 01:59:27 -0500 Subject: [PATCH 37/41] Bumped API version for debugging --- plugins/chronos_plugin/Cargo.toml | 2 +- plugins/player_lib/Cargo.toml | 2 +- plugins/stars_beyond/Cargo.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/chronos_plugin/Cargo.toml b/plugins/chronos_plugin/Cargo.toml index cf924c4..c760cdd 100644 --- a/plugins/chronos_plugin/Cargo.toml +++ b/plugins/chronos_plugin/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" edition = "2021" [dependencies] -horizon-plugin-api = "0.1.7" +horizon-plugin-api = "0.1.13" horizon_data_types = "0.4.0" lazy_static = "1.5.0" parking_lot = "0.12.3" diff --git a/plugins/player_lib/Cargo.toml b/plugins/player_lib/Cargo.toml index e62dcc4..567b135 100644 --- a/plugins/player_lib/Cargo.toml +++ b/plugins/player_lib/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" [dependencies] PebbleVault = "0.6.1" -horizon-plugin-api = "0.1.7" +horizon-plugin-api = "0.1.13" horizon_data_types = "0.4.0" socketioxide = "0.15.1" parking_lot = "0.12.3" diff --git a/plugins/stars_beyond/Cargo.toml b/plugins/stars_beyond/Cargo.toml index 7e04e1c..41b8735 100644 --- a/plugins/stars_beyond/Cargo.toml +++ b/plugins/stars_beyond/Cargo.toml @@ -4,6 +4,6 @@ version = "0.1.0" edition = "2021" [dependencies] -horizon-plugin-api = "0.1.7" +horizon-plugin-api = "0.1.13" horizon_data_types = "0.4.0" socketioxide = "0.15.1" From 989102e6b0efcb14be4e499a49a6074e5e1db25c Mon Sep 17 00:00:00 2001 From: "Tristan Poland (Trident_For_U)" <34868944+tristanpoland@users.noreply.github.com> Date: Fri, 6 Dec 2024 02:01:06 -0500 Subject: [PATCH 38/41] Update mod.rs --- server/src/server/mod.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server/src/server/mod.rs b/server/src/server/mod.rs index 4816059..e7f85c0 100644 --- a/server/src/server/mod.rs +++ b/server/src/server/mod.rs @@ -22,7 +22,6 @@ use horizon_data_types::Player; use horizon_logger::{log_critical, log_debug, log_error, log_info, log_warn}; use horizon_plugin_api::LoadedPlugin; use parking_lot::RwLock; -use player_lib::PluginAPI; use plugin_api::{Plugin, Pluginstate}; use socketioxide::{ extract::{AckSender, Data, SocketRef}, @@ -185,7 +184,7 @@ fn on_connect(socket: SocketRef, Data(data): Data) { let thread_plugins = target_thread.plugins.clone(); let plugin_name = stringify!(unreal_adapter_horizon); println!("{:?}", thread_plugins); - let plugin = match thread_plugins.get(plugin_name) { + let plugin = match thread_plugins.get(&plugin_name) { Some(plugin) => plugin, None => { log_error!(LOGGER, "PLUGIN", "Plugin unreal_adapter_horizon not found"); From 3cd910f156db2b9e0b8200368157301c845c0a1e Mon Sep 17 00:00:00 2001 From: "Tristan Poland (Trident_For_U)" <34868944+tristanpoland@users.noreply.github.com> Date: Fri, 6 Dec 2024 02:03:27 -0500 Subject: [PATCH 39/41] Update mod.rs --- server/src/server/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/server/mod.rs b/server/src/server/mod.rs index e7f85c0..0c277fe 100644 --- a/server/src/server/mod.rs +++ b/server/src/server/mod.rs @@ -184,14 +184,14 @@ fn on_connect(socket: SocketRef, Data(data): Data) { let thread_plugins = target_thread.plugins.clone(); let plugin_name = stringify!(unreal_adapter_horizon); println!("{:?}", thread_plugins); - let plugin = match thread_plugins.get(&plugin_name) { + let plugin = match thread_plugins.get(plugin_name) { Some(plugin) => plugin, None => { log_error!(LOGGER, "PLUGIN", "Plugin unreal_adapter_horizon not found"); return; } }; - let casted_struct = &plugin.instance; + let casted_struct: &unreal_adapter_horizon::Plugin = &plugin.instance as &unreal_adapter_horizon::Plugin; casted_struct.player_joined(socket, player_arc); } From e9a14685e0e2ef3c46c84dd174075df774d167bd Mon Sep 17 00:00:00 2001 From: "Tristan Poland (Trident_For_U)" <34868944+tristanpoland@users.noreply.github.com> Date: Fri, 6 Dec 2024 02:12:31 -0500 Subject: [PATCH 40/41] FIXED ITTTTT Co-Authored-By: Nils Kristians Ramps-Rampans <49234603+SafeShows@users.noreply.github.com> --- plugin_api/build.rs | 2 ++ plugin_api/src/plugin_imports.rs | 8 ++++++++ server/src/server/mod.rs | 27 +++++++++++++++------------ 3 files changed, 25 insertions(+), 12 deletions(-) diff --git a/plugin_api/build.rs b/plugin_api/build.rs index 53a8528..2528e45 100644 --- a/plugin_api/build.rs +++ b/plugin_api/build.rs @@ -178,6 +178,8 @@ fn generate_imports_file(plugin_paths: &[(String, String, String)], out_dir: &Pa writeln!(file, "use std::collections::HashMap;\n")?; for (i, (name, _, _)) in plugin_paths.iter().enumerate() { write!(file, "pub use {};\n", name)?; + write!(file, "pub use {}::*;\n", name)?; + write!(file, "pub use {}::Plugin as {}_plugin;\n", name, name)?; } writeln!(file, "\n"); diff --git a/plugin_api/src/plugin_imports.rs b/plugin_api/src/plugin_imports.rs index 2966ea1..01126e4 100644 --- a/plugin_api/src/plugin_imports.rs +++ b/plugin_api/src/plugin_imports.rs @@ -5,9 +5,17 @@ use horizon_plugin_api::{Pluginstate, LoadedPlugin, Plugin}; use std::collections::HashMap; pub use chronos_plugin; +pub use chronos_plugin::*; +pub use chronos_plugin::Plugin as chronos_plugin_plugin; pub use player_lib; +pub use player_lib::*; +pub use player_lib::Plugin as player_lib_plugin; pub use stars_beyond_plugin; +pub use stars_beyond_plugin::*; +pub use stars_beyond_plugin::Plugin as stars_beyond_plugin_plugin; pub use unreal_adapter_horizon; +pub use unreal_adapter_horizon::*; +pub use unreal_adapter_horizon::Plugin as unreal_adapter_horizon_plugin; // Invoke the macro with all discovered plugins diff --git a/server/src/server/mod.rs b/server/src/server/mod.rs index 0c277fe..1d28a78 100644 --- a/server/src/server/mod.rs +++ b/server/src/server/mod.rs @@ -36,6 +36,7 @@ mod event_rep; use lazy_static::lazy_static; use plugin_api::plugin_imports::*; + lazy_static! { static ref SERVER: Server = Server::new().unwrap(); } @@ -180,18 +181,20 @@ fn on_connect(socket: SocketRef, Data(data): Data) { let target_thread = Arc::clone(&threads[threadid]); target_thread.add_player(player.clone()); - let player_arc: Arc> = Arc::new(parking_lot::RwLock::new(player)); - let thread_plugins = target_thread.plugins.clone(); - let plugin_name = stringify!(unreal_adapter_horizon); - println!("{:?}", thread_plugins); - let plugin = match thread_plugins.get(plugin_name) { - Some(plugin) => plugin, - None => { - log_error!(LOGGER, "PLUGIN", "Plugin unreal_adapter_horizon not found"); - return; - } - }; - let casted_struct: &unreal_adapter_horizon::Plugin = &plugin.instance as &unreal_adapter_horizon::Plugin; + let player_arc: Arc = Arc::new(player); +// let thread_plugins = target_thread.plugins.clone(); +// let plugin_name = stringify!(unreal_adapter_horizon); +// println!("{:?}", thread_plugins); +// let plugin = match thread_plugins.get(plugin_name) { +// Some(plugin) => plugin, +// None => { +// log_error!(LOGGER, "PLUGIN", "Plugin unreal_adapter_horizon not found"); +// return; +// } +// }; +// let casted_struct: unreal_adapter_horizon_plugin = plugin.instance as unreal_adapter_horizon_plugin; + + let casted_struct = plugin_api::get_plugin!(unreal_adapter_horizon, target_thread.plugins); casted_struct.player_joined(socket, player_arc); } From 76b8394ccf7212f926935bd7b2db7a63a6ea4a9a Mon Sep 17 00:00:00 2001 From: "Tristan Poland (Trident_For_U)" <34868944+tristanpoland@users.noreply.github.com> Date: Fri, 6 Dec 2024 02:14:34 -0500 Subject: [PATCH 41/41] Update mod.rs Co-Authored-By: Nils Kristians Ramps-Rampans <49234603+SafeShows@users.noreply.github.com> --- server/src/server/mod.rs | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/server/src/server/mod.rs b/server/src/server/mod.rs index 1d28a78..80fef84 100644 --- a/server/src/server/mod.rs +++ b/server/src/server/mod.rs @@ -182,17 +182,6 @@ fn on_connect(socket: SocketRef, Data(data): Data) { target_thread.add_player(player.clone()); let player_arc: Arc = Arc::new(player); -// let thread_plugins = target_thread.plugins.clone(); -// let plugin_name = stringify!(unreal_adapter_horizon); -// println!("{:?}", thread_plugins); -// let plugin = match thread_plugins.get(plugin_name) { -// Some(plugin) => plugin, -// None => { -// log_error!(LOGGER, "PLUGIN", "Plugin unreal_adapter_horizon not found"); -// return; -// } -// }; -// let casted_struct: unreal_adapter_horizon_plugin = plugin.instance as unreal_adapter_horizon_plugin; let casted_struct = plugin_api::get_plugin!(unreal_adapter_horizon, target_thread.plugins);