#[cfg(not(target_arch = "wasm32"))]
use crate::rite::insn::{self, OpCode};

#[cfg(not(target_arch = "wasm32"))]
pub fn debug_eval_insn(mut insns: &[u8]) -> Result<(), crate::Error> {
    let ps: usize = 0;
    while !insns.is_empty() {
        let op = insns[ps];
        let opcode: OpCode = op.try_into()?;
        let fetched = insn::FETCH_TABLE[op as usize](&mut insns)?;
        println!("insn: {:?} {:?}", opcode, fetched);
    }
    Ok(())
}
