diff --git a/lib/compiler/src/artifact_builders/artifact_builder.rs b/lib/compiler/src/artifact_builders/artifact_builder.rs index e95061fb29b..f1940bdc1e6 100644 --- a/lib/compiler/src/artifact_builders/artifact_builder.rs +++ b/lib/compiler/src/artifact_builders/artifact_builder.rs @@ -13,7 +13,7 @@ use wasmer_types::entity::PrimaryMap; use wasmer_types::CompileModuleInfo; use wasmer_types::{ CompileError, CpuFeature, CustomSection, Dwarf, FunctionIndex, LocalFunctionIndex, MemoryIndex, - MemoryStyle, ModuleInfo, OwnedDataInitializer, Pages, Relocation, SectionIndex, SignatureIndex, + MemoryStyle, ModuleInfo, OwnedDataInitializer, Relocation, SectionIndex, SignatureIndex, TableIndex, TableStyle, Target, }; use wasmer_types::{ @@ -119,17 +119,10 @@ impl ArtifactBuild { compile_info, data_initializers, cpu_features: cpu_features.as_u64(), - module_start: None, }; Ok(Self { serializable }) } - /// Specify the fixed virtual memory address for the compiled module - pub fn with_module_start(mut self, module_start: Option) -> Self { - self.serializable.module_start = module_start; - self - } - /// Compile a data buffer into a `ArtifactBuild`, which may then be instantiated. #[cfg(not(feature = "compiler"))] #[cfg(not(target_arch = "wasm32"))] @@ -150,11 +143,6 @@ impl ArtifactBuild { Self { serializable } } - /// Returns the memory start address for this compiled module - pub fn get_memory_start(&self) -> Option { - self.serializable.module_start - } - /// Get Functions Bodies ref pub fn get_function_bodies_ref(&self) -> &PrimaryMap { &self.serializable.compilation.function_bodies diff --git a/lib/compiler/src/engine/artifact.rs b/lib/compiler/src/engine/artifact.rs index b9ac9029227..e60a86142ed 100644 --- a/lib/compiler/src/engine/artifact.rs +++ b/lib/compiler/src/engine/artifact.rs @@ -77,8 +77,7 @@ impl Artifact { engine.target(), memory_styles, table_styles, - )? - .with_module_start(tunables.module_start()); + )?; Self::from_parts(&mut inner_engine, artifact) } @@ -712,7 +711,6 @@ impl Artifact { compile_info: metadata.compile_info, data_initializers: metadata.data_initializers, cpu_features: metadata.cpu_features, - module_start: None, }); let finished_function_lengths = finished_functions diff --git a/lib/compiler/src/engine/tunables.rs b/lib/compiler/src/engine/tunables.rs index 9eab1ce85f1..596af921dc5 100644 --- a/lib/compiler/src/engine/tunables.rs +++ b/lib/compiler/src/engine/tunables.rs @@ -13,11 +13,6 @@ use wasmer_vm::{VMMemoryDefinition, VMTableDefinition}; /// An engine delegates the creation of memories, tables, and globals /// to a foreign implementor of this trait. pub trait Tunables { - /// Fixed virtual memory address for the compiled module - fn module_start(&self) -> Option { - None - } - /// Construct a `MemoryStyle` for the provided `MemoryType` fn memory_style(&self, memory: &MemoryType) -> MemoryStyle; diff --git a/lib/types/src/serialize.rs b/lib/types/src/serialize.rs index 4b8d3be2bb4..cab04942438 100644 --- a/lib/types/src/serialize.rs +++ b/lib/types/src/serialize.rs @@ -1,5 +1,4 @@ use crate::entity::PrimaryMap; -use crate::Pages; use crate::{ compilation::target::CpuFeature, CompileModuleInfo, CompiledFunctionFrameInfo, CustomSection, DeserializeError, Dwarf, Features, FunctionBody, FunctionIndex, LocalFunctionIndex, @@ -62,8 +61,6 @@ pub struct SerializableModule { pub data_initializers: Box<[OwnedDataInitializer]>, /// CPU Feature flags for this compilation pub cpu_features: u64, - /// The start memory address of this serializable module - pub module_start: Option, } fn to_serialize_error(err: impl std::error::Error) -> SerializeError { diff --git a/tests/integration/cli/tests/create_exe.rs b/tests/integration/cli/tests/create_exe.rs index 1ede069f763..25edb4617a9 100644 --- a/tests/integration/cli/tests/create_exe.rs +++ b/tests/integration/cli/tests/create_exe.rs @@ -483,9 +483,7 @@ fn create_exe_works_with_file() -> anyhow::Result<()> { // Ignored because of -lunwind linker issue on Windows // see https://github.com/wasmerio/wasmer/issues/3459 -//#[cfg_attr(target_os = "windows", ignore)] -// TODO: fix the cretae_exe with serialized object issue #3481 -#[ignore] +#[cfg_attr(target_os = "windows", ignore)] #[test] fn create_exe_serialized_works() -> anyhow::Result<()> { let temp_dir = tempfile::tempdir()?; @@ -685,9 +683,7 @@ fn create_exe_with_object_input_symbols() -> anyhow::Result<()> { // Ignored because of -lunwind linker issue on Windows // see https://github.com/wasmerio/wasmer/issues/3459 -//#[cfg_attr(target_os = "windows", ignore)] -// TODO: fix the cretae_exe with serialized object issue #3481 -#[ignore] +#[cfg_attr(target_os = "windows", ignore)] #[test] fn create_exe_with_object_input_serialized() -> anyhow::Result<()> { create_exe_with_object_input(vec![