Function sp1_lib::io::hint

source ·
pub fn hint<T: Serialize>(value: &T)
Expand description

Hint a serializable object to the hint stream.

§Examples

use serde::{Deserialize, Serialize};

#[derive(Serialize, Deserialize)]
struct MyStruct {
    a: u32,
    b: u32,
}

let data = MyStruct {
    a: 1,
    b: 2,
};
sp1_zkvm::io::hint(&data);