Skip to main content

Architecture

Trait Architecture 

Source
pub(crate) trait Architecture
where Self: Sized,
{ // Required methods fn compile(program: &[Instruction; 512]) -> Result<Self, CompilerError>; fn invoke(&self, regs: &mut RegisterFile); }
Expand description

Trait that adds architecture-specific functionality to Executable

Required Methods§

Source

fn compile(program: &[Instruction; 512]) -> Result<Self, CompilerError>

Compile an array of instructions into an Executable

Source

fn invoke(&self, regs: &mut RegisterFile)

Run the compiled code, with a RegisterFile for input and output

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§