rename to libpse and flag nosandbox

This commit is contained in:
2025-01-19 01:29:08 -05:00
parent 80c6feac42
commit ab68569ef6
4 changed files with 76 additions and 16 deletions

View File

@ -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<Cli> {
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)

View File

@ -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();
};
}