fill in compile trait

This commit is contained in:
Kevaundray Wedderburn
2025-05-12 14:01:59 +01:00
parent caaac30e1c
commit ff2e1f808d

View File

@@ -1,20 +1,20 @@
use thiserror::Error;
use compile::compile_risczero_program;
use zkvm_interface::Compiler;
mod compile;
mod error;
use error::RiscZeroError;
#[allow(non_camel_case_types)]
pub struct RV32_IM_RISCZERO_ZKVM_ELF;
#[derive(Debug, Error)]
pub enum RiscZeroError {}
impl Compiler for RV32_IM_RISCZERO_ZKVM_ELF {
type Error = RiscZeroError;
type Program = Vec<u8>;
fn compile(_path_to_program: &std::path::Path) -> Result<Self::Program, Self::Error> {
todo!()
fn compile(path_to_program: &std::path::Path) -> Result<Self::Program, Self::Error> {
compile_risczero_program(path_to_program).map_err(RiscZeroError::from)
}
}