diff --git a/convert/Cargo.toml b/convert/Cargo.toml index ba90073..8623366 100644 --- a/convert/Cargo.toml +++ b/convert/Cargo.toml @@ -21,8 +21,6 @@ serde_json = "1.0.105" extism-convert-macros.workspace = true [dev-dependencies] -# Only required for tests run from the workspace root, as that enables the `extism-path` feature. -extism.workspace = true serde = { version = "1.0.186", features = ["derive"] } [features] diff --git a/convert/src/encoding.rs b/convert/src/encoding.rs index fc9cd58..54a1e69 100644 --- a/convert/src/encoding.rs +++ b/convert/src/encoding.rs @@ -8,18 +8,7 @@ use base64::Engine; /// For example, the following line creates a new JSON encoding using serde_json: /// /// ``` -#[cfg_attr( - feature = "extism-path", - doc = "extism::convert::encoding!(MyJson, serde_json::to_vec, serde_json::from_slice);" -)] -#[cfg_attr( - all(feature = "extism-pdk-path", not(feature = "extism-path")), - doc = "extism_pdk::encoding!(MyJson, serde_json::to_vec, serde_json::from_slice);" -)] -#[cfg_attr( - not(any(feature = "extism-path", feature = "extism-pdk-path")), - doc = "extism_convert::encoding!(MyJson, serde_json::to_vec, serde_json::from_slice);" -)] +/// extism_convert::encoding!(MyJson, serde_json::to_vec, serde_json::from_slice); /// ``` /// /// This will create a struct `struct MyJson(pub T)` and implement [`ToBytes`] using [`serde_json::to_vec`] diff --git a/convert/src/from_bytes.rs b/convert/src/from_bytes.rs index b867236..d2aead2 100644 --- a/convert/src/from_bytes.rs +++ b/convert/src/from_bytes.rs @@ -9,18 +9,7 @@ pub use extism_convert_macros::FromBytes; /// `FromBytes`, e.g., [`Json`], [`Msgpack`]. /// /// ``` -#[cfg_attr( - feature = "extism-path", - doc = "use extism::convert::{Json, FromBytes};" -)] -#[cfg_attr( - all(feature = "extism-pdk-path", not(feature = "extism-path")), - doc = "use extism_pdk::{Json, FromBytes};" -)] -#[cfg_attr( - not(any(feature = "extism-path", feature = "extism-pdk-path")), - doc = "use extism_convert::{Json, FromBytes};" -)] +/// use extism_convert::{Json, FromBytes}; /// use serde::Deserialize; /// /// #[derive(FromBytes, Deserialize, PartialEq, Debug)] @@ -39,18 +28,7 @@ pub use extism_convert_macros::FromBytes; /// ``` /// use std::str::{self, FromStr}; /// use std::convert::Infallible; -#[cfg_attr( - feature = "extism-path", - doc = "use extism::convert::{Error, FromBytes, FromBytesOwned};" -)] -#[cfg_attr( - all(feature = "extism-pdk-path", not(feature = "extism-path")), - doc = "use extism_pdk::{Error, FromBytes, FromBytesOwned};" -)] -#[cfg_attr( - not(any(feature = "extism-path", feature = "extism-pdk-path")), - doc = "use extism_convert::{Error, FromBytes, FromBytesOwned};" -)] +/// use extism_convert::{Error, FromBytes, FromBytesOwned}; /// /// // Custom serialization using `FromStr` /// struct StringEnc(T); diff --git a/convert/src/to_bytes.rs b/convert/src/to_bytes.rs index 9debf02..fb40737 100644 --- a/convert/src/to_bytes.rs +++ b/convert/src/to_bytes.rs @@ -9,15 +9,7 @@ pub use extism_convert_macros::ToBytes; /// `ToBytes`, e.g., [`Json`], [`Msgpack`]. /// /// ``` -#[cfg_attr(feature = "extism-path", doc = "use extism::convert::{Json, ToBytes};")] -#[cfg_attr( - all(feature = "extism-pdk-path", not(feature = "extism-path")), - doc = "use extism_pdk::{Json, ToBytes};" -)] -#[cfg_attr( - not(any(feature = "extism-path", feature = "extism-pdk-path")), - doc = "use extism_convert::{Json, ToBytes};" -)] +/// use extism_convert::{Json, ToBytes}; /// use serde::Serialize; /// /// #[derive(ToBytes, Serialize)] @@ -34,18 +26,7 @@ pub use extism_convert_macros::ToBytes; /// generic argument, i.e., `Type(T)`, that implement `ToBytes` for the struct. /// /// ``` -#[cfg_attr( - feature = "extism-path", - doc = "use extism::convert::{Error, ToBytes};" -)] -#[cfg_attr( - all(feature = "extism-pdk-path", not(feature = "extism-path")), - doc = "use extism_pdk::{Error, ToBytes};" -)] -#[cfg_attr( - not(any(feature = "extism-path", feature = "extism-pdk-path")), - doc = "use extism_convert::{Error, ToBytes};" -)] +/// use extism_convert::{Error, ToBytes}; /// /// // Custom serialization using `ToString` /// struct StringEnc(T);