embive 0.7.1

Embive is an interpreter/virtual-machine that leverages RISC-V bytecode, enabling sandboxed code execution on tiny devices (e.g. microcontrollers).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::format::{Format, TypeU};
use crate::instruction::{embive, riscv};
use crate::transpiler::Error;

use super::{embive_raw, Convert, RawInstruction};

impl Convert for riscv::Lui {
    fn convert(data: u32) -> Result<RawInstruction, Error> {
        let inst = TypeU::from_riscv(data);

        Ok(embive_raw!(embive::Lui, inst))
    }
}