Add (hopefully-working) support for windows

This commit is contained in:
Lachlan Sneff
2019-01-21 11:51:41 -08:00
parent a3821a90c1
commit b74a08f097
12 changed files with 201 additions and 38 deletions

View File

@ -6,7 +6,10 @@ use std::mem;
use std::ptr::{write_unaligned, NonNull};
use wasmer_runtime::{
self,
backend::{self, Mmap, Protect},
backend::{
self,
sys::{Memory, Protect},
},
error::{CompileError, CompileResult},
structures::Map,
types::LocalFuncIndex,
@ -49,7 +52,7 @@ impl FuncResolverBuilder {
trap_sinks.push(trap_sink);
}
let mut memory = Mmap::with_size(total_size)
let mut memory = Memory::with_size(total_size)
.map_err(|e| CompileError::InternalError { msg: e.to_string() })?;
unsafe {
memory
@ -176,7 +179,7 @@ impl FuncResolverBuilder {
/// Resolves a function index to a function address.
pub struct FuncResolver {
map: Map<LocalFuncIndex, usize>,
memory: Mmap,
memory: Memory,
}
impl FuncResolver {