Allowing dumping generated cdef
This commit is contained in:
parent
014687068f
commit
2967513cbb
14
src/main.rs
14
src/main.rs
@ -97,6 +97,15 @@ struct Args {
|
|||||||
)]
|
)]
|
||||||
console_addr: SocketAddr,
|
console_addr: SocketAddr,
|
||||||
|
|
||||||
|
/// Dump internal data.
|
||||||
|
#[clap(
|
||||||
|
long,
|
||||||
|
help_heading = "Debugging",
|
||||||
|
value_name = "DATA",
|
||||||
|
value_parser = ["cdef"]
|
||||||
|
)]
|
||||||
|
dump: Vec<String>,
|
||||||
|
|
||||||
/// Print version.
|
/// Print version.
|
||||||
#[clap(long, short = 'V')]
|
#[clap(long, short = 'V')]
|
||||||
version: bool,
|
version: bool,
|
||||||
@ -198,6 +207,11 @@ fn init_tokio(args: &Args) -> tokio::runtime::Runtime {
|
|||||||
|
|
||||||
fn init_lua(args: &Args) -> lb::runtime::Runtime {
|
fn init_lua(args: &Args) -> lb::runtime::Runtime {
|
||||||
let rt = lb::runtime::Builder::new();
|
let rt = lb::runtime::Builder::new();
|
||||||
|
|
||||||
|
if args.dump.iter().find(|s| *s == "cdef").is_some() {
|
||||||
|
print!("{}", rt.registry());
|
||||||
|
}
|
||||||
|
|
||||||
let mut rt = rt.build().unwrap_or_else(exit_err(ExitCode::Software));
|
let mut rt = rt.build().unwrap_or_else(exit_err(ExitCode::Software));
|
||||||
|
|
||||||
for arg in args.jit.iter() {
|
for arg in args.jit.iter() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user