mrubyedge 1.1.12

mruby/edge is yet another mruby that is specialized for running on WASM
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#[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(())
}