Expand description
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.
Modules§
- logger
- oracle
- Interact with the host preimage oracle to retrieve data by its key
- prelude
- Prelude imports commonly used functions and traits
- syscalls
- Low level access to syscalls that are understood by the minimal Cannon kernel Using these can be dangerous. Prefer to use the oracle_reader if possible