pub struct Compilation { /* private fields */ }
Expand description

The result of compiling a WebAssembly module’s functions.

Implementations§

source§

impl Compilation

source

pub fn new( functions: Functions, custom_sections: CustomSections, function_call_trampolines: PrimaryMap<SignatureIndex, FunctionBody>, dynamic_function_trampolines: PrimaryMap<FunctionIndex, FunctionBody>, debug: Option<Dwarf>, trampolines: Option<TrampolinesSection> ) -> Self

Creates a compilation artifact from a contiguous function buffer and a set of ranges

source

pub fn get(&self, func: LocalFunctionIndex) -> &CompiledFunction

Gets the bytes of a single function

source

pub fn len(&self) -> usize

Gets the number of functions defined.

source

pub fn is_empty(&self) -> bool

Returns whether there are no functions defined.

source

pub fn get_relocations(&self) -> PrimaryMap<LocalFunctionIndex, Vec<Relocation>>

Gets functions relocations.

source

pub fn get_function_bodies( &self ) -> PrimaryMap<LocalFunctionIndex, FunctionBody>

Gets functions bodies.

source

pub fn get_jt_offsets(&self) -> PrimaryMap<LocalFunctionIndex, JumpTableOffsets>

Gets functions jump table offsets.

source

pub fn get_frame_info( &self ) -> PrimaryMap<LocalFunctionIndex, CompiledFunctionFrameInfo>

Gets functions frame info.

source

pub fn get_function_call_trampolines( &self ) -> PrimaryMap<SignatureIndex, FunctionBody>

Gets function call trampolines.

source

pub fn get_dynamic_function_trampolines( &self ) -> PrimaryMap<FunctionIndex, FunctionBody>

Gets function call trampolines.

source

pub fn get_custom_sections(&self) -> PrimaryMap<SectionIndex, CustomSection>

Gets custom section data.

source

pub fn get_custom_section_relocations( &self ) -> PrimaryMap<SectionIndex, Vec<Relocation>>

Gets relocations that apply to custom sections.

source

pub fn get_debug(&self) -> Option<Dwarf>

Returns the Dwarf info.

source

pub fn get_trampolines(&self) -> Option<TrampolinesSection>

Returns the Trampolines info.

Trait Implementations§

source§

impl Debug for Compilation

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a> IntoIterator for &'a Compilation

§

type IntoIter = Iter<'a>

Which kind of iterator are we turning this into?
§

type Item = <<&'a Compilation as IntoIterator>::IntoIter as Iterator>::Item

The type of the elements being iterated over.
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
source§

impl PartialEq<Compilation> for Compilation

source§

fn eq(&self, other: &Compilation) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for Compilation

source§

impl StructuralEq for Compilation

source§

impl StructuralPartialEq for Compilation

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> ArchivePointee for T

§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
source§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere W: DeserializeWith<F, T, D>, D: Fallible + ?Sized, F: ?Sized,

source§

fn deserialize( &self, deserializer: &mut D ) -> Result<With<T, W>, <D as Fallible>::Error>

Deserializes using the given deserializer
source§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointee for T

§

type Metadata = ()

The type for metadata in pointers and references to Self.
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.