diff --git a/Cargo.lock b/Cargo.lock index fb8cf7f..35c4477 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -168,6 +168,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "126f97965c8ad46d6d9163268ff28432e8f6a1196a55578867832e3049df63dd" dependencies = [ "const_format_proc_macros", + "konst", ] [[package]] @@ -253,12 +254,27 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "konst" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "330f0e13e6483b8c34885f7e6c9f19b1a7bd449c673fbb948a51c99d66ef74f4" +dependencies = [ + "konst_macro_rules", +] + +[[package]] +name = "konst_macro_rules" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4933f3f57a8e9d9da04db23fb153356ecaf00cbd14aee46279c33dc80925c37" + [[package]] name = "lambdashell" version = "0.1.0" dependencies = [ "clap", - "liblambdashell", + "libpse", ] [[package]] @@ -268,7 +284,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" [[package]] -name = "liblambdashell" +name = "libloading" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" +dependencies = [ + "cfg-if", + "windows-targets", +] + +[[package]] +name = "libpse" version = "0.1.0" dependencies = [ "color-print", @@ -281,16 +307,6 @@ dependencies = [ "whoami", ] -[[package]] -name = "libloading" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" -dependencies = [ - "cfg-if", - "windows-targets", -] - [[package]] name = "linux-raw-sys" version = "0.4.14" @@ -313,6 +329,25 @@ version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" +[[package]] +name = "lua-src" +version = "547.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1edaf29e3517b49b8b746701e5648ccb5785cde1c119062cbabbc5d5cd115e42" +dependencies = [ + "cc", +] + +[[package]] +name = "luajit-src" +version = "210.5.11+97813fb" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3015551c284515db7c30c559fc1080f9cb9ee990d1f6fca315451a107c7540bb" +dependencies = [ + "cc", + "which", +] + [[package]] name = "luau0-src" version = "0.11.2+luau653" @@ -369,6 +404,8 @@ checksum = "63a11d485edf0f3f04a508615d36c7d50d299cf61a7ee6d3e2530651e0a31771" dependencies = [ "cc", "cfg-if", + "lua-src", + "luajit-src", "luau0-src", "pkg-config", ] @@ -682,6 +719,18 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "which" +version = "6.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ee928febd44d98f2f459a4a79bd4d928591333a494a10a868418ac1b39cf1f" +dependencies = [ + "either", + "home", + "rustix", + "winsafe", +] + [[package]] name = "whoami" version = "1.5.2" @@ -796,3 +845,9 @@ name = "windows_x86_64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "winsafe" +version = "0.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d135d17ab770252ad95e9a872d365cf3090e3be864a34ab46f48555993efc904" diff --git a/Cargo.toml b/Cargo.toml index 83a2a59..7446f13 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" [dependencies] clap = { version = "4.5.20", features = ["derive"] } -liblambdashell = { path = "../liblambdashell" } +libpse = { path = "../libpse" } [profile.release] strip = true diff --git a/src/cli.rs b/src/cli.rs index 5f9b749..4b54d9d 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -22,13 +22,16 @@ pub struct Cli { ///Disable the Luau JIT backend #[arg(long)] pub nojit: bool, + ///Disable the Luau sandbox + #[arg(long)] + pub nosandbox: bool, } pub fn parser() -> Option { let cli_parser = Cli::parse(); if cli_parser.version { println!("lambdashell, version: {}.", VERSION); - println!("liblambdashell, version: {}.", liblambdashell::VERSION); + println!("liblambdashell, version: {}.", libpse::VERSION); return None //stop here } Some(cli_parser) diff --git a/src/main.rs b/src/main.rs index a39ae54..977bc91 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,10 +2,12 @@ mod cli; fn main() { if let Some(args) = cli::parser() { - let shell_config = liblambdashell::session::Config { + let shell_config = libpse::session::Config { norc: args.norc, + nojit: args.nojit, + nosandbox: args.nosandbox, }; - let mut shell_instance = liblambdashell::session::LambdaShell::create(shell_config); + let mut shell_instance = libpse::session::LambdaShell::create(shell_config); shell_instance.start(); }; } \ No newline at end of file