aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Cargo.lock703
-rw-r--r--Cargo.toml10
-rw-r--r--src/error.rs6
-rw-r--r--src/luax/lexer.rs12
-rw-r--r--src/luax/mod.rs137
-rw-r--r--src/luax/tests/preprocessor.rs2
-rw-r--r--src/main.rs14
-rw-r--r--src/server.rs30
8 files changed, 443 insertions, 471 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 0d4f534..28a3ed3 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1,138 +1,142 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
-version = 3
+version = 4
[[package]]
name = "addr2line"
-version = "0.21.0"
+version = "0.27.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb"
+checksum = "e567177890eb1617b1f774005b66b26b2377afd138a2ca37aae7d8f0c81429d4"
dependencies = [
"gimli",
]
[[package]]
-name = "adler"
-version = "1.0.2"
+name = "adler2"
+version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
+checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"
[[package]]
name = "anstream"
-version = "0.6.5"
+version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d664a92ecae85fd0a7392615844904654d1d5f5514837f471ddef4a057aba1b6"
+checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d"
dependencies = [
"anstyle",
"anstyle-parse",
"anstyle-query",
"anstyle-wincon",
"colorchoice",
+ "is_terminal_polyfill",
"utf8parse",
]
[[package]]
name = "anstyle"
-version = "1.0.4"
+version = "1.0.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87"
+checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000"
[[package]]
name = "anstyle-parse"
-version = "0.2.3"
+version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c"
+checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e"
dependencies = [
"utf8parse",
]
[[package]]
name = "anstyle-query"
-version = "1.0.2"
+version = "1.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648"
+checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc"
dependencies = [
- "windows-sys 0.52.0",
+ "windows-sys",
]
[[package]]
name = "anstyle-wincon"
-version = "3.0.2"
+version = "3.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7"
+checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d"
dependencies = [
"anstyle",
- "windows-sys 0.52.0",
+ "once_cell_polyfill",
+ "windows-sys",
]
[[package]]
+name = "atomic-waker"
+version = "1.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0"
+
+[[package]]
name = "autocfg"
-version = "1.1.0"
+version = "1.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
+checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53"
[[package]]
name = "backtrace"
-version = "0.3.69"
+version = "0.3.77"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837"
+checksum = "42f4220217f3288537b83684130f42fad43320b1c3b805f1910d683d52ded24f"
dependencies = [
"addr2line",
- "cc",
"cfg-if",
"libc",
"miniz_oxide",
"object",
"rustc-demangle",
+ "windows-link",
]
[[package]]
name = "bitflags"
-version = "1.3.2"
+version = "2.13.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
-
-[[package]]
-name = "bitflags"
-version = "2.4.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07"
+checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06"
[[package]]
name = "bstr"
-version = "0.2.17"
+version = "1.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223"
+checksum = "6bb31b46c14244e20ee9984b11bf5c992b91fb6939fea616e3512c8baecdbe5f"
dependencies = [
"memchr",
+ "serde_core",
]
[[package]]
name = "bytes"
-version = "1.5.0"
+version = "1.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223"
+checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04"
[[package]]
name = "cc"
-version = "1.0.83"
+version = "1.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0"
+checksum = "375989decec1a0fa424442bed520fa12ede43a48475ce8c7417d2c69b32b5f6b"
dependencies = [
- "libc",
+ "find-msvc-tools",
+ "shlex",
]
[[package]]
name = "cfg-if"
-version = "1.0.0"
+version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600"
[[package]]
name = "clap"
-version = "4.4.14"
+version = "4.6.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "33e92c5c1a78c62968ec57dbc2440366a2d6e5a23faf829970ff1585dc6b18e2"
+checksum = "aa8876b300ab35ba921adea3dfd70157a46249b33f95c9084ae5709785478946"
dependencies = [
"clap_builder",
"clap_derive",
@@ -140,9 +144,9 @@ dependencies = [
[[package]]
name = "clap_builder"
-version = "4.4.14"
+version = "4.6.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f4323769dc8a61e2c39ad7dc26f6f2800524691a44d74fe3d1071a5c24db6370"
+checksum = "ec0797fb7aeb1406c84efac526901f7ec3ead2124f946b494e72879d4b54704d"
dependencies = [
"anstream",
"anstyle",
@@ -152,9 +156,9 @@ dependencies = [
[[package]]
name = "clap_derive"
-version = "4.4.7"
+version = "4.6.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442"
+checksum = "f9c751b79415d4e559e3d1fcf128e09e720eb673a06d26cf6f392d37d75b66e0"
dependencies = [
"heck",
"proc-macro2",
@@ -164,15 +168,15 @@ dependencies = [
[[package]]
name = "clap_lex"
-version = "0.6.0"
+version = "1.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1"
+checksum = "1c133bc6a41be0d194c306b5506d15e6feeea7b1d6604bd3f8310dfb2ca96486"
[[package]]
name = "color-eyre"
-version = "0.6.2"
+version = "0.6.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5a667583cca8c4f8436db8de46ea8233c42a7d9ae424a82d338f2e4675229204"
+checksum = "e5920befb47832a6d61ee3a3a846565cfa39b331331e68a3b1d1116630f2f26d"
dependencies = [
"backtrace",
"color-spantrace",
@@ -185,9 +189,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",
@@ -197,41 +201,54 @@ dependencies = [
[[package]]
name = "colorchoice"
-version = "1.0.0"
+version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7"
+checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570"
+
+[[package]]
+name = "either"
+version = "1.19.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0e9c71c2167ca323c882b99918929403426e2373ea17242ff5653e0d5e1058be"
[[package]]
name = "equivalent"
-version = "1.0.1"
+version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
+checksum = "00d174d5400e5e8fd687ad1049e2f578285fa914201b1af7e8b112a4546bd826"
[[package]]
name = "errno"
-version = "0.3.8"
+version = "0.3.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245"
+checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
dependencies = [
"libc",
- "windows-sys 0.52.0",
+ "windows-sys",
]
[[package]]
name = "eyre"
-version = "0.6.11"
+version = "0.6.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b6267a1fa6f59179ea4afc8e50fd8612a3cc60bc858f786ff877a4a8cb042799"
+checksum = "c08309dbcc659c5549a24ddb9b27027640641b282ef5768267c7e675558986a3"
dependencies = [
+ "autocfg",
"indenter",
"once_cell",
]
[[package]]
name = "fastrand"
-version = "2.0.1"
+version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5"
+checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223"
+
+[[package]]
+name = "find-msvc-tools"
+version = "0.1.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1c66915cc5391097de7a2b0b972e8505aa33c0df401fd3a6811dbdb32881ba48"
[[package]]
name = "fnv"
@@ -241,60 +258,53 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
[[package]]
name = "futures-channel"
-version = "0.3.30"
+version = "0.3.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78"
+checksum = "b1f9e3d69d39e4862ffed03ed071a76f9a13ba1d9109d355b0f0aa6b15e393c4"
dependencies = [
"futures-core",
]
[[package]]
name = "futures-core"
-version = "0.3.30"
+version = "0.3.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d"
+checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e"
[[package]]
name = "futures-sink"
-version = "0.3.30"
+version = "0.3.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5"
+checksum = "1944426bf7d03f1d14f708785e4b33efd750b36d48a157b836b3efc15ede8e1d"
[[package]]
-name = "futures-task"
-version = "0.3.30"
+name = "getrandom"
+version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004"
-
-[[package]]
-name = "futures-util"
-version = "0.3.30"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48"
+checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099"
dependencies = [
- "futures-core",
- "futures-task",
- "pin-project-lite",
- "pin-utils",
+ "cfg-if",
+ "libc",
+ "r-efi",
]
[[package]]
name = "gimli"
-version = "0.28.1"
+version = "0.34.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253"
+checksum = "1033caf0b349c518623b5396bfb2cf0bddf44f0306d543a250e5743297aafd10"
[[package]]
name = "h2"
-version = "0.4.1"
+version = "0.4.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "991910e35c615d8cab86b5ab04be67e6ad24d2bf5f4f11fdbbed26da999bbeab"
+checksum = "7d29020232d6aa3fb1daca64c1127cf662cf97f254ae16c18c05b8ab635fc118"
dependencies = [
+ "atomic-waker",
"bytes",
"fnv",
"futures-core",
"futures-sink",
- "futures-util",
"http",
"indexmap",
"slab",
@@ -305,38 +315,31 @@ dependencies = [
[[package]]
name = "hashbrown"
-version = "0.14.3"
+version = "0.17.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604"
+checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a"
[[package]]
name = "heck"
-version = "0.4.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
-
-[[package]]
-name = "hermit-abi"
-version = "0.3.3"
+version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7"
+checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
[[package]]
name = "http"
-version = "1.0.0"
+version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b32afd38673a8016f7c9ae69e5af41a58f81b1d31689040f2f1959594ce194ea"
+checksum = "918d3568bebf352712bc2ef3d46a8bcf1a75b373be6539de198e9105cbbf9ce0"
dependencies = [
"bytes",
- "fnv",
"itoa",
]
[[package]]
name = "http-body"
-version = "1.0.0"
+version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643"
+checksum = "ca2a8f2913ee65f60facd6a5905613afaa448497a0230cc41ce022d93290bc2c"
dependencies = [
"bytes",
"http",
@@ -344,12 +347,12 @@ dependencies = [
[[package]]
name = "http-body-util"
-version = "0.1.0"
+version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "41cb79eb393015dadd30fc252023adb0b2400a0caee0fa2a077e6e21a551e840"
+checksum = "23169fe34a5fbcdd3f3862e78fb9b6fccd5f02a6dc6f732547005d45631ce71c"
dependencies = [
"bytes",
- "futures-util",
+ "futures-core",
"http",
"http-body",
"pin-project-lite",
@@ -357,9 +360,9 @@ dependencies = [
[[package]]
name = "httparse"
-version = "1.8.0"
+version = "1.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904"
+checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87"
[[package]]
name = "httpdate"
@@ -369,13 +372,14 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9"
[[package]]
name = "hyper"
-version = "1.1.0"
+version = "1.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fb5aa53871fc917b1a9ed87b683a5d86db645e23acb32c2e0785a353e522fb75"
+checksum = "2c3e324da4c95177d6291d4c8730197c0d1822f8a9766814a4a44fa5ab797c9c"
dependencies = [
+ "atomic-waker",
"bytes",
"futures-channel",
- "futures-util",
+ "futures-core",
"h2",
"http",
"http-body",
@@ -383,176 +387,255 @@ dependencies = [
"httpdate",
"itoa",
"pin-project-lite",
+ "smallvec",
"tokio",
]
[[package]]
name = "hyper-util"
-version = "0.1.2"
+version = "0.1.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bdea9aac0dbe5a9240d68cfd9501e2db94222c6dc06843e06640b9e07f0fdc67"
+checksum = "ddc03d96684f9226b8a787cdb71488417b53ab5ea8fdb1dac946cb9431cc8bff"
dependencies = [
"bytes",
- "futures-channel",
- "futures-util",
"http",
"http-body",
"hyper",
"pin-project-lite",
- "socket2",
"tokio",
- "tracing",
]
[[package]]
name = "indenter"
-version = "0.3.3"
+version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683"
+checksum = "964de6e86d545b246d84badc0fef527924ace5134f30641c203ef52ba83f58d5"
[[package]]
name = "indexmap"
-version = "2.1.0"
+version = "2.14.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f"
+checksum = "cc4e190f5d26ca7051642629da2c52fc03bde85a03197c99408dcd291734c855"
dependencies = [
"equivalent",
"hashbrown",
]
[[package]]
+name = "is_terminal_polyfill"
+version = "1.70.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695"
+
+[[package]]
name = "itoa"
-version = "1.0.10"
+version = "1.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c"
+checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
[[package]]
name = "lazy_static"
-version = "1.4.0"
+version = "1.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
+checksum = "20870f649af7073d53e38067b2a84312175d56ea15217e1b15bc83506ec50afb"
[[package]]
name = "libc"
-version = "0.2.152"
+version = "0.2.191"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7"
+checksum = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a"
[[package]]
name = "linux-raw-sys"
-version = "0.4.12"
+version = "0.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53"
+
+[[package]]
+name = "lock_api"
+version = "0.4.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965"
+dependencies = [
+ "scopeguard",
+]
+
+[[package]]
+name = "lua-src"
+version = "551.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d400ffef0e3d4d29287092bdc5a276d0bf468b2c69709d5bab0d469312d9f947"
+dependencies = [
+ "cc",
+]
+
+[[package]]
+name = "luajit-src"
+version = "210.7.4+c6ffc14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456"
+checksum = "1db548b001f0b7da416daf0ffae963912bae6cad1799fa9f4eaba09da6dba837"
+dependencies = [
+ "cc",
+ "which",
+]
[[package]]
name = "memchr"
-version = "2.7.1"
+version = "2.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149"
+checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
[[package]]
name = "miniz_oxide"
-version = "0.7.1"
+version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7"
+checksum = "b63fbc4a50860e98e7b2aa7804ded1db5cbc3aff9193adaff57a6931bf7c4b4c"
dependencies = [
- "adler",
+ "adler2",
]
[[package]]
name = "mio"
-version = "0.8.10"
+version = "1.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09"
+checksum = "1788edb87fdc09c7e26304471e2f5be8cdefb1b6930d6e3985fc02ff53bf86ee"
dependencies = [
"libc",
"wasi",
- "windows-sys 0.48.0",
+ "windows-sys",
]
[[package]]
-name = "num-traits"
-version = "0.2.17"
+name = "mlua"
+version = "0.12.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c"
+checksum = "7a7ae6b65bf54b7fdd4cf5b6f44f60862350ebf3fe3779b3a9cc005e7fa14f81"
dependencies = [
- "autocfg",
+ "bstr",
+ "either",
+ "libc",
+ "mlua-sys",
+ "num-traits",
+ "parking_lot",
+ "rustc-hash",
]
[[package]]
-name = "num_cpus"
-version = "1.16.0"
+name = "mlua-sys"
+version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43"
+checksum = "1631cda17bd6486410ab751d91f5fd4484f441589278cdad879eb3afc721a285"
dependencies = [
- "hermit-abi",
+ "cc",
+ "cfg-if",
"libc",
+ "lua-src",
+ "luajit-src",
+ "pkg-config",
+]
+
+[[package]]
+name = "num-traits"
+version = "0.2.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
+dependencies = [
+ "autocfg",
]
[[package]]
name = "object"
-version = "0.32.2"
+version = "0.40.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441"
+checksum = "dd229a0361b9d0d4396176e02d65897f487eebeab7caa6d443855ee152ca0b9c"
dependencies = [
"memchr",
]
[[package]]
name = "once_cell"
-version = "1.19.0"
+version = "1.21.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
+
+[[package]]
+name = "once_cell_polyfill"
+version = "1.70.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92"
+checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe"
[[package]]
name = "owo-colors"
-version = "3.5.0"
+version = "4.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f"
+checksum = "13c45bb4a6ae1280ec0803b1ef9d3455eb50f01efbbe1447ab020f1d54fba9d8"
[[package]]
-name = "pin-project-lite"
-version = "0.2.13"
+name = "parking_lot"
+version = "0.12.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58"
+checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a"
+dependencies = [
+ "lock_api",
+ "parking_lot_core",
+]
[[package]]
-name = "pin-utils"
-version = "0.1.0"
+name = "parking_lot_core"
+version = "0.9.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "redox_syscall",
+ "smallvec",
+ "windows-link",
+]
+
+[[package]]
+name = "pin-project-lite"
+version = "0.2.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
+checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd"
[[package]]
name = "pkg-config"
-version = "0.3.28"
+version = "0.3.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "69d3587f8a9e599cc7ec2c00e331f71c4e69a5f9a4b8a6efd5b07466b9736f9a"
+checksum = "f6b464fbc74e149a392436b17d523f769e057cb6877f6a5c4618bc6f11800548"
[[package]]
name = "proc-macro2"
-version = "1.0.76"
+version = "1.0.107"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "95fc56cda0b5c3325f5fbbd7ff9fda9e02bb00bb3dac51252d2f1bfa1cb8cc8c"
+checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
dependencies = [
"unicode-ident",
]
[[package]]
name = "quote"
-version = "1.0.35"
+version = "1.0.47"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef"
+checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
dependencies = [
"proc-macro2",
]
[[package]]
+name = "r-efi"
+version = "6.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
+
+[[package]]
name = "redox_syscall"
-version = "0.4.1"
+version = "0.5.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa"
+checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d"
dependencies = [
- "bitflags 1.3.2",
+ "bitflags",
]
[[package]]
@@ -564,53 +647,61 @@ dependencies = [
"http-body-util",
"hyper",
"hyper-util",
- "rlua",
+ "mlua",
"tempfile",
"tokio",
"utf8-read",
]
[[package]]
-name = "rlua"
-version = "0.19.7"
+name = "rustc-demangle"
+version = "0.1.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5d33e5ba15c3d43178f283ed5863d4531e292fc0e56fb773f3bea45f18e3a42a"
-dependencies = [
- "bitflags 1.3.2",
- "bstr",
- "libc",
- "num-traits",
- "rlua-lua51-sys",
-]
+checksum = "b74b56ffa8bb2830709a538c2cbcae9aa062db0d2a42563bfb09bdaae44020eb"
[[package]]
-name = "rlua-lua51-sys"
-version = "0.1.6"
+name = "rustc-hash"
+version = "2.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5c8f4636b03fa54b5c154415f1d9333cec7a7e3bd6bc64c092a2196e488cfd52"
+checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d"
+
+[[package]]
+name = "rustix"
+version = "1.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e5e76742e5294153d4dde1207dbec5bdd81eef6fabdc0d2118babadabfd858aa"
dependencies = [
- "cc",
+ "bitflags",
+ "errno",
"libc",
- "pkg-config",
+ "linux-raw-sys",
+ "windows-sys",
]
[[package]]
-name = "rustc-demangle"
-version = "0.1.23"
+name = "scopeguard"
+version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76"
+checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
[[package]]
-name = "rustix"
-version = "0.38.28"
+name = "serde_core"
+version = "1.0.229"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316"
+checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48"
dependencies = [
- "bitflags 2.4.1",
- "errno",
- "libc",
- "linux-raw-sys",
- "windows-sys 0.52.0",
+ "serde_derive",
+]
+
+[[package]]
+name = "serde_derive"
+version = "1.0.229"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
]
[[package]]
@@ -623,35 +714,44 @@ dependencies = [
]
[[package]]
+name = "shlex"
+version = "2.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba"
+
+[[package]]
name = "slab"
-version = "0.4.9"
+version = "0.4.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67"
-dependencies = [
- "autocfg",
-]
+checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5"
+
+[[package]]
+name = "smallvec"
+version = "1.16.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d0d5d4b1981b8bbbb7aed204cae5726d683d5d6ac7e74ec54122ea28f315e7c8"
[[package]]
name = "socket2"
-version = "0.5.5"
+version = "0.6.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9"
+checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4"
dependencies = [
"libc",
- "windows-sys 0.48.0",
+ "windows-sys",
]
[[package]]
name = "strsim"
-version = "0.10.0"
+version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
+checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
[[package]]
name = "syn"
-version = "2.0.48"
+version = "3.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f"
+checksum = "d78c8dee4c7bf0e14673097256fed6142ce9d3b85a408189d07482442145823b"
dependencies = [
"proc-macro2",
"quote",
@@ -660,49 +760,46 @@ dependencies = [
[[package]]
name = "tempfile"
-version = "3.9.0"
+version = "3.27.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa"
+checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd"
dependencies = [
- "cfg-if",
"fastrand",
- "redox_syscall",
+ "getrandom",
+ "once_cell",
"rustix",
- "windows-sys 0.52.0",
+ "windows-sys",
]
[[package]]
name = "thread_local"
-version = "1.1.7"
+version = "1.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152"
+checksum = "1ad99c4c6d32803332c548b1af0540b357b3f5fc0be8f6c6bfe8b2e6ae784070"
dependencies = [
"cfg-if",
- "once_cell",
]
[[package]]
name = "tokio"
-version = "1.35.1"
+version = "1.54.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104"
+checksum = "b52fd3255258d26fac7264ab5a76b53c13367136dc011d3d6ad4f8ed070396a3"
dependencies = [
- "backtrace",
"bytes",
"libc",
"mio",
- "num_cpus",
"pin-project-lite",
"socket2",
"tokio-macros",
- "windows-sys 0.48.0",
+ "windows-sys",
]
[[package]]
name = "tokio-macros"
-version = "2.2.0"
+version = "2.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b"
+checksum = "78773a2a397f451582ce068015985c33193cf6dea8b74d2a639fe457b2f07b0e"
dependencies = [
"proc-macro2",
"quote",
@@ -711,23 +808,23 @@ dependencies = [
[[package]]
name = "tokio-util"
-version = "0.7.10"
+version = "0.7.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15"
+checksum = "e464cf451ba96ebfc6f9b6542f17ee8b8956e33f1e40d9690624e59d7a7f8a4b"
dependencies = [
"bytes",
"futures-core",
"futures-sink",
+ "libc",
"pin-project-lite",
"tokio",
- "tracing",
]
[[package]]
name = "tracing"
-version = "0.1.40"
+version = "0.1.44"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef"
+checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100"
dependencies = [
"pin-project-lite",
"tracing-core",
@@ -735,9 +832,9 @@ dependencies = [
[[package]]
name = "tracing-core"
-version = "0.1.32"
+version = "0.1.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54"
+checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a"
dependencies = [
"once_cell",
"valuable",
@@ -745,9 +842,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",
@@ -755,9 +852,9 @@ dependencies = [
[[package]]
name = "tracing-subscriber"
-version = "0.3.18"
+version = "0.3.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b"
+checksum = "cb7f578e5945fb242538965c2d0b04418d38ec25c79d160cd279bf0731c8d319"
dependencies = [
"sharded-slab",
"thread_local",
@@ -766,9 +863,9 @@ dependencies = [
[[package]]
name = "unicode-ident"
-version = "1.0.12"
+version = "1.0.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
+checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563"
[[package]]
name = "utf8-read"
@@ -778,150 +875,42 @@ checksum = "fb566ac06e11c3f13872ebcb0e72ea5f97f0f65a16f45048d0adea21edc28018"
[[package]]
name = "utf8parse"
-version = "0.2.1"
+version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a"
+checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
[[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 = "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 = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
+checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
[[package]]
-name = "windows-sys"
-version = "0.48.0"
+name = "which"
+version = "8.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
+checksum = "bae2f2b2b816647a1cab1acc91f5bd20812d53cb344382635ec2181940c8034f"
dependencies = [
- "windows-targets 0.48.5",
-]
-
-[[package]]
-name = "windows-sys"
-version = "0.52.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
-dependencies = [
- "windows-targets 0.52.0",
+ "libc",
]
[[package]]
-name = "windows-targets"
-version = "0.48.5"
+name = "windows-link"
+version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"
-dependencies = [
- "windows_aarch64_gnullvm 0.48.5",
- "windows_aarch64_msvc 0.48.5",
- "windows_i686_gnu 0.48.5",
- "windows_i686_msvc 0.48.5",
- "windows_x86_64_gnu 0.48.5",
- "windows_x86_64_gnullvm 0.48.5",
- "windows_x86_64_msvc 0.48.5",
-]
+checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
[[package]]
-name = "windows-targets"
-version = "0.52.0"
+name = "windows-sys"
+version = "0.61.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd"
+checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
dependencies = [
- "windows_aarch64_gnullvm 0.52.0",
- "windows_aarch64_msvc 0.52.0",
- "windows_i686_gnu 0.52.0",
- "windows_i686_msvc 0.52.0",
- "windows_x86_64_gnu 0.52.0",
- "windows_x86_64_gnullvm 0.52.0",
- "windows_x86_64_msvc 0.52.0",
+ "windows-link",
]
-
-[[package]]
-name = "windows_aarch64_gnullvm"
-version = "0.48.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
-
-[[package]]
-name = "windows_aarch64_gnullvm"
-version = "0.52.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea"
-
-[[package]]
-name = "windows_aarch64_msvc"
-version = "0.48.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
-
-[[package]]
-name = "windows_aarch64_msvc"
-version = "0.52.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef"
-
-[[package]]
-name = "windows_i686_gnu"
-version = "0.48.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
-
-[[package]]
-name = "windows_i686_gnu"
-version = "0.52.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313"
-
-[[package]]
-name = "windows_i686_msvc"
-version = "0.48.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
-
-[[package]]
-name = "windows_i686_msvc"
-version = "0.52.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a"
-
-[[package]]
-name = "windows_x86_64_gnu"
-version = "0.48.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
-
-[[package]]
-name = "windows_x86_64_gnu"
-version = "0.52.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd"
-
-[[package]]
-name = "windows_x86_64_gnullvm"
-version = "0.48.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
-
-[[package]]
-name = "windows_x86_64_gnullvm"
-version = "0.52.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e"
-
-[[package]]
-name = "windows_x86_64_msvc"
-version = "0.48.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
-
-[[package]]
-name = "windows_x86_64_msvc"
-version = "0.52.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04"
diff --git a/Cargo.toml b/Cargo.toml
index a1a1fe0..d17015b 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "reluax"
version = "0.2.1"
-edition = "2021"
+edition = "2024"
description = "A LuaX-based web framework"
authors = ["Duckonaut"]
readme = "README.md"
@@ -16,11 +16,11 @@ keywords = ["http", "web", "framework", "lua", "luax"]
clap = { version = "4.4.14", features = ["derive"] }
color-eyre = "0.6.2"
http-body-util = "0.1.0"
-hyper = { version = "1.1.0", features = ["http1", "http2", "server"] }
-hyper-util = { version = "0.1.2", features = ["http1", "http2", "server", "tokio"] }
-rlua = { version = "0.19.7", default-features = false, features = ["system-luajit"] }
+hyper = { version = "1.12.0", features = ["http1", "http2", "server"] }
+hyper-util = { version = "0.1.21", features = ["http1", "http2", "server", "tokio"] }
+mlua = { version = "0.12", features = ["luajit", "vendored", "send"] }
tempfile = "3.9.0"
-tokio = { version = "1.35.1", features = ["macros", "rt-multi-thread"] }
+tokio = { version = "1.54.1", features = ["macros", "rt-multi-thread", "net"] }
utf8-read = "0.4.0"
# The profile that 'cargo dist' will build with
diff --git a/src/error.rs b/src/error.rs
index fabe012..6eb148e 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -32,7 +32,7 @@ impl Display for LuaXError {
#[derive(Debug)]
pub enum ReluaxError {
LuaX(LuaXError),
- Lua(rlua::Error),
+ Lua(mlua::Error),
Server(String),
}
@@ -54,8 +54,8 @@ impl From<LuaXError> for ReluaxError {
}
}
-impl From<rlua::Error> for ReluaxError {
- fn from(err: rlua::Error) -> Self {
+impl From<mlua::Error> for ReluaxError {
+ fn from(err: mlua::Error) -> Self {
ReluaxError::Lua(err)
}
}
diff --git a/src/luax/lexer.rs b/src/luax/lexer.rs
index c075b3a..c304412 100644
--- a/src/luax/lexer.rs
+++ b/src/luax/lexer.rs
@@ -23,10 +23,6 @@ macro_rules! try_all_paths {
};
}
-pub trait TokenProducer {
- fn next(&mut self) -> Option<Token>;
-}
-
#[derive(Debug)]
pub struct Lexer<'s> {
src: &'s str,
@@ -297,18 +293,18 @@ impl<'s> Lexer<'s> {
}
fn number(&mut self) -> TokenizeResult<'s> {
- if !self.current.map_or(false, |c| c.is_numeric()) {
+ if !self.current.is_some_and(|c| c.is_numeric()) {
return TokenizeResult::None;
}
let start = self.current_pos_in_bytes;
- while self.current.map_or(false, |c| c.is_numeric()) {
+ while self.current.is_some_and(|c| c.is_numeric()) {
self.advance();
}
if self.match_char('.') {
- while self.current.map_or(false, |c| c.is_numeric()) {
+ while self.current.is_some_and(|c| c.is_numeric()) {
self.advance();
}
}
@@ -317,7 +313,7 @@ impl<'s> Lexer<'s> {
if self.match_char('-') || self.match_char('+') {
self.advance();
}
- while self.current.map_or(false, |c| c.is_numeric()) {
+ while self.current.is_some_and(|c| c.is_numeric()) {
self.advance();
}
}
diff --git a/src/luax/mod.rs b/src/luax/mod.rs
index 994b80e..13afd88 100644
--- a/src/luax/mod.rs
+++ b/src/luax/mod.rs
@@ -1,6 +1,6 @@
use std::path::Path;
-use rlua::Lua;
+use mlua::Lua;
use crate::{error::LuaXError, Result};
@@ -10,15 +10,15 @@ mod preprocessor;
mod tests;
mod tokens;
-pub fn table_to_html<W: std::io::Write>(table: rlua::Table, f: &mut W) -> Result<()> {
+pub fn table_to_html<W: std::io::Write>(table: mlua::Table, f: &mut W) -> Result<()> {
let tag_name: Option<String> = table.get("tag").unwrap();
if tag_name.is_none() {
// we might be in a list
- for child in table.sequence_values::<rlua::Value>() {
+ for child in table.sequence_values::<mlua::Value>() {
match child? {
- rlua::Value::Table(child) => table_to_html(child, f)?,
- rlua::Value::String(s) => write!(f, "{}", s.to_str()?)?,
+ mlua::Value::Table(child) => table_to_html(child, f)?,
+ mlua::Value::String(s) => write!(f, "{}", s.to_str()?)?,
_ => return Err(LuaXError::NonTableChildren.into()),
}
}
@@ -31,7 +31,7 @@ pub fn table_to_html<W: std::io::Write>(table: rlua::Table, f: &mut W) -> Result
write!(f, "<{}", type_name)?;
let mut children = None;
let mut attrs = None;
- for pair in table.pairs::<String, rlua::Value>() {
+ for pair in table.pairs::<String, mlua::Value>() {
let (key, value) = pair?;
if key == "tag" {
continue;
@@ -46,8 +46,8 @@ pub fn table_to_html<W: std::io::Write>(table: rlua::Table, f: &mut W) -> Result
}
}
if let Some(attrs) = attrs {
- if let rlua::Value::Table(attrs) = attrs {
- for pair in attrs.pairs::<String, rlua::String>() {
+ if let mlua::Value::Table(attrs) = attrs {
+ for pair in attrs.pairs::<String, mlua::LuaString>() {
let (key, value) = pair?;
write!(f, " {}=\"{}\"", key, value.to_str()?)?;
}
@@ -58,13 +58,13 @@ pub fn table_to_html<W: std::io::Write>(table: rlua::Table, f: &mut W) -> Result
write!(f, ">")?;
if let Some(children) = children {
- if let rlua::Value::Table(children) = children {
- for child in children.sequence_values::<rlua::Value>() {
+ if let mlua::Value::Table(children) = children {
+ for child in children.sequence_values::<mlua::Value>() {
match child? {
- rlua::Value::Table(child) => table_to_html(child, f)?,
- rlua::Value::String(s) => write!(f, "{}", s.to_str()?)?,
- rlua::Value::Boolean(b) => write!(f, "{}", b)?,
- rlua::Value::Number(n) => write!(f, "{}", n)?,
+ mlua::Value::Table(child) => table_to_html(child, f)?,
+ mlua::Value::String(s) => write!(f, "{}", s.to_str()?)?,
+ mlua::Value::Boolean(b) => write!(f, "{}", b)?,
+ mlua::Value::Number(n) => write!(f, "{}", n)?,
_ => return Err(LuaXError::NonTableChildren.into()),
}
}
@@ -78,10 +78,10 @@ pub fn table_to_html<W: std::io::Write>(table: rlua::Table, f: &mut W) -> Result
Ok(())
}
-pub fn table_to_json<W: std::io::Write>(table: rlua::Table, f: &mut W) -> Result<()> {
+pub fn table_to_json<W: std::io::Write>(table: mlua::Table, f: &mut W) -> Result<()> {
let mut first = true;
write!(f, "{{")?;
- for pair in table.pairs::<String, rlua::Value>() {
+ for pair in table.pairs::<String, mlua::Value>() {
let (key, value) = pair?;
if !first {
write!(f, ",")?;
@@ -89,11 +89,11 @@ pub fn table_to_json<W: std::io::Write>(table: rlua::Table, f: &mut W) -> Result
first = false;
write!(f, "\"{}\":", key)?;
match value {
- rlua::Value::Table(t) => table_to_json(t, f)?,
- rlua::Value::String(s) => write!(f, "\"{}\"", s.to_str()?)?,
- rlua::Value::Boolean(b) => write!(f, "{}", b)?,
- rlua::Value::Number(n) => write!(f, "{}", n)?,
- rlua::Value::Nil => write!(f, "null")?,
+ mlua::Value::Table(t) => table_to_json(t, f)?,
+ mlua::Value::String(s) => write!(f, "\"{}\"", s.to_str()?)?,
+ mlua::Value::Boolean(b) => write!(f, "{}", b)?,
+ mlua::Value::Number(n) => write!(f, "{}", n)?,
+ mlua::Value::Nil => write!(f, "null")?,
_ => return Err(LuaXError::NonJsonType.into()),
}
}
@@ -161,33 +161,29 @@ pub fn prepare_lua(dev_mode: bool) -> Result<Lua> {
// create a table called "reluax" with common utility functions
// and put it in the global scope
- lua.context(|ctx| -> Result<()> {
- let reluax = ctx.create_table()?;
+ let reluax = lua.create_table()?;
- let url_matches = ctx.create_function(utils::url_matches)?;
- reluax.set("url_matches", url_matches)?;
- let url_extract = ctx.create_function(utils::url_extract)?;
- reluax.set("url_extract", url_extract)?;
- let html = ctx.create_function(utils::wrap_html)?;
- reluax.set("html", html)?;
- let html_page = ctx.create_function(utils::wrap_html_page)?;
- reluax.set("html_page", html_page)?;
- let json = ctx.create_function(utils::wrap_json)?;
- reluax.set("json", json)?;
- let headers = ctx.create_function(utils::wrap_headers)?;
- reluax.set("headers", headers)?;
- reluax.set("dev_mode", dev_mode)?;
+ let url_matches = lua.create_function(utils::url_matches)?;
+ reluax.set("url_matches", url_matches)?;
+ let url_extract = lua.create_function(utils::url_extract)?;
+ reluax.set("url_extract", url_extract)?;
+ let html = lua.create_function(utils::wrap_html)?;
+ reluax.set("html", html)?;
+ let html_page = lua.create_function(utils::wrap_html_page)?;
+ reluax.set("html_page", html_page)?;
+ let json = lua.create_function(utils::wrap_json)?;
+ reluax.set("json", json)?;
+ let headers = lua.create_function(utils::wrap_headers)?;
+ reluax.set("headers", headers)?;
+ reluax.set("dev_mode", dev_mode)?;
- ctx.globals().set("reluax", reluax)?;
-
- Ok(())
- })?;
+ lua.globals().set("reluax", reluax)?;
Ok(lua)
}
mod utils {
- use rlua::{Context, Result, Table};
+ use mlua::{Lua, Result, Table};
/// Check if a path matches a pattern
///
@@ -202,7 +198,7 @@ mod utils {
///
/// This function only checks if the path matches the pattern, it does not
/// capture any values.
- pub fn url_matches(_: Context<'_>, (pattern, path): (String, String)) -> Result<bool> {
+ pub fn url_matches(_: &Lua, (pattern, path): (String, String)) -> Result<bool> {
let mut path = path.chars();
let mut pattern = pattern.chars();
@@ -253,7 +249,7 @@ mod utils {
/// - `{name}` matches anything except `/` and captures the value as `name`
///
/// This function will return a table with the captured values.
- pub fn url_extract(ctx: Context<'_>, (pattern, path): (String, String)) -> Result<Table> {
+ pub fn url_extract(ctx: &Lua, (pattern, path): (String, String)) -> Result<Table> {
let mut path = path.chars();
let mut pattern = pattern.chars();
@@ -303,35 +299,32 @@ mod utils {
}
/// Wrap a table in a table to signal that it should be rendered as HTML
- pub fn wrap_html<'lua>(_: Context<'lua>, table: Table<'lua>) -> Result<Table<'lua>> {
+ pub fn wrap_html(_: &Lua, table: Table) -> Result<Table> {
table.set("type", "html")?;
Ok(table)
}
/// Wrap a table in a table to signal that it should be rendered as a full HTML page
- pub fn wrap_html_page<'lua>(_: Context<'lua>, table: Table<'lua>) -> Result<Table<'lua>> {
+ pub fn wrap_html_page(_: &Lua, table: Table) -> Result<Table> {
table.set("type", "html-page")?;
Ok(table)
}
/// Wrap a table in a table to signal that it should be rendered as JSON
- pub fn wrap_json<'lua>(_: Context<'lua>, table: Table<'lua>) -> Result<Table<'lua>> {
+ pub fn wrap_json(_: &Lua, table: Table) -> Result<Table> {
table.set("type", "json")?;
Ok(table)
}
/// Wrap a table to add headers to the response
- pub fn wrap_headers<'lua>(
- _: Context<'lua>,
- (table, headers): (Table<'lua>, Table<'lua>),
- ) -> Result<Table<'lua>> {
+ pub fn wrap_headers(_: &Lua, (table, headers): (Table, Table)) -> Result<Table> {
table.set("headers", headers)?;
Ok(table)
}
#[cfg(test)]
mod tests {
- use rlua::Lua;
+ use mlua::Lua;
#[test]
fn url_matches() {
@@ -354,9 +347,8 @@ mod utils {
let lua = Lua::new();
for (pattern, path, expected) in cases {
- let res: bool = lua
- .context(|ctx| super::url_matches(ctx, (pattern.to_string(), path.to_string())))
- .unwrap();
+ let res: bool =
+ super::url_matches(&lua, (pattern.to_string(), path.to_string())).unwrap();
if res != expected {
if expected {
panic!("expected {} to match {}", path, pattern);
@@ -392,27 +384,24 @@ mod utils {
for (pattern, path, mut expected) in cases {
expected.sort_by_key(|(k, _)| k.to_owned());
- lua.context(|ctx| {
- let res =
- super::url_extract(ctx, (pattern.to_string(), path.to_string())).unwrap();
- let mut res_vec = Vec::new();
- for pair in res.pairs::<String, String>() {
- let (key, value) = pair.unwrap();
- res_vec.push((key, value));
- }
- res_vec.sort_by_key(|(k, _)| k.clone());
+ let res = super::url_extract(&lua, (pattern.to_string(), path.to_string())).unwrap();
+ let mut res_vec = Vec::new();
+ for pair in res.pairs::<String, String>() {
+ let (key, value) = pair.unwrap();
+ res_vec.push((key, value));
+ }
+ res_vec.sort_by_key(|(k, _)| k.clone());
- let equal = res_vec
- .iter()
- .zip(expected.iter())
- .all(|((k1, v1), (k2, v2))| k1 == k2 && v1 == v2);
- if !equal {
- panic!(
- "expected {:?} to be {:?} for pattern {} and path {}",
- res_vec, expected, pattern, path
- );
- }
- })
+ let equal = res_vec
+ .iter()
+ .zip(expected.iter())
+ .all(|((k1, v1), (k2, v2))| k1 == k2 && v1 == v2);
+ if !equal {
+ panic!(
+ "expected {:?} to be {:?} for pattern {} and path {}",
+ res_vec, expected, pattern, path
+ );
+ }
}
}
}
diff --git a/src/luax/tests/preprocessor.rs b/src/luax/tests/preprocessor.rs
index 9411126..d6540ff 100644
--- a/src/luax/tests/preprocessor.rs
+++ b/src/luax/tests/preprocessor.rs
@@ -1,7 +1,7 @@
use crate::luax::{lexer::Lexer, tokens::Token, *};
use color_eyre::Result;
-fn tokenize(input: &str) -> Result<Vec<Token>> {
+fn tokenize(input: &str) -> Result<Vec<Token<'_>>> {
let mut lexer = Lexer::new(input);
let mut tokens = Vec::new();
diff --git a/src/main.rs b/src/main.rs
index e9e0472..b39f26d 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -261,16 +261,14 @@ async fn ensure_entry_point() -> Result<()> {
async fn serve(dev_mode: bool, port: u16, public_dir: Option<PathBuf>) -> Result<()> {
println!("📦 Building Lua state...");
let lua = luax::prepare_lua(dev_mode)?;
- lua.context(|ctx| -> Result<()> {
- let entry_table: rlua::Table = ctx.load("require('reluax')").eval()?;
- let project_name: Option<String> = entry_table.get("name")?;
- if let Some(name) = project_name {
- println!("🌴 App name: {}", name.bright_yellow());
- }
+ let entry_table: mlua::Table = lua.load("require('reluax')").eval()?;
+ let project_name: Option<String> = entry_table.get("name")?;
+
+ if let Some(name) = project_name {
+ println!("🌴 App name: {}", name.bright_yellow());
+ }
- Ok(())
- })?;
println!("🛫 Starting server on port {}...", port);
server::Server::serve(lua, port, public_dir).await
}
diff --git a/src/server.rs b/src/server.rs
index f57bcdc..b6e8110 100644
--- a/src/server.rs
+++ b/src/server.rs
@@ -16,7 +16,7 @@ use tokio::net::TcpListener;
use crate::error::ReluaxError;
use crate::luax::{table_to_html, table_to_json};
use color_eyre::Result;
-use rlua::Lua;
+use mlua::Lua;
pub struct Server {
port: u16,
@@ -88,10 +88,10 @@ fn mk_file_response(path: PathBuf) -> Result<Response<Full<Bytes>>> {
.body(Full::new(Bytes::from(bytes)))?)
}
-fn decode_luax_response(status: StatusCode, t: rlua::Table) -> Result<Response<Full<Bytes>>> {
- let lua_headers: Option<rlua::Table> = t.get("headers")?;
+fn decode_luax_response(status: StatusCode, t: mlua::Table) -> Result<Response<Full<Bytes>>> {
+ let lua_headers: Option<mlua::Table> = t.get("headers")?;
- let (response_body, mime_type) = if t.contains_key("type")? {
+ let (response_body, mime_type) = if t.contains_key("type")? {
let ty: String = t.get("type")?;
let mime_type: Option<String> = t.get("mime_type")?;
@@ -172,8 +172,8 @@ impl State {
) -> Result<Response<Full<Bytes>>> {
let lua = lua.lock().unwrap();
- let res = lua.context(|ctx| -> Result<Response<Full<Bytes>>> {
- let manifest: rlua::Result<rlua::Table> = ctx.load("require('reluax')").eval();
+ let res = {
+ let manifest: mlua::Result<mlua::Table> = lua.load("require('reluax')").eval();
let manifest = match manifest {
Ok(m) => m,
@@ -187,16 +187,16 @@ impl State {
}
};
- let route: rlua::Function = manifest.get("route")?;
+ let route: mlua::Function = manifest.get("route")?;
let method = method.as_str();
- let body: rlua::String = ctx.create_string(&body.to_bytes().to_vec())?;
- let lua_headers: rlua::Table = ctx.create_table()?;
+ let body: mlua::LuaString = lua.create_string(body.to_bytes())?;
+ let lua_headers: mlua::Table = lua.create_table()?;
for (k, v) in headers {
lua_headers.set(k, v)?;
}
- let res: rlua::Result<(rlua::Integer, rlua::Value)> =
+ let res: mlua::Result<(mlua::Integer, mlua::Value)> =
route.call((path.clone(), method, lua_headers, body));
let res = match res {
@@ -227,13 +227,13 @@ impl State {
}
match res.1 {
- rlua::Value::String(s) => mk_response(status, s.to_str()?.to_string()),
- rlua::Value::Table(t) => decode_luax_response(status, t),
- rlua::Value::Nil => Err(ReluaxError::Server("No route found".to_string()).into()),
- rlua::Value::Error(e) => Err(ReluaxError::Lua(e).into()),
+ mlua::Value::String(s) => mk_response(status, s.to_str()?.to_string()),
+ mlua::Value::Table(t) => decode_luax_response(status, t),
+ mlua::Value::Nil => Err(ReluaxError::Server("No route found".to_string()).into()),
+ mlua::Value::Error(e) => Err(ReluaxError::Lua(*e).into()),
_ => Err(ReluaxError::Server("Route returned invalid type".to_string()).into()),
}
- })?;
+ }?;
Ok(res)
}