Skip to main content

wasm_capability_contract/component/dto/
component_load_request.rs

1//! [`ComponentLoadRequest`] — input to [`crate::CapabilityEngine::load`].
2
3use crate::ComponentManifest;
4
5/// Request to load an already-validated component artifact into the engine.
6///
7/// Callers must run [`crate::ComponentValidator::validate`] against
8/// `manifest`/`component_bytes` first — `load` is not required to
9/// re-validate the manifest, only to fail if the bytes cannot be
10/// instantiated per the (already-validated) manifest's declared contract.
11#[derive(Debug, Clone)]
12pub struct ComponentLoadRequest {
13    /// The component's manifest, already validated by
14    /// [`crate::ComponentValidator`].
15    pub manifest: ComponentManifest,
16    /// The raw Wasm component binary.
17    pub component_bytes: Vec<u8>,
18}