mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-25 06:31:32 +00:00
Improved syntax
This commit is contained in:
@ -7,10 +7,7 @@ mod tests {
|
|||||||
use wasmer_runtime_core::codegen::{MiddlewareChain, StreamingCompiler};
|
use wasmer_runtime_core::codegen::{MiddlewareChain, StreamingCompiler};
|
||||||
use wasmer_runtime_core::fault::{pop_code_version, push_code_version};
|
use wasmer_runtime_core::fault::{pop_code_version, push_code_version};
|
||||||
use wasmer_runtime_core::state::CodeVersion;
|
use wasmer_runtime_core::state::CodeVersion;
|
||||||
use wasmer_runtime_core::{
|
use wasmer_runtime_core::{backend::Compiler, compile_with, imports, Func};
|
||||||
backend::Compiler,
|
|
||||||
compile_with, imports, Func,
|
|
||||||
};
|
|
||||||
|
|
||||||
#[cfg(feature = "llvm")]
|
#[cfg(feature = "llvm")]
|
||||||
fn get_compiler(limit: u64) -> impl Compiler {
|
fn get_compiler(limit: u64) -> impl Compiler {
|
||||||
|
@ -2,10 +2,7 @@
|
|||||||
//! serializing compiled wasm code to a binary format. The binary format can be persisted,
|
//! serializing compiled wasm code to a binary format. The binary format can be persisted,
|
||||||
//! and loaded to allow skipping compilation and fast startup.
|
//! and loaded to allow skipping compilation and fast startup.
|
||||||
|
|
||||||
use crate::{
|
use crate::{module::ModuleInfo, sys::Memory};
|
||||||
module::ModuleInfo,
|
|
||||||
sys::Memory,
|
|
||||||
};
|
|
||||||
use blake2b_simd::blake2bp;
|
use blake2b_simd::blake2bp;
|
||||||
use std::{io, mem, slice};
|
use std::{io, mem, slice};
|
||||||
|
|
||||||
|
@ -240,12 +240,7 @@ impl<
|
|||||||
_ => MCG::new(),
|
_ => MCG::new(),
|
||||||
};
|
};
|
||||||
let mut chain = (self.middleware_chain_generator)();
|
let mut chain = (self.middleware_chain_generator)();
|
||||||
let info = crate::parse::read_module(
|
let info = crate::parse::read_module(wasm, &mut mcg, &mut chain, &compiler_config)?;
|
||||||
wasm,
|
|
||||||
&mut mcg,
|
|
||||||
&mut chain,
|
|
||||||
&compiler_config,
|
|
||||||
)?;
|
|
||||||
let (exec_context, cache_gen) =
|
let (exec_context, cache_gen) =
|
||||||
mcg.finalize(&info.read().unwrap())
|
mcg.finalize(&info.read().unwrap())
|
||||||
.map_err(|x| CompileError::InternalError {
|
.map_err(|x| CompileError::InternalError {
|
||||||
|
@ -11,11 +11,9 @@ use std::{
|
|||||||
path::PathBuf,
|
path::PathBuf,
|
||||||
};
|
};
|
||||||
|
|
||||||
use wasmer_runtime_core::cache::Error as CacheError;
|
|
||||||
pub use wasmer_runtime_core::{
|
|
||||||
cache::{Artifact, WasmHash},
|
|
||||||
};
|
|
||||||
pub use super::Backend;
|
pub use super::Backend;
|
||||||
|
use wasmer_runtime_core::cache::Error as CacheError;
|
||||||
|
pub use wasmer_runtime_core::cache::{Artifact, WasmHash};
|
||||||
|
|
||||||
/// A generic cache for storing and loading compiled wasm modules.
|
/// A generic cache for storing and loading compiled wasm modules.
|
||||||
///
|
///
|
||||||
|
Reference in New Issue
Block a user