luaur_repl_cli/functions/
display_help.rs1pub fn display_help(argv0: &str) {
2 println!("Usage: {} [options] [file list] [-a] [arg list]", argv0);
3 println!();
4 println!("When file list is omitted, an interactive REPL is started instead.");
5 println!();
6 println!("Available options:");
7 println!(" --coverage: collect code coverage while running the code and output results to coverage.out");
8 println!(" --counters: collect native counters data while running the code and output results to callgrind.out");
9 println!(" -h, --help: Display this usage message.");
10 println!(
11 " -i, --interactive: Run an interactive REPL after executing the last script specified."
12 );
13 println!(
14 " -O<n>: compile with optimization level n (default 1, n should be between 0 and 2)."
15 );
16 println!(" -g<n>: compile with debug level n (default 1, n should be between 0 and 2).");
17 println!(" --profile[=N]: profile the code using N Hz sampling (default 10000) and output results to profile.out");
18 println!(" --timetrace: record compiler time tracing information into trace.json");
19 println!(" --codegen: execute code using native code generation");
20 println!(" --codegen-cold: execute code using native code generation, including any functions deemed not profitable to natively compile");
21 println!(" --codegen-perf: execute code using native code generation and profile using perf (only on Linux)");
22 println!(" --program-args,-a: declare start of arguments to be passed to the Luau program");
23 println!(" --fflags=<flags>: comma-separated list of fast flags to enable/disable (--fflags=true,false,LuauFlag1=true,LuauFlag2=false).");
24}