about summary refs log tree commit diff
path: root/Cargo.toml
diff options
context:
space:
mode:
authorVika <vika@fireburn.ru>2021-09-26 02:04:27 +0300
committerVika <vika@fireburn.ru>2021-09-26 02:06:56 +0300
commit9203dd3ef7b62489116e7b7fe0b9d288c3389c78 (patch)
treec958b9bd42241b4452262ddfe197b1e91d211cbb /Cargo.toml
parent572435f7c8e1d613983309eca268c3f87ec5f00f (diff)
Moved integration tests and allowed the binary to use file backend
Now the Redis dependencies are optional and only required if you want
to test the backend or actually use it in production. The app displays
a hint if you try to launch with an unsupported backend.
Diffstat (limited to 'Cargo.toml')
-rw-r--r--Cargo.toml8
1 files changed, 6 insertions, 2 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 3974d9c..3f93407 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -7,6 +7,7 @@ edition = "2018"
 [features]
 default = ["util"]
 util = ["anyhow"]
+redis = ["mobc", "mobc-redis"]
 
 [[bin]]
 name = "kittybox-bulk-import"
@@ -16,7 +17,7 @@ required-features = ["util"]
 [[bin]]
 name = "pyindieblog-export"
 path = "src/bin/pyindieblog_to_kittybox.rs"
-required-features = ["util"]
+required-features = ["util", "redis"]
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
 
 [dev-dependencies]
@@ -39,7 +40,6 @@ lazy_static = "^1.4.0"       # A macro for declaring lazily evaluated statics in
 log = "^0.4.14"              # A lightweight logging facade for Rust
 markdown = "^0.3.0"          # Native Rust library for parsing Markdown and (outputting HTML)
 markup = "^0.12.0"           # HTML templating engine... ok also very funny about markdown and markup... i just realized the pun...
-mobc = "^0.7.2"              # A generic connection pool with async/await support
 newbase60 = "^0.1.3"         # A library that implements Tantek Çelik's New Base 60
 retainer = "^0.2.2"          # Minimal async cache in Rust with support for key expirations
 serde_json = "^1.0.64"       # A JSON serialization file format
@@ -54,8 +54,12 @@ features = ["attributes", "unstable"]
 [dependencies.chrono]        # Date and time library for Rust
 version = "^0.4.19"
 features = ["serde"]
+[dependencies.mobc]          # A generic connection pool with async/await support
+version = "^0.7.2"
+optional = true
 [dependencies.mobc-redis]    # Redis support for the mobc connection pool
 version = "^0.7.0"
+optional = true
 features = ["async-std-comp"]
 default-features = false
 [dependencies.prometheus]    # Prometheus instrumentation library for Rust applications