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", so this trait is not object safe.

Implementors§

Source§

impl Architecture for Executable

Available on crate feature compiler and x86-64 only.