I am working on a library, that optionally enables serde
serialization.
This is my original dependency section
[dependencies]
chrono = { version = "0.4", features = ["serde"] }
flagset = { version = "0.4", features = ["serde"] }
nom = "7.1"
parse-display = "0.5"
serde = { version = "1.0", features = ["derive"], optional = true }
[features]
serde = ["dep:serde"]
Now this does not compile when not using serde
, because chrono
and flagset
have the serde
feature enabled.
Can anyone please refer me to a resource (or be said resource) explaining how to conditionally disable the serde
feature in chrono
and flagset
?
Thanks a lot! Cheers