From f2f8248de736abf0f54acef18e077343a0b87faa Mon Sep 17 00:00:00 2001 From: SeanOMik Date: Wed, 14 Feb 2024 20:33:07 -0500 Subject: [PATCH] scripting: add elua as a git submodule, remove mlua from the cargo.toml --- .gitmodules | 3 +++ Cargo.lock | 37 +++++++++++-------------------------- lyra-scripting/Cargo.toml | 5 +++-- lyra-scripting/elua | 1 + 4 files changed, 18 insertions(+), 28 deletions(-) create mode 100644 .gitmodules create mode 160000 lyra-scripting/elua diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..c181ae1 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "lyra-scripting/elua"] + path = lyra-scripting/elua + url = git@git.seanomik.net:SeanOMik/elua.git diff --git a/Cargo.lock b/Cargo.lock index ad8a285..593b602 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -432,16 +432,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "bstr" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c48f0051a4b4c5e0b6d365cd04af53aeaa209e3cc15ec2cdb69e73cc87fbd0dc" -dependencies = [ - "memchr", - "serde", -] - [[package]] name = "bumpalo" version = "3.14.0" @@ -742,6 +732,14 @@ version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +[[package]] +name = "elua" +version = "0.1.0" +dependencies = [ + "mlua-sys", + "thiserror", +] + [[package]] name = "equivalent" version = "1.0.1" @@ -1608,13 +1606,13 @@ name = "lyra-scripting" version = "0.1.0" dependencies = [ "anyhow", + "elua", "itertools 0.12.0", "lyra-ecs", "lyra-game", "lyra-reflect", "lyra-resource", "lyra-scripting-derive", - "mlua", "thiserror", "tracing", "tracing-subscriber", @@ -1713,24 +1711,11 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "mlua" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c81f8ac20188feb5461a73eabb22a34dd09d6d58513535eb587e46bff6ba250" -dependencies = [ - "bstr", - "mlua-sys", - "num-traits", - "once_cell", - "rustc-hash", -] - [[package]] name = "mlua-sys" -version = "0.4.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc29228347d6bdc9e613dc95c69df2817f755434ee0f7f3b27b57755fe238b7f" +checksum = "2847b42764435201d8cbee1f517edb79c4cca4181877b90047587c89e1b7bce4" dependencies = [ "cc", "cfg-if", diff --git a/lyra-scripting/Cargo.toml b/lyra-scripting/Cargo.toml index 320ac06..2782c56 100644 --- a/lyra-scripting/Cargo.toml +++ b/lyra-scripting/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" [features] default = ["lua"] -lua = ["dep:mlua"] +lua = ["dep:elua"] [dependencies] lyra-scripting-derive = { path = "lyra-scripting-derive" } @@ -20,7 +20,8 @@ anyhow = "1.0.77" tracing = "0.1.37" # enabled with lua feature -mlua = { version = "0.9.2", features = ["lua54"], optional = true } # luajit maybe? +#mlua = { version = "0.9.2", features = ["lua54"], optional = true } # luajit maybe? +elua = { path = "./elua", optional = true } itertools = "0.12.0" diff --git a/lyra-scripting/elua b/lyra-scripting/elua new file mode 160000 index 0000000..5694d39 --- /dev/null +++ b/lyra-scripting/elua @@ -0,0 +1 @@ +Subproject commit 5694d395abbbce340eda195c99104db3e9c9435a