1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-02-17 08:33:30 +01:00

add web feature

This commit is contained in:
Nikolay Kim 2017-12-29 01:20:29 -08:00
parent 4340726198
commit d7242659fe
2 changed files with 14 additions and 2 deletions

View File

@ -16,6 +16,12 @@ exclude = [".gitignore", ".travis.yml", ".cargo/config", "appveyor.yml"]
name = "actix_redis"
path = "src/lib.rs"
[features]
default = ["web"]
# actix-web integration
web = ["actix-web"]
[dependencies]
rand = "0.3"
http = "0.1"
@ -30,7 +36,7 @@ actix = "^0.3.5"
redis-async = "0.0"
cookie = { version="0.10", features=["percent-encode", "secure"] }
actix-web = { git = "https://github.com/actix/actix-web.git" }
actix-web = { git="https://github.com/actix/actix-web.git", optional=true }
[dev-dependencies]
env_logger = "0.4"

View File

@ -1,5 +1,4 @@
extern crate actix;
extern crate actix_web;
extern crate bytes;
extern crate cookie;
extern crate futures;
@ -14,8 +13,15 @@ extern crate redis_async;
#[macro_use]
extern crate failure;
#[cfg(feature="web")]
extern crate actix_web;
mod redis;
#[cfg(feature="web")]
mod session;
pub use redis::RedisActor;
#[cfg(feature="web")]
pub use session::RedisSessionBackend;