1
0
mirror of https://github.com/fluencelabs/wasmer synced 2025-04-13 12:56:04 +00:00

19 lines
499 B
Rust
Raw Normal View History

use crate::{error::CompileResult, module::ModuleInner, types::LocalFuncIndex, vm};
2019-01-08 12:09:47 -05:00
use std::ptr::NonNull;
pub use crate::mmap::{Mmap, Protect};
2019-01-10 22:59:57 -05:00
pub use crate::sig_registry::SigRegistry;
2019-01-08 12:09:47 -05:00
pub trait Compiler {
/// Compiles a `Module` from WebAssembly binary format
fn compile(&self, wasm: &[u8]) -> CompileResult<ModuleInner>;
2019-01-08 12:09:47 -05:00
}
pub trait FuncResolver {
2019-01-16 10:26:10 -08:00
fn get(
&self,
module: &ModuleInner,
local_func_index: LocalFuncIndex,
) -> Option<NonNull<vm::Func>>;
2019-01-08 12:09:47 -05:00
}