mirror of
https://github.com/fluencelabs/wasmer
synced 2025-04-04 08:41:07 +00:00
12 lines
330 B
Rust
12 lines
330 B
Rust
|
use crate::{module::Module, types::FuncIndex, vm};
|
||
|
use std::ptr::NonNull;
|
||
|
|
||
|
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>>;
|
||
|
}
|