The files in Powdr

Files structure:

std:

prelude.asm

In the context of programming, a prelude is generally a set of common imports or definitions that a module or program can use directly without needing to specify them every time. It acts like a convenience layer, making certain functions, traits, or types available by default.

In the context of a virtual machine (VM), a prelude often refers to a collection of essential components, like imports, traits, types, or constants, that are required for setting up the VM or executing scripts within the VM. For instance, this could include definitions for standard libraries, memory management utilities, or commonly used functions that a script might need to interact with the VM.

In Rust, specifically, the term “prelude” is often associated with making commonly used items available without needing to import them manually, such as the std::prelude, which is automatically imported and provides access to basic types and traits like Option, Result, Vec, etc. A prelude in the context of a VM might serve a similar purpose, but with components specific to the VM’s functionality and runtime.

Pipeline

pipeline utility:

let backend = powdr_backend::BackendType::Stwo;
    let mut pipeline = Pipeline::default()
        .with_tmp_output()
        .from_file(resolve_test_file(file_name))
        .with_prover_inputs(inputs.clone())
        .with_backend(backend, None)
        .set_witness(vec![("add::a".to_string(), vec![inputs[0]]),("add::b".to_string(), vec![inputs[1]]),("add::c".to_string(), vec![inputs[2]])]);
    println!("inputs from test file {:?}", inputs);

    // Generate a proof
    let _proof = pipeline.compute_proof().cloned().unwrap();
  • with_prover_inputs: what is this for???
  • witness needs to be set individually

Leave a Reply

Your email address will not be published. Required fields are marked *