Skip to content

Commit

Permalink
Make hyper and actix dependencies optional.
Browse files Browse the repository at this point in the history
Put actix-tarantool-proxy and hyper-tarantool-proxy behind
feature flags and make dependencies optional.

Fixes #3.
  • Loading branch information
akhilman committed Dec 14, 2019
1 parent ffcbe93 commit 455cf03
Showing 1 changed file with 26 additions and 5 deletions.
31 changes: 26 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ readme = "README.md"
name = "rusty_tarantool"
path = "src/lib.rs"

[features]
actix-example = ["actix-web", "url", "serde_json"]
hyper-example = ["hyper", "url", "serde_json"]

[dependencies]
maplit = "1.0"
futures = "0.1"
Expand All @@ -37,8 +41,25 @@ base64 = "0.2"
sha1 = "0.2"
rustc-serialize = "0.3"

[dev-dependencies]
hyper = "0.12"
serde_json = "1.0"
url = "1.7"
actix-web = "1.0"
# required for examples
hyper = {version = "0.12", optional = true}
serde_json = {version = "1.0", optional = true}
url = {version = "1.7", optional = true}
actix-web = {version = "1.0", optional = true}

[[example]]
name = "actix-tarantool-proxy"
required-features = ["actix-example"]

[[example]]
name = "hyper-tarantool-proxy"
required-features = ["hyper-example"]

[[example]]
name = "simple-bench"

[[example]]
name = "simple-call"

[[example]]
name = "test-reconnect"

0 comments on commit 455cf03

Please sign in to comment.