mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-06 12:48:20 +00:00
Merge branch 'master' into feature/reference-types
This commit is contained in:
@@ -25,6 +25,7 @@ serde = { version = "1.0", features = ["derive"] }
|
||||
more-asserts = "0.2"
|
||||
gimli = { version = "0.23", optional = true }
|
||||
smallvec = "1.6"
|
||||
loupe = "0.1"
|
||||
|
||||
[dev-dependencies]
|
||||
target-lexicon = { version = "0.11", default-features = false }
|
||||
|
||||
@@ -18,6 +18,7 @@ use cranelift_codegen::print_errors::pretty_error;
|
||||
use cranelift_codegen::{binemit, Context};
|
||||
#[cfg(feature = "unwind")]
|
||||
use gimli::write::{Address, EhFrame, FrameTable};
|
||||
use loupe::MemoryUsage;
|
||||
use rayon::prelude::{IntoParallelRefIterator, ParallelIterator};
|
||||
use std::sync::Arc;
|
||||
use wasmer_compiler::CompileError;
|
||||
@@ -32,6 +33,7 @@ use wasmer_types::{FunctionIndex, LocalFunctionIndex, SignatureIndex};
|
||||
|
||||
/// A compiler that compiles a WebAssembly module with Cranelift, translating the Wasm to Cranelift IR,
|
||||
/// optimizing it and then translating to assembly.
|
||||
#[derive(MemoryUsage)]
|
||||
pub struct CraneliftCompiler {
|
||||
config: Cranelift,
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
use crate::compiler::CraneliftCompiler;
|
||||
use cranelift_codegen::isa::{lookup, TargetIsa};
|
||||
use cranelift_codegen::settings::{self, Configurable};
|
||||
use loupe::MemoryUsage;
|
||||
use std::sync::Arc;
|
||||
use wasmer_compiler::{
|
||||
Architecture, Compiler, CompilerConfig, CpuFeature, ModuleMiddleware, Target,
|
||||
@@ -10,7 +11,7 @@ use wasmer_compiler::{
|
||||
|
||||
/// Possible optimization levels for the Cranelift codegen backend.
|
||||
#[non_exhaustive]
|
||||
#[derive(Clone, Debug)]
|
||||
#[derive(Clone, Debug, MemoryUsage)]
|
||||
pub enum CraneliftOptLevel {
|
||||
/// No optimizations performed, minimizes compilation time by disabling most
|
||||
/// optimizations.
|
||||
@@ -27,7 +28,7 @@ pub enum CraneliftOptLevel {
|
||||
///
|
||||
/// This structure exposes a builder-like interface and is primarily
|
||||
/// consumed by `wasmer_engine::Engine::new`.
|
||||
#[derive(Debug, Clone)]
|
||||
#[derive(Debug, Clone, MemoryUsage)]
|
||||
pub struct Cranelift {
|
||||
enable_nan_canonicalization: bool,
|
||||
enable_verifier: bool,
|
||||
|
||||
Reference in New Issue
Block a user