Merge pull request #127 from chriseth/verbose_pil

Verbose option for pil compiler.
This commit is contained in:
chriseth
2023-03-29 08:46:15 +02:00
committed by GitHub
3 changed files with 10 additions and 2 deletions

View File

@@ -107,6 +107,10 @@ enum Commands {
#[arg(short, long)]
#[arg(default_value_t = String::from("."))]
output_directory: String,
/// Verbose output (provides a full execution trace).
#[arg(short, long)]
#[arg(default_value_t = false)]
verbose: bool,
},
}
@@ -178,11 +182,13 @@ fn main() {
Commands::Compile {
file,
output_directory,
verbose,
} => {
powdr::compiler::compile_pil(
Path::new(&file),
Path::new(&output_directory),
no_callback(),
verbose,
);
}
}

View File

@@ -21,13 +21,14 @@ pub fn compile_pil(
pil_file: &Path,
output_dir: &Path,
query_callback: Option<impl FnMut(&str) -> Option<AbstractNumberType>>,
verbose: bool,
) -> bool {
compile(
&analyzer::analyze(pil_file),
pil_file.file_name().unwrap().to_str().unwrap(),
output_dir,
query_callback,
false,
verbose,
)
}

View File

@@ -16,7 +16,8 @@ pub fn verify_pil(file_name: &str, query_callback: Option<fn(&str) -> Option<Abs
assert!(compiler::compile_pil(
&input_file,
&temp_dir,
query_callback
query_callback,
false
));
verify(file_name, &temp_dir);
}