Path: blob/main/crates/environ/src/component/artifacts.rs
3069 views
//! Definitions of compilation artifacts of the component compilation process1//! which are serialized with `bincode` into output ELF files.23use crate::{4CompiledFunctionsTable, CompiledModuleInfo, PrimaryMap, StaticModuleIndex,5component::{Component, ComponentTypes, TypeComponentIndex},6};7use serde_derive::{Deserialize, Serialize};89/// Serializable state that's stored in a compilation artifact.10#[derive(Serialize, Deserialize)]11pub struct ComponentArtifacts {12/// The type of this component.13pub ty: TypeComponentIndex,14/// Information all kept available at runtime as-is.15pub info: CompiledComponentInfo,16/// The index of every compiled function's location in the text section.17pub table: CompiledFunctionsTable,18/// Type information for this component and all contained modules.19pub types: ComponentTypes,20/// Serialized metadata about all included core wasm modules.21pub static_modules: PrimaryMap<StaticModuleIndex, CompiledModuleInfo>,22}2324/// Runtime state that a component retains to support its operation.25#[derive(Serialize, Deserialize)]26pub struct CompiledComponentInfo {27/// Type information calculated during translation about this component.28pub component: Component,29}303132