diff --git a/crates/wadm-types/src/bindings.rs b/crates/wadm-types/src/bindings.rs index 36be6fe9..854d8f5d 100644 --- a/crates/wadm-types/src/bindings.rs +++ b/crates/wadm-types/src/bindings.rs @@ -5,9 +5,10 @@ use crate::{ }, CapabilityProperties, Component, ComponentProperties, ConfigDefinition, ConfigProperty, LinkProperty, Manifest, Metadata, Policy, Properties, SecretProperty, SecretSourceProperty, - Specification, Spread, SpreadScalerProperty, TargetConfig, Trait, TraitProperty, + SharedApplicationComponentProperties, Specification, Spread, SpreadScalerProperty, + TargetConfig, Trait, TraitProperty, }; -use wasmcloud::wadm; +use wasmcloud::wadm::{self}; wit_bindgen_wrpc::generate!({ generate_unused_types: true, @@ -87,6 +88,7 @@ impl From for wadm::types::Properties { impl From for wadm::types::ComponentProperties { fn from(properties: ComponentProperties) -> Self { wadm::types::ComponentProperties { + application: properties.application.map(Into::into), image: properties.image, id: properties.id, config: properties.config.into_iter().map(|c| c.into()).collect(), @@ -98,6 +100,7 @@ impl From for wadm::types::ComponentProperties { impl From for wadm::types::CapabilityProperties { fn from(properties: CapabilityProperties) -> Self { wadm::types::CapabilityProperties { + application: properties.application.map(Into::into), image: properties.image, id: properties.id, config: properties.config.into_iter().map(|c| c.into()).collect(), @@ -135,6 +138,17 @@ impl From for wadm::types::SecretSourceProperty { } } +impl From + for wadm::types::SharedApplicationComponentProperties +{ + fn from(properties: SharedApplicationComponentProperties) -> Self { + wadm::types::SharedApplicationComponentProperties { + name: properties.name, + component: properties.component, + } + } +} + impl From for wadm::types::Trait { fn from(trait_: Trait) -> Self { wadm::types::Trait { @@ -391,6 +405,7 @@ impl From for ComponentProperties { fn from(properties: wadm::types::ComponentProperties) -> Self { ComponentProperties { image: properties.image, + application: properties.application.map(Into::into), id: properties.id, config: properties.config.into_iter().map(|c| c.into()).collect(), secrets: properties.secrets.into_iter().map(|c| c.into()).collect(), @@ -402,6 +417,7 @@ impl From for CapabilityProperties { fn from(properties: wadm::types::CapabilityProperties) -> Self { CapabilityProperties { image: properties.image, + application: properties.application.map(Into::into), id: properties.id, config: properties.config.into_iter().map(|c| c.into()).collect(), secrets: properties.secrets.into_iter().map(|c| c.into()).collect(), @@ -438,6 +454,17 @@ impl From for SecretSourceProperty { } } +impl From + for SharedApplicationComponentProperties +{ + fn from(properties: wadm::types::SharedApplicationComponentProperties) -> Self { + SharedApplicationComponentProperties { + name: properties.name, + component: properties.component, + } + } +} + impl From for Trait { fn from(trait_: wadm::types::Trait) -> Self { Trait { diff --git a/crates/wadm-types/wit/deps.lock b/crates/wadm-types/wit/deps.lock index 8e0144a8..eaaa308a 100644 --- a/crates/wadm-types/wit/deps.lock +++ b/crates/wadm-types/wit/deps.lock @@ -1,4 +1,4 @@ [wadm] path = "../../../wit/wadm" -sha256 = "30b945b53e5dc1220f25da83449571e119cfd4029647a1908e5658d72335424e" -sha512 = "bbd7e5883dc4014ea246a33cf9386b11803cb330854e5691af526971c7131ad358eec9ad8f6dbf0ccd20efe0fedb43a3304f8e9538832d73cce7db09f82f1176" +sha256 = "be9dcb406ac45d69c18c70d962572b9def1f59787246caf27b54f255a817ace7" +sha512 = "c3a3dc09613acff547165627174323096e50abd31998a3514917cc7b2596d86ae04bf4950cbbfac932fc82b2039f435f278fe25eb6f9d23ab7678662e8d528f1" diff --git a/crates/wadm-types/wit/deps/wadm/types.wit b/crates/wadm-types/wit/deps/wadm/types.wit index dd93bd54..f161c658 100644 --- a/crates/wadm-types/wit/deps/wadm/types.wit +++ b/crates/wadm-types/wit/deps/wadm/types.wit @@ -117,7 +117,8 @@ interface types { // Properties for a component record component-properties { - image: string, + image: option, + application: option, id: option, config: list, secrets: list, @@ -125,7 +126,8 @@ interface types { // Properties for a capability record capability-properties { - image: string, + image: option, + application: option, id: option, config: list, secrets: list, @@ -187,6 +189,12 @@ interface types { version: option, } + // Shared application component properties + record shared-application-component-properties { + name: string, + component: string + } + // Target configuration record target-config { name: string, diff --git a/wit/wadm/types.wit b/wit/wadm/types.wit index dd93bd54..f161c658 100644 --- a/wit/wadm/types.wit +++ b/wit/wadm/types.wit @@ -117,7 +117,8 @@ interface types { // Properties for a component record component-properties { - image: string, + image: option, + application: option, id: option, config: list, secrets: list, @@ -125,7 +126,8 @@ interface types { // Properties for a capability record capability-properties { - image: string, + image: option, + application: option, id: option, config: list, secrets: list, @@ -187,6 +189,12 @@ interface types { version: option, } + // Shared application component properties + record shared-application-component-properties { + name: string, + component: string + } + // Target configuration record target-config { name: string,