rename to libpse and flag nosandbox
This commit is contained in:
@ -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)
|
||||
|
@ -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();
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user