use ommui_file_loading::{load_json, Error};
use {std, InstructionMap};
type Result<T> = std::result::Result<T, Error>;
#[derive(Debug, Clone, PartialEq)]
pub struct InstructionSet {
path: String,
}
impl InstructionSet {
pub fn new(instructionset_path: &str) -> Self {
InstructionSet {
path: instructionset_path.to_string(),
}
}
pub fn load_instructions(&self) -> Result<InstructionMap> {
load_json(&format!("{}/instructionset.json", self.path))
}
}