diff options
author | Vincent Ambo <mail@tazj.in> | 2019-02-26T12·49+0100 |
---|---|---|
committer | Vincent Ambo <mail@tazj.in> | 2019-02-26T12·49+0100 |
commit | c6c17464288848aba045d4dbd6ee06fb8925f1b9 (patch) | |
tree | 3fe812c1326ba51da4293ad8a02b901ebd962017 /Cargo.toml | |
parent | 479a6b3442a852d414d977cdfabf61ad8180d877 (diff) |
refactor: Introduce `json` feature and make it optional
Gates support for `serde_json` behind a Cargo feature called `json` that is enabled by default.
Diffstat (limited to 'Cargo.toml')
-rw-r--r-- | Cargo.toml | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Cargo.toml b/Cargo.toml index 5f54546a39d5..60247f3e666e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,11 @@ name = "crimp" version = "0.1.0" authors = ["Vincent Ambo <mail@tazj.in>"] +[features] +default = [ "json" ] +json = [ "serde", "serde_json"] + [dependencies] curl = "0.4" -serde = "1.0" -serde_json = "1.0" +serde = { version = "1.0", optional = true } +serde_json = { version = "1.0", optional = true } |