mirror of
https://github.com/actix/actix-extras.git
synced 2025-02-21 10:04:49 +01:00
add web feature
This commit is contained in:
parent
4340726198
commit
d7242659fe
@ -16,6 +16,12 @@ exclude = [".gitignore", ".travis.yml", ".cargo/config", "appveyor.yml"]
|
|||||||
name = "actix_redis"
|
name = "actix_redis"
|
||||||
path = "src/lib.rs"
|
path = "src/lib.rs"
|
||||||
|
|
||||||
|
[features]
|
||||||
|
default = ["web"]
|
||||||
|
|
||||||
|
# actix-web integration
|
||||||
|
web = ["actix-web"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
rand = "0.3"
|
rand = "0.3"
|
||||||
http = "0.1"
|
http = "0.1"
|
||||||
@ -30,7 +36,7 @@ actix = "^0.3.5"
|
|||||||
redis-async = "0.0"
|
redis-async = "0.0"
|
||||||
cookie = { version="0.10", features=["percent-encode", "secure"] }
|
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]
|
[dev-dependencies]
|
||||||
env_logger = "0.4"
|
env_logger = "0.4"
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
extern crate actix;
|
extern crate actix;
|
||||||
extern crate actix_web;
|
|
||||||
extern crate bytes;
|
extern crate bytes;
|
||||||
extern crate cookie;
|
extern crate cookie;
|
||||||
extern crate futures;
|
extern crate futures;
|
||||||
@ -14,8 +13,15 @@ extern crate redis_async;
|
|||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate failure;
|
extern crate failure;
|
||||||
|
|
||||||
|
#[cfg(feature="web")]
|
||||||
|
extern crate actix_web;
|
||||||
|
|
||||||
mod redis;
|
mod redis;
|
||||||
|
|
||||||
|
#[cfg(feature="web")]
|
||||||
mod session;
|
mod session;
|
||||||
|
|
||||||
pub use redis::RedisActor;
|
pub use redis::RedisActor;
|
||||||
|
|
||||||
|
#[cfg(feature="web")]
|
||||||
pub use session::RedisSessionBackend;
|
pub use session::RedisSessionBackend;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user