Skip to main content
Version: 0.6.0

Logging

The standard library provides a familiar println statement you can use. Despite being a limited implementation of rust's println! macro, this construct can be useful for debugging.

The println statement only works for fields, integers and arrays (including strings).

use dep::std;

fn main(string: pub str<5>) {
let x = 5;
std::println(x)
}

To view the output of the println statement you need to set the --show-output flag.

$ nargo prove --help
Create proof for this program. The proof is returned as a hex encoded string

Usage: nargo prove [OPTIONS] [PROOF_NAME] [CIRCUIT_NAME]

Arguments:
[PROOF_NAME] The name of the proof
[CIRCUIT_NAME] The name of the circuit build files (ACIR, proving and verification keys)

Options:
-v, --verify Verify proof after proving
-s, --show-ssa Emit debug information for the intermediate SSA IR
-d, --deny-warnings Quit execution when warnings are emitted
--show-output Display output of `println` statements during tests
-h, --help Print help