mirror of
https://github.com/fluencelabs/wasmer
synced 2025-05-17 04:51:18 +00:00
Remove unused imports
This commit is contained in:
parent
2f9119a7f0
commit
f57bcc47a1
@ -1,4 +1,3 @@
|
|||||||
use super::super::host;
|
|
||||||
/// NOTE: These syscalls only support wasm_32 for now because they take u32 offset
|
/// NOTE: These syscalls only support wasm_32 for now because they take u32 offset
|
||||||
use libc::{
|
use libc::{
|
||||||
c_int, c_long, getenv, getgrnam as libc_getgrnam, getpwnam as libc_getpwnam, putenv, setenv,
|
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 std::os::raw::c_char;
|
||||||
|
|
||||||
use super::utils::{allocate_on_stack, copy_cstr_into_wasm, copy_terminated_array_of_cstrs};
|
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::apis::emscripten::EmscriptenData;
|
||||||
use crate::runtime::{types::Value, Instance};
|
use crate::runtime::{types::Value, Instance};
|
||||||
|
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
use crate::webassembly::Instance;
|
|
||||||
|
|
||||||
/// emscripten: _llvm_log10_f64
|
/// emscripten: _llvm_log10_f64
|
||||||
pub extern "C" fn _llvm_log10_f64(value: f64) -> f64 {
|
pub extern "C" fn _llvm_log10_f64(value: f64) -> f64 {
|
||||||
debug!("emscripten::_llvm_log10_f64");
|
debug!("emscripten::_llvm_log10_f64");
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
use crate::runtime::memory::LinearMemory;
|
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};
|
use crate::runtime::{Import, Imports, Instance};
|
||||||
/// NOTE: TODO: These emscripten api implementation only support wasm32 for now because they assume offsets are u32
|
/// NOTE: TODO: These emscripten api implementation only support wasm32 for now because they assume offsets are u32
|
||||||
use byteorder::{ByteOrder, LittleEndian};
|
use byteorder::{ByteOrder, LittleEndian};
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
use super::utils::{copy_cstr_into_wasm, write_to_buf};
|
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::mem;
|
||||||
use std::time::SystemTime;
|
use std::time::SystemTime;
|
||||||
|
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
use crate::runtime::{Instance, Module};
|
use crate::runtime::{Instance, Module};
|
||||||
//use crate::webassembly::Instance;
|
//use crate::webassembly::Instance;
|
||||||
use crate::apis::emscripten::env;
|
use crate::apis::emscripten::env;
|
||||||
use byteorder::{ByteOrder, LittleEndian};
|
|
||||||
use libc::stat;
|
use libc::stat;
|
||||||
use std::ffi::CStr;
|
use std::ffi::CStr;
|
||||||
use std::mem::size_of;
|
use std::mem::size_of;
|
||||||
use std::os::raw::c_char;
|
use std::os::raw::c_char;
|
||||||
use std::slice;
|
use std::slice;
|
||||||
use std::sync::Arc;
|
|
||||||
/// We check if a provided module is an Emscripten generated one
|
/// We check if a provided module is an Emscripten generated one
|
||||||
pub fn is_emscripten_module(module: &Module) -> bool {
|
pub fn is_emscripten_module(module: &Module) -> bool {
|
||||||
for (_, import_name) in &module.imported_functions {
|
for (_, import_name) in &module.imported_functions {
|
||||||
|
@ -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> {
|
// pub extern "C" fn get_env(name: &str, _instance: &mut Instance) -> Result<String, env::VarError> {
|
||||||
// debug!("host::get_env({:?})", name);
|
// debug!("host::get_env({:?})", name);
|
||||||
// env::var(name)
|
// env::var(name)
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
use std::ffi::CString;
|
|
||||||
use std::io;
|
use std::io;
|
||||||
use std::io::Error;
|
use std::io::Error;
|
||||||
use std::io::ErrorKind;
|
use std::io::ErrorKind;
|
||||||
|
@ -2,8 +2,7 @@ macro_rules! assert_emscripten_output {
|
|||||||
($file:expr, $name:expr, $args:expr, $expected:expr) => {{
|
($file:expr, $name:expr, $args:expr, $expected:expr) => {{
|
||||||
use crate::apis::generate_emscripten_env;
|
use crate::apis::generate_emscripten_env;
|
||||||
use crate::common::stdio::StdioCapturer;
|
use crate::common::stdio::StdioCapturer;
|
||||||
use crate::runtime::types::{ElementType, FuncSig, Table, Type, Value};
|
use crate::runtime::{InstanceABI, InstanceOptions};
|
||||||
use crate::runtime::{Import, Imports, InstanceABI, InstanceOptions};
|
|
||||||
use crate::webassembly::{get_isa, instantiate, start_instance};
|
use crate::webassembly::{get_isa, instantiate, start_instance};
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
|
@ -10,8 +10,6 @@ use cranelift_codegen::{
|
|||||||
isa,
|
isa,
|
||||||
settings::{self, Configurable},
|
settings::{self, Configurable},
|
||||||
};
|
};
|
||||||
use cranelift_wasm::ModuleEnvironment;
|
|
||||||
use std::io::{self, Write};
|
|
||||||
use std::panic;
|
use std::panic;
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user