2023-04-22 16:06:33 -05:00
|
|
|
// #![no_std]
|
|
|
|
extern crate alloc;
|
|
|
|
|
2023-04-17 07:31:18 -05:00
|
|
|
pub mod bytecode;
|
2023-04-18 18:08:30 -05:00
|
|
|
pub mod engine;
|
2023-04-22 16:06:33 -05:00
|
|
|
pub mod memory;
|
2023-04-22 13:00:19 -05:00
|
|
|
|
2023-04-18 18:08:30 -05:00
|
|
|
use bytecode::ops::*;
|
|
|
|
use bytecode::types::{CONST_F64, CONST_U8};
|
|
|
|
use engine::Engine;
|
2023-04-17 07:31:18 -05:00
|
|
|
|
2023-04-18 18:08:30 -05:00
|
|
|
#[derive(Debug)]
|
2023-04-17 07:31:18 -05:00
|
|
|
pub enum RuntimeErrors {
|
|
|
|
InvalidOpcode(u8),
|
|
|
|
RegisterTooSmall,
|
2023-04-22 17:17:49 -05:00
|
|
|
HostError(u64),
|
2023-05-06 07:33:40 -05:00
|
|
|
PageNotMapped(u64),
|
2023-04-17 07:31:18 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// If you solve the halting problem feel free to remove this
|
|
|
|
pub enum HaltStatus {
|
|
|
|
Halted,
|
|
|
|
Running,
|
|
|
|
}
|
|
|
|
|
|
|
|
pub struct HandSide {
|
|
|
|
signed: bool,
|
2023-04-18 18:08:30 -05:00
|
|
|
float: bool,
|
2023-04-17 07:31:18 -05:00
|
|
|
num8: Option<u8>,
|
|
|
|
num64: Option<u64>,
|
|
|
|
}
|