mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-29 16:41:33 +00:00
Fixed middleware linting
This commit is contained in:
@ -134,24 +134,22 @@ mod tests {
|
|||||||
use super::*;
|
use super::*;
|
||||||
use wabt::wat2wasm;
|
use wabt::wat2wasm;
|
||||||
|
|
||||||
|
use wasmer_runtime_core::codegen::{MiddlewareChain, StreamingCompiler};
|
||||||
use wasmer_runtime_core::{backend::Compiler, compile_with, imports, Func};
|
use wasmer_runtime_core::{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 {
|
||||||
use wasmer_runtime_core::codegen::{MiddlewareChain, StreamingCompiler};
|
|
||||||
use wasmer_llvm_backend::ModuleCodeGenerator as LLVMMCG;
|
use wasmer_llvm_backend::ModuleCodeGenerator as LLVMMCG;
|
||||||
let c: StreamingCompiler<LLVMMCG, _, _, _, _> =
|
let c: StreamingCompiler<LLVMMCG, _, _, _, _> = StreamingCompiler::new(move || {
|
||||||
StreamingCompiler::new(move || {
|
let mut chain = MiddlewareChain::new();
|
||||||
let mut chain = MiddlewareChain::new();
|
chain.push(Metering::new(limit));
|
||||||
chain.push(Metering::new(limit));
|
chain
|
||||||
chain
|
});
|
||||||
});
|
|
||||||
c
|
c
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "singlepass")]
|
#[cfg(feature = "singlepass")]
|
||||||
fn get_compiler(limit: u64) -> impl Compiler {
|
fn get_compiler(limit: u64) -> impl Compiler {
|
||||||
use wasmer_runtime_core::codegen::{MiddlewareChain, StreamingCompiler};
|
|
||||||
use wasmer_singlepass_backend::ModuleCodeGenerator as SinglePassMCG;
|
use wasmer_singlepass_backend::ModuleCodeGenerator as SinglePassMCG;
|
||||||
let c: StreamingCompiler<SinglePassMCG, _, _, _, _> = StreamingCompiler::new(move || {
|
let c: StreamingCompiler<SinglePassMCG, _, _, _, _> = StreamingCompiler::new(move || {
|
||||||
let mut chain = MiddlewareChain::new();
|
let mut chain = MiddlewareChain::new();
|
||||||
|
Reference in New Issue
Block a user