mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-13 17:11:21 +00:00
Cargo fmt more files.
This commit is contained in:
@ -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),
|
||||
};
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -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<T> = std::result::Result<T, Error>;
|
||||
pub type CompileResult<T> = std::result::Result<T, CompileError>;
|
||||
|
@ -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.
|
||||
|
@ -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() };
|
||||
|
@ -87,7 +87,10 @@ pub fn run_instance(
|
||||
if is_emscripten_module(module) {
|
||||
run_emscripten_instance(module, instance, path, args)?;
|
||||
} else {
|
||||
let args: Vec<Value> = args.into_iter().map(|x| Value::I32(x.parse().unwrap())).collect();
|
||||
let args: Vec<Value> = args
|
||||
.into_iter()
|
||||
.map(|x| Value::I32(x.parse().unwrap()))
|
||||
.collect();
|
||||
println!("{:?}", instance.call("main", &args)?);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user