This commit is contained in:
Heyang Zhou
2019-05-05 09:32:35 -07:00
parent cc01e40dc5
commit 7bc09ee220
6 changed files with 256 additions and 5 deletions

View File

@ -23,6 +23,13 @@ pub trait Loader {
pub trait Instance {
type Error: Debug;
fn call(&mut self, id: usize, args: &[Value]) -> Result<u64, Self::Error>;
fn read_memory(&mut self, offset: u32, len: u32) -> Result<Vec<u8>, Self::Error> {
unimplemented!()
}
fn write_memory(&mut self, offset: u32, len: u32, buf: &[u8]) -> Result<(), Self::Error> {
unimplemented!()
}
}
pub struct LocalLoader;