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
14
15
//! Embive Interpreter State

/// Embive Interpreter State
#[derive(Debug, Default, PartialEq, Clone, Copy)]
pub enum State {
    /// Interpreter running. Call [`super::Interpreter::run`] to continue running.
    #[default]
    Running,
    /// Interpreter was called (syscall). Optionally call [`super::Interpreter::syscall`] to handle the syscall and then [`super::Interpreter::run`] to continue running.
    Called,
    /// Interpreter waiting interrupt. Optionally call [`super::Interpreter::interrupt`] to trigger an interrupt and then [`super::Interpreter::run`] to continue running.
    Waiting,
    /// Interpreter halted. Call [`super::Interpreter::reset`] and then [`super::Interpreter::run`] to run again.
    Halted,
}