Skip to content

Commit

Permalink
Removed unnecessary files
Browse files Browse the repository at this point in the history
  • Loading branch information
syrusakbary committed Jan 20, 2019
1 parent a9056d5 commit e8ccea4
Show file tree
Hide file tree
Showing 10 changed files with 0 additions and 506 deletions.
17 changes: 0 additions & 17 deletions src/common/mmap/common.rs

This file was deleted.

13 changes: 0 additions & 13 deletions src/common/mmap/mod.rs

This file was deleted.

95 changes: 0 additions & 95 deletions src/common/mmap/unix.rs

This file was deleted.

88 changes: 0 additions & 88 deletions src/common/mmap/windows.rs

This file was deleted.

2 changes: 0 additions & 2 deletions src/common/mod.rs

This file was deleted.

106 changes: 0 additions & 106 deletions src/common/slice.rs

This file was deleted.

9 changes: 0 additions & 9 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
extern crate libc;
extern crate region;
extern crate wasmer_runtime;
// extern crate wasmer_emscripten;

pub extern crate nix; // re-exported for usage in macros
#[cfg(windows)]
extern crate winapi;

#[macro_use]
mod macros;
#[macro_use]
pub mod recovery;
pub mod common;
pub mod sighandler;
pub mod update;
pub mod webassembly;
21 changes: 0 additions & 21 deletions src/macros.rs
Original file line number Diff line number Diff line change
@@ -1,24 +1,3 @@
/// Retrieve a WebAssembly function given a Instance and a FuncIndex
/// Example:
/// let func: fn(i32) -> i32 = get_instance_function!(instance, func_index);
#[macro_export]
macro_rules! get_instance_function {
($instance:expr, $func_index:expr) => {{
use std::mem;
let func_addr = $instance.get_function_pointer($func_index);
unsafe { mem::transmute(func_addr) }
}};
}

#[macro_export]
macro_rules! include_wast2wasm_bytes {
($x:expr) => {{
use wabt::wat2wasm;
const WAST_BYTES: &[u8] = include_bytes!($x);
wat2wasm(WAST_BYTES.to_vec()).expect(&format!("Can't convert {} file to wasm", $x))
}};
}

#[macro_export]
macro_rules! debug {
($fmt:expr) => (if cfg!(any(debug_assertions, feature="debug")) { println!(concat!("Wasmer::", $fmt)) });
Expand Down
Loading

0 comments on commit e8ccea4

Please sign in to comment.