mirror of
https://github.com/powdr-labs/powdr.git
synced 2026-05-13 03:00:26 -04:00
Merge pull request #127 from chriseth/verbose_pil
Verbose option for pil compiler.
This commit is contained in:
@@ -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,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user