Skip to main content
Version: 0.9.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 is unconstrained, so it works for outputting integers, fields, strings, and even structs or expressions. For example:

use dep::std;

struct Person {
age : Field,
height : Field,
}

fn main(age : Field, height : Field) {
let person = Person { age : age, height : height };
std::println(person);
std::println(age + height);
std::println("Hello world!");
}