Module prelude

Source
Expand description

Re-exports the most commonly-needed APIs of Triton VM.

This module is intended to be wildcard-imported, i.e., use triton_vm::prelude::*;. You might also want to consider wildcard-importing the prelude of twenty_first, i.e., use triton_vm::twenty_first::prelude::*;.

Re-exports§

pub use crate::error::VMError;
pub use crate::proof::Claim;
pub use crate::proof::Proof;
pub use crate::stark::Prover;
pub use crate::stark::Stark;
pub use crate::stark::Verifier;
pub use crate::vm::NonDeterminism;
pub use crate::vm::PublicInput;
pub use crate::vm::VMState;
pub use crate::vm::VM;
pub use twenty_first;
pub use isa;

Modules§

tip5

Macros§

bfe
Simplifies constructing base field elements.
bfe_array
Simplifies constructing arrays of base field elements.
bfe_vec
Simplifies constructing vectors of base field elements.
triton_asm
Compile Triton assembly into a list of labelled Instructions. Similar to triton_program!, it is possible to use string-like interpolation to insert instructions, arguments, labels, or other expressions.
triton_instr
Compile a single Triton assembly instruction into a LabelledInstruction.
triton_program
Compile an entire program written in Triton assembly. Triton VM can run the resulting Program; see there for details.
xfe
Simplifies constructing extension field elements.
xfe_array
Simplifies constructing arrays of extension field elements.
xfe_vec
Simplifies constructing vectors of extension field elements.

Structs§

BFieldElement
Base field element ∈ ℤ_{2^64 - 2^32 + 1}.
Digest
The result of hashing a sequence of elements, for example using Tip5. Sometimes called a “hash”.
ParseError
Program
A program for Triton VM. Triton VM can run and profile such programs, and trace its execution in order to generate a proof of correct execution. See there for details.
Tip5
XFieldElement

Enums§

InstructionError
LabelledInstruction
A LabelledInstruction has call addresses encoded as label names.
NumberOfWordsError
OpStackElementError
OpStackError
ProgramDecodingError
TableId
Uniquely determines one of Triton VM’s tables.

Traits§

AIR
The main trait for the tables’ Arithmetic Intermediate Representation.
BFieldCodec
This trait provides functions for encoding to and decoding from a Vec of BFieldElements. This encoding does not record the size of objects nor their type information; this is the responsibility of the decoder.
FiniteField

Derive Macros§

BFieldCodec
Derives BFieldCodec for structs and enums.