diff --git a/lib/runtime-core/src/backing.rs b/lib/runtime-core/src/backing.rs index 7a1e7239a..2c9630764 100644 --- a/lib/runtime-core/src/backing.rs +++ b/lib/runtime-core/src/backing.rs @@ -230,7 +230,12 @@ impl LocalBacking { } }; - elements[init_base + i] = vm::Anyfunc { func, ctx, sig_id, func_index: Some(func_index) }; + elements[init_base + i] = vm::Anyfunc { + func, + ctx, + sig_id, + func_index: Some(func_index), + }; } }); } diff --git a/lib/runtime-core/src/error.rs b/lib/runtime-core/src/error.rs index 124b2d23a..ecb5c0207 100644 --- a/lib/runtime-core/src/error.rs +++ b/lib/runtime-core/src/error.rs @@ -1,10 +1,11 @@ use crate::types::{ - FuncSig, GlobalDescriptor, MemoryDescriptor, MemoryIndex, TableDescriptor, TableIndex, Type, Value, + FuncSig, GlobalDescriptor, MemoryDescriptor, MemoryIndex, TableDescriptor, TableIndex, Type, + Value, }; -use std::sync::Arc; -use wasmparser::BinaryReaderError; use core::borrow::Borrow; use std::any::Any; +use std::sync::Arc; +use wasmparser::BinaryReaderError; pub type Result = std::result::Result; pub type CompileResult = std::result::Result; diff --git a/lib/runtime-core/src/types.rs b/lib/runtime-core/src/types.rs index 3b641e043..fb30c6276 100644 --- a/lib/runtime-core/src/types.rs +++ b/lib/runtime-core/src/types.rs @@ -1,5 +1,8 @@ use crate::error::{CompileError, CompileResult}; -use crate::{memory::MemoryType, module::ModuleInfo, module::ModuleInner, structures::TypedIndex, units::Pages}; +use crate::{ + memory::MemoryType, module::ModuleInfo, module::ModuleInner, structures::TypedIndex, + units::Pages, +}; use std::{borrow::Cow, mem}; /// Represents a WebAssembly type. diff --git a/lib/runtime/src/lib.rs b/lib/runtime/src/lib.rs index 478408334..13557d383 100644 --- a/lib/runtime/src/lib.rs +++ b/lib/runtime/src/lib.rs @@ -160,7 +160,7 @@ fn default_compiler() -> &'static dyn Compiler { #[cfg(not(feature = "llvm"))] use wasmer_dynasm_backend::SinglePassCompiler as DefaultCompiler; - // use wasmer_clif_backend::CraneliftCompiler as DefaultCompiler; // TODO Fix default + // use wasmer_clif_backend::CraneliftCompiler as DefaultCompiler; // TODO Fix default lazy_static! { static ref DEFAULT_COMPILER: DefaultCompiler = { DefaultCompiler::new() }; diff --git a/src/webassembly.rs b/src/webassembly.rs index 5a603893b..e448ce5c6 100644 --- a/src/webassembly.rs +++ b/src/webassembly.rs @@ -87,7 +87,10 @@ pub fn run_instance( if is_emscripten_module(module) { run_emscripten_instance(module, instance, path, args)?; } else { - let args: Vec = args.into_iter().map(|x| Value::I32(x.parse().unwrap())).collect(); + let args: Vec = args + .into_iter() + .map(|x| Value::I32(x.parse().unwrap())) + .collect(); println!("{:?}", instance.call("main", &args)?); };