#host #guest #exit #oracle #preimage #read #cannon

nightly cannon-io

A crate that encapsulates all supported interactions between the cannon guest (provable progam) and the host. This includes stdout, preimage oracle, hinting and exit codes.

1 unstable release

0.1.0 Jul 23, 2023

#3 in #preimage

LGPL-3.0

20KB
351 lines

Cannon-io

A Rust crate to allow Cannon guest programs written in Rust to communicate with the host


lib.rs:

A crate to allow Cannon guest programs written in Rust to communicate with the host

The Cannon host provides a number of ways for the guest to write outputs and request data. This crate provides simple and safe wrappers around the low level syscalls that implement these features. Note that this crate can only be used when building for a MIPS32 target.

The main features of this crate are exposed in the prelude which can be imported with import cannon_io::prelude::*;. This imports the oracle_reader, exit, and print functions along with the PreimageKey and Read traits.

Dependencies

~87KB