mirror of
https://github.com/mii443/wasmer.git
synced 2025-08-24 09:19:25 +00:00
Run cargo fmt
This commit is contained in:
@ -263,8 +263,8 @@ macro_rules! import_namespace {
|
|||||||
mod test {
|
mod test {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::{Global, Store, Val};
|
use crate::{Global, Store, Val};
|
||||||
use wasmer_types::Type;
|
|
||||||
use wasmer_engine::ChainableNamedResolver;
|
use wasmer_engine::ChainableNamedResolver;
|
||||||
|
use wasmer_types::Type;
|
||||||
use wasmer_vm::Export;
|
use wasmer_vm::Export;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
@ -63,10 +63,6 @@ pub use crate::types::{
|
|||||||
pub use crate::types::{Val as Value, ValType as Type};
|
pub use crate::types::{Val as Value, ValType as Type};
|
||||||
pub use crate::utils::is_wasm;
|
pub use crate::utils::is_wasm;
|
||||||
pub use target_lexicon::{Architecture, CallingConvention, OperatingSystem, Triple, HOST};
|
pub use target_lexicon::{Architecture, CallingConvention, OperatingSystem, Triple, HOST};
|
||||||
pub use wasmer_types::{
|
|
||||||
Atomically, Bytes, GlobalInit, LocalFunctionIndex, MemoryView, Pages, ValueType,
|
|
||||||
WASM_MAX_PAGES, WASM_MIN_PAGES, WASM_PAGE_SIZE,
|
|
||||||
};
|
|
||||||
#[cfg(feature = "compiler")]
|
#[cfg(feature = "compiler")]
|
||||||
pub use wasmer_compiler::CompilerConfig;
|
pub use wasmer_compiler::CompilerConfig;
|
||||||
pub use wasmer_compiler::{
|
pub use wasmer_compiler::{
|
||||||
@ -77,6 +73,10 @@ pub use wasmer_engine::{
|
|||||||
ChainableNamedResolver, DeserializeError, Engine, InstantiationError, LinkError, NamedResolver,
|
ChainableNamedResolver, DeserializeError, Engine, InstantiationError, LinkError, NamedResolver,
|
||||||
NamedResolverChain, Resolver, RuntimeError, SerializeError,
|
NamedResolverChain, Resolver, RuntimeError, SerializeError,
|
||||||
};
|
};
|
||||||
|
pub use wasmer_types::{
|
||||||
|
Atomically, Bytes, GlobalInit, LocalFunctionIndex, MemoryView, Pages, ValueType,
|
||||||
|
WASM_MAX_PAGES, WASM_MIN_PAGES, WASM_PAGE_SIZE,
|
||||||
|
};
|
||||||
pub use wasmer_vm::{raise_user_trap, Export, MemoryError};
|
pub use wasmer_vm::{raise_user_trap, Export, MemoryError};
|
||||||
#[cfg(feature = "wat")]
|
#[cfg(feature = "wat")]
|
||||||
pub use wat::parse_bytes as wat2wasm;
|
pub use wat::parse_bytes as wat2wasm;
|
||||||
|
@ -13,10 +13,10 @@ use std::collections::HashMap;
|
|||||||
use std::ffi::CStr;
|
use std::ffi::CStr;
|
||||||
use std::ptr::NonNull;
|
use std::ptr::NonNull;
|
||||||
use std::slice;
|
use std::slice;
|
||||||
use wasmer_types::{entity::*, ExportIndex, MemoryIndex};
|
|
||||||
use wasmer::{
|
use wasmer::{
|
||||||
Exports, Extern, Function, Global, ImportObject, Instance, Memory, Module, Table, Val,
|
Exports, Extern, Function, Global, ImportObject, Instance, Memory, Module, Table, Val,
|
||||||
};
|
};
|
||||||
|
use wasmer_types::{entity::*, ExportIndex, MemoryIndex};
|
||||||
|
|
||||||
/// Opaque pointer to an Instance type plus metadata.
|
/// Opaque pointer to an Instance type plus metadata.
|
||||||
///
|
///
|
||||||
|
@ -201,10 +201,10 @@ impl StoreOptions {
|
|||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
use std::io::Write;
|
use std::io::Write;
|
||||||
use wasmer_types::entity::EntityRef;
|
|
||||||
use wasmer_compiler_llvm::{
|
use wasmer_compiler_llvm::{
|
||||||
CompiledFunctionKind, InkwellMemoryBuffer, InkwellModule, LLVMCallbacks, LLVM,
|
CompiledFunctionKind, InkwellMemoryBuffer, InkwellModule, LLVMCallbacks, LLVM,
|
||||||
};
|
};
|
||||||
|
use wasmer_types::entity::EntityRef;
|
||||||
let mut config = LLVM::new();
|
let mut config = LLVM::new();
|
||||||
struct Callbacks {
|
struct Callbacks {
|
||||||
debug_dir: PathBuf,
|
debug_dir: PathBuf,
|
||||||
|
@ -19,14 +19,14 @@ use cranelift_codegen::{binemit, Context};
|
|||||||
#[cfg(feature = "unwind")]
|
#[cfg(feature = "unwind")]
|
||||||
use gimli::write::{Address, EhFrame, FrameTable};
|
use gimli::write::{Address, EhFrame, FrameTable};
|
||||||
use rayon::prelude::{IntoParallelRefIterator, ParallelIterator};
|
use rayon::prelude::{IntoParallelRefIterator, ParallelIterator};
|
||||||
use wasmer_types::entity::{EntityRef, PrimaryMap};
|
|
||||||
use wasmer_types::{FunctionIndex, LocalFunctionIndex, SignatureIndex};
|
|
||||||
use wasmer_compiler::CompileError;
|
use wasmer_compiler::CompileError;
|
||||||
use wasmer_compiler::{CallingConvention, ModuleTranslationState, Target};
|
use wasmer_compiler::{CallingConvention, ModuleTranslationState, Target};
|
||||||
use wasmer_compiler::{
|
use wasmer_compiler::{
|
||||||
Compilation, CompileModuleInfo, CompiledFunction, CompiledFunctionFrameInfo,
|
Compilation, CompileModuleInfo, CompiledFunction, CompiledFunctionFrameInfo,
|
||||||
CompiledFunctionUnwindInfo, Compiler, Dwarf, FunctionBody, FunctionBodyData, SectionIndex,
|
CompiledFunctionUnwindInfo, Compiler, Dwarf, FunctionBody, FunctionBodyData, SectionIndex,
|
||||||
};
|
};
|
||||||
|
use wasmer_types::entity::{EntityRef, PrimaryMap};
|
||||||
|
use wasmer_types::{FunctionIndex, LocalFunctionIndex, SignatureIndex};
|
||||||
|
|
||||||
/// A compiler that compiles a WebAssembly module with Cranelift, translating the Wasm to Cranelift IR,
|
/// A compiler that compiles a WebAssembly module with Cranelift, translating the Wasm to Cranelift IR,
|
||||||
/// optimizing it and then translating to assembly.
|
/// optimizing it and then translating to assembly.
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
use gimli::write::{Address, EndianVec, Result, Writer};
|
use gimli::write::{Address, EndianVec, Result, Writer};
|
||||||
use gimli::{RunTimeEndian, SectionId};
|
use gimli::{RunTimeEndian, SectionId};
|
||||||
use wasmer_types::entity::EntityRef;
|
|
||||||
use wasmer_types::LocalFunctionIndex;
|
|
||||||
use wasmer_compiler::{CustomSection, CustomSectionProtection, SectionBody};
|
use wasmer_compiler::{CustomSection, CustomSectionProtection, SectionBody};
|
||||||
use wasmer_compiler::{Endianness, Relocation, RelocationKind, RelocationTarget};
|
use wasmer_compiler::{Endianness, Relocation, RelocationKind, RelocationTarget};
|
||||||
|
use wasmer_types::entity::EntityRef;
|
||||||
|
use wasmer_types::LocalFunctionIndex;
|
||||||
|
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct WriterRelocate {
|
pub struct WriterRelocate {
|
||||||
|
@ -12,10 +12,10 @@ use cranelift_codegen::ir::types::*;
|
|||||||
use cranelift_codegen::ir::{AbiParam, ArgumentPurpose, Function, InstBuilder, Signature};
|
use cranelift_codegen::ir::{AbiParam, ArgumentPurpose, Function, InstBuilder, Signature};
|
||||||
use cranelift_codegen::isa::TargetFrontendConfig;
|
use cranelift_codegen::isa::TargetFrontendConfig;
|
||||||
use std::convert::TryFrom;
|
use std::convert::TryFrom;
|
||||||
|
use wasmer_compiler::{WasmError, WasmResult};
|
||||||
use wasmer_types::entity::EntityRef;
|
use wasmer_types::entity::EntityRef;
|
||||||
use wasmer_types::entity::PrimaryMap;
|
use wasmer_types::entity::PrimaryMap;
|
||||||
use wasmer_types::{FunctionIndex, GlobalIndex, MemoryIndex, SignatureIndex, TableIndex};
|
use wasmer_types::{FunctionIndex, GlobalIndex, MemoryIndex, SignatureIndex, TableIndex};
|
||||||
use wasmer_compiler::{WasmError, WasmResult};
|
|
||||||
use wasmer_vm::VMBuiltinFunctionIndex;
|
use wasmer_vm::VMBuiltinFunctionIndex;
|
||||||
use wasmer_vm::VMOffsets;
|
use wasmer_vm::VMOffsets;
|
||||||
use wasmer_vm::{MemoryStyle, ModuleInfo, TableStyle};
|
use wasmer_vm::{MemoryStyle, ModuleInfo, TableStyle};
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
use crate::translator::{irlibcall_to_libcall, irreloc_to_relocationkind};
|
use crate::translator::{irlibcall_to_libcall, irreloc_to_relocationkind};
|
||||||
use cranelift_codegen::binemit;
|
use cranelift_codegen::binemit;
|
||||||
use cranelift_codegen::ir::{self, ExternalName};
|
use cranelift_codegen::ir::{self, ExternalName};
|
||||||
|
use wasmer_compiler::{JumpTable, Relocation, RelocationTarget, SourceLoc, TrapInformation};
|
||||||
use wasmer_types::entity::EntityRef;
|
use wasmer_types::entity::EntityRef;
|
||||||
use wasmer_types::{FunctionIndex, LocalFunctionIndex};
|
use wasmer_types::{FunctionIndex, LocalFunctionIndex};
|
||||||
use wasmer_compiler::{JumpTable, Relocation, RelocationTarget, SourceLoc, TrapInformation};
|
|
||||||
use wasmer_vm::{ModuleInfo, TrapCode};
|
use wasmer_vm::{ModuleInfo, TrapCode};
|
||||||
|
|
||||||
/// Implementation of a relocation sink that just saves all the information for later
|
/// Implementation of a relocation sink that just saves all the information for later
|
||||||
|
@ -16,8 +16,8 @@ use std::cmp;
|
|||||||
use std::mem;
|
use std::mem;
|
||||||
|
|
||||||
use cranelift_frontend::{FunctionBuilder, FunctionBuilderContext};
|
use cranelift_frontend::{FunctionBuilder, FunctionBuilderContext};
|
||||||
use wasmer_types::FunctionType;
|
|
||||||
use wasmer_compiler::{CompileError, FunctionBody};
|
use wasmer_compiler::{CompileError, FunctionBody};
|
||||||
|
use wasmer_types::FunctionType;
|
||||||
use wasmer_vm::VMOffsets;
|
use wasmer_vm::VMOffsets;
|
||||||
|
|
||||||
/// Create a trampoline for invoking a WebAssembly function.
|
/// Create a trampoline for invoking a WebAssembly function.
|
||||||
|
@ -19,8 +19,8 @@ use cranelift_codegen::Context;
|
|||||||
use cranelift_codegen::{binemit, ir};
|
use cranelift_codegen::{binemit, ir};
|
||||||
use cranelift_frontend::{FunctionBuilder, FunctionBuilderContext};
|
use cranelift_frontend::{FunctionBuilder, FunctionBuilderContext};
|
||||||
use std::mem;
|
use std::mem;
|
||||||
use wasmer_types::FunctionType;
|
|
||||||
use wasmer_compiler::{CompileError, FunctionBody};
|
use wasmer_compiler::{CompileError, FunctionBody};
|
||||||
|
use wasmer_types::FunctionType;
|
||||||
|
|
||||||
/// Create a trampoline for invoking a WebAssembly function.
|
/// Create a trampoline for invoking a WebAssembly function.
|
||||||
pub fn make_trampoline_function_call(
|
pub fn make_trampoline_function_call(
|
||||||
|
@ -42,10 +42,10 @@ use cranelift_codegen::ir::{
|
|||||||
use cranelift_codegen::packed_option::ReservedValue;
|
use cranelift_codegen::packed_option::ReservedValue;
|
||||||
use cranelift_frontend::{FunctionBuilder, Variable};
|
use cranelift_frontend::{FunctionBuilder, Variable};
|
||||||
use std::vec::Vec;
|
use std::vec::Vec;
|
||||||
use wasmer_types::{FunctionIndex, GlobalIndex, MemoryIndex, SignatureIndex, TableIndex};
|
|
||||||
use wasmer_compiler::wasmparser::{MemoryImmediate, Operator};
|
use wasmer_compiler::wasmparser::{MemoryImmediate, Operator};
|
||||||
use wasmer_compiler::{to_wasm_error, WasmResult};
|
use wasmer_compiler::{to_wasm_error, WasmResult};
|
||||||
use wasmer_compiler::{wasm_unsupported, ModuleTranslationState};
|
use wasmer_compiler::{wasm_unsupported, ModuleTranslationState};
|
||||||
|
use wasmer_types::{FunctionIndex, GlobalIndex, MemoryIndex, SignatureIndex, TableIndex};
|
||||||
|
|
||||||
// Clippy warns about "flags: _" but its important to document that the flags field is ignored
|
// Clippy warns about "flags: _" but its important to document that the flags field is ignored
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
|
@ -12,9 +12,9 @@ use cranelift_codegen::ir::immediates::Offset32;
|
|||||||
use cranelift_codegen::ir::{self, InstBuilder};
|
use cranelift_codegen::ir::{self, InstBuilder};
|
||||||
use cranelift_codegen::isa::TargetFrontendConfig;
|
use cranelift_codegen::isa::TargetFrontendConfig;
|
||||||
use cranelift_frontend::FunctionBuilder;
|
use cranelift_frontend::FunctionBuilder;
|
||||||
use wasmer_types::{FunctionIndex, GlobalIndex, MemoryIndex, SignatureIndex, TableIndex};
|
|
||||||
use wasmer_compiler::wasmparser::Operator;
|
use wasmer_compiler::wasmparser::Operator;
|
||||||
use wasmer_compiler::WasmResult;
|
use wasmer_compiler::WasmResult;
|
||||||
|
use wasmer_types::{FunctionIndex, GlobalIndex, MemoryIndex, SignatureIndex, TableIndex};
|
||||||
|
|
||||||
/// The value of a WebAssembly global variable.
|
/// The value of a WebAssembly global variable.
|
||||||
#[derive(Clone, Copy)]
|
#[derive(Clone, Copy)]
|
||||||
|
@ -13,8 +13,8 @@ use super::func_environ::{FuncEnvironment, GlobalVariable};
|
|||||||
use crate::{HashMap, Occupied, Vacant};
|
use crate::{HashMap, Occupied, Vacant};
|
||||||
use cranelift_codegen::ir::{self, Block, Inst, Value};
|
use cranelift_codegen::ir::{self, Block, Inst, Value};
|
||||||
use std::vec::Vec;
|
use std::vec::Vec;
|
||||||
use wasmer_types::{FunctionIndex, GlobalIndex, MemoryIndex, SignatureIndex, TableIndex};
|
|
||||||
use wasmer_compiler::WasmResult;
|
use wasmer_compiler::WasmResult;
|
||||||
|
use wasmer_types::{FunctionIndex, GlobalIndex, MemoryIndex, SignatureIndex, TableIndex};
|
||||||
|
|
||||||
/// Information about the presence of an associated `else` for an `if`, or the
|
/// Information about the presence of an associated `else` for an `if`, or the
|
||||||
/// lack thereof.
|
/// lack thereof.
|
||||||
|
@ -17,12 +17,12 @@ use cranelift_codegen::ir::{self, Block, InstBuilder, ValueLabel};
|
|||||||
use cranelift_codegen::timing;
|
use cranelift_codegen::timing;
|
||||||
use cranelift_frontend::{FunctionBuilder, FunctionBuilderContext, Variable};
|
use cranelift_frontend::{FunctionBuilder, FunctionBuilderContext, Variable};
|
||||||
use tracing::info;
|
use tracing::info;
|
||||||
use wasmer_types::LocalFunctionIndex;
|
|
||||||
use wasmer_compiler::wasmparser;
|
use wasmer_compiler::wasmparser;
|
||||||
use wasmer_compiler::{
|
use wasmer_compiler::{
|
||||||
to_wasm_error, wasm_unsupported, GenerateMiddlewareChain, MiddlewareBinaryReader,
|
to_wasm_error, wasm_unsupported, GenerateMiddlewareChain, MiddlewareBinaryReader,
|
||||||
ModuleTranslationState, WasmResult,
|
ModuleTranslationState, WasmResult,
|
||||||
};
|
};
|
||||||
|
use wasmer_types::LocalFunctionIndex;
|
||||||
|
|
||||||
/// WebAssembly to Cranelift IR function translator.
|
/// WebAssembly to Cranelift IR function translator.
|
||||||
///
|
///
|
||||||
|
@ -7,12 +7,12 @@ use cranelift_codegen::binemit::Reloc;
|
|||||||
use cranelift_codegen::ir::{self, AbiParam};
|
use cranelift_codegen::ir::{self, AbiParam};
|
||||||
use cranelift_codegen::isa::TargetFrontendConfig;
|
use cranelift_codegen::isa::TargetFrontendConfig;
|
||||||
use cranelift_frontend::FunctionBuilder;
|
use cranelift_frontend::FunctionBuilder;
|
||||||
use wasmer_types::entity::{EntityRef, SecondaryMap};
|
|
||||||
use wasmer_types::{FunctionType, Type};
|
|
||||||
use wasmer_compiler::wasm_unsupported;
|
use wasmer_compiler::wasm_unsupported;
|
||||||
use wasmer_compiler::wasmparser;
|
use wasmer_compiler::wasmparser;
|
||||||
use wasmer_compiler::{JumpTable, RelocationKind};
|
use wasmer_compiler::{JumpTable, RelocationKind};
|
||||||
use wasmer_compiler::{WasmError, WasmResult};
|
use wasmer_compiler::{WasmError, WasmResult};
|
||||||
|
use wasmer_types::entity::{EntityRef, SecondaryMap};
|
||||||
|
use wasmer_types::{FunctionType, Type};
|
||||||
use wasmer_vm::libcalls::LibCall;
|
use wasmer_vm::libcalls::LibCall;
|
||||||
|
|
||||||
/// Helper function translate a Function signature into Cranelift Ir
|
/// Helper function translate a Function signature into Cranelift Ir
|
||||||
|
@ -6,13 +6,13 @@ use inkwell::memory_buffer::MemoryBuffer;
|
|||||||
use inkwell::module::Module;
|
use inkwell::module::Module;
|
||||||
use inkwell::targets::FileType;
|
use inkwell::targets::FileType;
|
||||||
use rayon::prelude::{IntoParallelRefIterator, ParallelIterator};
|
use rayon::prelude::{IntoParallelRefIterator, ParallelIterator};
|
||||||
use wasmer_types::entity::{EntityRef, PrimaryMap};
|
|
||||||
use wasmer_types::{FunctionIndex, LocalFunctionIndex, SignatureIndex};
|
|
||||||
use wasmer_compiler::{
|
use wasmer_compiler::{
|
||||||
Compilation, CompileError, CompileModuleInfo, Compiler, CustomSection, CustomSectionProtection,
|
Compilation, CompileError, CompileModuleInfo, Compiler, CustomSection, CustomSectionProtection,
|
||||||
Dwarf, FunctionBodyData, ModuleTranslationState, RelocationTarget, SectionBody, SectionIndex,
|
Dwarf, FunctionBodyData, ModuleTranslationState, RelocationTarget, SectionBody, SectionIndex,
|
||||||
Symbol, SymbolRegistry, Target,
|
Symbol, SymbolRegistry, Target,
|
||||||
};
|
};
|
||||||
|
use wasmer_types::entity::{EntityRef, PrimaryMap};
|
||||||
|
use wasmer_types::{FunctionIndex, LocalFunctionIndex, SignatureIndex};
|
||||||
|
|
||||||
//use std::sync::{Arc, Mutex};
|
//use std::sync::{Arc, Mutex};
|
||||||
|
|
||||||
|
@ -8,8 +8,8 @@ use itertools::Itertools;
|
|||||||
use std::fmt::Debug;
|
use std::fmt::Debug;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use target_lexicon::Architecture;
|
use target_lexicon::Architecture;
|
||||||
use wasmer_types::{FunctionType, LocalFunctionIndex};
|
|
||||||
use wasmer_compiler::{Compiler, CompilerConfig, FunctionMiddlewareGenerator, Target, Triple};
|
use wasmer_compiler::{Compiler, CompilerConfig, FunctionMiddlewareGenerator, Target, Triple};
|
||||||
|
use wasmer_types::{FunctionType, LocalFunctionIndex};
|
||||||
|
|
||||||
/// The InkWell ModuleInfo type
|
/// The InkWell ModuleInfo type
|
||||||
pub type InkwellModule<'ctx> = inkwell::module::Module<'ctx>;
|
pub type InkwellModule<'ctx> = inkwell::module::Module<'ctx>;
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
use std::collections::{HashMap, HashSet};
|
use std::collections::{HashMap, HashSet};
|
||||||
use std::convert::TryFrom;
|
use std::convert::TryFrom;
|
||||||
|
|
||||||
use wasmer_types::entity::{PrimaryMap, SecondaryMap};
|
|
||||||
use wasmer_compiler::{
|
use wasmer_compiler::{
|
||||||
CompileError, CompiledFunctionFrameInfo, CustomSection, CustomSectionProtection,
|
CompileError, CompiledFunctionFrameInfo, CustomSection, CustomSectionProtection,
|
||||||
CustomSections, FunctionAddressMap, FunctionBody, InstructionAddressMap, Relocation,
|
CustomSections, FunctionAddressMap, FunctionBody, InstructionAddressMap, Relocation,
|
||||||
RelocationKind, RelocationTarget, SectionBody, SectionIndex, SourceLoc,
|
RelocationKind, RelocationTarget, SectionBody, SectionIndex, SourceLoc,
|
||||||
};
|
};
|
||||||
|
use wasmer_types::entity::{PrimaryMap, SecondaryMap};
|
||||||
use wasmer_vm::libcalls::LibCall;
|
use wasmer_vm::libcalls::LibCall;
|
||||||
|
|
||||||
use wasmer_types::entity::entity_impl;
|
use wasmer_types::entity::entity_impl;
|
||||||
|
@ -17,8 +17,8 @@ use inkwell::{
|
|||||||
};
|
};
|
||||||
use std::cmp;
|
use std::cmp;
|
||||||
use std::convert::TryInto;
|
use std::convert::TryInto;
|
||||||
use wasmer_types::{FunctionType, LocalFunctionIndex};
|
|
||||||
use wasmer_compiler::{CompileError, FunctionBody, RelocationTarget};
|
use wasmer_compiler::{CompileError, FunctionBody, RelocationTarget};
|
||||||
|
use wasmer_types::{FunctionType, LocalFunctionIndex};
|
||||||
|
|
||||||
pub struct FuncTrampoline {
|
pub struct FuncTrampoline {
|
||||||
ctx: Context,
|
ctx: Context,
|
||||||
|
@ -22,8 +22,8 @@ use inkwell::{
|
|||||||
},
|
},
|
||||||
AddressSpace,
|
AddressSpace,
|
||||||
};
|
};
|
||||||
use wasmer_types::{FunctionType as FuncSig, Type};
|
|
||||||
use wasmer_compiler::CompileError;
|
use wasmer_compiler::CompileError;
|
||||||
|
use wasmer_types::{FunctionType as FuncSig, Type};
|
||||||
|
|
||||||
// Given a function definition, retrieve the parameter that is the vmctx pointer.
|
// Given a function definition, retrieve the parameter that is the vmctx pointer.
|
||||||
pub fn get_vmctx_ptr_param<'ctx>(func_value: &FunctionValue<'ctx>) -> PointerValue<'ctx> {
|
pub fn get_vmctx_ptr_param<'ctx>(func_value: &FunctionValue<'ctx>) -> PointerValue<'ctx> {
|
||||||
|
@ -24,16 +24,16 @@ use smallvec::SmallVec;
|
|||||||
|
|
||||||
use crate::config::{CompiledFunctionKind, LLVM};
|
use crate::config::{CompiledFunctionKind, LLVM};
|
||||||
use crate::object_file::{load_object_file, CompiledFunction};
|
use crate::object_file::{load_object_file, CompiledFunction};
|
||||||
use wasmer_types::entity::PrimaryMap;
|
|
||||||
use wasmer_types::{
|
|
||||||
FunctionIndex, FunctionType, GlobalIndex, LocalFunctionIndex, MemoryIndex, SignatureIndex,
|
|
||||||
TableIndex, Type,
|
|
||||||
};
|
|
||||||
use wasmer_compiler::wasmparser::{MemoryImmediate, Operator};
|
use wasmer_compiler::wasmparser::{MemoryImmediate, Operator};
|
||||||
use wasmer_compiler::{
|
use wasmer_compiler::{
|
||||||
to_wasm_error, wptype_to_type, CompileError, FunctionBodyData, GenerateMiddlewareChain,
|
to_wasm_error, wptype_to_type, CompileError, FunctionBodyData, GenerateMiddlewareChain,
|
||||||
MiddlewareBinaryReader, ModuleTranslationState, RelocationTarget, Symbol, SymbolRegistry,
|
MiddlewareBinaryReader, ModuleTranslationState, RelocationTarget, Symbol, SymbolRegistry,
|
||||||
};
|
};
|
||||||
|
use wasmer_types::entity::PrimaryMap;
|
||||||
|
use wasmer_types::{
|
||||||
|
FunctionIndex, FunctionType, GlobalIndex, LocalFunctionIndex, MemoryIndex, SignatureIndex,
|
||||||
|
TableIndex, Type,
|
||||||
|
};
|
||||||
use wasmer_vm::{MemoryStyle, ModuleInfo, TableStyle};
|
use wasmer_vm::{MemoryStyle, ModuleInfo, TableStyle};
|
||||||
|
|
||||||
const FUNCTION_SECTION: &str = "__TEXT,wasmer_function";
|
const FUNCTION_SECTION: &str = "__TEXT,wasmer_function";
|
||||||
|
@ -20,12 +20,12 @@ use inkwell::{
|
|||||||
AddressSpace,
|
AddressSpace,
|
||||||
};
|
};
|
||||||
use std::collections::{hash_map::Entry, HashMap};
|
use std::collections::{hash_map::Entry, HashMap};
|
||||||
|
use wasmer_compiler::CompileError;
|
||||||
use wasmer_types::entity::{EntityRef, PrimaryMap};
|
use wasmer_types::entity::{EntityRef, PrimaryMap};
|
||||||
use wasmer_types::{
|
use wasmer_types::{
|
||||||
FunctionIndex, FunctionType as FuncType, GlobalIndex, LocalFunctionIndex, MemoryIndex,
|
FunctionIndex, FunctionType as FuncType, GlobalIndex, LocalFunctionIndex, MemoryIndex,
|
||||||
Mutability, SignatureIndex, TableIndex, Type,
|
Mutability, SignatureIndex, TableIndex, Type,
|
||||||
};
|
};
|
||||||
use wasmer_compiler::CompileError;
|
|
||||||
use wasmer_vm::ModuleInfo as WasmerCompilerModule;
|
use wasmer_vm::ModuleInfo as WasmerCompilerModule;
|
||||||
use wasmer_vm::{MemoryStyle, TrapCode, VMBuiltinFunctionIndex, VMOffsets};
|
use wasmer_vm::{MemoryStyle, TrapCode, VMBuiltinFunctionIndex, VMOffsets};
|
||||||
|
|
||||||
|
@ -3,14 +3,6 @@ use dynasmrt::{x64::Assembler, DynamicLabel};
|
|||||||
use smallvec::{smallvec, SmallVec};
|
use smallvec::{smallvec, SmallVec};
|
||||||
use std::collections::BTreeMap;
|
use std::collections::BTreeMap;
|
||||||
use std::iter;
|
use std::iter;
|
||||||
use wasmer_types::{
|
|
||||||
entity::{EntityRef, PrimaryMap, SecondaryMap},
|
|
||||||
FunctionType,
|
|
||||||
};
|
|
||||||
use wasmer_types::{
|
|
||||||
FunctionIndex, GlobalIndex, LocalFunctionIndex, LocalMemoryIndex, MemoryIndex, SignatureIndex,
|
|
||||||
TableIndex, Type,
|
|
||||||
};
|
|
||||||
use wasmer_compiler::wasmparser::{
|
use wasmer_compiler::wasmparser::{
|
||||||
MemoryImmediate, Operator, Type as WpType, TypeOrFuncType as WpTypeOrFuncType,
|
MemoryImmediate, Operator, Type as WpType, TypeOrFuncType as WpTypeOrFuncType,
|
||||||
};
|
};
|
||||||
@ -19,6 +11,14 @@ use wasmer_compiler::{
|
|||||||
FunctionBody, Relocation, RelocationKind, RelocationTarget, SectionBody, SectionIndex,
|
FunctionBody, Relocation, RelocationKind, RelocationTarget, SectionBody, SectionIndex,
|
||||||
TrapInformation,
|
TrapInformation,
|
||||||
};
|
};
|
||||||
|
use wasmer_types::{
|
||||||
|
entity::{EntityRef, PrimaryMap, SecondaryMap},
|
||||||
|
FunctionType,
|
||||||
|
};
|
||||||
|
use wasmer_types::{
|
||||||
|
FunctionIndex, GlobalIndex, LocalFunctionIndex, LocalMemoryIndex, MemoryIndex, SignatureIndex,
|
||||||
|
TableIndex, Type,
|
||||||
|
};
|
||||||
use wasmer_vm::{MemoryStyle, ModuleInfo, TableStyle, TrapCode, VMBuiltinFunctionIndex, VMOffsets};
|
use wasmer_vm::{MemoryStyle, ModuleInfo, TableStyle, TrapCode, VMBuiltinFunctionIndex, VMOffsets};
|
||||||
|
|
||||||
/// The singlepass per-function code generator.
|
/// The singlepass per-function code generator.
|
||||||
|
@ -9,8 +9,6 @@ use crate::codegen_x64::{
|
|||||||
use crate::config::Singlepass;
|
use crate::config::Singlepass;
|
||||||
use rayon::prelude::{IntoParallelIterator, IntoParallelRefIterator, ParallelIterator};
|
use rayon::prelude::{IntoParallelIterator, IntoParallelRefIterator, ParallelIterator};
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use wasmer_types::entity::{EntityRef, PrimaryMap};
|
|
||||||
use wasmer_types::{FunctionIndex, FunctionType, LocalFunctionIndex, MemoryIndex, TableIndex};
|
|
||||||
use wasmer_compiler::wasmparser::BinaryReaderError;
|
use wasmer_compiler::wasmparser::BinaryReaderError;
|
||||||
use wasmer_compiler::TrapInformation;
|
use wasmer_compiler::TrapInformation;
|
||||||
use wasmer_compiler::{Compilation, CompileError, CompiledFunction, Compiler, SectionIndex};
|
use wasmer_compiler::{Compilation, CompileError, CompiledFunction, Compiler, SectionIndex};
|
||||||
@ -19,6 +17,8 @@ use wasmer_compiler::{
|
|||||||
ModuleTranslationState, Target,
|
ModuleTranslationState, Target,
|
||||||
};
|
};
|
||||||
use wasmer_compiler::{FunctionBody, FunctionBodyData};
|
use wasmer_compiler::{FunctionBody, FunctionBodyData};
|
||||||
|
use wasmer_types::entity::{EntityRef, PrimaryMap};
|
||||||
|
use wasmer_types::{FunctionIndex, FunctionType, LocalFunctionIndex, MemoryIndex, TableIndex};
|
||||||
use wasmer_vm::{ModuleInfo, TrapCode, VMOffsets};
|
use wasmer_vm::{ModuleInfo, TrapCode, VMOffsets};
|
||||||
|
|
||||||
/// A compiler that compiles a WebAssembly module with Singlepass.
|
/// A compiler that compiles a WebAssembly module with Singlepass.
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
use crate::compiler::SinglepassCompiler;
|
use crate::compiler::SinglepassCompiler;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use wasmer_types::Features;
|
|
||||||
use wasmer_compiler::{Compiler, CompilerConfig, CpuFeature, FunctionMiddlewareGenerator, Target};
|
use wasmer_compiler::{Compiler, CompilerConfig, CpuFeature, FunctionMiddlewareGenerator, Target};
|
||||||
|
use wasmer_types::Features;
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct Singlepass {
|
pub struct Singlepass {
|
||||||
|
@ -8,11 +8,6 @@ use crate::serialize::SerializableCompilation;
|
|||||||
use crate::serialize::SerializableModule;
|
use crate::serialize::SerializableModule;
|
||||||
use crate::unwind::UnwindRegistry;
|
use crate::unwind::UnwindRegistry;
|
||||||
use std::sync::{Arc, Mutex};
|
use std::sync::{Arc, Mutex};
|
||||||
use wasmer_types::entity::{BoxedSlice, PrimaryMap};
|
|
||||||
use wasmer_types::{
|
|
||||||
FunctionIndex, LocalFunctionIndex, MemoryIndex, OwnedDataInitializer, SignatureIndex,
|
|
||||||
TableIndex,
|
|
||||||
};
|
|
||||||
use wasmer_compiler::{CompileError, Features, Triple};
|
use wasmer_compiler::{CompileError, Features, Triple};
|
||||||
#[cfg(feature = "compiler")]
|
#[cfg(feature = "compiler")]
|
||||||
use wasmer_compiler::{CompileModuleInfo, ModuleEnvironment};
|
use wasmer_compiler::{CompileModuleInfo, ModuleEnvironment};
|
||||||
@ -21,6 +16,11 @@ use wasmer_engine::{
|
|||||||
};
|
};
|
||||||
#[cfg(feature = "compiler")]
|
#[cfg(feature = "compiler")]
|
||||||
use wasmer_engine::{Engine, SerializableFunctionFrameInfo, Tunables};
|
use wasmer_engine::{Engine, SerializableFunctionFrameInfo, Tunables};
|
||||||
|
use wasmer_types::entity::{BoxedSlice, PrimaryMap};
|
||||||
|
use wasmer_types::{
|
||||||
|
FunctionIndex, LocalFunctionIndex, MemoryIndex, OwnedDataInitializer, SignatureIndex,
|
||||||
|
TableIndex,
|
||||||
|
};
|
||||||
use wasmer_vm::{FunctionBodyPtr, MemoryStyle, ModuleInfo, TableStyle, VMSharedSignatureIndex};
|
use wasmer_vm::{FunctionBodyPtr, MemoryStyle, ModuleInfo, TableStyle, VMSharedSignatureIndex};
|
||||||
|
|
||||||
/// A compiled wasm module, ready to be instantiated.
|
/// A compiled wasm module, ready to be instantiated.
|
||||||
|
@ -6,8 +6,8 @@ use crate::unwind::UnwindRegistry;
|
|||||||
use std::mem::ManuallyDrop;
|
use std::mem::ManuallyDrop;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::{cmp, mem};
|
use std::{cmp, mem};
|
||||||
use wasmer_types::entity::{EntityRef, PrimaryMap};
|
|
||||||
use wasmer_compiler::{CompiledFunctionUnwindInfo, FunctionBody, SectionBody};
|
use wasmer_compiler::{CompiledFunctionUnwindInfo, FunctionBody, SectionBody};
|
||||||
|
use wasmer_types::entity::{EntityRef, PrimaryMap};
|
||||||
use wasmer_vm::{FunctionBodyPtr, Mmap, VMFunctionBody};
|
use wasmer_vm::{FunctionBodyPtr, Mmap, VMFunctionBody};
|
||||||
|
|
||||||
/// The optimal alignment for functions.
|
/// The optimal alignment for functions.
|
||||||
|
@ -4,15 +4,15 @@ use crate::unwind::UnwindRegistry;
|
|||||||
use crate::{CodeMemory, JITArtifact};
|
use crate::{CodeMemory, JITArtifact};
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::sync::{Arc, Mutex};
|
use std::sync::{Arc, Mutex};
|
||||||
use wasmer_types::entity::PrimaryMap;
|
|
||||||
use wasmer_types::Features;
|
|
||||||
use wasmer_types::{FunctionIndex, FunctionType, LocalFunctionIndex, SignatureIndex};
|
|
||||||
#[cfg(feature = "compiler")]
|
#[cfg(feature = "compiler")]
|
||||||
use wasmer_compiler::Compiler;
|
use wasmer_compiler::Compiler;
|
||||||
use wasmer_compiler::{
|
use wasmer_compiler::{
|
||||||
CompileError, CustomSection, CustomSectionProtection, FunctionBody, SectionIndex, Target,
|
CompileError, CustomSection, CustomSectionProtection, FunctionBody, SectionIndex, Target,
|
||||||
};
|
};
|
||||||
use wasmer_engine::{Artifact, DeserializeError, Engine, EngineId, Tunables};
|
use wasmer_engine::{Artifact, DeserializeError, Engine, EngineId, Tunables};
|
||||||
|
use wasmer_types::entity::PrimaryMap;
|
||||||
|
use wasmer_types::Features;
|
||||||
|
use wasmer_types::{FunctionIndex, FunctionType, LocalFunctionIndex, SignatureIndex};
|
||||||
use wasmer_vm::{
|
use wasmer_vm::{
|
||||||
FunctionBodyPtr, ModuleInfo, SignatureRegistry, VMFunctionBody, VMSharedSignatureIndex,
|
FunctionBodyPtr, ModuleInfo, SignatureRegistry, VMFunctionBody, VMSharedSignatureIndex,
|
||||||
VMTrampoline,
|
VMTrampoline,
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
//! Linking for JIT-compiled code.
|
//! Linking for JIT-compiled code.
|
||||||
|
|
||||||
use std::ptr::write_unaligned;
|
use std::ptr::write_unaligned;
|
||||||
use wasmer_types::entity::{EntityRef, PrimaryMap};
|
|
||||||
use wasmer_types::LocalFunctionIndex;
|
|
||||||
use wasmer_compiler::{
|
use wasmer_compiler::{
|
||||||
JumpTable, JumpTableOffsets, Relocation, RelocationKind, RelocationTarget, Relocations,
|
JumpTable, JumpTableOffsets, Relocation, RelocationKind, RelocationTarget, Relocations,
|
||||||
SectionIndex,
|
SectionIndex,
|
||||||
};
|
};
|
||||||
|
use wasmer_types::entity::{EntityRef, PrimaryMap};
|
||||||
|
use wasmer_types::LocalFunctionIndex;
|
||||||
use wasmer_vm::ModuleInfo;
|
use wasmer_vm::ModuleInfo;
|
||||||
use wasmer_vm::{FunctionBodyPtr, VMFunctionBody};
|
use wasmer_vm::{FunctionBodyPtr, VMFunctionBody};
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use wasmer_types::entity::PrimaryMap;
|
|
||||||
use wasmer_types::{FunctionIndex, LocalFunctionIndex, OwnedDataInitializer, SignatureIndex};
|
|
||||||
use wasmer_compiler::{
|
use wasmer_compiler::{
|
||||||
CompileModuleInfo, CustomSection, Dwarf, FunctionBody, JumpTableOffsets, Relocation,
|
CompileModuleInfo, CustomSection, Dwarf, FunctionBody, JumpTableOffsets, Relocation,
|
||||||
SectionIndex,
|
SectionIndex,
|
||||||
};
|
};
|
||||||
use wasmer_engine::SerializableFunctionFrameInfo;
|
use wasmer_engine::SerializableFunctionFrameInfo;
|
||||||
|
use wasmer_types::entity::PrimaryMap;
|
||||||
|
use wasmer_types::{FunctionIndex, LocalFunctionIndex, OwnedDataInitializer, SignatureIndex};
|
||||||
|
|
||||||
// /// The serializable function data
|
// /// The serializable function data
|
||||||
// #[derive(Serialize, Deserialize)]
|
// #[derive(Serialize, Deserialize)]
|
||||||
|
@ -14,13 +14,6 @@ use std::sync::Arc;
|
|||||||
use tempfile::NamedTempFile;
|
use tempfile::NamedTempFile;
|
||||||
#[cfg(feature = "compiler")]
|
#[cfg(feature = "compiler")]
|
||||||
use tracing::trace;
|
use tracing::trace;
|
||||||
use wasmer_types::entity::{BoxedSlice, PrimaryMap};
|
|
||||||
#[cfg(feature = "compiler")]
|
|
||||||
use wasmer_types::DataInitializer;
|
|
||||||
use wasmer_types::{
|
|
||||||
FunctionIndex, LocalFunctionIndex, MemoryIndex, OwnedDataInitializer, SignatureIndex,
|
|
||||||
TableIndex,
|
|
||||||
};
|
|
||||||
use wasmer_compiler::{CompileError, Features, OperatingSystem, Symbol, SymbolRegistry, Triple};
|
use wasmer_compiler::{CompileError, Features, OperatingSystem, Symbol, SymbolRegistry, Triple};
|
||||||
#[cfg(feature = "compiler")]
|
#[cfg(feature = "compiler")]
|
||||||
use wasmer_compiler::{
|
use wasmer_compiler::{
|
||||||
@ -33,6 +26,13 @@ use wasmer_engine::{
|
|||||||
use wasmer_engine::{Engine, Tunables};
|
use wasmer_engine::{Engine, Tunables};
|
||||||
#[cfg(feature = "compiler")]
|
#[cfg(feature = "compiler")]
|
||||||
use wasmer_object::{emit_compilation, emit_data, get_object_for_target};
|
use wasmer_object::{emit_compilation, emit_data, get_object_for_target};
|
||||||
|
use wasmer_types::entity::{BoxedSlice, PrimaryMap};
|
||||||
|
#[cfg(feature = "compiler")]
|
||||||
|
use wasmer_types::DataInitializer;
|
||||||
|
use wasmer_types::{
|
||||||
|
FunctionIndex, LocalFunctionIndex, MemoryIndex, OwnedDataInitializer, SignatureIndex,
|
||||||
|
TableIndex,
|
||||||
|
};
|
||||||
use wasmer_vm::{
|
use wasmer_vm::{
|
||||||
FunctionBodyPtr, MemoryStyle, ModuleInfo, TableStyle, VMFunctionBody, VMSharedSignatureIndex,
|
FunctionBodyPtr, MemoryStyle, ModuleInfo, TableStyle, VMFunctionBody, VMSharedSignatureIndex,
|
||||||
VMTrampoline,
|
VMTrampoline,
|
||||||
|
@ -6,12 +6,12 @@ use std::path::Path;
|
|||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::sync::Mutex;
|
use std::sync::Mutex;
|
||||||
#[cfg(feature = "compiler")]
|
#[cfg(feature = "compiler")]
|
||||||
use wasmer_types::Features;
|
|
||||||
use wasmer_types::FunctionType;
|
|
||||||
#[cfg(feature = "compiler")]
|
|
||||||
use wasmer_compiler::Compiler;
|
use wasmer_compiler::Compiler;
|
||||||
use wasmer_compiler::{CompileError, Target};
|
use wasmer_compiler::{CompileError, Target};
|
||||||
use wasmer_engine::{Artifact, DeserializeError, Engine, EngineId, Tunables};
|
use wasmer_engine::{Artifact, DeserializeError, Engine, EngineId, Tunables};
|
||||||
|
#[cfg(feature = "compiler")]
|
||||||
|
use wasmer_types::Features;
|
||||||
|
use wasmer_types::FunctionType;
|
||||||
use wasmer_vm::{SignatureRegistry, VMSharedSignatureIndex, VMTrampoline};
|
use wasmer_vm::{SignatureRegistry, VMSharedSignatureIndex, VMTrampoline};
|
||||||
|
|
||||||
/// A WebAssembly `Native` Engine.
|
/// A WebAssembly `Native` Engine.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
use wasmer_compiler::{CompileModuleInfo, SectionIndex, Symbol, SymbolRegistry};
|
||||||
use wasmer_types::entity::{EntityRef, PrimaryMap};
|
use wasmer_types::entity::{EntityRef, PrimaryMap};
|
||||||
use wasmer_types::{FunctionIndex, LocalFunctionIndex, OwnedDataInitializer, SignatureIndex};
|
use wasmer_types::{FunctionIndex, LocalFunctionIndex, OwnedDataInitializer, SignatureIndex};
|
||||||
use wasmer_compiler::{CompileModuleInfo, SectionIndex, Symbol, SymbolRegistry};
|
|
||||||
|
|
||||||
/// Serializable struct that represents the compiled metadata.
|
/// Serializable struct that represents the compiled metadata.
|
||||||
#[derive(Serialize, Deserialize, Debug)]
|
#[derive(Serialize, Deserialize, Debug)]
|
||||||
|
@ -5,12 +5,12 @@ use std::any::Any;
|
|||||||
use std::fs;
|
use std::fs;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
use wasmer_compiler::Features;
|
||||||
use wasmer_types::entity::{BoxedSlice, PrimaryMap};
|
use wasmer_types::entity::{BoxedSlice, PrimaryMap};
|
||||||
use wasmer_types::{
|
use wasmer_types::{
|
||||||
DataInitializer, FunctionIndex, LocalFunctionIndex, MemoryIndex, OwnedDataInitializer,
|
DataInitializer, FunctionIndex, LocalFunctionIndex, MemoryIndex, OwnedDataInitializer,
|
||||||
SignatureIndex, TableIndex,
|
SignatureIndex, TableIndex,
|
||||||
};
|
};
|
||||||
use wasmer_compiler::Features;
|
|
||||||
use wasmer_vm::{
|
use wasmer_vm::{
|
||||||
FunctionBodyPtr, InstanceHandle, MemoryStyle, ModuleInfo, TableStyle, VMSharedSignatureIndex,
|
FunctionBodyPtr, InstanceHandle, MemoryStyle, ModuleInfo, TableStyle, VMSharedSignatureIndex,
|
||||||
};
|
};
|
||||||
|
@ -5,8 +5,8 @@ use crate::{Artifact, DeserializeError};
|
|||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
use std::sync::atomic::{AtomicUsize, Ordering::SeqCst};
|
use std::sync::atomic::{AtomicUsize, Ordering::SeqCst};
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use wasmer_types::FunctionType;
|
|
||||||
use wasmer_compiler::{CompileError, Target};
|
use wasmer_compiler::{CompileError, Target};
|
||||||
|
use wasmer_types::FunctionType;
|
||||||
use wasmer_vm::{VMSharedSignatureIndex, VMTrampoline};
|
use wasmer_vm::{VMSharedSignatureIndex, VMTrampoline};
|
||||||
|
|
||||||
/// A unimplemented Wasmer `Engine`.
|
/// A unimplemented Wasmer `Engine`.
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
use crate::trap::RuntimeError;
|
use crate::trap::RuntimeError;
|
||||||
use std::io;
|
use std::io;
|
||||||
use thiserror::Error;
|
use thiserror::Error;
|
||||||
use wasmer_types::ExternType;
|
|
||||||
use wasmer_compiler::CompileError;
|
use wasmer_compiler::CompileError;
|
||||||
|
use wasmer_types::ExternType;
|
||||||
|
|
||||||
/// The Serialize error can occur when serializing a
|
/// The Serialize error can occur when serializing a
|
||||||
/// compiled Module into a binary.
|
/// compiled Module into a binary.
|
||||||
|
@ -14,9 +14,9 @@ use crate::serialize::SerializableFunctionFrameInfo;
|
|||||||
use std::cmp;
|
use std::cmp;
|
||||||
use std::collections::BTreeMap;
|
use std::collections::BTreeMap;
|
||||||
use std::sync::{Arc, RwLock};
|
use std::sync::{Arc, RwLock};
|
||||||
|
use wasmer_compiler::{CompiledFunctionFrameInfo, SourceLoc, TrapInformation};
|
||||||
use wasmer_types::entity::{BoxedSlice, EntityRef, PrimaryMap};
|
use wasmer_types::entity::{BoxedSlice, EntityRef, PrimaryMap};
|
||||||
use wasmer_types::LocalFunctionIndex;
|
use wasmer_types::LocalFunctionIndex;
|
||||||
use wasmer_compiler::{CompiledFunctionFrameInfo, SourceLoc, TrapInformation};
|
|
||||||
use wasmer_vm::{FunctionBodyPtr, ModuleInfo};
|
use wasmer_vm::{FunctionBodyPtr, ModuleInfo};
|
||||||
|
|
||||||
lazy_static::lazy_static! {
|
lazy_static::lazy_static! {
|
||||||
|
@ -5,15 +5,15 @@ use crate::engine::DummyEngine;
|
|||||||
#[cfg(feature = "serialize")]
|
#[cfg(feature = "serialize")]
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
use wasmer_compiler::CompileError;
|
||||||
|
#[cfg(feature = "compiler")]
|
||||||
|
use wasmer_compiler::ModuleEnvironment;
|
||||||
|
use wasmer_engine::{Artifact, DeserializeError, Engine as _, SerializeError, Tunables};
|
||||||
use wasmer_types::entity::{BoxedSlice, PrimaryMap};
|
use wasmer_types::entity::{BoxedSlice, PrimaryMap};
|
||||||
use wasmer_types::{
|
use wasmer_types::{
|
||||||
Features, FunctionIndex, LocalFunctionIndex, MemoryIndex, OwnedDataInitializer, SignatureIndex,
|
Features, FunctionIndex, LocalFunctionIndex, MemoryIndex, OwnedDataInitializer, SignatureIndex,
|
||||||
TableIndex,
|
TableIndex,
|
||||||
};
|
};
|
||||||
use wasmer_compiler::CompileError;
|
|
||||||
#[cfg(feature = "compiler")]
|
|
||||||
use wasmer_compiler::ModuleEnvironment;
|
|
||||||
use wasmer_engine::{Artifact, DeserializeError, Engine as _, SerializeError, Tunables};
|
|
||||||
use wasmer_vm::{
|
use wasmer_vm::{
|
||||||
FunctionBodyPtr, MemoryStyle, ModuleInfo, TableStyle, VMContext, VMFunctionBody,
|
FunctionBodyPtr, MemoryStyle, ModuleInfo, TableStyle, VMContext, VMFunctionBody,
|
||||||
VMSharedSignatureIndex,
|
VMSharedSignatureIndex,
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
use crate::DummyArtifact;
|
use crate::DummyArtifact;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use wasmer_types::FunctionType;
|
|
||||||
use wasmer_compiler::{CompileError, Features, Target};
|
use wasmer_compiler::{CompileError, Features, Target};
|
||||||
use wasmer_engine::{Artifact, DeserializeError, Engine, EngineId, Tunables};
|
use wasmer_engine::{Artifact, DeserializeError, Engine, EngineId, Tunables};
|
||||||
|
use wasmer_types::FunctionType;
|
||||||
use wasmer_vm::{
|
use wasmer_vm::{
|
||||||
SignatureRegistry, VMContext, VMFunctionBody, VMSharedSignatureIndex, VMTrampoline,
|
SignatureRegistry, VMContext, VMFunctionBody, VMSharedSignatureIndex, VMTrampoline,
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user