mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-25 22:51:32 +00:00
Library restructure (#104)
* Move wasmer-runtime to wasmer-runtime-core * Add the runtime library * Fix issue with macros using wasmer_runtime, fmt * Make default compiler dependency optional * Add instantiate and validate functions
This commit is contained in:
committed by
Lachlan Sneff
parent
62b8e7cc2d
commit
74875ed554
@ -7,7 +7,7 @@ use crate::call::recovery::call_protected;
|
||||
use hashbrown::HashSet;
|
||||
use libffi::high::{arg as libffi_arg, call as libffi_call, CodePtr};
|
||||
use std::iter;
|
||||
use wasmer_runtime::{
|
||||
use wasmer_runtime_core::{
|
||||
backend::{ProtectedCaller, Token},
|
||||
error::RuntimeResult,
|
||||
export::Context,
|
||||
|
@ -12,7 +12,7 @@ use nix::sys::signal::{Signal, SIGBUS, SIGFPE, SIGILL, SIGSEGV};
|
||||
use std::cell::{Cell, UnsafeCell};
|
||||
use std::ptr;
|
||||
use std::sync::Once;
|
||||
use wasmer_runtime::{
|
||||
use wasmer_runtime_core::{
|
||||
error::{RuntimeError, RuntimeResult},
|
||||
structures::TypedIndex,
|
||||
types::{MemoryIndex, TableIndex},
|
||||
|
@ -16,7 +16,7 @@ use cranelift_wasm::{
|
||||
use hashbrown::HashMap;
|
||||
use std::mem;
|
||||
use target_lexicon;
|
||||
use wasmer_runtime::{
|
||||
use wasmer_runtime_core::{
|
||||
backend::SigRegistry,
|
||||
memory::LinearMemory,
|
||||
module::{
|
||||
|
@ -5,7 +5,7 @@ use cranelift_codegen::{
|
||||
isa,
|
||||
};
|
||||
use cranelift_wasm::{self, FuncEnvironment, ModuleEnvironment};
|
||||
use wasmer_runtime::{
|
||||
use wasmer_runtime_core::{
|
||||
memory::LinearMemory,
|
||||
structures::TypedIndex,
|
||||
types::{FuncIndex, GlobalIndex, LocalOrImport, MemoryIndex, TableIndex},
|
||||
|
@ -12,7 +12,7 @@ use cranelift_codegen::{
|
||||
settings::{self, Configurable},
|
||||
};
|
||||
use target_lexicon::Triple;
|
||||
use wasmer_runtime::{
|
||||
use wasmer_runtime_core::{
|
||||
backend::{Compiler, Token},
|
||||
error::{CompileError, CompileResult},
|
||||
module::ModuleInner,
|
||||
|
@ -7,7 +7,7 @@ use std::{
|
||||
ops::{Deref, DerefMut},
|
||||
ptr::NonNull,
|
||||
};
|
||||
use wasmer_runtime::{
|
||||
use wasmer_runtime_core::{
|
||||
backend::SigRegistry,
|
||||
backend::{FuncResolver, ProtectedCaller, Token},
|
||||
error::{CompileResult, RuntimeResult},
|
||||
|
@ -4,7 +4,7 @@ use crate::{
|
||||
};
|
||||
use cranelift_codegen::{ir, isa};
|
||||
use cranelift_wasm::{self, translate_module, FuncTranslator, ModuleEnvironment};
|
||||
use wasmer_runtime::{
|
||||
use wasmer_runtime_core::{
|
||||
error::{CompileError, CompileResult},
|
||||
module::{DataInitializer, ExportIndex, ImportName, TableInitializer},
|
||||
structures::{Map, TypedIndex},
|
||||
|
@ -6,7 +6,7 @@ use cranelift_codegen::binemit;
|
||||
pub use cranelift_codegen::binemit::Reloc;
|
||||
use cranelift_codegen::ir::{self, ExternalName, LibCall, SourceLoc, TrapCode};
|
||||
use hashbrown::HashMap;
|
||||
use wasmer_runtime::{structures::TypedIndex, types::LocalFuncIndex};
|
||||
use wasmer_runtime_core::{structures::TypedIndex, types::LocalFuncIndex};
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Relocation {
|
||||
|
@ -7,7 +7,7 @@ use byteorder::{ByteOrder, LittleEndian};
|
||||
use cranelift_codegen::{ir, isa, Context};
|
||||
use std::mem;
|
||||
use std::ptr::{write_unaligned, NonNull};
|
||||
use wasmer_runtime::{
|
||||
use wasmer_runtime_core::{
|
||||
self,
|
||||
backend::{
|
||||
self,
|
||||
@ -206,7 +206,7 @@ impl FuncResolver {
|
||||
impl backend::FuncResolver for FuncResolver {
|
||||
fn get(
|
||||
&self,
|
||||
_module: &wasmer_runtime::module::ModuleInner,
|
||||
_module: &wasmer_runtime_core::module::ModuleInner,
|
||||
index: LocalFuncIndex,
|
||||
) -> Option<NonNull<vm::Func>> {
|
||||
self.lookup(index)
|
||||
|
Reference in New Issue
Block a user