Struct aluvm::Vm[][src]

pub struct Vm<E = ReservedOp> where
    E: InstructionSet
{ /* fields omitted */ }
Expand description

Alu virtual machine providing single-core execution environment

Implementations

Method borrowing Vm::libs field. Libraries known to the runtime, identified by their hashes

Method borrowing Vm::entrypoint field. Entrypoint for the main function

Method borrowing Vm::registers field. A set of registers

Constructs new virtual machine with no code in it.

Calling Vm::main on it will result in machine termination with st0 set to false.

Constructs new virtual machine using the provided library.

Adds Alu bytecode library to the virtual machine.

Returns

true if the library was already known and false otherwise.

Sets new entry point value (used when calling Vm::main)

Executes the program starting from the provided entry point (set with Vm::set_entrypoint or initialized to 0 offset of the first used library if Vm::new, Vm::default or Vm::with were used).

Returns

Value of the st0 register at the end of the program execution.

Executes the program starting from the provided entry point.

Returns

Value of the st0 register at the end of the program execution.

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.