@@ -298,6 +298,9 @@ pub struct ComponentProperties {
298
298
/// these values at runtime using `wasmcloud:secrets/store`.
299
299
#[ serde( default , skip_serializing_if = "Vec::is_empty" ) ]
300
300
pub secrets : Vec < SecretProperty > ,
301
+ /// This Config holds the componet's metadata properties like memory limits and execution time limits
302
+ #[ serde( skip_serializing_if = "Option::is_none" ) ]
303
+ pub limits : Option < LimitsConfig > ,
301
304
}
302
305
303
306
#[ derive( Debug , Serialize , Deserialize , Clone , PartialEq , Eq , Default , ToSchema , JsonSchema ) ]
@@ -333,6 +336,14 @@ pub struct SecretSourceProperty {
333
336
pub version : Option < String > ,
334
337
}
335
338
339
+ #[ derive( Debug , Serialize , Deserialize , Clone , PartialEq , Eq , Hash , ToSchema , JsonSchema ) ]
340
+ pub struct LimitsConfig {
341
+ #[ serde( skip_serializing_if = "Option::is_none" ) ]
342
+ pub max_linear_memory : Option < u64 > ,
343
+ #[ serde( skip_serializing_if = "Option::is_none" ) ]
344
+ pub max_execution_time : Option < u64 > ,
345
+ }
346
+
336
347
#[ derive( Debug , Serialize , Deserialize , Clone , PartialEq , Eq , ToSchema , JsonSchema ) ]
337
348
#[ serde( deny_unknown_fields) ]
338
349
pub struct CapabilityProperties {
@@ -845,6 +856,7 @@ mod test {
845
856
id : None ,
846
857
config : vec ! [ ] ,
847
858
secrets : vec ! [ ] ,
859
+ limits : None ,
848
860
} ,
849
861
} ,
850
862
traits : Some ( trait_vec) ,
0 commit comments