diff --git a/Cargo.lock b/Cargo.lock
index 18746f4..6fe42fd 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4,24 +4,18 @@ version = 3
[[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"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
-
[[package]]
name = "adler2"
-version = "2.0.0"
+version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627"
+checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"
[[package]]
name = "aes"
@@ -45,9 +39,9 @@ dependencies = [
[[package]]
name = "anstream"
-version = "0.6.18"
+version = "0.6.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b"
+checksum = "301af1932e46185686725e0fad2f8f2aa7da69dd70bf6ecc44d6b703844a3933"
dependencies = [
"anstyle",
"anstyle-parse",
@@ -60,57 +54,58 @@ dependencies = [
[[package]]
name = "anstyle"
-version = "1.0.10"
+version = "1.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9"
+checksum = "862ed96ca487e809f1c8e5a8447f6ee2cf102f846893800b20cebdf541fc6bbd"
[[package]]
name = "anstyle-parse"
-version = "0.2.6"
+version = "0.2.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9"
+checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2"
dependencies = [
"utf8parse",
]
[[package]]
name = "anstyle-query"
-version = "1.1.2"
+version = "1.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c"
+checksum = "6c8bdeb6047d8983be085bab0ba1472e6dc604e7041dbf6fcd5e71523014fae9"
dependencies = [
"windows-sys 0.59.0",
]
[[package]]
name = "anstyle-wincon"
-version = "3.0.6"
+version = "3.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125"
+checksum = "403f75924867bb1033c59fbf0797484329750cfbe3c4325cd33127941fabc882"
dependencies = [
"anstyle",
+ "once_cell_polyfill",
"windows-sys 0.59.0",
]
[[package]]
name = "autocfg"
-version = "1.4.0"
+version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
+checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
[[package]]
name = "backtrace"
-version = "0.3.71"
+version = "0.3.75"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d"
+checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002"
dependencies = [
"addr2line",
- "cc",
"cfg-if",
"libc",
- "miniz_oxide 0.7.4",
+ "miniz_oxide",
"object",
"rustc-demangle",
+ "windows-targets",
]
[[package]]
@@ -127,20 +122,20 @@ checksum = "dc827186963e592360843fb5ba4b973e145841266c1357f7180c43526f2e5b61"
[[package]]
name = "bitfield-struct"
-version = "0.9.2"
+version = "0.9.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "aad5e1745b6082358758e26ed8cf52ed6abb11c548491cc9bc21eb0fa6c14c36"
+checksum = "b2869c63ccf4f8bf0d485070b880e60e097fb7aeea80ee82a0a94a957e372a0b"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.87",
+ "syn 2.0.104",
]
[[package]]
name = "bitflags"
-version = "2.6.0"
+version = "2.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de"
+checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967"
[[package]]
name = "block-buffer"
@@ -151,11 +146,17 @@ dependencies = [
"generic-array",
]
+[[package]]
+name = "bumpalo"
+version = "3.19.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43"
+
[[package]]
name = "bytemuck"
-version = "1.19.0"
+version = "1.23.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8334215b81e418a0a7bdb8ef0849474f40bb10c8b71f1c4ed315cff49f32494d"
+checksum = "5c76a5792e44e4abe34d3abf15636779261d45a7450612059293d1d2cfc63422"
[[package]]
name = "byteorder"
@@ -165,18 +166,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
[[package]]
name = "bytes"
-version = "1.8.0"
+version = "1.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da"
-
-[[package]]
-name = "cc"
-version = "1.1.37"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "40545c26d092346d8a8dab71ee48e7685a7a9cba76e634790c215b41a4a7b4cf"
-dependencies = [
- "shlex",
-]
+checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a"
[[package]]
name = "cesu8"
@@ -195,9 +187,9 @@ dependencies = [
[[package]]
name = "cfg-if"
-version = "1.0.0"
+version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268"
[[package]]
name = "cipher"
@@ -211,9 +203,9 @@ dependencies = [
[[package]]
name = "clap"
-version = "4.5.20"
+version = "4.5.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8"
+checksum = "40b6887a1d8685cebccf115538db5c0efe625ccac9696ad45c409d96566e910f"
dependencies = [
"clap_builder",
"clap_derive",
@@ -221,9 +213,9 @@ dependencies = [
[[package]]
name = "clap_builder"
-version = "4.5.20"
+version = "4.5.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54"
+checksum = "e0c66c08ce9f0c698cbce5c0279d0bb6ac936d8674174fe48f736533b964f59e"
dependencies = [
"anstream",
"anstyle",
@@ -233,27 +225,27 @@ dependencies = [
[[package]]
name = "clap_derive"
-version = "4.5.18"
+version = "4.5.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab"
+checksum = "d2c7947ae4cc3d851207c1adb5b5e260ff0cca11446b1d6d1423788e442257ce"
dependencies = [
"heck",
"proc-macro2",
"quote",
- "syn 2.0.87",
+ "syn 2.0.104",
]
[[package]]
name = "clap_lex"
-version = "0.7.2"
+version = "0.7.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97"
+checksum = "b94f61472cee1439c0b966b47e3aca9ae07e45d070759512cd390ea2bebc6675"
[[package]]
name = "color-eyre"
-version = "0.6.3"
+version = "0.6.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "55146f5e46f237f7423d74111267d4597b59b0dad0ffaf7303bce9945d843ad5"
+checksum = "e5920befb47832a6d61ee3a3a846565cfa39b331331e68a3b1d1116630f2f26d"
dependencies = [
"backtrace",
"color-spantrace",
@@ -266,9 +258,9 @@ dependencies = [
[[package]]
name = "color-spantrace"
-version = "0.2.1"
+version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cd6be1b2a7e382e2b98b43b2adcca6bb0e465af0bdd38123873ae61eb17a72c2"
+checksum = "b8b88ea9df13354b55bc7234ebcce36e6ef896aca2e42a15de9e10edce01b427"
dependencies = [
"once_cell",
"owo-colors",
@@ -284,15 +276,15 @@ checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b"
[[package]]
name = "colorchoice"
-version = "1.0.3"
+version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990"
+checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75"
[[package]]
name = "cpufeatures"
-version = "0.2.15"
+version = "0.2.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0ca741a962e1b0bff6d724a1a0958b686406e853bb14061f218562e1896f95e6"
+checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280"
dependencies = [
"libc",
]
@@ -309,6 +301,7 @@ dependencies = [
"cfb8",
"clap",
"color-eyre",
+ "crawlspace-macro",
"fastanvil",
"fastnbt",
"rand",
@@ -324,6 +317,14 @@ dependencies = [
"uuid",
]
+[[package]]
+name = "crawlspace-macro"
+version = "0.1.0"
+dependencies = [
+ "quote",
+ "syn 2.0.104",
+]
+
[[package]]
name = "crc32fast"
version = "1.4.2"
@@ -335,9 +336,9 @@ dependencies = [
[[package]]
name = "crossbeam-deque"
-version = "0.8.5"
+version = "0.8.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d"
+checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51"
dependencies = [
"crossbeam-epoch",
"crossbeam-utils",
@@ -354,9 +355,9 @@ dependencies = [
[[package]]
name = "crossbeam-utils"
-version = "0.8.20"
+version = "0.8.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80"
+checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
[[package]]
name = "crypto-common"
@@ -380,15 +381,15 @@ dependencies = [
[[package]]
name = "either"
-version = "1.13.0"
+version = "1.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0"
+checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719"
[[package]]
name = "equivalent"
-version = "1.0.1"
+version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
+checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
[[package]]
name = "eyre"
@@ -444,12 +445,12 @@ dependencies = [
[[package]]
name = "flate2"
-version = "1.0.34"
+version = "1.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0"
+checksum = "4a3d7db9596fecd151c5f638c0ee5d5bd487b6e0ea232e5dc96d5250f6f94b1d"
dependencies = [
"crc32fast",
- "miniz_oxide 0.8.0",
+ "miniz_oxide",
]
[[package]]
@@ -476,9 +477,9 @@ dependencies = [
[[package]]
name = "getrandom"
-version = "0.2.15"
+version = "0.2.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7"
+checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592"
dependencies = [
"cfg-if",
"libc",
@@ -487,15 +488,15 @@ dependencies = [
[[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 = "hashbrown"
-version = "0.15.1"
+version = "0.15.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3a9bfc1af68b1726ea47d3d5109de126281def866b33970e10fbab11b5dafab3"
+checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5"
[[package]]
name = "heck"
@@ -503,12 +504,6 @@ version = "0.5.0"
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 = "image"
version = "0.23.14"
@@ -531,9 +526,9 @@ checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683"
[[package]]
name = "indexmap"
-version = "2.6.0"
+version = "2.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da"
+checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e"
dependencies = [
"equivalent",
"hashbrown",
@@ -541,9 +536,9 @@ dependencies = [
[[package]]
name = "inout"
-version = "0.1.3"
+version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5"
+checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01"
dependencies = [
"generic-array",
]
@@ -556,9 +551,19 @@ checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
[[package]]
name = "itoa"
-version = "1.0.11"
+version = "1.0.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c"
+
+[[package]]
+name = "js-sys"
+version = "0.3.77"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b"
+checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f"
+dependencies = [
+ "once_cell",
+ "wasm-bindgen",
+]
[[package]]
name = "lazy_static"
@@ -574,9 +579,9 @@ checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776"
[[package]]
name = "libredox"
-version = "0.1.3"
+version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d"
+checksum = "1580801010e535496706ba011c15f8532df6b42297d2e471fec38ceadd8c0638"
dependencies = [
"bitflags",
"libc",
@@ -585,9 +590,9 @@ dependencies = [
[[package]]
name = "lock_api"
-version = "0.4.12"
+version = "0.4.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17"
+checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765"
dependencies = [
"autocfg",
"scopeguard",
@@ -595,9 +600,9 @@ dependencies = [
[[package]]
name = "log"
-version = "0.4.22"
+version = "0.4.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"
+checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94"
[[package]]
name = "lz4-java-wrc"
@@ -611,9 +616,9 @@ dependencies = [
[[package]]
name = "lz4_flex"
-version = "0.11.3"
+version = "0.11.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "75761162ae2b0e580d7e7c390558127e5f01b4194debd6221fd8c207fc80e3f5"
+checksum = "08ab2867e3eeeca90e844d1940eab391c9dc5228783db2ed999acbc0a9ed375a"
[[package]]
name = "matchers"
@@ -626,38 +631,28 @@ dependencies = [
[[package]]
name = "memchr"
-version = "2.7.4"
+version = "2.7.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
+checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0"
[[package]]
name = "miniz_oxide"
-version = "0.7.4"
+version = "0.8.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08"
-dependencies = [
- "adler",
-]
-
-[[package]]
-name = "miniz_oxide"
-version = "0.8.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1"
+checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316"
dependencies = [
"adler2",
]
[[package]]
name = "mio"
-version = "1.0.2"
+version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec"
+checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c"
dependencies = [
- "hermit-abi",
"libc",
"wasi",
- "windows-sys 0.52.0",
+ "windows-sys 0.59.0",
]
[[package]]
@@ -733,18 +728,24 @@ dependencies = [
[[package]]
name = "object"
-version = "0.32.2"
+version = "0.36.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441"
+checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87"
dependencies = [
"memchr",
]
[[package]]
name = "once_cell"
-version = "1.20.2"
+version = "1.21.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
+
+[[package]]
+name = "once_cell_polyfill"
+version = "1.70.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775"
+checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad"
[[package]]
name = "overload"
@@ -754,15 +755,15 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
[[package]]
name = "owo-colors"
-version = "3.5.0"
+version = "4.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f"
+checksum = "48dd4f4a2c8405440fd0462561f0e5806bd0f77e86f51c761481bdd4018b545e"
[[package]]
name = "parking_lot"
-version = "0.12.3"
+version = "0.12.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27"
+checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13"
dependencies = [
"lock_api",
"parking_lot_core",
@@ -770,9 +771,9 @@ dependencies = [
[[package]]
name = "parking_lot_core"
-version = "0.9.10"
+version = "0.9.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8"
+checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5"
dependencies = [
"cfg-if",
"libc",
@@ -783,15 +784,15 @@ dependencies = [
[[package]]
name = "pin-project-lite"
-version = "0.2.15"
+version = "0.2.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff"
+checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b"
[[package]]
name = "ppv-lite86"
-version = "0.2.20"
+version = "0.2.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04"
+checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9"
dependencies = [
"zerocopy",
]
@@ -808,18 +809,18 @@ dependencies = [
[[package]]
name = "proc-macro2"
-version = "1.0.89"
+version = "1.0.95"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e"
+checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778"
dependencies = [
"unicode-ident",
]
[[package]]
name = "quote"
-version = "1.0.37"
+version = "1.0.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"
+checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d"
dependencies = [
"proc-macro2",
]
@@ -876,9 +877,9 @@ dependencies = [
[[package]]
name = "redox_syscall"
-version = "0.5.7"
+version = "0.5.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f"
+checksum = "0d04b7d0ee6b4a0207a0a7adb104d23ecb0b47d6beae7152d0fa34b692b29fd6"
dependencies = [
"bitflags",
]
@@ -929,15 +930,21 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
[[package]]
name = "rustc-demangle"
-version = "0.1.24"
+version = "0.1.25"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "989e6739f80c4ad5b13e0fd7fe89531180375b18520cc8c82080e4dc4035b84f"
+
+[[package]]
+name = "rustversion"
+version = "1.0.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f"
+checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d"
[[package]]
name = "ryu"
-version = "1.0.18"
+version = "1.0.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f"
+checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f"
[[package]]
name = "scopeguard"
@@ -947,38 +954,38 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
[[package]]
name = "serde"
-version = "1.0.215"
+version = "1.0.219"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f"
+checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_bytes"
-version = "0.11.15"
+version = "0.11.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "387cc504cb06bb40a96c8e04e951fe01854cf6bc921053c954e4a606d9675c6a"
+checksum = "8437fd221bde2d4ca316d61b90e337e9e702b3820b87d63caa9ba6c02bd06d96"
dependencies = [
"serde",
]
[[package]]
name = "serde_derive"
-version = "1.0.215"
+version = "1.0.219"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0"
+checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.87",
+ "syn 2.0.104",
]
[[package]]
name = "serde_json"
-version = "1.0.132"
+version = "1.0.140"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03"
+checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373"
dependencies = [
"itoa",
"memchr",
@@ -988,9 +995,9 @@ dependencies = [
[[package]]
name = "sha2"
-version = "0.10.8"
+version = "0.10.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8"
+checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283"
dependencies = [
"cfg-if",
"cpufeatures",
@@ -1006,32 +1013,26 @@ dependencies = [
"lazy_static",
]
-[[package]]
-name = "shlex"
-version = "1.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
-
[[package]]
name = "signal-hook-registry"
-version = "1.4.2"
+version = "1.4.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1"
+checksum = "9203b8055f63a2a00e2f593bb0510367fe707d7ff1e5c872de2f537b339e5410"
dependencies = [
"libc",
]
[[package]]
name = "smallvec"
-version = "1.13.2"
+version = "1.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67"
+checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03"
[[package]]
name = "socket2"
-version = "0.5.7"
+version = "0.5.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c"
+checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678"
dependencies = [
"libc",
"windows-sys 0.52.0",
@@ -1062,9 +1063,9 @@ dependencies = [
[[package]]
name = "syn"
-version = "2.0.87"
+version = "2.0.104"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d"
+checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40"
dependencies = [
"proc-macro2",
"quote",
@@ -1073,9 +1074,9 @@ dependencies = [
[[package]]
name = "tar"
-version = "0.4.43"
+version = "0.4.44"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c65998313f8e17d0d553d28f91a0df93e4dbbbf770279c7bc21ca0f09ea1a1f6"
+checksum = "1d863878d212c87a19c1a610eb53bb01fe12951c0501cf5a0d65f724914a667a"
dependencies = [
"filetime",
"libc",
@@ -1098,24 +1099,23 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.87",
+ "syn 2.0.104",
]
[[package]]
name = "thread_local"
-version = "1.1.8"
+version = "1.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c"
+checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185"
dependencies = [
"cfg-if",
- "once_cell",
]
[[package]]
name = "tokio"
-version = "1.43.1"
+version = "1.45.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "492a604e2fd7f814268a378409e6c92b5525d747d10db9a229723f55a417958c"
+checksum = "75ef51a33ef1da925cea3e4eb122833cb377c61439ca401b770f54902b806779"
dependencies = [
"backtrace",
"bytes",
@@ -1137,14 +1137,14 @@ checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.87",
+ "syn 2.0.104",
]
[[package]]
name = "tokio-util"
-version = "0.7.12"
+version = "0.7.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a"
+checksum = "66a539a9ad6d5d281510d5bd368c973d636c02dbf8a67300bfb6b950696ad7df"
dependencies = [
"bytes",
"futures-core",
@@ -1155,9 +1155,9 @@ dependencies = [
[[package]]
name = "toml_datetime"
-version = "0.6.8"
+version = "0.6.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41"
+checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c"
[[package]]
name = "toml_edit"
@@ -1172,9 +1172,9 @@ dependencies = [
[[package]]
name = "tracing"
-version = "0.1.40"
+version = "0.1.41"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef"
+checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0"
dependencies = [
"pin-project-lite",
"tracing-attributes",
@@ -1183,20 +1183,20 @@ dependencies = [
[[package]]
name = "tracing-attributes"
-version = "0.1.27"
+version = "0.1.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
+checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.87",
+ "syn 2.0.104",
]
[[package]]
name = "tracing-core"
-version = "0.1.32"
+version = "0.1.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54"
+checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678"
dependencies = [
"once_cell",
"valuable",
@@ -1204,9 +1204,9 @@ dependencies = [
[[package]]
name = "tracing-error"
-version = "0.2.0"
+version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d686ec1c0f384b1277f097b2f279a2ecc11afe8c133c1aabf036a27cb4cd206e"
+checksum = "8b1581020d7a273442f5b45074a6a57d5757ad0a47dac0e9f0bd57b81936f3db"
dependencies = [
"tracing",
"tracing-subscriber",
@@ -1225,9 +1225,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",
@@ -1253,15 +1253,15 @@ dependencies = [
[[package]]
name = "typenum"
-version = "1.17.0"
+version = "1.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
+checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f"
[[package]]
name = "unicode-ident"
-version = "1.0.13"
+version = "1.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe"
+checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512"
[[package]]
name = "utf8parse"
@@ -1271,15 +1271,19 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
[[package]]
name = "uuid"
-version = "1.11.0"
+version = "1.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a"
+checksum = "3cf4199d1e5d15ddd86a694e4d0dffa9c323ce759fea589f00fef9d81cc1931d"
+dependencies = [
+ "js-sys",
+ "wasm-bindgen",
+]
[[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 = "version_check"
@@ -1289,9 +1293,67 @@ checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
[[package]]
name = "wasi"
-version = "0.11.0+wasi-snapshot-preview1"
+version = "0.11.1+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
+
+[[package]]
+name = "wasm-bindgen"
+version = "0.2.100"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5"
+dependencies = [
+ "cfg-if",
+ "once_cell",
+ "rustversion",
+ "wasm-bindgen-macro",
+]
+
+[[package]]
+name = "wasm-bindgen-backend"
+version = "0.2.100"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6"
+dependencies = [
+ "bumpalo",
+ "log",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.104",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-macro"
+version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
+checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407"
+dependencies = [
+ "quote",
+ "wasm-bindgen-macro-support",
+]
+
+[[package]]
+name = "wasm-bindgen-macro-support"
+version = "0.2.100"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.104",
+ "wasm-bindgen-backend",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-shared"
+version = "0.2.100"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d"
+dependencies = [
+ "unicode-ident",
+]
[[package]]
name = "winapi"
@@ -1408,21 +1470,20 @@ dependencies = [
[[package]]
name = "zerocopy"
-version = "0.7.35"
+version = "0.8.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0"
+checksum = "1039dd0d3c310cf05de012d8a39ff557cb0d23087fd44cad61df08fc31907a2f"
dependencies = [
- "byteorder",
"zerocopy-derive",
]
[[package]]
name = "zerocopy-derive"
-version = "0.7.35"
+version = "0.8.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
+checksum = "9ecf5b4cc5364572d7f4c329661bcc82724222973f2cab6f050a4e5c22f75181"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.87",
+ "syn 2.0.104",
]
diff --git a/Cargo.toml b/Cargo.toml
index 23e10d4..34482bf 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,58 +1,6 @@
-# Copyright (c) 2024 Andrew Brower.
-# This file is part of Crawlspace.
-#
-# Crawlspace is free software: you can redistribute it and/or
-# modify it under the terms of the GNU Affero General Public
-# License as published by the Free Software Foundation, either
-# version 3 of the License, or (at your option) any later version.
-#
-# Crawlspace is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public
-# License along with Crawlspace. If not, see
-# .
-
-[package]
-name = "crawlspace"
-version = "0.1.0"
-edition = "2021"
-license = "AGPL-3.0-or-later"
-
-[dependencies]
-aes = { version = "0.8.4", optional = true }
-bit-vec = "0.8.0"
-bitfield-struct = "0.9.2"
-byteorder = "1.5.0"
-bytes = "1.8.0"
-cfb8 = { version = "0.8.1", optional = true }
-clap = { version = "4.5.20", features = ["derive", "env"] }
-color-eyre = "0.6.3"
-fastanvil = { git = "https://github.com/owengage/fastnbt.git" }
-fastnbt = { git = "https://github.com/owengage/fastnbt.git" }
-rand = "0.8.5"
-rayon = "1.10.0"
-serde = { version = "1.0.213", features = ["derive"] }
-serde_json = "1.0.132"
-sha2 = "0.10.8"
-thiserror = "1.0.65"
-tokio = { version = "1.43.1", features = ["full"] }
-tokio-util = "0.7.12"
-tracing = { version = "0.1.40", features = ["max_level_trace", "release_max_level_info"] }
-tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
-uuid = "1.11.0"
-
-[features]
-default = []
-compression = []
-encryption = ["dep:cfb8", "dep:aes"]
-modern_art = []
-lan = []
-timings = []
-
-full = ["compression", "encryption"]
+[workspace]
+resolver = "2"
+members = [ "crawlspace-macro","crawlspace"]
[profile.release-stripped]
inherits = "release"
diff --git a/crawlspace-macro/Cargo.toml b/crawlspace-macro/Cargo.toml
new file mode 100644
index 0000000..b7a3316
--- /dev/null
+++ b/crawlspace-macro/Cargo.toml
@@ -0,0 +1,11 @@
+[package]
+name = "crawlspace-macro"
+version = "0.1.0"
+edition = "2021"
+
+[lib]
+proc-macro = true
+
+[dependencies]
+quote = "1.0.40"
+syn = "2.0.104"
diff --git a/crawlspace-macro/src/lib.rs b/crawlspace-macro/src/lib.rs
new file mode 100644
index 0000000..c50ebfd
--- /dev/null
+++ b/crawlspace-macro/src/lib.rs
@@ -0,0 +1,97 @@
+use proc_macro::{Span, TokenStream};
+use quote::quote;
+use syn::{parse_macro_input, DeriveInput, Ident, Lit};
+
+#[proc_macro_derive(Packet, attributes(packet))]
+pub fn derive_packet(input: TokenStream) -> TokenStream {
+ let input = parse_macro_input!(input as DeriveInput);
+
+ let syn::Data::Struct(_) = input.data else {
+ panic!("Packet must be defined as a struct");
+ };
+
+ let mut id = None;
+ let mut state = None;
+ let mut direction = None;
+
+ for attr in input.attrs {
+ if !attr.path().is_ident("packet") {
+ continue;
+ }
+
+ attr.parse_nested_meta(|meta| {
+ if meta.path.is_ident("id") {
+ let lit = meta.value()?.parse()?;
+ match lit {
+ Lit::Str(i) => {
+ id = Some(i);
+ }
+ _ => panic!("attribute value `id` must be a string"),
+ }
+ } else if meta.path.is_ident("state") {
+ let lit = meta
+ .value()
+ .expect("no value for state")
+ .parse()
+ .expect("couldn't parse value for state");
+ let Lit::Str(v) = lit else {
+ panic!("unable to parse state as string");
+ };
+ state = Some(
+ v.parse_with(syn::Path::parse_mod_style)
+ .expect("couldn't parse state as path"),
+ );
+ } else if meta.path.is_ident("serverbound") {
+ match direction {
+ None => direction = Some("Serverbound"),
+ Some(_) => {
+ panic!("cannot have two directives of type `serverbound` or `clientbound`")
+ }
+ }
+ } else if meta.path.is_ident("clientbound") {
+ match direction {
+ None => direction = Some("Clientbound"),
+ Some(_) => {
+ panic!("cannot have two directives of type `serverbound` or `clientbound`")
+ }
+ }
+ } else {
+ let Some(id) = meta.path.get_ident() else {
+ panic!("unable to get ident for unrecognized directive");
+ };
+ panic!("unrecognized directive {}", id);
+ }
+
+ Ok(())
+ })
+ .unwrap();
+ }
+
+ let id = id.expect("id must be provided for packet");
+ let state = state.expect("state must be provided for packet");
+ let direction = Ident::new(
+ direction.expect("direction must be provided for packet"),
+ Span::call_site().into(),
+ );
+
+ let name = input.ident;
+ let where_clause = input.generics.where_clause.clone();
+ let generics = input.generics;
+
+ quote! {
+ impl #generics Packet for #name #generics #where_clause {
+ fn id() -> &'static str {
+ #id
+ }
+
+ fn state() -> PacketState {
+ #state
+ }
+
+ fn direction() -> PacketDirection {
+ PacketDirection::#direction
+ }
+ }
+ }
+ .into()
+}
diff --git a/crawlspace/Cargo.lock b/crawlspace/Cargo.lock
new file mode 100644
index 0000000..18746f4
--- /dev/null
+++ b/crawlspace/Cargo.lock
@@ -0,0 +1,1428 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 3
+
+[[package]]
+name = "addr2line"
+version = "0.21.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb"
+dependencies = [
+ "gimli",
+]
+
+[[package]]
+name = "adler"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
+
+[[package]]
+name = "adler2"
+version = "2.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627"
+
+[[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 = "aho-corasick"
+version = "1.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916"
+dependencies = [
+ "memchr",
+]
+
+[[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 = "autocfg"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
+
+[[package]]
+name = "backtrace"
+version = "0.3.71"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d"
+dependencies = [
+ "addr2line",
+ "cc",
+ "cfg-if",
+ "libc",
+ "miniz_oxide 0.7.4",
+ "object",
+ "rustc-demangle",
+]
+
+[[package]]
+name = "bit-vec"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7"
+
+[[package]]
+name = "bit_field"
+version = "0.10.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dc827186963e592360843fb5ba4b973e145841266c1357f7180c43526f2e5b61"
+
+[[package]]
+name = "bitfield-struct"
+version = "0.9.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aad5e1745b6082358758e26ed8cf52ed6abb11c548491cc9bc21eb0fa6c14c36"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.87",
+]
+
+[[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 = "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"
+
+[[package]]
+name = "cc"
+version = "1.1.37"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "40545c26d092346d8a8dab71ee48e7685a7a9cba76e634790c215b41a4a7b4cf"
+dependencies = [
+ "shlex",
+]
+
+[[package]]
+name = "cesu8"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c"
+
+[[package]]
+name = "cfb8"
+version = "0.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "014c0a0e1ad0dae6a86c082db2f9bd7fe8c2c734227047d0d8b4d4a3a094a1e1"
+dependencies = [
+ "cipher",
+]
+
+[[package]]
+name = "cfg-if"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+
+[[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 = "clap"
+version = "4.5.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8"
+dependencies = [
+ "clap_builder",
+ "clap_derive",
+]
+
+[[package]]
+name = "clap_builder"
+version = "4.5.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54"
+dependencies = [
+ "anstream",
+ "anstyle",
+ "clap_lex",
+ "strsim",
+]
+
+[[package]]
+name = "clap_derive"
+version = "4.5.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab"
+dependencies = [
+ "heck",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.87",
+]
+
+[[package]]
+name = "clap_lex"
+version = "0.7.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97"
+
+[[package]]
+name = "color-eyre"
+version = "0.6.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "55146f5e46f237f7423d74111267d4597b59b0dad0ffaf7303bce9945d843ad5"
+dependencies = [
+ "backtrace",
+ "color-spantrace",
+ "eyre",
+ "indenter",
+ "once_cell",
+ "owo-colors",
+ "tracing-error",
+]
+
+[[package]]
+name = "color-spantrace"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cd6be1b2a7e382e2b98b43b2adcca6bb0e465af0bdd38123873ae61eb17a72c2"
+dependencies = [
+ "once_cell",
+ "owo-colors",
+ "tracing-core",
+ "tracing-error",
+]
+
+[[package]]
+name = "color_quant"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b"
+
+[[package]]
+name = "colorchoice"
+version = "1.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990"
+
+[[package]]
+name = "cpufeatures"
+version = "0.2.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0ca741a962e1b0bff6d724a1a0958b686406e853bb14061f218562e1896f95e6"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "crawlspace"
+version = "0.1.0"
+dependencies = [
+ "aes",
+ "bit-vec",
+ "bitfield-struct",
+ "byteorder",
+ "bytes",
+ "cfb8",
+ "clap",
+ "color-eyre",
+ "fastanvil",
+ "fastnbt",
+ "rand",
+ "rayon",
+ "serde",
+ "serde_json",
+ "sha2",
+ "thiserror",
+ "tokio",
+ "tokio-util",
+ "tracing",
+ "tracing-subscriber",
+ "uuid",
+]
+
+[[package]]
+name = "crc32fast"
+version = "1.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3"
+dependencies = [
+ "cfg-if",
+]
+
+[[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 = "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 = "equivalent"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
+
+[[package]]
+name = "eyre"
+version = "0.6.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec"
+dependencies = [
+ "indenter",
+ "once_cell",
+]
+
+[[package]]
+name = "fastanvil"
+version = "0.31.0"
+source = "git+https://github.com/owengage/fastnbt.git#e2a5d8a7001d4f074ae99fd21bb485667934baeb"
+dependencies = [
+ "bit_field",
+ "byteorder",
+ "fastnbt",
+ "flate2",
+ "image",
+ "log",
+ "lz4-java-wrc",
+ "num_enum",
+ "once_cell",
+ "serde",
+ "serde_json",
+ "tar",
+]
+
+[[package]]
+name = "fastnbt"
+version = "2.5.0"
+source = "git+https://github.com/owengage/fastnbt.git#e2a5d8a7001d4f074ae99fd21bb485667934baeb"
+dependencies = [
+ "byteorder",
+ "cesu8",
+ "serde",
+ "serde_bytes",
+]
+
+[[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 = "flate2"
+version = "1.0.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0"
+dependencies = [
+ "crc32fast",
+ "miniz_oxide 0.8.0",
+]
+
+[[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 = "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.28.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253"
+
+[[package]]
+name = "hashbrown"
+version = "0.15.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3a9bfc1af68b1726ea47d3d5109de126281def866b33970e10fbab11b5dafab3"
+
+[[package]]
+name = "heck"
+version = "0.5.0"
+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 = "image"
+version = "0.23.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "24ffcb7e7244a9bf19d35bf2883b9c080c4ced3c07a9895572178cdb8f13f6a1"
+dependencies = [
+ "bytemuck",
+ "byteorder",
+ "color_quant",
+ "num-iter",
+ "num-rational",
+ "num-traits",
+]
+
+[[package]]
+name = "indenter"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683"
+
+[[package]]
+name = "indexmap"
+version = "2.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da"
+dependencies = [
+ "equivalent",
+ "hashbrown",
+]
+
+[[package]]
+name = "inout"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5"
+dependencies = [
+ "generic-array",
+]
+
+[[package]]
+name = "is_terminal_polyfill"
+version = "1.70.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
+
+[[package]]
+name = "itoa"
+version = "1.0.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b"
+
+[[package]]
+name = "lazy_static"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
+
+[[package]]
+name = "libc"
+version = "0.2.174"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776"
+
+[[package]]
+name = "libredox"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d"
+dependencies = [
+ "bitflags",
+ "libc",
+ "redox_syscall",
+]
+
+[[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 = "lz4-java-wrc"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3ed1c11dbd317fa5d0508cbb5ce47696bb27771e3c9604428e0e98c7c3d76d0d"
+dependencies = [
+ "lz4_flex",
+ "twox-hash",
+]
+
+[[package]]
+name = "lz4_flex"
+version = "0.11.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "75761162ae2b0e580d7e7c390558127e5f01b4194debd6221fd8c207fc80e3f5"
+
+[[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 = "memchr"
+version = "2.7.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
+
+[[package]]
+name = "miniz_oxide"
+version = "0.7.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08"
+dependencies = [
+ "adler",
+]
+
+[[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 = "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-integer"
+version = "0.1.46"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f"
+dependencies = [
+ "num-traits",
+]
+
+[[package]]
+name = "num-iter"
+version = "0.1.45"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf"
+dependencies = [
+ "autocfg",
+ "num-integer",
+ "num-traits",
+]
+
+[[package]]
+name = "num-rational"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "12ac428b1cb17fce6f731001d307d351ec70a6d202fc2e60f7d4c5e42d8f4f07"
+dependencies = [
+ "autocfg",
+ "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 = "num_enum"
+version = "0.5.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9"
+dependencies = [
+ "num_enum_derive",
+]
+
+[[package]]
+name = "num_enum_derive"
+version = "0.5.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799"
+dependencies = [
+ "proc-macro-crate",
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "object"
+version = "0.32.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441"
+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 = "owo-colors"
+version = "3.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f"
+
+[[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",
+]
+
+[[package]]
+name = "pin-project-lite"
+version = "0.2.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff"
+
+[[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-macro-crate"
+version = "1.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919"
+dependencies = [
+ "once_cell",
+ "toml_edit",
+]
+
+[[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 = "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 = "rustc-demangle"
+version = "0.1.24"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f"
+
+[[package]]
+name = "ryu"
+version = "1.0.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f"
+
+[[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_bytes"
+version = "0.11.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "387cc504cb06bb40a96c8e04e951fe01854cf6bc921053c954e4a606d9675c6a"
+dependencies = [
+ "serde",
+]
+
+[[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 2.0.87",
+]
+
+[[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 = "sha2"
+version = "0.10.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8"
+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 = "signal-hook-registry"
+version = "1.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1"
+dependencies = [
+ "libc",
+]
+
+[[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 = "static_assertions"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
+
+[[package]]
+name = "strsim"
+version = "0.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
+
+[[package]]
+name = "syn"
+version = "1.0.109"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[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 = "tar"
+version = "0.4.43"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c65998313f8e17d0d553d28f91a0df93e4dbbbf770279c7bc21ca0f09ea1a1f6"
+dependencies = [
+ "filetime",
+ "libc",
+]
+
+[[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 2.0.87",
+]
+
+[[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.43.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "492a604e2fd7f814268a378409e6c92b5525d747d10db9a229723f55a417958c"
+dependencies = [
+ "backtrace",
+ "bytes",
+ "libc",
+ "mio",
+ "parking_lot",
+ "pin-project-lite",
+ "signal-hook-registry",
+ "socket2",
+ "tokio-macros",
+ "windows-sys 0.52.0",
+]
+
+[[package]]
+name = "tokio-macros"
+version = "2.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.87",
+]
+
+[[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"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41"
+
+[[package]]
+name = "toml_edit"
+version = "0.19.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421"
+dependencies = [
+ "indexmap",
+ "toml_datetime",
+ "winnow",
+]
+
+[[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 2.0.87",
+]
+
+[[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-error"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d686ec1c0f384b1277f097b2f279a2ecc11afe8c133c1aabf036a27cb4cd206e"
+dependencies = [
+ "tracing",
+ "tracing-subscriber",
+]
+
+[[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 = "twox-hash"
+version = "1.6.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675"
+dependencies = [
+ "cfg-if",
+ "static_assertions",
+]
+
+[[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 = "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"
+
+[[package]]
+name = "valuable"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d"
+
+[[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 = "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-sys"
+version = "0.52.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
+dependencies = [
+ "windows-targets",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.59.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
+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 = "winnow"
+version = "0.5.40"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876"
+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 2.0.87",
+]
diff --git a/crawlspace/Cargo.toml b/crawlspace/Cargo.toml
new file mode 100644
index 0000000..bc501db
--- /dev/null
+++ b/crawlspace/Cargo.toml
@@ -0,0 +1,57 @@
+# Copyright (c) 2024 Andrew Brower.
+# This file is part of Crawlspace.
+#
+# Crawlspace is free software: you can redistribute it and/or
+# modify it under the terms of the GNU Affero General Public
+# License as published by the Free Software Foundation, either
+# version 3 of the License, or (at your option) any later version.
+#
+# Crawlspace is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public
+# License along with Crawlspace. If not, see
+# .
+
+[package]
+name = "crawlspace"
+version = "0.1.0"
+edition = "2021"
+license = "AGPL-3.0-or-later"
+
+[dependencies]
+crawlspace-macro = { path = "../crawlspace-macro" }
+
+aes = { version = "0.8.4", optional = true }
+bit-vec = "0.8.0"
+bitfield-struct = "0.9.2"
+byteorder = "1.5.0"
+bytes = "1.8.0"
+cfb8 = { version = "0.8.1", optional = true }
+clap = { version = "4.5.20", features = ["derive", "env"] }
+color-eyre = "0.6.3"
+fastanvil = { git = "https://github.com/owengage/fastnbt.git" }
+fastnbt = { git = "https://github.com/owengage/fastnbt.git" }
+rand = "0.8.5"
+rayon = "1.10.0"
+serde = { version = "1.0.213", features = ["derive"] }
+serde_json = "1.0.132"
+sha2 = "0.10.8"
+thiserror = "1.0.65"
+tokio = { version = "1.43.1", features = ["full"] }
+tokio-util = "0.7.12"
+tracing = { version = "0.1.40", features = ["max_level_trace", "release_max_level_info"] }
+tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
+uuid = "1.11.0"
+
+[features]
+default = []
+compression = []
+encryption = ["dep:cfb8", "dep:aes"]
+modern_art = []
+lan = []
+timings = []
+
+full = ["compression", "encryption"]
diff --git a/assets/blocks.json b/crawlspace/assets/blocks.json
similarity index 100%
rename from assets/blocks.json
rename to crawlspace/assets/blocks.json
diff --git a/assets/more_registries.json b/crawlspace/assets/more_registries.json
similarity index 100%
rename from assets/more_registries.json
rename to crawlspace/assets/more_registries.json
diff --git a/assets/packets.json b/crawlspace/assets/packets.json
similarity index 100%
rename from assets/packets.json
rename to crawlspace/assets/packets.json
diff --git a/assets/registries.json b/crawlspace/assets/registries.json
similarity index 100%
rename from assets/registries.json
rename to crawlspace/assets/registries.json
diff --git a/assets/tags.json b/crawlspace/assets/tags.json
similarity index 100%
rename from assets/tags.json
rename to crawlspace/assets/tags.json
diff --git a/src/args.rs b/crawlspace/src/args.rs
similarity index 100%
rename from src/args.rs
rename to crawlspace/src/args.rs
diff --git a/src/main.rs b/crawlspace/src/main.rs
similarity index 100%
rename from src/main.rs
rename to crawlspace/src/main.rs
diff --git a/src/net/cache.rs b/crawlspace/src/net/cache.rs
similarity index 100%
rename from src/net/cache.rs
rename to crawlspace/src/net/cache.rs
diff --git a/src/net/entity.rs b/crawlspace/src/net/entity.rs
similarity index 100%
rename from src/net/entity.rs
rename to crawlspace/src/net/entity.rs
diff --git a/src/net/io.rs b/crawlspace/src/net/io.rs
similarity index 100%
rename from src/net/io.rs
rename to crawlspace/src/net/io.rs
diff --git a/src/net/mod.rs b/crawlspace/src/net/mod.rs
similarity index 100%
rename from src/net/mod.rs
rename to crawlspace/src/net/mod.rs
diff --git a/src/net/player.rs b/crawlspace/src/net/player.rs
similarity index 98%
rename from src/net/player.rs
rename to crawlspace/src/net/player.rs
index 29a30aa..df6b88e 100644
--- a/src/net/player.rs
+++ b/crawlspace/src/net/player.rs
@@ -544,7 +544,7 @@ impl SharedPlayer {
.as_str();
match resource {
- SetPlayerPositionS::ID => {
+ id if id == SetPlayerPositionS::id() => {
let packet: SetPlayerPositionS = frame.decode()?;
let tp_state = self.0.tp_state.read().await;
@@ -554,7 +554,7 @@ impl SharedPlayer {
}
}
- SetPlayerPositionAndRotationS::ID => {
+ id if id == SetPlayerPositionAndRotationS::id() => {
let packet: SetPlayerPositionAndRotationS = frame.decode()?;
let tp_state = self.0.tp_state.read().await;
@@ -565,12 +565,12 @@ impl SharedPlayer {
}
}
- ConfirmTeleportS::ID => {
+ id if id == ConfirmTeleportS::id() => {
let packet: ConfirmTeleportS = frame.decode()?;
self.check_teleports(Some(packet)).await?;
}
- UseItemOnS::ID => {
+ id if id == UseItemOnS::id() => {
let packet: UseItemOnS = frame.decode()?;
self.handle_use_item(packet).await?;
}
diff --git a/src/protocol/datatypes/impls.rs b/crawlspace/src/protocol/datatypes/impls.rs
similarity index 100%
rename from src/protocol/datatypes/impls.rs
rename to crawlspace/src/protocol/datatypes/impls.rs
diff --git a/src/protocol/datatypes/position.rs b/crawlspace/src/protocol/datatypes/position.rs
similarity index 100%
rename from src/protocol/datatypes/position.rs
rename to crawlspace/src/protocol/datatypes/position.rs
diff --git a/src/protocol/datatypes/slot.rs b/crawlspace/src/protocol/datatypes/slot.rs
similarity index 100%
rename from src/protocol/datatypes/slot.rs
rename to crawlspace/src/protocol/datatypes/slot.rs
diff --git a/src/protocol/datatypes/string.rs b/crawlspace/src/protocol/datatypes/string.rs
similarity index 100%
rename from src/protocol/datatypes/string.rs
rename to crawlspace/src/protocol/datatypes/string.rs
diff --git a/src/protocol/datatypes/text_component.rs b/crawlspace/src/protocol/datatypes/text_component.rs
similarity index 100%
rename from src/protocol/datatypes/text_component.rs
rename to crawlspace/src/protocol/datatypes/text_component.rs
diff --git a/src/protocol/datatypes/variable.rs b/crawlspace/src/protocol/datatypes/variable.rs
similarity index 100%
rename from src/protocol/datatypes/variable.rs
rename to crawlspace/src/protocol/datatypes/variable.rs
diff --git a/src/protocol/decoder.rs b/crawlspace/src/protocol/decoder.rs
similarity index 99%
rename from src/protocol/decoder.rs
rename to crawlspace/src/protocol/decoder.rs
index 227e060..78eafdb 100644
--- a/src/protocol/decoder.rs
+++ b/crawlspace/src/protocol/decoder.rs
@@ -61,7 +61,7 @@ impl Frame {
ensure!(
r.is_empty(),
"Didn't decode enough bytes decoding {}: {} left",
- P::ID,
+ P::id(),
r.len()
);
diff --git a/src/protocol/encoder.rs b/crawlspace/src/protocol/encoder.rs
similarity index 100%
rename from src/protocol/encoder.rs
rename to crawlspace/src/protocol/encoder.rs
diff --git a/src/protocol/mod.rs b/crawlspace/src/protocol/mod.rs
similarity index 96%
rename from src/protocol/mod.rs
rename to crawlspace/src/protocol/mod.rs
index bfe3145..d71d55c 100644
--- a/src/protocol/mod.rs
+++ b/crawlspace/src/protocol/mod.rs
@@ -248,19 +248,19 @@ impl TryFrom for ProtocolState {
}
pub trait Packet {
- const ID: &'static str;
- const STATE: PacketState;
- const DIRECTION: PacketDirection;
+ fn id() -> &'static str;
+ fn state() -> PacketState;
+ fn direction() -> PacketDirection;
fn get_id() -> i32 {
PACKETS
- .get_protocol_id(Self::STATE, Self::DIRECTION, Self::ID)
+ .get_protocol_id(Self::state(), Self::direction(), Self::id())
.unwrap_or_else(|| {
panic!(
"expected packet {:?}/{} ({:?}) to exist",
- Self::STATE,
- Self::ID,
- Self::DIRECTION
+ Self::state(),
+ Self::id(),
+ Self::direction()
)
})
}
diff --git a/src/protocol/packets/login/config.rs b/crawlspace/src/protocol/packets/login/config.rs
similarity index 73%
rename from src/protocol/packets/login/config.rs
rename to crawlspace/src/protocol/packets/login/config.rs
index a4a64c7..84e741d 100644
--- a/src/protocol/packets/login/config.rs
+++ b/crawlspace/src/protocol/packets/login/config.rs
@@ -18,10 +18,19 @@
*/
use color_eyre::eyre::{ensure, Result};
-
-use crate::protocol::{datatypes::{Bounded, VarInt}, Decode, DecodeSized, Encode, Packet, PacketDirection, PacketState, ProtocolState};
-
-#[derive(Debug)]
+use crawlspace_macro::Packet;
+
+use crate::protocol::{
+ datatypes::{Bounded, VarInt},
+ Decode, DecodeSized, Encode, Packet, PacketDirection, PacketState,
+};
+
+#[derive(Debug, Packet)]
+#[packet(
+ id = "minecraft:select_known_packs",
+ clientbound,
+ state = "PacketState::Configuration"
+)]
pub struct KnownPacksC<'a> {
known_pack_count: VarInt,
known_packs: Vec>,
@@ -34,12 +43,6 @@ pub struct KnownPack<'a> {
version: Bounded<&'a str>,
}
-impl Packet for KnownPacksC<'_> {
- const ID: &'static str = "minecraft:select_known_packs";
- const STATE: PacketState = PacketState::Configuration;
- const DIRECTION: PacketDirection = PacketDirection::Clientbound;
-}
-
impl Encode for KnownPacksC<'_> {
fn encode(&self, mut w: impl std::io::Write) -> Result<()> {
self.known_pack_count.encode(&mut w)?;
@@ -79,18 +82,17 @@ impl<'a> KnownPacksC<'a> {
}
}
-#[derive(Debug)]
+#[derive(Debug, Packet)]
+#[packet(
+ id = "minecraft:select_known_packs",
+ serverbound,
+ state = "PacketState::Configuration"
+)]
pub struct KnownPacksS<'a> {
pub _known_pack_count: VarInt,
pub _known_packs: Vec>,
}
-impl Packet for KnownPacksS<'_> {
- const ID: &'static str = "minecraft:select_known_packs";
- const STATE: PacketState = PacketState::Configuration;
- const DIRECTION: PacketDirection = PacketDirection::Serverbound;
-}
-
impl<'a> Decode<'a> for KnownPacksS<'a> {
fn decode(r: &mut &'a [u8]) -> Result {
let known_pack_count = VarInt::decode(r)?;
@@ -113,30 +115,28 @@ impl<'a> Decode<'a> for KnownPack<'a> {
}
}
-#[derive(Debug)]
+#[derive(Debug, Packet)]
+#[packet(
+ id = "minecraft:finish_configuration",
+ clientbound,
+ state = "PacketState::Configuration"
+)]
pub struct FinishConfigurationC;
-impl Packet for FinishConfigurationC {
- const ID: &'static str = "minecraft:finish_configuration";
- const STATE: PacketState = PacketState::Configuration;
- const DIRECTION: PacketDirection = PacketDirection::Clientbound;
-}
-
impl Encode for FinishConfigurationC {
fn encode(&self, _w: impl std::io::Write) -> Result<()> {
Ok(())
}
}
-#[derive(Debug)]
+#[derive(Debug, Packet)]
+#[packet(
+ id = "minecraft:finish_configuration",
+ serverbound,
+ state = "PacketState::Configuration"
+)]
pub struct FinishConfigurationAckS;
-impl Packet for FinishConfigurationAckS {
- const ID: &'static str = "minecraft:finish_configuration";
- const STATE: PacketState = PacketState::Configuration;
- const DIRECTION: PacketDirection = PacketDirection::Serverbound;
-}
-
impl<'a> Decode<'a> for FinishConfigurationAckS {
fn decode(_r: &mut &'a [u8]) -> Result {
Ok(Self)
diff --git a/src/protocol/packets/login/handshake.rs b/crawlspace/src/protocol/packets/login/handshake.rs
similarity index 80%
rename from src/protocol/packets/login/handshake.rs
rename to crawlspace/src/protocol/packets/login/handshake.rs
index d2b5997..55a4acb 100644
--- a/src/protocol/packets/login/handshake.rs
+++ b/crawlspace/src/protocol/packets/login/handshake.rs
@@ -19,10 +19,19 @@
use byteorder::{BigEndian, ReadBytesExt};
use color_eyre::eyre::Result;
+use crawlspace_macro::Packet;
-use crate::protocol::{datatypes::{Bounded, VarInt}, Decode, Packet, PacketDirection, PacketState, ProtocolState};
+use crate::protocol::{
+ datatypes::{Bounded, VarInt},
+ Decode, Packet, PacketDirection, PacketState, ProtocolState,
+};
-#[derive(Debug)]
+#[derive(Debug, Packet)]
+#[packet(
+ id = "minecraft:intention",
+ serverbound,
+ state = "PacketState::Handshake"
+)]
pub struct HandshakeS<'a> {
pub protocol_version: VarInt,
_server_address: Bounded<&'a str, 255>,
@@ -30,12 +39,6 @@ pub struct HandshakeS<'a> {
pub next_state: ProtocolState,
}
-impl Packet for HandshakeS<'_> {
- const ID: &'static str = "minecraft:intention";
- const STATE: PacketState = PacketState::Handshake;
- const DIRECTION: PacketDirection = PacketDirection::Serverbound;
-}
-
impl<'a> Decode<'a> for HandshakeS<'a> {
fn decode(buf: &mut &'a [u8]) -> Result {
Ok(Self {
diff --git a/src/protocol/packets/login/login.rs b/crawlspace/src/protocol/packets/login/login.rs
similarity index 62%
rename from src/protocol/packets/login/login.rs
rename to crawlspace/src/protocol/packets/login/login.rs
index 1e3c079..38c99f1 100644
--- a/src/protocol/packets/login/login.rs
+++ b/crawlspace/src/protocol/packets/login/login.rs
@@ -18,22 +18,21 @@
*/
use color_eyre::eyre::Result;
+use crawlspace_macro::Packet;
use uuid::Uuid;
-use crate::protocol::{datatypes::{Bounded, Bytes, Rest, VarInt}, Decode, Encode, Packet, PacketDirection, PacketState, Property};
+use crate::protocol::{
+ datatypes::{Bounded, Bytes, Rest, VarInt},
+ Decode, Encode, Packet, PacketDirection, PacketState, Property,
+};
-#[derive(Debug)]
+#[derive(Debug, Packet)]
+#[packet(id = "minecraft:hello", serverbound, state = "PacketState::Login")]
pub struct LoginStartS<'a> {
pub name: Bounded<&'a str, 16>,
pub player_uuid: Uuid,
}
-impl Packet for LoginStartS<'_> {
- const ID: &'static str = "minecraft:hello";
- const STATE: PacketState = PacketState::Login;
- const DIRECTION: PacketDirection = PacketDirection::Serverbound;
-}
-
impl<'a> Decode<'a> for LoginStartS<'a> {
fn decode(buf: &mut &'a [u8]) -> Result {
Ok(Self {
@@ -43,19 +42,18 @@ impl<'a> Decode<'a> for LoginStartS<'a> {
}
}
-#[derive(Debug)]
+#[derive(Debug, Packet)]
+#[packet(
+ id = "minecraft:login_finished",
+ clientbound,
+ state = "PacketState::Login"
+)]
pub struct LoginSuccessC<'a> {
pub uuid: Uuid,
pub username: Bounded<&'a str, 16>,
pub properties: Vec>,
}
-impl Packet for LoginSuccessC<'_> {
- const ID: &'static str = "minecraft:login_finished";
- const STATE: PacketState = PacketState::Login;
- const DIRECTION: PacketDirection = PacketDirection::Clientbound;
-}
-
impl<'a> Encode for LoginSuccessC<'a> {
fn encode(&self, mut w: impl std::io::Write) -> Result<()> {
let properties_len = VarInt(self.properties.len() as i32);
@@ -69,19 +67,18 @@ impl<'a> Encode for LoginSuccessC<'a> {
}
}
-#[derive(Debug)]
+#[derive(Debug, Packet)]
+#[packet(
+ id = "minecraft:custom_query",
+ clientbound,
+ state = "PacketState::Login"
+)]
pub struct PluginRequestC<'a> {
pub message_id: VarInt,
pub channel: Bounded<&'a str, 32767>,
pub data: Rest, 1048576>,
}
-impl Packet for PluginRequestC<'_> {
- const ID: &'static str = "minecraft:custom_query";
- const STATE: PacketState = PacketState::Login;
- const DIRECTION: PacketDirection = PacketDirection::Clientbound;
-}
-
impl<'a> Encode for PluginRequestC<'a> {
fn encode(&self, mut w: impl std::io::Write) -> Result<()> {
self.message_id.encode(&mut w)?;
@@ -92,36 +89,38 @@ impl<'a> Encode for PluginRequestC<'a> {
}
}
-#[derive(Debug)]
+#[derive(Debug, Packet)]
+#[packet(
+ id = "minecraft:custom_query_answer",
+ serverbound,
+ state = "PacketState::Login"
+)]
pub struct PluginResponseS<'a> {
pub message_id: VarInt,
- pub data: Option, 1048576>>
-}
-
-impl Packet for PluginResponseS<'_> {
- const ID: &'static str = "minecraft:custom_query_answer";
- const STATE: PacketState = PacketState::Login;
- const DIRECTION: PacketDirection = PacketDirection::Serverbound;
+ pub data: Option, 1048576>>,
}
impl<'a> Decode<'a> for PluginResponseS<'a> {
fn decode(r: &mut &'a [u8]) -> Result {
Ok(Self {
message_id: VarInt::decode(r)?,
- data: if bool::decode(r)? { Some(Rest::, 1048576>::decode(r)?) } else { None }
+ data: if bool::decode(r)? {
+ Some(Rest::, 1048576>::decode(r)?)
+ } else {
+ None
+ },
})
}
}
-#[derive(Debug)]
+#[derive(Debug, Packet)]
+#[packet(
+ id = "minecraft:login_acknowledged",
+ serverbound,
+ state = "PacketState::Login"
+)]
pub struct LoginAckS;
-impl Packet for LoginAckS {
- const ID: &'static str = "minecraft:login_acknowledged";
- const STATE: PacketState = PacketState::Login;
- const DIRECTION: PacketDirection = PacketDirection::Serverbound;
-}
-
impl Decode<'_> for LoginAckS {
fn decode(_r: &mut &'_ [u8]) -> Result {
Ok(Self)
diff --git a/src/protocol/packets/login/registry/banner.rs b/crawlspace/src/protocol/packets/login/registry/banner.rs
similarity index 100%
rename from src/protocol/packets/login/registry/banner.rs
rename to crawlspace/src/protocol/packets/login/registry/banner.rs
diff --git a/src/protocol/packets/login/registry/biome.rs b/crawlspace/src/protocol/packets/login/registry/biome.rs
similarity index 100%
rename from src/protocol/packets/login/registry/biome.rs
rename to crawlspace/src/protocol/packets/login/registry/biome.rs
diff --git a/src/protocol/packets/login/registry/chat.rs b/crawlspace/src/protocol/packets/login/registry/chat.rs
similarity index 100%
rename from src/protocol/packets/login/registry/chat.rs
rename to crawlspace/src/protocol/packets/login/registry/chat.rs
diff --git a/src/protocol/packets/login/registry/damage.rs b/crawlspace/src/protocol/packets/login/registry/damage.rs
similarity index 100%
rename from src/protocol/packets/login/registry/damage.rs
rename to crawlspace/src/protocol/packets/login/registry/damage.rs
diff --git a/src/protocol/packets/login/registry/dimension.rs b/crawlspace/src/protocol/packets/login/registry/dimension.rs
similarity index 100%
rename from src/protocol/packets/login/registry/dimension.rs
rename to crawlspace/src/protocol/packets/login/registry/dimension.rs
diff --git a/src/protocol/packets/login/registry/mod.rs b/crawlspace/src/protocol/packets/login/registry/mod.rs
similarity index 94%
rename from src/protocol/packets/login/registry/mod.rs
rename to crawlspace/src/protocol/packets/login/registry/mod.rs
index 34d9cb4..7b7a806 100644
--- a/src/protocol/packets/login/registry/mod.rs
+++ b/crawlspace/src/protocol/packets/login/registry/mod.rs
@@ -19,6 +19,7 @@
use std::{collections::HashMap, sync::LazyLock};
+use crawlspace_macro::Packet;
use fastnbt::SerOpts;
use serde::{de, Deserialize, Serialize};
@@ -30,9 +31,9 @@ mod chat;
mod damage;
mod dimension;
mod painting;
+mod tags;
mod trim;
mod wolf;
-mod tags;
pub use banner::*;
pub use biome::*;
@@ -40,9 +41,9 @@ pub use chat::*;
pub use damage::*;
pub use dimension::*;
pub use painting::*;
+pub use tags::*;
pub use trim::*;
pub use wolf::*;
-pub use tags::*;
pub static ALL_REGISTRIES: LazyLock = LazyLock::new(|| {
serde_json::from_str(include_str!("../../../../../assets/registries.json"))
@@ -54,8 +55,16 @@ pub static TAGS: LazyLock = LazyLock::new(|| {
.expect("tags.json should be parseable")
});
-#[derive(Clone, Debug, Serialize, Deserialize)]
-pub struct Registry {
+#[derive(Clone, Debug, Serialize, Deserialize, Packet)]
+#[packet(
+ id = "minecraft:registry_data",
+ clientbound,
+ state = "PacketState::Configuration"
+)]
+pub struct Registry
+where
+ T: RegistryItem,
+{
registry_id: String,
pub entries: Vec>,
}
@@ -71,15 +80,6 @@ impl Registry {
}
}
-impl Packet for Registry
-where
- T: RegistryItem,
-{
- const ID: &'static str = "minecraft:registry_data";
- const STATE: PacketState = PacketState::Configuration;
- const DIRECTION: PacketDirection = PacketDirection::Clientbound;
-}
-
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct RegistryEntry {
id: String,
diff --git a/src/protocol/packets/login/registry/painting.rs b/crawlspace/src/protocol/packets/login/registry/painting.rs
similarity index 100%
rename from src/protocol/packets/login/registry/painting.rs
rename to crawlspace/src/protocol/packets/login/registry/painting.rs
diff --git a/src/protocol/packets/login/registry/tags.rs b/crawlspace/src/protocol/packets/login/registry/tags.rs
similarity index 78%
rename from src/protocol/packets/login/registry/tags.rs
rename to crawlspace/src/protocol/packets/login/registry/tags.rs
index bb9633e..34be898 100644
--- a/src/protocol/packets/login/registry/tags.rs
+++ b/crawlspace/src/protocol/packets/login/registry/tags.rs
@@ -1,19 +1,20 @@
-use std::collections::HashMap;
-use crate::protocol::{Encode, Packet, PacketDirection, PacketState};
+use crawlspace_macro::Packet;
+
use crate::protocol::datatypes::{Bounded, VarInt};
+use crate::protocol::{Encode, Packet, PacketDirection, PacketState};
+use std::collections::HashMap;
-#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
+#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Packet)]
+#[packet(
+ id = "minecraft:update_tags",
+ clientbound,
+ state = "PacketState::Configuration"
+)]
pub struct AllTags(pub HashMap);
#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct Tags(pub HashMap>);
-impl Packet for AllTags {
- const ID: &'static str = "minecraft:update_tags";
- const STATE: PacketState = PacketState::Configuration;
- const DIRECTION: PacketDirection = PacketDirection::Clientbound;
-}
-
impl Encode for AllTags {
fn encode(&self, mut w: impl std::io::Write) -> color_eyre::Result<()> {
VarInt(self.0.len() as i32).encode(&mut w)?;
@@ -38,4 +39,4 @@ impl Encode for Tags {
Ok(())
}
-}
\ No newline at end of file
+}
diff --git a/src/protocol/packets/login/registry/trim.rs b/crawlspace/src/protocol/packets/login/registry/trim.rs
similarity index 100%
rename from src/protocol/packets/login/registry/trim.rs
rename to crawlspace/src/protocol/packets/login/registry/trim.rs
diff --git a/src/protocol/packets/login/registry/wolf.rs b/crawlspace/src/protocol/packets/login/registry/wolf.rs
similarity index 100%
rename from src/protocol/packets/login/registry/wolf.rs
rename to crawlspace/src/protocol/packets/login/registry/wolf.rs
diff --git a/src/protocol/packets/login/status.rs b/crawlspace/src/protocol/packets/login/status.rs
similarity index 65%
rename from src/protocol/packets/login/status.rs
rename to crawlspace/src/protocol/packets/login/status.rs
index 2918f6f..09845f1 100644
--- a/src/protocol/packets/login/status.rs
+++ b/crawlspace/src/protocol/packets/login/status.rs
@@ -21,63 +21,52 @@ use std::io::Write;
use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt};
use color_eyre::eyre::Result;
+use crawlspace_macro::Packet;
use crate::protocol::{Decode, Encode, Packet, PacketDirection, PacketState};
-#[derive(Debug)]
+#[derive(Debug, Packet)]
+#[packet(
+ id = "minecraft:status_request",
+ serverbound,
+ state = "PacketState::Status"
+)]
pub struct StatusRequestS;
-impl Packet for StatusRequestS {
- const ID: &'static str = "minecraft:status_request";
- const STATE: PacketState = PacketState::Status;
- const DIRECTION: PacketDirection = PacketDirection::Serverbound;
-}
-
impl<'a> Decode<'a> for StatusRequestS {
fn decode(_buf: &mut &'a [u8]) -> Result {
Ok(Self)
}
}
-#[derive(Debug)]
+#[derive(Debug, Packet)]
+#[packet(
+ id = "minecraft:status_response",
+ clientbound,
+ state = "PacketState::Status"
+)]
pub struct StatusResponseC<'a> {
pub json_respose: &'a str,
}
-impl<'a> Packet for StatusResponseC<'a> {
- const ID: &'static str = "minecraft:status_response";
- const STATE: PacketState = PacketState::Status;
- const DIRECTION: PacketDirection = PacketDirection::Clientbound;
-}
-
impl<'a> Encode for StatusResponseC<'a> {
fn encode(&self, mut w: impl Write) -> Result<()> {
self.json_respose.encode(&mut w)
}
}
-#[derive(Debug)]
+#[derive(Debug, Packet)]
+#[packet(id = "minecraft:ping", serverbound, state = "PacketState::Status")]
pub struct PingC {
pub payload: i64,
}
-#[derive(Debug)]
+#[derive(Debug, Packet)]
+#[packet(id = "minecraft:pong", clientbound, state = "PacketState::Status")]
pub struct PingS {
pub payload: i64,
}
-impl Packet for PingC {
- const ID: &'static str = "minecraft:ping";
- const STATE: PacketState = PacketState::Status;
- const DIRECTION: PacketDirection = PacketDirection::Serverbound;
-}
-
-impl Packet for PingS {
- const ID: &'static str = "minecraft:pong";
- const STATE: PacketState = PacketState::Status;
- const DIRECTION: PacketDirection = PacketDirection::Clientbound;
-}
-
impl Encode for PingC {
fn encode(&self, mut w: impl Write) -> Result<()> {
Ok(w.write_i64::(self.payload)?)
diff --git a/src/protocol/packets/play/container.rs b/crawlspace/src/protocol/packets/play/container.rs
similarity index 82%
rename from src/protocol/packets/play/container.rs
rename to crawlspace/src/protocol/packets/play/container.rs
index f6ca665..39024c5 100644
--- a/src/protocol/packets/play/container.rs
+++ b/crawlspace/src/protocol/packets/play/container.rs
@@ -17,6 +17,9 @@
* .
*/
+use crawlspace_macro::Packet;
+
+use crate::protocol::{PacketDirection, PacketState};
use crate::{
protocol::{
datatypes::{Slot, TextComponent, VarInt},
@@ -24,21 +27,15 @@ use crate::{
},
server::window::{Window, WindowType},
};
-use crate::protocol::{PacketDirection, PacketState};
-#[derive(Debug)]
+#[derive(Debug, Packet)]
+#[packet(id = "minecraft:open_screen", clientbound, state = "PacketState::Play")]
pub struct OpenScreenC {
window_id: i32,
window_type: WindowType,
window_title: TextComponent,
}
-impl Packet for OpenScreenC {
- const ID: &'static str = "minecraft:open_screen";
- const STATE: PacketState = PacketState::Play;
- const DIRECTION: PacketDirection = PacketDirection::Clientbound;
-}
-
impl Encode for OpenScreenC {
fn encode(&self, mut w: impl std::io::Write) -> color_eyre::eyre::Result<()> {
VarInt(self.window_id).encode(&mut w)?;
@@ -60,7 +57,12 @@ impl From<&Window> for OpenScreenC {
}
}
-#[derive(Debug)]
+#[derive(Debug, Packet)]
+#[packet(
+ id = "minecraft:container_set_content",
+ clientbound,
+ state = "PacketState::Play"
+)]
pub struct SetContainerContentC {
pub window_id: u8,
pub state_id: i32,
@@ -68,12 +70,6 @@ pub struct SetContainerContentC {
pub carried_item: Slot,
}
-impl Packet for SetContainerContentC {
- const ID: &'static str = "minecraft:container_set_content";
- const STATE: PacketState = PacketState::Play;
- const DIRECTION: PacketDirection = PacketDirection::Clientbound;
-}
-
impl Encode for SetContainerContentC {
fn encode(&self, mut w: impl std::io::Write) -> color_eyre::eyre::Result<()> {
self.window_id.encode(&mut w)?;
diff --git a/src/protocol/packets/play/game_event.rs b/crawlspace/src/protocol/packets/play/game_event.rs
similarity index 92%
rename from src/protocol/packets/play/game_event.rs
rename to crawlspace/src/protocol/packets/play/game_event.rs
index 6baf7c0..fd7cfc5 100644
--- a/src/protocol/packets/play/game_event.rs
+++ b/crawlspace/src/protocol/packets/play/game_event.rs
@@ -17,22 +17,19 @@
* .
*/
+use crawlspace_macro::Packet;
+
use crate::protocol::{Encode, Packet, PacketDirection, PacketState};
use super::Gamemode;
-#[derive(Debug)]
+#[derive(Debug, Packet)]
+#[packet(id = "minecraft:game_event", clientbound, state = "PacketState::Play")]
pub struct GameEventC {
event: u8,
value: f32,
}
-impl Packet for GameEventC {
- const ID: &'static str = "minecraft:game_event";
- const STATE: PacketState = PacketState::Play;
- const DIRECTION: PacketDirection = PacketDirection::Clientbound;
-}
-
impl Encode for GameEventC {
fn encode(&self, mut w: impl std::io::Write) -> color_eyre::eyre::Result<()> {
self.event.encode(&mut w)?;
diff --git a/src/protocol/packets/play/interactions.rs b/crawlspace/src/protocol/packets/play/interactions.rs
similarity index 89%
rename from src/protocol/packets/play/interactions.rs
rename to crawlspace/src/protocol/packets/play/interactions.rs
index db786c7..97111d6 100644
--- a/src/protocol/packets/play/interactions.rs
+++ b/crawlspace/src/protocol/packets/play/interactions.rs
@@ -18,10 +18,15 @@
*/
use byteorder::{BigEndian, ReadBytesExt};
+use crawlspace_macro::Packet;
-use crate::protocol::{datatypes::{Position, VarInt}, Decode, Packet, PacketDirection, PacketState};
+use crate::protocol::{
+ datatypes::{Position, VarInt},
+ Decode, Packet, PacketDirection, PacketState,
+};
-#[derive(Debug)]
+#[derive(Debug, Packet)]
+#[packet(id = "minecraft:use_item_on", serverbound, state = "PacketState::Play")]
pub struct UseItemOnS {
pub hand: Hand,
pub location: Position,
@@ -90,12 +95,6 @@ impl TryFrom for Face {
}
}
-impl Packet for UseItemOnS {
- const ID: &'static str = "minecraft:use_item_on";
- const STATE: PacketState = PacketState::Play;
- const DIRECTION: PacketDirection = PacketDirection::Serverbound;
-}
-
impl Decode<'_> for UseItemOnS {
fn decode(r: &mut &'_ [u8]) -> color_eyre::eyre::Result
where
diff --git a/src/protocol/packets/play/keepalive.rs b/crawlspace/src/protocol/packets/play/keepalive.rs
similarity index 73%
rename from src/protocol/packets/play/keepalive.rs
rename to crawlspace/src/protocol/packets/play/keepalive.rs
index 884aa98..f8266d2 100644
--- a/src/protocol/packets/play/keepalive.rs
+++ b/crawlspace/src/protocol/packets/play/keepalive.rs
@@ -17,33 +17,25 @@
* .
*/
+use crawlspace_macro::Packet;
+
use crate::protocol::{Decode, Encode, Packet, PacketDirection, PacketState};
-#[derive(Debug)]
+#[derive(Debug, Packet)]
+#[packet(id = "minecraft:keep_alive", clientbound, state = "PacketState::Play")]
pub struct KeepAliveC(pub i64);
-impl Packet for KeepAliveC {
- const ID: &'static str = "minecraft:keep_alive";
- const STATE: PacketState = PacketState::Play;
- const DIRECTION: PacketDirection = PacketDirection::Clientbound;
-}
-
impl Encode for KeepAliveC {
fn encode(&self, mut w: impl std::io::Write) -> color_eyre::eyre::Result<()> {
self.0.encode(&mut w)
}
}
-#[derive(Debug)]
+#[derive(Debug, Packet)]
+#[packet(id = "minecraft:keep_alive", serverbound, state = "PacketState::Play")]
#[expect(unused)]
pub struct KeepAliveS(i64);
-impl Packet for KeepAliveS {
- const ID: &'static str = "minecraft:keep_alive";
- const STATE: PacketState = PacketState::Play;
- const DIRECTION: PacketDirection = PacketDirection::Serverbound;
-}
-
impl<'a> Decode<'a> for KeepAliveS {
fn decode(r: &mut &'a [u8]) -> color_eyre::eyre::Result {
Ok(Self(i64::decode(r)?))
diff --git a/src/protocol/packets/play/login.rs b/crawlspace/src/protocol/packets/play/login.rs
similarity index 93%
rename from src/protocol/packets/play/login.rs
rename to crawlspace/src/protocol/packets/play/login.rs
index df6d5ae..3bd60ff 100644
--- a/src/protocol/packets/play/login.rs
+++ b/crawlspace/src/protocol/packets/play/login.rs
@@ -17,9 +17,15 @@
* .
*/
-use crate::protocol::{datatypes::{Bounded, Position, VarInt}, Encode, Packet, PacketDirection, PacketState};
+use crawlspace_macro::Packet;
-#[derive(Debug)]
+use crate::protocol::{
+ datatypes::{Bounded, Position, VarInt},
+ Encode, Packet, PacketDirection, PacketState,
+};
+
+#[derive(Debug, Packet)]
+#[packet(id = "minecraft:login", clientbound, state = "PacketState::Play")]
pub struct LoginPlayC<'a> {
/// The player's Entity ID (EID).
pub entity_id: i32,
@@ -89,12 +95,6 @@ pub struct DeathLocation<'a> {
death_location: Position,
}
-impl Packet for LoginPlayC<'_> {
- const ID: &'static str = "minecraft:login";
- const STATE: PacketState = PacketState::Play;
- const DIRECTION: PacketDirection = PacketDirection::Clientbound;
-}
-
impl<'a> Encode for LoginPlayC<'a> {
fn encode(&self, mut w: impl std::io::Write) -> color_eyre::eyre::Result<()> {
self.entity_id.encode(&mut w)?;
diff --git a/src/protocol/packets/play/position.rs b/crawlspace/src/protocol/packets/play/position.rs
similarity index 80%
rename from src/protocol/packets/play/position.rs
rename to crawlspace/src/protocol/packets/play/position.rs
index 2a4590c..6b9f7ac 100644
--- a/src/protocol/packets/play/position.rs
+++ b/crawlspace/src/protocol/packets/play/position.rs
@@ -18,10 +18,16 @@
*/
use byteorder::{BigEndian, ReadBytesExt};
+use crawlspace_macro::Packet;
use crate::protocol::{Decode, Packet, PacketDirection, PacketState};
-#[derive(Debug)]
+#[derive(Debug, Packet)]
+#[packet(
+ id = "minecraft:move_player_pos",
+ serverbound,
+ state = "PacketState::Play"
+)]
pub struct SetPlayerPositionS {
pub x: f64,
pub feet_y: f64,
@@ -29,12 +35,6 @@ pub struct SetPlayerPositionS {
pub on_ground: bool,
}
-impl Packet for SetPlayerPositionS {
- const ID: &'static str = "minecraft:move_player_pos";
- const STATE: PacketState = PacketState::Play;
- const DIRECTION: PacketDirection = PacketDirection::Serverbound;
-}
-
impl Decode<'_> for SetPlayerPositionS {
fn decode(r: &mut &'_ [u8]) -> color_eyre::eyre::Result
where
@@ -49,7 +49,12 @@ impl Decode<'_> for SetPlayerPositionS {
}
}
-#[derive(Debug)]
+#[derive(Debug, Packet)]
+#[packet(
+ id = "minecraft:move_player_pos_rot",
+ serverbound,
+ state = "PacketState::Play"
+)]
pub struct SetPlayerPositionAndRotationS {
pub x: f64,
pub feet_y: f64,
@@ -59,12 +64,6 @@ pub struct SetPlayerPositionAndRotationS {
pub on_ground: bool,
}
-impl Packet for SetPlayerPositionAndRotationS {
- const ID: &'static str = "minecraft:move_player_pos_rot";
- const STATE: PacketState = PacketState::Play;
- const DIRECTION: PacketDirection = PacketDirection::Serverbound;
-}
-
impl Decode<'_> for SetPlayerPositionAndRotationS {
fn decode(r: &mut &'_ [u8]) -> color_eyre::eyre::Result
where
diff --git a/src/protocol/packets/play/status.rs b/crawlspace/src/protocol/packets/play/status.rs
similarity index 91%
rename from src/protocol/packets/play/status.rs
rename to crawlspace/src/protocol/packets/play/status.rs
index 0d82f83..8f548ff 100644
--- a/src/protocol/packets/play/status.rs
+++ b/crawlspace/src/protocol/packets/play/status.rs
@@ -17,13 +17,22 @@
* .
*/
+use crawlspace_macro::Packet;
use uuid::Uuid;
-use crate::protocol::{datatypes::{Bounded, VarInt}, Encode, Packet, PacketDirection, PacketState, Property};
+use crate::protocol::{
+ datatypes::{Bounded, VarInt},
+ Encode, Packet, PacketDirection, PacketState, Property,
+};
use super::Gamemode;
-#[derive(Debug)]
+#[derive(Debug, Packet)]
+#[packet(
+ id = "minecraft:player_info_update",
+ clientbound,
+ state = "PacketState::Play"
+)]
pub struct PlayerInfoUpdateC<'a> {
pub players: &'a [PlayerStatus<'a>],
}
@@ -51,12 +60,6 @@ enum PlayerAction<'a> {
},
}
-impl Packet for PlayerInfoUpdateC<'_> {
- const ID: &'static str = "minecraft:player_info_update";
- const STATE: PacketState = PacketState::Play;
- const DIRECTION: PacketDirection = PacketDirection::Clientbound;
-}
-
// "I'm a Never-Nester"
// The unwavering Minecraft Protocol:
impl Encode for PlayerInfoUpdateC<'_> {
diff --git a/src/protocol/packets/play/teleport.rs b/crawlspace/src/protocol/packets/play/teleport.rs
similarity index 88%
rename from src/protocol/packets/play/teleport.rs
rename to crawlspace/src/protocol/packets/play/teleport.rs
index 23c454c..eea06ea 100644
--- a/src/protocol/packets/play/teleport.rs
+++ b/crawlspace/src/protocol/packets/play/teleport.rs
@@ -19,11 +19,18 @@
use std::sync::atomic::{AtomicI32, Ordering};
+use crawlspace_macro::Packet;
+
use crate::protocol::{datatypes::VarInt, Decode, Encode, Packet, PacketDirection, PacketState};
static TP_ID: AtomicI32 = AtomicI32::new(0);
-#[derive(Debug)]
+#[derive(Debug, Packet)]
+#[packet(
+ id = "minecraft:player_position",
+ clientbound,
+ state = "PacketState::Play"
+)]
pub struct SynchronisePositionC {
x: f64,
y: f64,
@@ -123,12 +130,6 @@ impl SynchronisePositionC {
}
}
-impl Packet for SynchronisePositionC {
- const ID: &'static str = "minecraft:player_position";
- const STATE: PacketState = PacketState::Play;
- const DIRECTION: PacketDirection = PacketDirection::Clientbound;
-}
-
impl Encode for SynchronisePositionC {
fn encode(&self, mut w: impl std::io::Write) -> color_eyre::eyre::Result<()> {
VarInt(self.id).encode(&mut w)?;
@@ -146,17 +147,16 @@ impl Encode for SynchronisePositionC {
}
}
-#[derive(Debug)]
+#[derive(Debug, Packet)]
+#[packet(
+ id = "minecraft:accept_teleportation",
+ serverbound,
+ state = "PacketState::Play"
+)]
pub struct ConfirmTeleportS {
pub id: i32,
}
-impl Packet for ConfirmTeleportS {
- const ID: &'static str = "minecraft:accept_teleportation";
- const STATE: PacketState = PacketState::Play;
- const DIRECTION: PacketDirection = PacketDirection::Serverbound;
-}
-
impl Decode<'_> for ConfirmTeleportS {
fn decode(r: &mut &'_ [u8]) -> color_eyre::eyre::Result {
Ok(Self {
diff --git a/src/protocol/packets/play/tick.rs b/crawlspace/src/protocol/packets/play/tick.rs
similarity index 74%
rename from src/protocol/packets/play/tick.rs
rename to crawlspace/src/protocol/packets/play/tick.rs
index 4bd2dce..73f8364 100644
--- a/src/protocol/packets/play/tick.rs
+++ b/crawlspace/src/protocol/packets/play/tick.rs
@@ -17,20 +17,21 @@
* .
*/
+use crawlspace_macro::Packet;
+
use crate::protocol::{datatypes::VarInt, Encode, Packet, PacketDirection, PacketState};
-#[derive(Debug)]
+#[derive(Debug, Packet)]
+#[packet(
+ id = "minecraft:ticking_state",
+ clientbound,
+ state = "PacketState::Play"
+)]
pub struct SetTickingStateC {
pub tick_rate: f32,
pub is_frozen: bool,
}
-impl Packet for SetTickingStateC {
- const ID: &'static str = "minecraft:ticking_state";
- const STATE: PacketState = PacketState::Play;
- const DIRECTION: PacketDirection = PacketDirection::Clientbound;
-}
-
impl Encode for SetTickingStateC {
fn encode(&self, mut w: impl std::io::Write) -> color_eyre::eyre::Result<()> {
self.tick_rate.encode(&mut w)?;
@@ -39,15 +40,14 @@ impl Encode for SetTickingStateC {
}
}
-#[derive(Debug)]
+#[derive(Debug, Packet)]
+#[packet(
+ id = "minecraft:ticking_step",
+ clientbound,
+ state = "PacketState::Play"
+)]
pub struct StepTicksC(pub i32);
-impl Packet for StepTicksC {
- const ID: &'static str = "minecraft:ticking_step";
- const STATE: PacketState = PacketState::Play;
- const DIRECTION: PacketDirection = PacketDirection::Clientbound;
-}
-
impl Encode for StepTicksC {
fn encode(&self, w: impl std::io::Write) -> color_eyre::eyre::Result<()> {
VarInt(self.0).encode(w)
diff --git a/src/protocol/packets/play/world.rs b/crawlspace/src/protocol/packets/play/world.rs
similarity index 92%
rename from src/protocol/packets/play/world.rs
rename to crawlspace/src/protocol/packets/play/world.rs
index be643ae..2e5d856 100644
--- a/src/protocol/packets/play/world.rs
+++ b/crawlspace/src/protocol/packets/play/world.rs
@@ -21,8 +21,10 @@ use std::collections::HashMap;
use bit_vec::BitVec;
use bytes::BufMut;
+use crawlspace_macro::Packet;
use fastnbt::SerOpts;
+use crate::protocol::{PacketDirection, PacketState};
use crate::{
protocol::{
datatypes::{VarInt, VarLong},
@@ -34,20 +36,18 @@ use crate::{
},
CrawlState,
};
-use crate::protocol::{PacketDirection, PacketState};
-#[derive(Debug)]
+#[derive(Debug, Packet)]
+#[packet(
+ id = "minecraft:set_chunk_cache_center",
+ clientbound,
+ state = "PacketState::Play"
+)]
pub struct SetCenterChunkC {
pub x: VarInt,
pub y: VarInt,
}
-impl Packet for SetCenterChunkC {
- const ID: &'static str = "minecraft:set_chunk_cache_center";
- const STATE: PacketState = PacketState::Play;
- const DIRECTION: PacketDirection = PacketDirection::Clientbound;
-}
-
impl Encode for SetCenterChunkC {
fn encode(&self, mut w: impl std::io::Write) -> color_eyre::eyre::Result<()> {
self.x.encode(&mut w)?;
@@ -56,7 +56,12 @@ impl Encode for SetCenterChunkC {
}
}
-#[derive(Debug)]
+#[derive(Debug, Packet)]
+#[packet(
+ id = "minecraft:level_chunk_with_light",
+ clientbound,
+ state = "PacketState::Play"
+)]
pub struct ChunkDataUpdateLightC<'a> {
x: i32,
z: i32,
@@ -214,12 +219,6 @@ impl Encode for PalettedContainer {
}
}
-impl Packet for ChunkDataUpdateLightC<'_> {
- const ID: &'static str = "minecraft:level_chunk_with_light";
- const STATE: PacketState = PacketState::Play;
- const DIRECTION: PacketDirection = PacketDirection::Clientbound;
-}
-
impl Encode for ChunkDataUpdateLightC<'_> {
fn encode(&self, mut w: impl std::io::Write) -> color_eyre::eyre::Result<()> {
self.x.encode(&mut w)?;
@@ -446,7 +445,12 @@ impl ChunkDataUpdateLightC<'_> {
}
}
-#[derive(Debug)]
+#[derive(Debug, Packet)]
+#[packet(
+ id = "minecraft:initialize_border",
+ clientbound,
+ state = "PacketState::Play"
+)]
pub struct InitializeWorldBorderC {
pub x: f64,
pub z: f64,
@@ -458,12 +462,6 @@ pub struct InitializeWorldBorderC {
pub warning_time_sec: i32,
}
-impl Packet for InitializeWorldBorderC {
- const ID: &'static str = "minecraft:initialize_border";
- const STATE: PacketState = PacketState::Play;
- const DIRECTION: PacketDirection = PacketDirection::Clientbound;
-}
-
impl Encode for InitializeWorldBorderC {
fn encode(&self, mut w: impl std::io::Write) -> color_eyre::eyre::Result<()> {
self.x.encode(&mut w)?;
@@ -478,18 +476,17 @@ impl Encode for InitializeWorldBorderC {
}
}
-#[derive(Debug)]
+#[derive(Debug, Packet)]
+#[packet(
+ id = "minecraft:set_border_center",
+ clientbound,
+ state = "PacketState::Play"
+)]
pub struct SetBorderCenterC {
pub x: f64,
pub z: f64,
}
-impl Packet for SetBorderCenterC {
- const ID: &'static str = "minecraft:set_border_center";
- const STATE: PacketState = PacketState::Play;
- const DIRECTION: PacketDirection = PacketDirection::Clientbound;
-}
-
impl Encode for SetBorderCenterC {
fn encode(&self, mut w: impl std::io::Write) -> color_eyre::eyre::Result<()> {
self.x.encode(&mut w)?;
@@ -498,15 +495,14 @@ impl Encode for SetBorderCenterC {
}
}
-#[derive(Debug)]
+#[derive(Debug, Packet)]
+#[packet(
+ id = "minecraft:set_border_size",
+ clientbound,
+ state = "PacketState::Play"
+)]
pub struct SetBorderSizeC(pub f64);
-impl Packet for SetBorderSizeC {
- const ID: &'static str = "minecraft:set_border_size";
- const STATE: PacketState = PacketState::Play;
- const DIRECTION: PacketDirection = PacketDirection::Clientbound;
-}
-
impl Encode for SetBorderSizeC {
fn encode(&self, w: impl std::io::Write) -> color_eyre::eyre::Result<()> {
self.0.encode(w)
diff --git a/src/server/mod.rs b/crawlspace/src/server/mod.rs
similarity index 100%
rename from src/server/mod.rs
rename to crawlspace/src/server/mod.rs
diff --git a/src/server/registries.rs b/crawlspace/src/server/registries.rs
similarity index 100%
rename from src/server/registries.rs
rename to crawlspace/src/server/registries.rs
diff --git a/src/server/ticker.rs b/crawlspace/src/server/ticker.rs
similarity index 100%
rename from src/server/ticker.rs
rename to crawlspace/src/server/ticker.rs
diff --git a/src/server/window.rs b/crawlspace/src/server/window.rs
similarity index 100%
rename from src/server/window.rs
rename to crawlspace/src/server/window.rs
diff --git a/src/state.rs b/crawlspace/src/state.rs
similarity index 100%
rename from src/state.rs
rename to crawlspace/src/state.rs
diff --git a/src/world/block_entity.rs b/crawlspace/src/world/block_entity.rs
similarity index 100%
rename from src/world/block_entity.rs
rename to crawlspace/src/world/block_entity.rs
diff --git a/src/world/blocks.rs b/crawlspace/src/world/blocks.rs
similarity index 100%
rename from src/world/blocks.rs
rename to crawlspace/src/world/blocks.rs
diff --git a/src/world/container.rs b/crawlspace/src/world/container.rs
similarity index 100%
rename from src/world/container.rs
rename to crawlspace/src/world/container.rs
diff --git a/src/world/mod.rs b/crawlspace/src/world/mod.rs
similarity index 100%
rename from src/world/mod.rs
rename to crawlspace/src/world/mod.rs