Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add custom Duration and Timestamp types for conversion with serde #89

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
4 changes: 2 additions & 2 deletions interpreter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ categories = ["compilers"]
[dependencies]
cel-parser = { path = "../parser", version = "0.7.1 " }
thiserror = "1.0.40"
chrono = { version = "0.4.26", default-features = false, features = ["alloc"], optional = true }
chrono = { version = "0.4.26", default-features = false, features = ["alloc", "serde"], optional = true }
nom = "7.1.3"
paste = "1.0.14"
serde = "1.0.196"
Expand All @@ -30,4 +30,4 @@ harness = false
[features]
json = ["dep:base64", "dep:serde_json"]
regex = ["dep:regex"]
chrono = ["dep:chrono"]
chrono = ["dep:chrono"]
2 changes: 2 additions & 0 deletions interpreter/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ pub mod objects;
mod resolvers;
mod ser;
pub use ser::to_value;
#[cfg(feature = "chrono")]
pub use ser::{Duration, Timestamp};

#[cfg(feature = "json")]
mod json;
Expand Down
Loading