wasmer/lib/runtime/src/backend.rs

15 lines
411 B
Rust
Raw Normal View History

2019-01-08 17:09:47 +00:00
use crate::{module::Module, types::FuncIndex, vm};
use std::ptr::NonNull;
pub use crate::mmap::{Mmap, Protect};
2019-01-11 03:59:57 +00:00
pub use crate::sig_registry::SigRegistry;
2019-01-08 17:09:47 +00:00
pub trait Compiler {
/// Compiles a `Module` from WebAssembly binary format
fn compile(&self, wasm: &[u8]) -> Result<Module, String>;
}
pub trait FuncResolver {
fn get(&self, module: &Module, index: FuncIndex) -> Option<NonNull<vm::Func>>;
}