feature gating actor stuff
This commit is contained in:
parent
13b38c5b6c
commit
895d54d26d
2 changed files with 33 additions and 6 deletions
28
Cargo.toml
28
Cargo.toml
|
@ -11,20 +11,36 @@ edition = "2018"
|
|||
readme = "README.md"
|
||||
|
||||
[dependencies]
|
||||
actix = "0.10"
|
||||
actix = { version = "0.10", optional = true}
|
||||
|
||||
serde = "1.0.114"
|
||||
serde_json = "1"
|
||||
|
||||
pretty_env_logger = "0.4"
|
||||
log = "0.4"
|
||||
pretty_env_logger = {version = "0.4", optional = true }
|
||||
log = {version = "0.4", optional = true }
|
||||
|
||||
derive_builder = "0.9"
|
||||
derive_more = "0.99"
|
||||
|
||||
rand = "0.8"
|
||||
pow_sha256 = { version = "0.2.1", git = "https://github.com/mcaptcha/pow_sha256" }
|
||||
redis = { version = "0.20.1", features = ["tokio-comp","aio", "cluster"] }
|
||||
rand = {version = "0.8", optional = true }
|
||||
|
||||
|
||||
pow_sha256 = { version = "0.2.1", git = "https://github.com/mcaptcha/pow_sha256", optional=true }
|
||||
redis = { version = "0.20.1", features = ["tokio-comp","aio", "cluster"], optional=true }
|
||||
|
||||
[dev-dependencies]
|
||||
actix-rt = "1"
|
||||
|
||||
[features]
|
||||
default = [
|
||||
"minimal",
|
||||
"full",
|
||||
"actix",
|
||||
"rand",
|
||||
"log",
|
||||
"pretty_env_logger",
|
||||
"pow_sha256",
|
||||
"redis"
|
||||
]
|
||||
minimal = []
|
||||
full = []
|
||||
|
|
11
src/lib.rs
11
src/lib.rs
|
@ -183,19 +183,30 @@
|
|||
//! }
|
||||
//! ```
|
||||
#![forbid(unsafe_code)]
|
||||
#[cfg(feature = "minimal")]
|
||||
pub mod defense;
|
||||
pub mod errors;
|
||||
#[cfg(feature = "full")]
|
||||
pub mod master;
|
||||
|
||||
/// message datatypes to interact with [MCaptcha] actor
|
||||
#[cfg(feature = "full")]
|
||||
pub mod cache;
|
||||
#[cfg(feature = "minimal")]
|
||||
pub mod mcaptcha;
|
||||
#[cfg(feature = "full")]
|
||||
pub mod pow;
|
||||
#[cfg(feature = "full")]
|
||||
pub mod system;
|
||||
#[cfg(feature = "full")]
|
||||
mod utils;
|
||||
|
||||
#[cfg(feature = "full")]
|
||||
pub use crate::cache::hashcache::HashCache;
|
||||
|
||||
#[cfg(feature = "minimal")]
|
||||
pub use defense::{Defense, DefenseBuilder, LevelBuilder};
|
||||
#[cfg(feature = "full")]
|
||||
pub use master::embedded::counter::Counter;
|
||||
#[cfg(feature = "minimal")]
|
||||
pub use mcaptcha::{MCaptcha, MCaptchaBuilder};
|
||||
|
|
Loading…
Reference in a new issue