holey-bytes/hbvm/src/lib.rs

23 lines
410 B
Rust
Raw Normal View History

#![no_std]
2023-04-22 16:06:33 -05:00
extern crate alloc;
pub mod validate;
pub mod vm;
2023-04-22 13:00:19 -05:00
2023-05-22 09:01:13 -05:00
#[derive(Debug, PartialEq)]
2023-04-17 07:31:18 -05:00
pub enum RuntimeErrors {
2023-05-22 23:44:40 -05:00
InvalidOpcodePair(u8, u8),
2023-04-17 07:31:18 -05:00
RegisterTooSmall,
2023-04-22 17:17:49 -05:00
HostError(u64),
2023-05-06 07:33:40 -05:00
PageNotMapped(u64),
2023-05-22 09:01:13 -05:00
InvalidJumpAddress(u64),
2023-05-22 22:47:29 -05:00
InvalidSystemCall(u8),
2023-04-17 07:31:18 -05:00
}
// If you solve the halting problem feel free to remove this
2023-05-22 09:01:13 -05:00
#[derive(PartialEq, Debug)]
2023-04-17 07:31:18 -05:00
pub enum HaltStatus {
Halted,
Running,
}