binius_core/consts.rs
1// Copyright 2025 Irreducible Inc.
2//! Protocol-level constants for the Binius64 constraint system.
3
4use binius_utils::checked_arithmetics::checked_log_2;
5
6/// The protocol proves constraint systems over 64-bit words.
7pub const WORD_SIZE_BYTES: usize = 8;
8
9/// The protocol proves constraint systems over 64-bit words.
10pub const WORD_SIZE_BITS: usize = WORD_SIZE_BYTES * 8;
11
12/// log2 of [`WORD_SIZE_BITS`].
13pub const LOG_WORD_SIZE_BITS: usize = checked_log_2(WORD_SIZE_BITS);
14
15/// The minimum number of words per segment.
16///
17/// This is the minimum size requirement for public input segments in the constraint system.
18pub const MIN_WORDS_PER_SEGMENT: usize = 2;
19
20/// The number of bits in a byte.
21pub const BYTE_BITS: usize = 8;
22
23/// log2 of [`BYTE_BITS`].
24pub const LOG_BYTE_BITS: usize = checked_log_2(BYTE_BITS);