about summary refs log tree commit diff
diff options
context:
space:
mode:
authorgennyble <gen@nyble.dev>2025-02-16 10:17:28 -0600
committergennyble <gen@nyble.dev>2025-02-16 10:17:28 -0600
commit0c5986851dee23e09751ae594d8a43a84a0dab61 (patch)
treeed27d132aa04b86ecabd9cf5bb440b7d87f7bff3
parente1b51d7dfc24c443af34410da2fed6aa6db52b62 (diff)
downloadawake-0c5986851dee23e09751ae594d8a43a84a0dab61.tar.gz
awake-0c5986851dee23e09751ae594d8a43a84a0dab61.zip
Network stats
-rwxr-xr-x.DS_Storebin6148 -> 0 bytes
-rw-r--r--[-rwxr-xr-x]Cargo.lock645
-rwxr-xr-xCargo.toml6
-rwxr-xr-xdev.conf4
-rw-r--r--src/db.rs191
-rw-r--r--src/gatherer.rs228
-rw-r--r--src/griph/mod.rs98
-rwxr-xr-xsrc/main.rs113
8 files changed, 1004 insertions, 281 deletions
diff --git a/.DS_Store b/.DS_Store
deleted file mode 100755
index 813a890..0000000
--- a/.DS_Store
+++ /dev/null
Binary files differdiff --git a/Cargo.lock b/Cargo.lock
index a34a6f4..7b23bfa 100755..100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1,12 +1,12 @@
 # This file is automatically @generated by Cargo.
 # It is not intended for manual editing.
-version = 3
+version = 4
 
 [[package]]
 name = "addr2line"
-version = "0.24.1"
+version = "0.24.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f5fb1d8e4442bd405fdfd1dacb42792696b0cf9cb15882e5d097b742a676d375"
+checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1"
 dependencies = [
  "gimli",
 ]
@@ -28,9 +28,9 @@ dependencies = [
 
 [[package]]
 name = "async-trait"
-version = "0.1.82"
+version = "0.1.86"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a27b8a3a6e1a44fa4c8baf1f653e4172e81486d4941f2237e20dc2d0cf4ddff1"
+checksum = "644dd749086bf3771a2fbc5f256fdb982d53f011c7d5d560304eafeecebce79d"
 dependencies = [
  "proc-macro2",
  "quote",
@@ -39,9 +39,9 @@ dependencies = [
 
 [[package]]
 name = "autocfg"
-version = "1.3.0"
+version = "1.4.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0"
+checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
 
 [[package]]
 name = "awake"
@@ -52,7 +52,9 @@ dependencies = [
  "camino",
  "confindent",
  "cutie",
+ "gifed",
  "rand",
+ "regex-lite",
  "rusqlite",
  "serde",
  "sha2",
@@ -67,9 +69,9 @@ dependencies = [
 
 [[package]]
 name = "axum"
-version = "0.7.5"
+version = "0.7.9"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3a6c9af12842a67734c9a2e355436e5d03b22383ed60cf13cd0c18fbfe3dcbcf"
+checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f"
 dependencies = [
  "async-trait",
  "axum-core",
@@ -91,7 +93,7 @@ dependencies = [
  "serde_json",
  "serde_path_to_error",
  "serde_urlencoded",
- "sync_wrapper 1.0.1",
+ "sync_wrapper",
  "tokio",
  "tower",
  "tower-layer",
@@ -101,9 +103,9 @@ dependencies = [
 
 [[package]]
 name = "axum-core"
-version = "0.4.3"
+version = "0.4.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3"
+checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199"
 dependencies = [
  "async-trait",
  "bytes",
@@ -114,7 +116,7 @@ dependencies = [
  "mime",
  "pin-project-lite",
  "rustversion",
- "sync_wrapper 0.1.2",
+ "sync_wrapper",
  "tower-layer",
  "tower-service",
  "tracing",
@@ -142,9 +144,21 @@ source = "git+https://github.com/gennyble/bempline#8b9d3030366dbb1c6909cfbf438ea
 
 [[package]]
 name = "bitflags"
-version = "2.6.0"
+version = "2.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36"
+
+[[package]]
+name = "bitvec"
+version = "1.0.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de"
+checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c"
+dependencies = [
+ "funty",
+ "radium",
+ "tap",
+ "wyz",
+]
 
 [[package]]
 name = "block-buffer"
@@ -156,6 +170,12 @@ dependencies = [
 ]
 
 [[package]]
+name = "bytemuck"
+version = "1.21.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ef657dfab802224e671f5818e9a4935f9b1957ed18e58292690cc39e7a4092a3"
+
+[[package]]
 name = "byteorder"
 version = "1.5.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -163,9 +183,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
 
 [[package]]
 name = "bytes"
-version = "1.7.1"
+version = "1.10.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50"
+checksum = "f61dac84819c6588b558454b194026eb1f09c293b9036ae9b159e74e73ab6cf9"
 
 [[package]]
 name = "camino"
@@ -175,9 +195,9 @@ checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3"
 
 [[package]]
 name = "cc"
-version = "1.1.31"
+version = "1.2.14"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f"
+checksum = "0c3d1b2e905a3a7b00a6141adb0e4c0bb941d11caf55349d863942a1cc44e3c9"
 dependencies = [
  "shlex",
 ]
@@ -189,15 +209,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
 
 [[package]]
+name = "color_quant"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b"
+
+[[package]]
 name = "confindent"
 version = "3.0.0"
 source = "git+https://github.com/gennyble/confindent?branch=v3.0-writing#cbb0aa4bc55c346f33e41f979e72cd3a95518a75"
 
 [[package]]
 name = "cpufeatures"
-version = "0.2.14"
+version = "0.2.17"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0"
+checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280"
 dependencies = [
  "libc",
 ]
@@ -240,6 +266,17 @@ dependencies = [
 ]
 
 [[package]]
+name = "displaydoc"
+version = "0.2.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
 name = "fallible-iterator"
 version = "0.3.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -273,37 +310,43 @@ dependencies = [
 ]
 
 [[package]]
+name = "funty"
+version = "2.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c"
+
+[[package]]
 name = "futures-channel"
-version = "0.3.30"
+version = "0.3.31"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78"
+checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10"
 dependencies = [
  "futures-core",
 ]
 
 [[package]]
 name = "futures-core"
-version = "0.3.30"
+version = "0.3.31"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d"
+checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e"
 
 [[package]]
 name = "futures-sink"
-version = "0.3.30"
+version = "0.3.31"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5"
+checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7"
 
 [[package]]
 name = "futures-task"
-version = "0.3.30"
+version = "0.3.31"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004"
+checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988"
 
 [[package]]
 name = "futures-util"
-version = "0.3.30"
+version = "0.3.31"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48"
+checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81"
 dependencies = [
  "futures-core",
  "futures-task",
@@ -333,10 +376,21 @@ dependencies = [
 ]
 
 [[package]]
+name = "gifed"
+version = "0.3.0"
+source = "git+https://git.nyble.dev/multimedia/gifed/#772c717d00b28a64bd29f7440a90972b82d538a7"
+dependencies = [
+ "bitvec",
+ "color_quant",
+ "rgb",
+ "weezl",
+]
+
+[[package]]
 name = "gimli"
-version = "0.31.0"
+version = "0.31.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "32085ea23f3234fc7846555e85283ba4de91e21016dc0455a16286d87a292d64"
+checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f"
 
 [[package]]
 name = "hashbrown"
@@ -363,16 +417,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
 
 [[package]]
-name = "hermit-abi"
-version = "0.3.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024"
-
-[[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",
@@ -404,9 +452,9 @@ dependencies = [
 
 [[package]]
 name = "httparse"
-version = "1.9.4"
+version = "1.10.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9"
+checksum = "f2d708df4e7140240a16cd6ab0ab65c972d7433ab77819ea693fde9c43811e2a"
 
 [[package]]
 name = "httpdate"
@@ -416,9 +464,9 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9"
 
 [[package]]
 name = "hyper"
-version = "1.4.1"
+version = "1.6.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05"
+checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80"
 dependencies = [
  "bytes",
  "futures-channel",
@@ -435,9 +483,9 @@ dependencies = [
 
 [[package]]
 name = "hyper-util"
-version = "0.1.8"
+version = "0.1.10"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "da62f120a8a37763efb0cf8fdf264b884c7b8b9ac8660b900c8661030c00e6ba"
+checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4"
 dependencies = [
  "bytes",
  "futures-util",
@@ -446,23 +494,153 @@ dependencies = [
  "hyper",
  "pin-project-lite",
  "tokio",
+ "tower-service",
+]
+
+[[package]]
+name = "icu_collections"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526"
+dependencies = [
+ "displaydoc",
+ "yoke",
+ "zerofrom",
+ "zerovec",
+]
+
+[[package]]
+name = "icu_locid"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637"
+dependencies = [
+ "displaydoc",
+ "litemap",
+ "tinystr",
+ "writeable",
+ "zerovec",
+]
+
+[[package]]
+name = "icu_locid_transform"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e"
+dependencies = [
+ "displaydoc",
+ "icu_locid",
+ "icu_locid_transform_data",
+ "icu_provider",
+ "tinystr",
+ "zerovec",
+]
+
+[[package]]
+name = "icu_locid_transform_data"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e"
+
+[[package]]
+name = "icu_normalizer"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f"
+dependencies = [
+ "displaydoc",
+ "icu_collections",
+ "icu_normalizer_data",
+ "icu_properties",
+ "icu_provider",
+ "smallvec",
+ "utf16_iter",
+ "utf8_iter",
+ "write16",
+ "zerovec",
+]
+
+[[package]]
+name = "icu_normalizer_data"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516"
+
+[[package]]
+name = "icu_properties"
+version = "1.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5"
+dependencies = [
+ "displaydoc",
+ "icu_collections",
+ "icu_locid_transform",
+ "icu_properties_data",
+ "icu_provider",
+ "tinystr",
+ "zerovec",
+]
+
+[[package]]
+name = "icu_properties_data"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569"
+
+[[package]]
+name = "icu_provider"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9"
+dependencies = [
+ "displaydoc",
+ "icu_locid",
+ "icu_provider_macros",
+ "stable_deref_trait",
+ "tinystr",
+ "writeable",
+ "yoke",
+ "zerofrom",
+ "zerovec",
+]
+
+[[package]]
+name = "icu_provider_macros"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
 ]
 
 [[package]]
 name = "idna"
-version = "0.5.0"
+version = "1.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e"
+dependencies = [
+ "idna_adapter",
+ "smallvec",
+ "utf8_iter",
+]
+
+[[package]]
+name = "idna_adapter"
+version = "1.2.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6"
+checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71"
 dependencies = [
- "unicode-bidi",
- "unicode-normalization",
+ "icu_normalizer",
+ "icu_properties",
 ]
 
 [[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 = "lazy_static"
@@ -472,9 +650,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
 
 [[package]]
 name = "libc"
-version = "0.2.158"
+version = "0.2.169"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439"
+checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a"
 
 [[package]]
 name = "libsqlite3-sys"
@@ -488,6 +666,12 @@ dependencies = [
 ]
 
 [[package]]
+name = "litemap"
+version = "0.7.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104"
+
+[[package]]
 name = "lock_api"
 version = "0.4.12"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -499,9 +683,9 @@ dependencies = [
 
 [[package]]
 name = "log"
-version = "0.4.22"
+version = "0.4.25"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"
+checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f"
 
 [[package]]
 name = "matchers"
@@ -532,20 +716,19 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
 
 [[package]]
 name = "miniz_oxide"
-version = "0.8.0"
+version = "0.8.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1"
+checksum = "b3b1c9bd4fe1f0f8b387f6eb9eb3b4a1aa26185e5750efb9140301703f62cd1b"
 dependencies = [
  "adler2",
 ]
 
 [[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",
  "wasi",
  "windows-sys",
@@ -578,18 +761,18 @@ dependencies = [
 
 [[package]]
 name = "object"
-version = "0.36.4"
+version = "0.36.7"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a"
+checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87"
 dependencies = [
  "memchr",
 ]
 
 [[package]]
 name = "once_cell"
-version = "1.19.0"
+version = "1.20.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92"
+checksum = "945462a4b81e43c4e3ba96bd7b49d834c6f61198356aa858733bc4acf3cbe62e"
 
 [[package]]
 name = "overload"
@@ -627,30 +810,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
 
 [[package]]
-name = "pin-project"
-version = "1.1.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3"
-dependencies = [
- "pin-project-internal",
-]
-
-[[package]]
-name = "pin-project-internal"
-version = "1.1.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn",
-]
-
-[[package]]
 name = "pin-project-lite"
-version = "0.2.14"
+version = "0.2.16"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02"
+checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b"
 
 [[package]]
 name = "pin-utils"
@@ -681,23 +844,29 @@ dependencies = [
 
 [[package]]
 name = "proc-macro2"
-version = "1.0.86"
+version = "1.0.93"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77"
+checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99"
 dependencies = [
  "unicode-ident",
 ]
 
 [[package]]
 name = "quote"
-version = "1.0.37"
+version = "1.0.38"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"
+checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc"
 dependencies = [
  "proc-macro2",
 ]
 
 [[package]]
+name = "radium"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09"
+
+[[package]]
 name = "rand"
 version = "0.8.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -729,23 +898,23 @@ dependencies = [
 
 [[package]]
 name = "redox_syscall"
-version = "0.5.3"
+version = "0.5.8"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4"
+checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834"
 dependencies = [
  "bitflags",
 ]
 
 [[package]]
 name = "regex"
-version = "1.10.6"
+version = "1.11.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619"
+checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191"
 dependencies = [
  "aho-corasick",
  "memchr",
- "regex-automata 0.4.7",
- "regex-syntax 0.8.4",
+ "regex-automata 0.4.9",
+ "regex-syntax 0.8.5",
 ]
 
 [[package]]
@@ -759,16 +928,22 @@ dependencies = [
 
 [[package]]
 name = "regex-automata"
-version = "0.4.7"
+version = "0.4.9"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df"
+checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908"
 dependencies = [
  "aho-corasick",
  "memchr",
- "regex-syntax 0.8.4",
+ "regex-syntax 0.8.5",
 ]
 
 [[package]]
+name = "regex-lite"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "53a49587ad06b26609c52e423de037e7f57f20d53535d66e08c695f347df952a"
+
+[[package]]
 name = "regex-syntax"
 version = "0.6.29"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -776,9 +951,18 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1"
 
 [[package]]
 name = "regex-syntax"
-version = "0.8.4"
+version = "0.8.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
+
+[[package]]
+name = "rgb"
+version = "0.8.50"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b"
+checksum = "57397d16646700483b67d2dd6511d79318f9d057fdbd21a4066aeac8b41d310a"
+dependencies = [
+ "bytemuck",
+]
 
 [[package]]
 name = "rusqlite"
@@ -803,15 +987,15 @@ checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f"
 
 [[package]]
 name = "rustversion"
-version = "1.0.17"
+version = "1.0.19"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6"
+checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4"
 
 [[package]]
 name = "ryu"
-version = "1.0.18"
+version = "1.0.19"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f"
+checksum = "6ea1a2d0a644769cc99faa24c3ad26b379b786fe7c36fd3c546254801650e6dd"
 
 [[package]]
 name = "scopeguard"
@@ -841,9 +1025,9 @@ dependencies = [
 
 [[package]]
 name = "serde_json"
-version = "1.0.128"
+version = "1.0.138"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8"
+checksum = "d434192e7da787e94a6ea7e9670b26a036d0ca41e0b7efb2676dd32bae872949"
 dependencies = [
  "itoa",
  "memchr",
@@ -910,24 +1094,24 @@ dependencies = [
 
 [[package]]
 name = "smallvec"
-version = "1.13.2"
+version = "1.14.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67"
+checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd"
 
 [[package]]
 name = "snafu"
-version = "0.8.4"
+version = "0.8.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2b835cb902660db3415a672d862905e791e54d306c6e8189168c7f3d9ae1c79d"
+checksum = "223891c85e2a29c3fe8fb900c1fae5e69c2e42415e3177752e8718475efa5019"
 dependencies = [
  "snafu-derive",
 ]
 
 [[package]]
 name = "snafu-derive"
-version = "0.8.4"
+version = "0.8.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "38d1e02fca405f6280643174a50c942219f0bbf4dbf7d480f1dd864d6f211ae5"
+checksum = "03c3c6b7927ffe7ecaa769ee0e3994da3b8cafc8f444578982c83ecb161af917"
 dependencies = [
  "heck",
  "proc-macro2",
@@ -937,19 +1121,25 @@ dependencies = [
 
 [[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",
 ]
 
 [[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"
+version = "2.0.98"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d"
+checksum = "36147f1a48ae0ec2b5b3bc5b537d267457555a10dc06f3dbc8cb11ba3006d3b1"
 dependencies = [
  "proc-macro2",
  "quote",
@@ -958,30 +1148,41 @@ dependencies = [
 
 [[package]]
 name = "sync_wrapper"
-version = "0.1.2"
+version = "1.0.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160"
+checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263"
 
 [[package]]
-name = "sync_wrapper"
+name = "synstructure"
+version = "0.13.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "tap"
 version = "1.0.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394"
+checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369"
 
 [[package]]
 name = "thiserror"
-version = "1.0.63"
+version = "1.0.69"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724"
+checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
 dependencies = [
  "thiserror-impl",
 ]
 
 [[package]]
 name = "thiserror-impl"
-version = "1.0.63"
+version = "1.0.69"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261"
+checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
 dependencies = [
  "proc-macro2",
  "quote",
@@ -1000,9 +1201,9 @@ dependencies = [
 
 [[package]]
 name = "time"
-version = "0.3.36"
+version = "0.3.37"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885"
+checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21"
 dependencies = [
  "deranged",
  "itoa",
@@ -1023,34 +1224,29 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"
 
 [[package]]
 name = "time-macros"
-version = "0.2.18"
+version = "0.2.19"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf"
+checksum = "2834e6017e3e5e4b9834939793b282bc03b37a3336245fa820e35e233e2a85de"
 dependencies = [
  "num-conv",
  "time-core",
 ]
 
 [[package]]
-name = "tinyvec"
-version = "1.8.0"
+name = "tinystr"
+version = "0.7.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938"
+checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f"
 dependencies = [
- "tinyvec_macros",
+ "displaydoc",
+ "zerovec",
 ]
 
 [[package]]
-name = "tinyvec_macros"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
-
-[[package]]
 name = "tokio"
-version = "1.40.0"
+version = "1.43.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998"
+checksum = "3d61fa4ffa3de412bfea335c6ecff681de2b609ba3c77ef3e00e521813a9ed9e"
 dependencies = [
  "backtrace",
  "bytes",
@@ -1066,9 +1262,9 @@ dependencies = [
 
 [[package]]
 name = "tokio-macros"
-version = "2.4.0"
+version = "2.5.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752"
+checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8"
 dependencies = [
  "proc-macro2",
  "quote",
@@ -1077,9 +1273,9 @@ dependencies = [
 
 [[package]]
 name = "tokio-util"
-version = "0.7.12"
+version = "0.7.13"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a"
+checksum = "d7fcaa8d55a2bdd6b83ace262b016eca0d79ee02818c5c1bcdf0305114081078"
 dependencies = [
  "bytes",
  "futures-core",
@@ -1090,14 +1286,14 @@ dependencies = [
 
 [[package]]
 name = "tower"
-version = "0.4.13"
+version = "0.5.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c"
+checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9"
 dependencies = [
  "futures-core",
  "futures-util",
- "pin-project",
  "pin-project-lite",
+ "sync_wrapper",
  "tokio",
  "tower-layer",
  "tower-service",
@@ -1118,9 +1314,9 @@ 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",
@@ -1130,9 +1326,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",
@@ -1141,9 +1337,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",
@@ -1162,9 +1358,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",
@@ -1185,31 +1381,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
 
 [[package]]
-name = "unicode-bidi"
-version = "0.3.15"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75"
-
-[[package]]
 name = "unicode-ident"
-version = "1.0.12"
+version = "1.0.16"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
-
-[[package]]
-name = "unicode-normalization"
-version = "0.1.23"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5"
-dependencies = [
- "tinyvec",
-]
+checksum = "a210d160f08b701c8721ba1c726c11662f877ea6b7094007e1ca9a1041945034"
 
 [[package]]
 name = "url"
-version = "2.5.2"
+version = "2.5.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c"
+checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60"
 dependencies = [
  "form_urlencoded",
  "idna",
@@ -1217,10 +1398,22 @@ dependencies = [
 ]
 
 [[package]]
+name = "utf16_iter"
+version = "1.0.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246"
+
+[[package]]
+name = "utf8_iter"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be"
+
+[[package]]
 name = "valuable"
-version = "0.1.0"
+version = "0.1.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d"
+checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65"
 
 [[package]]
 name = "vcpkg"
@@ -1241,6 +1434,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
 
 [[package]]
+name = "weezl"
+version = "0.1.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082"
+
+[[package]]
 name = "winapi"
 version = "0.3.9"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1336,6 +1535,51 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
 
 [[package]]
+name = "write16"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936"
+
+[[package]]
+name = "writeable"
+version = "0.5.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51"
+
+[[package]]
+name = "wyz"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed"
+dependencies = [
+ "tap",
+]
+
+[[package]]
+name = "yoke"
+version = "0.7.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40"
+dependencies = [
+ "serde",
+ "stable_deref_trait",
+ "yoke-derive",
+ "zerofrom",
+]
+
+[[package]]
+name = "yoke-derive"
+version = "0.7.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+ "synstructure",
+]
+
+[[package]]
 name = "zerocopy"
 version = "0.7.35"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1355,3 +1599,46 @@ dependencies = [
  "quote",
  "syn",
 ]
+
+[[package]]
+name = "zerofrom"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e"
+dependencies = [
+ "zerofrom-derive",
+]
+
+[[package]]
+name = "zerofrom-derive"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+ "synstructure",
+]
+
+[[package]]
+name = "zerovec"
+version = "0.10.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079"
+dependencies = [
+ "yoke",
+ "zerofrom",
+ "zerovec-derive",
+]
+
+[[package]]
+name = "zerovec-derive"
+version = "0.10.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
diff --git a/Cargo.toml b/Cargo.toml
index 173a739..6d42f9f 100755
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -15,7 +15,7 @@ tokio-util = { version = "0.7.10", features = ["io"] }
 confindent = { git = "https://github.com/gennyble/confindent", branch = "v3.0-writing", features = [
 	"macros",
 ] }
-cutie = { git ="https://git.nyble.dev/cutie" }
+cutie = { git = "https://git.nyble.dev/cutie" }
 tracing = "0.1.40"
 tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
 time = { version = "0.3.36", features = [
@@ -28,6 +28,10 @@ sha2 = "0.10.8"
 url = "2.5.0"
 rusqlite = { version = "0.33.0", features = ["bundled", "time"] }
 serde = { version = "1.0.217", features = ["derive"] }
+gifed = { git = "https://git.nyble.dev/multimedia/gifed/", features = [
+	"standard",
+] }
+regex-lite = "0.1.6"
 
 # for generating Atom URNs
 [dependencies.rand]
diff --git a/dev.conf b/dev.conf
index 2e1e952..f80353f 100755
--- a/dev.conf
+++ b/dev.conf
@@ -1,4 +1,6 @@
-Webroot /home/gen/src/inf/served
+Webroot /Users/gen/src/inf/served
 Templates ../templates
 Hostname dreamy.place
+
 Database database.sqlite
+Cache cache
diff --git a/src/db.rs b/src/db.rs
index d4038cb..6edeba1 100644
--- a/src/db.rs
+++ b/src/db.rs
@@ -4,44 +4,127 @@ use camino::Utf8PathBuf;
 use rusqlite::{params, Connection, OptionalExtension};
 use time::OffsetDateTime;
 
-use crate::Meminfo;
+use crate::gatherer::Meminfo;
 
-
-pub struct Database{ 
-    db_path: Utf8PathBuf,
-    conn: Mutex<Connection>
+pub struct Database {
+	db_path: Utf8PathBuf,
+	conn: Mutex<Connection>,
 }
 
 impl Database {
-    pub fn new(db_path: Utf8PathBuf) -> Self {
-        Self {
-            conn:Mutex::new(Connection::open(&db_path).unwrap()),
-            db_path,
-        }
-    }
-
-    pub fn create_tables(&self) {
-        let conn = self.conn.lock().unwrap();
-        conn.execute(CREATE_TABLE_HOSTMEM, params![]).unwrap();
-    }
-
-    pub fn insert_host_meminfo(&self, meminfo: Meminfo) {
-        let conn = self.conn.lock().unwrap();
-
-        conn.execute("INSERT INTO stats_hostmem(total_kb, available_kb) VALUES (?1, ?2)", params![meminfo.total, meminfo.avaialable]).unwrap();
-    }
-
-    pub fn get_last_host_meminfo(&self) -> DbMeminfo {
-        let conn = self.conn.lock().unwrap();
-
-        conn.query_row("SELECT * FROM stats_hostmem ORDER BY stamp DESC LIMIT 1", [], |row| {
-            let (stamp, total_kb, available_kb) = row.try_into().unwrap();
-
-            Ok(DbMeminfo {
-                stamp, total_kb, available_kb
-            })
-        }).optional().unwrap().unwrap()
-    }
+	pub fn new(db_path: Utf8PathBuf) -> Self {
+		Self {
+			conn: Mutex::new(Connection::open(&db_path).unwrap()),
+			db_path,
+		}
+	}
+
+	pub fn create_tables(&self) {
+		let conn = self.conn.lock().unwrap();
+		conn.execute(CREATE_TABLE_HOSTMEM, params![]).unwrap();
+		conn.execute(CREATE_TABLE_HOSTNET, params![]).unwrap();
+	}
+
+	pub fn insert_host_meminfo(&self, meminfo: Meminfo) {
+		let conn = self.conn.lock().unwrap();
+
+		conn.execute(
+			"INSERT INTO stats_hostmem(total_kb, available_kb) VALUES (?1, ?2)",
+			params![meminfo.total, meminfo.avaialable],
+		)
+		.unwrap();
+	}
+
+	pub fn get_last_host_meminfo(&self) -> DbMeminfo {
+		let conn = self.conn.lock().unwrap();
+
+		conn.query_row(
+			"SELECT * FROM stats_hostmem ORDER BY stamp DESC LIMIT 1",
+			[],
+			|row| {
+				let (stamp, total_kb, available_kb) = row.try_into().unwrap();
+
+				Ok(DbMeminfo {
+					stamp,
+					total_kb,
+					available_kb,
+				})
+			},
+		)
+		.optional()
+		.unwrap()
+		.unwrap()
+	}
+
+	pub fn get_last_n_host_meminfo(&self, count: usize) -> Vec<DbMeminfo> {
+		let conn = self.conn.lock().unwrap();
+		let mut stmt = conn
+			.prepare("SELECT * FROM stats_hostmem ORDER BY stamp ASC LIMIT ?1")
+			.unwrap();
+
+		stmt.query_map(params![count], |row| {
+			Ok(DbMeminfo {
+				stamp: row.get(0)?,
+				total_kb: row.get(1)?,
+				available_kb: row.get(2)?,
+			})
+		})
+		.unwrap()
+		.map(|r| r.unwrap())
+		.collect()
+	}
+
+	pub fn get_date_bound_n_host_meminfo(
+		&self,
+		since: OffsetDateTime,
+		until: OffsetDateTime,
+		count: usize,
+	) -> Vec<DbMeminfo> {
+		let conn = self.conn.lock().unwrap();
+		let mut stmt = conn
+			.prepare("SELECT * FROM stats_hostmem WHERE stamp > ?1 AND stamp < ?2 ORDER BY stamp ASC LIMIT ?3")
+			.unwrap();
+
+		stmt.query_map(params![since, until, count], |row| {
+			Ok(DbMeminfo {
+				stamp: row.get(0)?,
+				total_kb: row.get(1)?,
+				available_kb: row.get(2)?,
+			})
+		})
+		.unwrap()
+		.map(|r| r.unwrap())
+		.collect()
+	}
+
+	pub fn insert_hostnet(&self, span_sec: usize, rx_delta: usize, tx_delta: usize) {
+		let conn = self.conn.lock().unwrap();
+
+		conn.execute(
+			"INSERT INTO stats_hostnet(span_sec, rx_delta, tx_delta) VALUES (?1, ?2, ?3)",
+			params![span_sec, rx_delta, tx_delta],
+		)
+		.unwrap();
+	}
+
+	pub fn get_last_n_hostnet(&self, count: usize) -> Vec<DbNetinfo> {
+		let conn = self.conn.lock().unwrap();
+		let mut stmt = conn
+			.prepare("SELECT * FROM stats_hostnet ORDER BY stamp ASC LIMIT ?1")
+			.unwrap();
+
+		stmt.query_map(params![count], |row| {
+			Ok(DbNetinfo {
+				stamp: row.get(0)?,
+				span_sec: row.get(1)?,
+				rx_delta: row.get(2)?,
+				tx_delta: row.get(3)?,
+			})
+		})
+		.unwrap()
+		.map(|r| r.unwrap())
+		.collect()
+	}
 }
 
 pub const CREATE_TABLE_HOSTMEM: &'static str = "\
@@ -51,14 +134,40 @@ pub const CREATE_TABLE_HOSTMEM: &'static str = "\
         available_kb INTEGER NOT NULL
     );";
 
+pub const CREATE_TABLE_HOSTNET: &'static str = "\
+    CREATE TABLE IF NOT EXISTS stats_hostnet(
+        stamp TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
+        span_sec INTEGER NOT NULL,
+        rx_delta INTEGER NOT NULL,
+        tx_delta INTEGER NOT NULL
+    );";
+
 pub struct DbMeminfo {
-    pub stamp: OffsetDateTime,
-    pub total_kb: usize,
-    pub available_kb: usize
+	pub stamp: OffsetDateTime,
+	pub total_kb: usize,
+	pub available_kb: usize,
 }
 
 impl DbMeminfo {
-    pub fn usage(&self) -> usize {
-        self.total_kb - self.available_kb
-    }
-}
\ No newline at end of file
+	pub fn usage(&self) -> usize {
+		self.total_kb - self.available_kb
+	}
+}
+
+#[derive(Copy, Clone, Debug)]
+pub struct DbNetinfo {
+	pub stamp: OffsetDateTime,
+	pub span_sec: usize,
+	pub rx_delta: usize,
+	pub tx_delta: usize,
+}
+
+impl DbNetinfo {
+	pub fn rx_bytes_per_sec(&self) -> f32 {
+		self.rx_delta as f32 / self.span_sec as f32
+	}
+
+	pub fn tx_bytes_per_sec(&self) -> f32 {
+		self.tx_delta as f32 / self.span_sec as f32
+	}
+}
diff --git a/src/gatherer.rs b/src/gatherer.rs
new file mode 100644
index 0000000..0cceea6
--- /dev/null
+++ b/src/gatherer.rs
@@ -0,0 +1,228 @@
+use std::{
+	fs::File,
+	io::{BufRead, BufReader},
+	sync::mpsc::Sender,
+	thread::JoinHandle,
+	time::Duration,
+};
+
+use regex_lite::Regex;
+use time::OffsetDateTime;
+
+use crate::{griph, AwakeState};
+
+pub struct Gatherer {
+	state: AwakeState,
+	hwnd: Option<JoinHandle<()>>,
+}
+
+impl Gatherer {
+	pub fn new(state: AwakeState) -> Self {
+		Self { state, hwnd: None }
+	}
+
+	pub fn start(&mut self) {
+		let state = self.state.clone();
+		let hwnd = std::thread::spawn(|| task(state));
+		self.hwnd = Some(hwnd);
+	}
+}
+
+fn task(state: AwakeState) {
+	tracing::info!("starting gatherer thread");
+
+	// I just want a graph on first boot; don't care about divisions just yet
+	make_mem_graph(&state);
+	make_net_graph(&state);
+
+	let mut last_netinfo: Option<Netinfo> = None;
+
+	// this is a `let _` because otherwise the attribute was
+	// making the comiler mad
+	#[rustfmt::skip]
+	let _ = loop {
+		tracing::debug!("collecting stats");
+
+		// Gather data
+		let meminfo = Meminfo::current();
+		let netinfo = Netinfo::current();
+
+		// Print traces, y'know, for tracing
+		tracing::trace!("memory: {}MB used / {}MB total", meminfo.usage() / 1000, meminfo.total / 1000);
+		tracing::trace!("net: rx {} / tx {}", data_human_fmt(netinfo.rx_bytes), data_human_fmt(netinfo.tx_bytes));
+
+		if let Some(lni) = last_netinfo {
+			let rx_delta = netinfo.rx_bytes - lni.rx_bytes;
+			let tx_delta = netinfo.tx_bytes - lni.tx_bytes;
+
+			state.database.insert_hostnet(60, rx_delta, tx_delta);
+		}
+		last_netinfo = Some(netinfo);
+
+		// Store stats in database
+		state.database.insert_host_meminfo(meminfo);
+
+		// Only generate graphs every 15 minutes
+		let now = OffsetDateTime::now_utc();
+		if now.minute() % 15 == 0 {
+			make_mem_graph(&state);
+			make_net_graph(&state);
+		}
+
+		std::thread::sleep(Duration::from_secs(60));
+	};
+}
+
+pub fn make_mem_graph(state: &AwakeState) {
+	tracing::debug!("generating meminfo graph");
+
+	let infos = state.database.get_last_n_host_meminfo(256);
+	let max = infos[0].total_kb;
+	let usages: Vec<usize> = infos.into_iter().map(|mi| mi.usage()).collect();
+
+	let gif = griph::make_1line(0, max, &usages);
+
+	let path = state.cache_path.join("current_hostmeminfo.gif");
+	gif.save(path).unwrap();
+}
+
+pub fn make_net_graph(state: &AwakeState) {
+	tracing::debug!("generating netinfo graph");
+
+	let infos = state.database.get_last_n_hostnet(256);
+	let rx_deltas: Vec<usize> = infos
+		.iter()
+		.map(|ni| ni.rx_bytes_per_sec() as usize / 1000)
+		.collect();
+	let tx_deltas: Vec<usize> = infos
+		.iter()
+		.map(|ni| ni.tx_bytes_per_sec() as usize / 1000)
+		.collect();
+
+	for ahh in &tx_deltas {
+		tracing::trace!("ahh: {ahh} kbytes");
+	}
+
+	let gif = griph::make_2line(0, 1000, &rx_deltas, &tx_deltas);
+
+	let path = state.cache_path.join("current_hostnetinfo.gif");
+	gif.save(path).unwrap();
+}
+
+pub struct Meminfo {
+	pub total: usize,
+	pub free: usize,
+	pub avaialable: usize,
+}
+
+impl Meminfo {
+	pub fn current() -> Self {
+		let procinfo = File::open("/proc/meminfo").unwrap();
+		let bread = BufReader::new(procinfo);
+
+		let mut meminfo = Meminfo {
+			total: 0,
+			free: 0,
+			avaialable: 0,
+		};
+
+		for line in bread.lines() {
+			let line = line.unwrap();
+
+			if let Some((raw_key, raw_value_kb)) = line.split_once(':') {
+				let value = if let Some(raw_value) = raw_value_kb.trim().strip_suffix(" kB") {
+					if let Ok(parsed) = raw_value.parse() {
+						parsed
+					} else {
+						continue;
+					}
+				} else {
+					continue;
+				};
+
+				match raw_key.trim() {
+					"MemTotal" => meminfo.total = value,
+					"MemFree" => meminfo.free = value,
+					"MemAvailable" => meminfo.avaialable = value,
+					_ => (),
+				}
+			}
+		}
+
+		meminfo
+	}
+
+	pub fn usage(&self) -> usize {
+		self.total - self.avaialable
+	}
+}
+
+pub struct Netinfo {
+	rx_bytes: usize,
+	tx_bytes: usize,
+}
+
+impl Netinfo {
+	pub fn current() -> Self {
+		let procinfo = File::open("/proc/net/dev").unwrap();
+		let bread = BufReader::new(procinfo);
+
+		let mut netinfo = Self {
+			rx_bytes: 0,
+			tx_bytes: 0,
+		};
+
+		let re = Regex::new(r"[ ]*(\d+)").unwrap();
+		let interface = "eth0:";
+		for line in bread.lines() {
+			let line = line.unwrap();
+			let trim = line.trim();
+
+			let mut captures = if let Some(data) = trim.strip_prefix(interface) {
+				re.captures_iter(data)
+			} else {
+				continue;
+			};
+
+			netinfo.rx_bytes = captures
+				.next()
+				.unwrap()
+				.get(1)
+				.unwrap()
+				.as_str()
+				.parse()
+				.unwrap();
+			netinfo.tx_bytes = captures
+				.skip(7)
+				.next()
+				.unwrap()
+				.get(1)
+				.unwrap()
+				.as_str()
+				.parse()
+				.unwrap();
+			break;
+		}
+
+		netinfo
+	}
+}
+
+fn data_human_fmt(bytes: usize) -> String {
+	let (num, unit) = data_human(bytes);
+	format!("{num}{unit}")
+}
+
+fn data_human(bytes: usize) -> (f32, &'static str) {
+	const UNITS: &[&str] = &["B", "kB", "MB", "GB", "TB"];
+
+	let mut wrk = bytes as f32;
+	let mut unit_idx = 0;
+	loop {
+		if wrk < 1500.0 || unit_idx == UNITS.len() - 1 {
+			return (wrk, UNITS[unit_idx]);
+		}
+		wrk /= 1000.0;
+		unit_idx += 1;
+	}
+}
diff --git a/src/griph/mod.rs b/src/griph/mod.rs
new file mode 100644
index 0000000..b034207
--- /dev/null
+++ b/src/griph/mod.rs
@@ -0,0 +1,98 @@
+use gifed::{writer::ImageBuilder, Gif, StandardGif};
+
+#[rustfmt::skip]
+pub const DARK_PALETTE: &[u8] = &[
+	  0,   0,   0, // Background - Black
+	192, 192, 192, // Graphline - Mostly White
+	 64,  64,  64, // Gridlines - Dark gray
+	 32,  32,  32, // Minor Gridlines - Darker gray
+	 48,  48, 192, // Primary 2 Colour - Blue
+	 48, 192,  48, // Secondary 2 Colour - Green
+];
+
+const BACKGROUND: u8 = 0;
+const LINE: u8 = 1;
+const GRIDLINE: u8 = 2;
+const MINOR_GRIDLINE: u8 = 3;
+const LINE1: u8 = 4;
+const LINE2: u8 = 5;
+
+const WIDTH: usize = 256;
+const HEIGHT: usize = 160;
+const SIZE: usize = WIDTH * HEIGHT;
+
+pub fn make_1line(min: usize, max: usize, values: &[usize]) -> Gif {
+	let range = max - min;
+	// this assumes a range of values that is >1 per pixel
+	let vpp = range / HEIGHT;
+
+	let mut raster = vec![0; SIZE];
+	draw_grid(&mut raster);
+	draw_line(&mut raster, values, vpp, LINE);
+
+	let mut standard = Gif::new(WIDTH as u16, HEIGHT as u16);
+	standard.set_palette(Some(DARK_PALETTE[0..12].try_into().unwrap()));
+	standard.push(
+		ImageBuilder::new(WIDTH as u16, HEIGHT as u16)
+			.build(raster)
+			.unwrap(),
+	);
+
+	standard
+}
+
+pub fn make_2line(min: usize, max: usize, values1: &[usize], values2: &[usize]) -> Gif {
+	let range = max - min;
+	// this assumes a range of values that is >1 per pixel
+	let vpp = range / HEIGHT;
+
+	let mut raster = vec![0; SIZE];
+	draw_grid(&mut raster);
+	draw_line(&mut raster, values1, vpp, LINE1);
+	draw_line(&mut raster, values2, vpp, LINE2);
+
+	let mut standard = Gif::new(WIDTH as u16, HEIGHT as u16);
+	standard.set_palette(Some(DARK_PALETTE.try_into().unwrap()));
+	standard.push(
+		ImageBuilder::new(WIDTH as u16, HEIGHT as u16)
+			.build(raster)
+			.unwrap(),
+	);
+
+	standard
+}
+
+fn draw_grid(raster: &mut [u8]) {
+	// Draw Divisions
+	// we want a gridline every 16 pixels, but not the bottom
+	// or top, so only 8.
+	for div in 1..=9 {
+		let y_val = div * 16;
+
+		let grid = if div % 2 == 0 {
+			GRIDLINE
+		} else {
+			MINOR_GRIDLINE
+		};
+
+		for x in 0..WIDTH {
+			raster[y_val * WIDTH + x] = grid;
+		}
+	}
+}
+
+fn draw_line(raster: &mut [u8], values: &[usize], vpp: usize, colour: u8) {
+	// Draw Line
+	// this will be discontinuous and i think that's okay. we
+	// could make it a proper line by keeping track what value
+	// was last and drawing the whole vertical there
+	for (x, value) in values.iter().enumerate() {
+		let value_height = value / vpp;
+		if value_height > (HEIGHT - 1) {
+			continue;
+		}
+		let y_val = (HEIGHT - 1) - value_height;
+
+		raster[y_val * WIDTH + x] = colour;
+	}
+}
diff --git a/src/main.rs b/src/main.rs
index 26e1cf0..cddd2f1 100755
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,16 +1,26 @@
 mod atom;
+mod db;
 mod error;
 mod fs;
+mod gatherer;
+mod griph;
 mod ifc;
 mod markup;
 mod settings;
 mod templated;
 mod timeparse;
 mod util;
-mod db;
 
-use std::{fs::File, io::{BufRead, BufReader, Write}, os::unix::fs::MetadataExt, str::FromStr, sync::Arc, time::Duration};
+use std::{
+	fs::File,
+	io::{BufRead, BufReader, Write},
+	os::unix::fs::MetadataExt,
+	str::FromStr,
+	sync::Arc,
+	time::Duration,
+};
 
+use ::time::OffsetDateTime;
 use axum::{
 	body::Body,
 	extract::{Path, State},
@@ -25,6 +35,7 @@ use confindent::{Confindent, Node};
 use db::Database;
 pub use error::RuntimeError;
 use fs::Filesystem;
+use gatherer::Gatherer;
 use settings::Settings;
 use templated::Frontmatter;
 use tokio_util::io::ReaderStream;
@@ -38,7 +49,8 @@ use crate::{
 
 #[derive(Clone)]
 pub struct AwakeState {
-	pub database: Arc<Database>
+	pub database: Arc<Database>,
+	pub cache_path: Utf8PathBuf,
 }
 
 #[tokio::main]
@@ -64,6 +76,7 @@ async fn main() {
 	let templates = conf.child_value("Templates").unwrap();
 	let hostname = conf.child_owned("Hostname").unwrap();
 	let dbpath = conf.child_owned("Database").unwrap();
+	let cache = conf.child_owned("Cache").unwrap();
 
 	let database = Database::new(dbpath.into());
 	database.create_tables();
@@ -71,18 +84,24 @@ async fn main() {
 	let fs = Filesystem::new(&webroot);
 
 	let state = AwakeState {
-		database: Arc::new(database)
+		database: Arc::new(database),
+		cache_path: cache.into(),
 	};
 
-	let mi_state = state.clone();
-	let meminfo_thread = std::thread::spawn(move || {
-		loop {
-			let meminfo = Meminfo::current();
-			mi_state.database.insert_host_meminfo(meminfo);
-
-			std::thread::sleep(Duration::from_secs(60));
+	match std::env::args().nth(1).as_deref() {
+		Some("graph") => {
+			gatherer::make_mem_graph(&state);
 		}
-	});
+		_ => (),
+	}
+
+	let mut gatherer = Gatherer::new(state.clone());
+
+	#[cfg(target_os = "linux")]
+	gatherer.start();
+
+	#[cfg(not(target_os = "linux"))]
+	tracing::warn!("compilation target was not linux; not collecing stat data");
 
 	let settings = Settings {
 		template_dir: Utf8PathBuf::from(webroot.join(templates))
@@ -93,9 +112,11 @@ async fn main() {
 
 	let app = Router::new()
 		.route("/", get(index_handler))
+		.route("/api/stats/:name", get(stats))
 		.route("/*path", get(handler))
 		.layer(Extension(fs))
-		.layer(Extension(settings)).with_state(state);
+		.layer(Extension(settings))
+		.with_state(state);
 
 	let listener = tokio::net::TcpListener::bind("0.0.0.0:2560").await.unwrap();
 	axum::serve(listener, app).await.unwrap()
@@ -190,6 +211,7 @@ fn redirect<S: Into<String>>(redirection: S) -> Response {
 const STREAM_AFTER: u64 = 20 * 1024 * 1024;
 
 async fn send_file(filepath: Utf8PathBuf) -> Result<Response, RuntimeError> {
+	tracing::debug!(target: "send_file", filepath = ?filepath);
 	let ext = filepath.extension().unwrap_or_default();
 	let stem = filepath.file_stem().unwrap_or_default();
 
@@ -209,6 +231,7 @@ async fn send_file(filepath: Utf8PathBuf) -> Result<Response, RuntimeError> {
 		"png" => "image/png",
 		_ => "",
 	};
+	tracing::debug!(target: "send_file", mime = ?mime);
 
 	let mut response = Response::builder();
 	if !mime.is_empty() {
@@ -223,6 +246,8 @@ async fn send_file(filepath: Utf8PathBuf) -> Result<Response, RuntimeError> {
 		let stream = ReaderStream::new(file);
 		Ok(response.body(Body::from_stream(stream)).unwrap())
 	} else {
+		tracing::debug!("small file, sending entirely at once");
+
 		let content = Filesystem::read(filepath).await?;
 		Ok(response.body(Body::from(content)).unwrap())
 	}
@@ -380,63 +405,33 @@ async fn send_template(
 
 fn template_content(state: AwakeState, frontmatter: &Frontmatter, marked: String) -> String {
 	let Ok(mut doc) = Document::from_str(&marked, Options::default()) else {
-		return marked
+		return marked;
 	};
 
 	if frontmatter.get("system-stats").is_some() {
 		let mem = state.database.get_last_host_meminfo();
 
-		doc.set("stats.mem.total", mem.total_kb / 1024);
-		doc.set("stats.mem.usage", mem.usage() / 1024);
+		doc.set("stats.mem.total", mem.total_kb / 1000);
+		doc.set("stats.mem.usage", mem.usage() / 1000);
 	}
 
 	doc.compile()
 }
 
-struct Meminfo {
-	pub total: usize,
-	pub free: usize,
-	pub avaialable: usize
-}
-
-impl Meminfo {
-	pub fn current() -> Self {
-		let procinfo = File::open("/proc/meminfo").unwrap();
-		let bread = BufReader::new(procinfo);
+async fn stats(State(state): State<AwakeState>, Path(name): Path<String>) -> Response {
+	const NAMES: &[&'static str] = &["current_hostmeminfo.gif", "current_hostnetinfo.gif"];
 
-		let mut meminfo = Meminfo {
-			total: 0,
-			free: 0,
-			avaialable: 0
-		};
-
-		for line in bread.lines() {
-			let line = line.unwrap();
-
-			if let Some((raw_key, raw_value_kb)) = line.split_once(':') {
-				let value = if let Some(raw_value) = raw_value_kb.trim().strip_suffix(" kB") {
-					if let Ok(parsed) = raw_value.parse() {
-						parsed
-					} else {
-						continue;
-					}
-				} else {
-					continue;
-				};
-
-				match raw_key.trim() {
-					"MemTotal" => meminfo.total = value,
-					"MemFree" => meminfo.free = value,
-					"MemAvailable" => meminfo.avaialable = value,
-					_ => ()
-				}
-			}
+	if NAMES.contains(&name.as_str()) {
+		let path = state.cache_path.join(name);
+		match send_file(path).await {
+			Ok(resp) => resp,
+			Err(e) => Response::builder().body(Body::from(e.to_string())).unwrap(),
 		}
+	} else {
+		tracing::debug!("invalid stat requested: {name}");
 
-		meminfo
-	}
-
-	pub fn usage(&self) -> usize {
-		self.total - self.avaialable
+		Response::builder()
+			.body(Body::from("that stat is not real"))
+			.unwrap()
 	}
-}
\ No newline at end of file
+}