[−][src]Struct wasmer_engine_native::NativeArtifact
A compiled wasm module, ready to be instantiated.
Implementations
impl NativeArtifact[src]
pub fn is_deserializable(bytes: &[u8]) -> bool[src]
Check if the provided bytes look like NativeArtifact.
This means, if the bytes look like a shared object file in the target system.
pub fn get_default_extension(triple: &Triple) -> &'static str[src]
Get the default extension when serializing this artifact
pub fn from_parts_crosscompiled(
metadata: ModuleMetadata,
sharedobject_path: PathBuf
) -> Result<Self, CompileError>[src]
metadata: ModuleMetadata,
sharedobject_path: PathBuf
) -> Result<Self, CompileError>
Construct a NativeArtifact from component parts.
pub fn from_parts(
engine_inner: &mut NativeEngineInner,
metadata: ModuleMetadata,
sharedobject_path: PathBuf,
lib: Library
) -> Result<Self, CompileError>[src]
engine_inner: &mut NativeEngineInner,
metadata: ModuleMetadata,
sharedobject_path: PathBuf,
lib: Library
) -> Result<Self, CompileError>
Construct a NativeArtifact from component parts.
pub fn new(_engine: &NativeEngine, _data: &[u8]) -> Result<Self, CompileError>[src]
Compile a data buffer into a NativeArtifact, which may then be instantiated.
pub unsafe fn deserialize(
engine: &NativeEngine,
bytes: &[u8]
) -> Result<Self, DeserializeError>[src]
engine: &NativeEngine,
bytes: &[u8]
) -> Result<Self, DeserializeError>
Deserialize a NativeArtifact from bytes.
Safety
The bytes must represent a serialized WebAssembly module.
pub unsafe fn deserialize_from_file(
engine: &NativeEngine,
path: &Path
) -> Result<Self, DeserializeError>[src]
engine: &NativeEngine,
path: &Path
) -> Result<Self, DeserializeError>
Deserialize a NativeArtifact from a file path.
Safety
The file's content must represent a serialized WebAssembly module.
pub unsafe fn deserialize_from_file_unchecked(
engine: &NativeEngine,
path: &Path
) -> Result<Self, DeserializeError>[src]
engine: &NativeEngine,
path: &Path
) -> Result<Self, DeserializeError>
Deserialize a NativeArtifact from a file path (unchecked).
Safety
The file's content must represent a serialized WebAssembly module.
Trait Implementations
impl Artifact for NativeArtifact[src]
pub fn module(&self) -> Arc<ModuleInfo>[src]
pub fn module_ref(&self) -> &ModuleInfo[src]
pub fn module_mut(&mut self) -> Option<&mut ModuleInfo>[src]
pub fn register_frame_info(&self)[src]
pub fn features(&self) -> &Features[src]
pub fn data_initializers(&self) -> &[OwnedDataInitializer][src]
pub fn memory_styles(&self) -> &PrimaryMap<MemoryIndex, MemoryStyle>[src]
pub fn table_styles(&self) -> &PrimaryMap<TableIndex, TableStyle>[src]
pub fn finished_functions(
&self
) -> &BoxedSlice<LocalFunctionIndex, FunctionBodyPtr>[src]
&self
) -> &BoxedSlice<LocalFunctionIndex, FunctionBodyPtr>
pub fn finished_function_call_trampolines(
&self
) -> &BoxedSlice<SignatureIndex, VMTrampoline>[src]
&self
) -> &BoxedSlice<SignatureIndex, VMTrampoline>
pub fn finished_dynamic_function_trampolines(
&self
) -> &BoxedSlice<FunctionIndex, FunctionBodyPtr>[src]
&self
) -> &BoxedSlice<FunctionIndex, FunctionBodyPtr>
pub fn signatures(&self) -> &BoxedSlice<SignatureIndex, VMSharedSignatureIndex>[src]
pub fn preinstantiate(&self) -> Result<(), InstantiationError>[src]
pub fn serialize(&self) -> Result<Vec<u8>, SerializeError>[src]
Serialize a NativeArtifact
pub fn serialize_to_file(&self, path: &Path) -> Result<(), SerializeError>[src]
pub unsafe fn instantiate(
&self,
tunables: &dyn Tunables,
resolver: &dyn Resolver,
host_state: Box<dyn Any + 'static, Global>
) -> Result<InstanceHandle, InstantiationError>[src]
&self,
tunables: &dyn Tunables,
resolver: &dyn Resolver,
host_state: Box<dyn Any + 'static, Global>
) -> Result<InstanceHandle, InstantiationError>
pub unsafe fn finish_instantiation(
&self,
handle: &InstanceHandle
) -> Result<(), InstantiationError>[src]
&self,
handle: &InstanceHandle
) -> Result<(), InstantiationError>
Auto Trait Implementations
impl RefUnwindSafe for NativeArtifact[src]
impl Send for NativeArtifact[src]
impl Sync for NativeArtifact[src]
impl Unpin for NativeArtifact[src]
impl UnwindSafe for NativeArtifact[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T> Instrument for T[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,