zkml_common/lib.rs
1//! # zkml-common
2//!
3//! Shared types, data structures, and utilities used across the
4//! `zkml-prover` and `zkml-verifier` crates.
5//!
6//! This crate deliberately depends on neither Soroban nor RISC Zero so the
7//! same code compiles for native host tests and for the zkVM guest.
8
9#![cfg_attr(not(feature = "std"), no_std)]
10
11extern crate alloc;
12
13pub mod activation;
14pub mod bn254;
15pub mod bundle;
16#[cfg(feature = "poseidon")]
17pub mod commitment;
18pub mod error;
19pub mod fixed_point;
20pub mod inference;
21pub mod journal;
22#[cfg(feature = "poseidon")]
23pub mod merkle;
24pub mod models;
25pub mod proof;
26pub mod risc0;
27pub mod tensor;
28
29/// A 32-byte commitment.
30///
31/// Defined here rather than in [`commitment`] because the journal and the
32/// verifier need the type without the Poseidon implementation, which pulls in
33/// arkworks and does not build for `wasm32v1-none`.
34pub type Commitment = [u8; 32];
35
36pub use error::ZkmlError;