proof-forge-pf 0.1.2

ProofForge developer CLI (pf): orchestrates proof-forge-next and official chain tools
1
2
3
4
5
6
7
8
9
10
11
12
use crate::cmd::{compiler_json, emit};
use crate::{compiler, error::PfResult, result_json::PfOk};

pub fn run(json: bool) -> PfResult<()> {
    let out = compiler::run_compiler_checked(&["list-targets", "--json"], None)?;
    let value = compiler_json(&out.stdout)?;
    let mut ok = PfOk::new("list-targets");
    ok.extra = Some(value);
    emit(ok, json, || {
        print!("{}", String::from_utf8_lossy(&out.stdout))
    })
}