[Bug]: wasm-types manifesh doesnt match with what is expected by wadm.
ritesh089 opened this issue · 2 comments
ritesh089 commented
Currently , Link property struct is defined as :
pub struct LinkProperty {
/// WIT namespace for the link
pub namespace: String,
/// WIT package for the link
pub package: String,
/// WIT interfaces for the link
pub interfaces: Vec<String>,
/// Configuration to apply to the source of the link
#[serde(default, skip_serializing_if = "Option::is_none")]
pub source: Option<ConfigDefinition>,
/// Configuration to apply to the target of the link
pub target: TargetConfig,
/// The name of this link
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(default, skip_serializing)]
#[deprecated(since = "0.13.0")]
pub source_config: Option<Vec<ConfigProperty>>,
#[serde(default, skip_serializing)]
#[deprecated(since = "0.13.0")]
pub target_config: Option<Vec<ConfigProperty>>,
}
But WADM requires target to be a string :
- type: link
properties:
target: http-component
namespace: wasi
package: http
interfaces: [incoming-handler]
brooksmtownsend commented
@ritesh089 this is actually by design, since we've moved to the new format of
target:
name: <name>
instead of just a String name. You can see below in the custom deserialize code how we're converting the older format to thew new https://github.com/wasmCloud/wadm/blob/main/crates/wadm-types/src/lib.rs#L432
ritesh089 commented
Thank you. Closing the issue .