pub trait ArtifactCreate: Send + Sync + Upcastable {
    fn create_module_info(&self) -> ModuleInfo;
    fn features(&self) -> &Features;
    fn cpu_features(&self) -> EnumSet<CpuFeature>;
    fn memory_styles(&self) -> &PrimaryMap<MemoryIndex, MemoryStyle>;
    fn table_styles(&self) -> &PrimaryMap<TableIndex, TableStyle>;
    fn data_initializers(&self) -> &[OwnedDataInitializer];
    fn serialize(&self) -> Result<Vec<u8>, SerializeError>;

    fn serialize_to_file(&self, path: &Path) -> Result<(), SerializeError> { ... }
}
Expand description

An Artifact is the product that the Engine implementation produce and use.

The Artifact contains the compiled data for a given module as well as extra information needed to run the module at runtime, such as ModuleInfo and Features.

Required Methods§

Create a ModuleInfo for instantiation

Returns the features for this Artifact

Returns the CPU features for this Artifact

Returns the memory styles associated with this Artifact.

Returns the table plans associated with this Artifact.

Returns data initializers to pass to InstanceHandle::initialize

Serializes an artifact into bytes

Provided Methods§

Serializes an artifact into a file path

Implementations§

Try to downcast the artifact into a given type.

Try to downcast the artifact into a given type mutably.

Implementors§