Skip to content

Commit

Permalink
Make serde_derive optional for postcard users
Browse files Browse the repository at this point in the history
Outside of tests, the only use of serde_derive is in schema.rs, which
is only exposed when postcard's experimental-derive feature is enabled.
  • Loading branch information
hanna-kruppe committed Mar 1, 2024
1 parent 866de42 commit d8174d7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ default-features = false

[dependencies.serde_derive]
version = "1"
optional = true

[dependencies.cobs]
version = "0.2.3"
Expand Down Expand Up @@ -95,7 +96,7 @@ use-crc = ["crc", "paste"]
# Experimental features!
#
# NOT subject to SemVer guarantees!
experimental-derive = ["postcard-derive", "const_format"]
experimental-derive = ["postcard-derive", "const_format", "dep:serde_derive"]

[workspace]
members = ["postcard-derive"]
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ mod varint;

// Still experimental! Don't make pub pub.
pub(crate) mod max_size;
#[cfg(feature = "experimental-derive")]
pub(crate) mod schema;

/// # Experimental Postcard Features
Expand Down

0 comments on commit d8174d7

Please sign in to comment.