pub trait HostInterface {
    fn print(&mut self, string: &str, new_line: bool) -> Result<()>;
    fn read_byte(&mut self) -> Result<u8>;
    fn exit(&mut self, code: i32);
}
Expand description

Host Environment Interface

Required Methods

Print a string

Read a byte

This function should exit the program with specified code.

For cases where exit is not desired, just let the function return and interpreter will terminate with an error.

Implementors