Installation
[maili][maili] consists of a number of crates that provide a range of functionality essential for interfacing with any OP Stack chain.
The most succinct way to work with maili is to add the maili crate
with the full feature flag from the command-line using Cargo.
cargo add maili --features full
Alternatively, you can add the following to your Cargo.toml file.
maili = { version = "0.1", features = ["full"] }
For more fine-grained control over the features you wish to include, you can add the individual
crates to your Cargo.toml file, or use the maili crate with the features you need.
After maili is added as a dependency, crates re-exported by maili are now available.
#![allow(unused)] fn main() { use maili::{ protocol::BlockInfo, genesis::RollupConfig, }; }
Features
The maili defines many feature flags including the following.
Default
stdserde
Full enables the most commonly used crates.
full
Arbitrary enables arbitrary features on crates, deriving the Arbitrary trait on types.
arbitrary
Serde derives serde's Serialize and Deserialize traits on types.
serde
Additionally, individual crates can be enabled using their shorthand names.
For example, the protocol feature flag provides the maili-protocol re-export
so maili-protocol types can be used from maili through maili::protocol::InsertTypeHere.
Crates
The following crates support no_std.
To add no_std support to a crate, ensure the check_no_std
script is updated to include this crate once no_std compatible.