#![allow(missing_docs)]
use std::sync::Arc;
use proofman_fields::PrimeField64;
use zisk_asm_runner::HintsShmem;
use zisk_common::{
io::{StreamSource, ZiskStdin},
AsmExecutionInfo, ExecutorStatsHandle, StatsScope,
};
use zisk_core::ZiskRom;
use zisk_precomp_hints::HintsProcessor;
use super::AsmResources;
use crate::error::ExecutorResult;
use crate::execution::output::ExecutionOutput;
fn unsupported() -> ! {
panic!("ASM emulator backend is only available on Linux x86_64");
}
pub struct EmulatorAsm;
impl EmulatorAsm {
pub fn new(_chunk_size: u64) -> Self {
unsupported()
}
pub fn get_asm_execution_info(&self) -> ExecutorResult<Option<AsmExecutionInfo>> {
unsupported()
}
pub fn set_asm_resources(&self, _: Arc<AsmResources>) -> ExecutorResult<()> {
unsupported()
}
pub fn submit_hint_direct(&self, _: &[u64]) -> ExecutorResult<()> {
unsupported()
}
pub fn append_raw_input(&self, _: &[u8]) -> ExecutorResult<()> {
unsupported()
}
pub fn set_hints_stream_src(&self, _: StreamSource) -> ExecutorResult<()> {
unsupported()
}
pub fn set_inputs_stream_src(&self, _: StreamSource) -> ExecutorResult<()> {
unsupported()
}
pub fn get_hints_processor(&self) -> ExecutorResult<Arc<HintsProcessor<HintsShmem>>> {
unsupported()
}
pub fn set_active_services(&self, _: bool) -> ExecutorResult<()> {
unsupported()
}
pub fn reset(&self) -> ExecutorResult<()> {
unsupported()
}
pub fn signal_cancellation(&self) -> ExecutorResult<()> {
unsupported()
}
#[allow(clippy::too_many_arguments)]
pub fn execute<F: PrimeField64>(
&self,
_zisk_rom: &ZiskRom,
_stdin: &ZiskStdin,
_is_first_process: bool,
_use_hints: bool,
_stats: &ExecutorStatsHandle,
_caller_stats_scope: &StatsScope,
_chunk_hook: crate::ChunkHook<'_>,
) -> ExecutorResult<ExecutionOutput> {
unsupported()
}
}