Skip to main content

airbender_host/
lib.rs

1#![doc = include_str!("../README.md")]
2// TODO: This feature is not really required, but added as a workaround for:
3// https://github.com/rust-lang/rust/issues/141492
4// See also:
5// - https://github.com/rust-lang/rust/issues/144690
6// - https://github.com/rust-lang/rust/issues/133199
7#![cfg_attr(doc, feature(generic_const_exprs))]
8
9mod cycle_marker;
10mod error;
11mod inputs;
12mod machine;
13mod program;
14mod proof;
15mod prover;
16mod receipt;
17mod runner;
18mod security;
19mod verifier;
20mod vk;
21
22pub use airbender_core::guest::Commit;
23pub use cycle_marker::{CycleMarker, Mark};
24pub use error::{HostError, Result};
25pub use inputs::Inputs;
26pub use machine::MachineProfile;
27pub use program::Program;
28pub use proof::{DevProof, Proof, RealProof};
29pub use prover::{
30    CpuProver, CpuProverBuilder, DevProver, DevProverBuilder, ProveResult, Prover, ProverLevel,
31};
32#[cfg(feature = "gpu-prover")]
33pub use prover::{GpuProver, GpuProverBuilder, GpuProverConfig};
34pub use receipt::Receipt;
35pub use runner::{
36    resolve_cycles, ExecutionResult, FlamegraphConfig, Runner, TranspilerRunner,
37    TranspilerRunnerBuilder, DEFAULT_CYCLES,
38};
39pub use security::SecurityLevel;
40pub use verifier::{
41    verify_real_proof_with_vk, DevVerificationKey, DevVerifier, DevVerifierBuilder,
42    RealUnifiedVerificationKey, RealUnrolledVerificationKey, RealVerifier, RealVerifierBuilder,
43    VerificationKey, VerificationRequest, Verifier,
44};
45pub use vk::{
46    compute_unified_vk, compute_unrolled_vk, verify_proof, verify_unrolled_proof, UnifiedVk,
47    UnrolledVk,
48};
49
50/// Raw Airbender re-exports without stability guarantees.
51///
52/// These items are not recommended for normal use. They are exposed for rare
53/// cases, for example when a project depends on both `airbender-host` and
54/// direct Airbender crates at the same time.
55pub mod raw {
56    pub use execution_utils::unrolled::UnrolledProgramProof;
57    pub use riscv_transpiler::ir::{
58        DecodingOptions, FullMachineDecoderConfig, FullUnsignedMachineDecoderConfig,
59        ReducedMachineDecoderConfig,
60    };
61}