Remove unused imports

This commit is contained in:
Brandon Fish 2019-01-06 16:29:45 -06:00
parent 2f9119a7f0
commit f57bcc47a1
9 changed files with 3 additions and 16 deletions

View File

@ -1,4 +1,3 @@
use super::super::host;
/// NOTE: These syscalls only support wasm_32 for now because they take u32 offset
use libc::{
c_int, c_long, getenv, getgrnam as libc_getgrnam, getpwnam as libc_getpwnam, putenv, setenv,
@ -9,7 +8,6 @@ use std::mem;
use std::os::raw::c_char;
use super::utils::{allocate_on_stack, copy_cstr_into_wasm, copy_terminated_array_of_cstrs};
use crate::apis::emscripten::env;
use crate::apis::emscripten::EmscriptenData;
use crate::runtime::{types::Value, Instance};

View File

@ -1,5 +1,3 @@
use crate::webassembly::Instance;
/// emscripten: _llvm_log10_f64
pub extern "C" fn _llvm_log10_f64(value: f64) -> f64 {
debug!("emscripten::_llvm_log10_f64");

View File

@ -1,5 +1,5 @@
use crate::runtime::memory::LinearMemory;
use crate::runtime::types::{ElementType, FuncSig, Table, Type, Value};
use crate::runtime::types::{FuncSig, Type, Value};
use crate::runtime::{Import, Imports, Instance};
/// NOTE: TODO: These emscripten api implementation only support wasm32 for now because they assume offsets are u32
use byteorder::{ByteOrder, LittleEndian};

View File

@ -1,5 +1,5 @@
use super::utils::{copy_cstr_into_wasm, write_to_buf};
use libc::{c_char, c_int, localtime, localtime_r, time as libc_time, time_t, timespec, tm};
use libc::{c_char, c_int, time as libc_time, time_t};
use std::mem;
use std::time::SystemTime;

View File

@ -1,13 +1,11 @@
use crate::runtime::{Instance, Module};
//use crate::webassembly::Instance;
use crate::apis::emscripten::env;
use byteorder::{ByteOrder, LittleEndian};
use libc::stat;
use std::ffi::CStr;
use std::mem::size_of;
use std::os::raw::c_char;
use std::slice;
use std::sync::Arc;
/// We check if a provided module is an Emscripten generated one
pub fn is_emscripten_module(module: &Module) -> bool {
for (_, import_name) in &module.imported_functions {

View File

@ -1,6 +1,3 @@
use crate::webassembly::Instance;
use std::env;
// pub extern "C" fn get_env(name: &str, _instance: &mut Instance) -> Result<String, env::VarError> {
// debug!("host::get_env({:?})", name);
// env::var(name)

View File

@ -1,4 +1,3 @@
use std::ffi::CString;
use std::io;
use std::io::Error;
use std::io::ErrorKind;

View File

@ -2,8 +2,7 @@ macro_rules! assert_emscripten_output {
($file:expr, $name:expr, $args:expr, $expected:expr) => {{
use crate::apis::generate_emscripten_env;
use crate::common::stdio::StdioCapturer;
use crate::runtime::types::{ElementType, FuncSig, Table, Type, Value};
use crate::runtime::{Import, Imports, InstanceABI, InstanceOptions};
use crate::runtime::{InstanceABI, InstanceOptions};
use crate::webassembly::{get_isa, instantiate, start_instance};
use std::sync::Arc;

View File

@ -10,8 +10,6 @@ use cranelift_codegen::{
isa,
settings::{self, Configurable},
};
use cranelift_wasm::ModuleEnvironment;
use std::io::{self, Write};
use std::panic;
use std::str::FromStr;
use std::sync::Arc;