risc0_circuit_rv32im/execute/
mod.rs

1// Copyright 2025 RISC Zero, Inc.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15pub(crate) mod bibc;
16pub(crate) mod bigint;
17mod executor;
18pub(crate) mod pager;
19pub mod platform;
20pub(crate) mod poseidon2;
21pub(crate) mod r0vm;
22pub(crate) mod rv32im;
23pub(crate) mod segment;
24pub(crate) mod sha2;
25mod syscall;
26#[cfg(test)]
27mod tests;
28pub mod testutil;
29
30pub use self::{
31    executor::{EcallMetric, Executor, ExecutorResult, SimpleSession},
32    platform::*,
33    segment::Segment,
34    syscall::{Syscall, SyscallContext},
35};
36
37pub const DEFAULT_SEGMENT_LIMIT_PO2: usize = 20;
38
39pub(crate) fn node_idx(page_idx: u32) -> u32 {
40    MEMORY_PAGES as u32 + page_idx
41}