diff --git a/template/Cargo.toml.ejs b/template/Cargo.toml.ejs index 86bfbdf..4fc55a2 100644 --- a/template/Cargo.toml.ejs +++ b/template/Cargo.toml.ejs @@ -14,3 +14,5 @@ serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" base64-serde = "0.7" base64 = "0.21" + +[workspace] diff --git a/template/src/pdk.rs.ejs b/template/src/pdk.rs.ejs index 821c40c..38c0c70 100644 --- a/template/src/pdk.rs.ejs +++ b/template/src/pdk.rs.ejs @@ -74,7 +74,7 @@ pub mod types { use super::*; <% Object.values(schema.schemas).forEach(schema => { %> <% if (isEnum(schema)) { %> -#[derive(Default, serde::Serialize, serde::Deserialize, extism_pdk::FromBytes, extism_pdk::ToBytes)] +#[derive(Default, Debug, Clone, serde::Serialize, serde::Deserialize, extism_pdk::FromBytes, extism_pdk::ToBytes)] #[encoding(Json)] pub enum <%- capitalize(schema.name) %> { #[default] @@ -84,7 +84,7 @@ pub enum <%- capitalize(schema.name) %> { <% }) %> } <% } else { %> -#[derive(Default, serde::Serialize, serde::Deserialize, extism_pdk::FromBytes, extism_pdk::ToBytes)] +#[derive(Default, Debug, Clone, serde::Serialize, serde::Deserialize, extism_pdk::FromBytes, extism_pdk::ToBytes)] #[encoding(Json)] pub struct <%- capitalize(schema.name) %> { <% schema.properties.forEach(p => { -%>