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"
|
readme = "README.md"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
actix = "0.10"
|
actix = { version = "0.10", optional = true}
|
||||||
|
|
||||||
serde = "1.0.114"
|
serde = "1.0.114"
|
||||||
serde_json = "1"
|
serde_json = "1"
|
||||||
|
|
||||||
pretty_env_logger = "0.4"
|
pretty_env_logger = {version = "0.4", optional = true }
|
||||||
log = "0.4"
|
log = {version = "0.4", optional = true }
|
||||||
|
|
||||||
derive_builder = "0.9"
|
derive_builder = "0.9"
|
||||||
derive_more = "0.99"
|
derive_more = "0.99"
|
||||||
|
|
||||||
rand = "0.8"
|
rand = {version = "0.8", optional = true }
|
||||||
pow_sha256 = { version = "0.2.1", git = "https://github.com/mcaptcha/pow_sha256" }
|
|
||||||
redis = { version = "0.20.1", features = ["tokio-comp","aio", "cluster"] }
|
|
||||||
|
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]
|
[dev-dependencies]
|
||||||
actix-rt = "1"
|
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)]
|
#![forbid(unsafe_code)]
|
||||||
|
#[cfg(feature = "minimal")]
|
||||||
pub mod defense;
|
pub mod defense;
|
||||||
pub mod errors;
|
pub mod errors;
|
||||||
|
#[cfg(feature = "full")]
|
||||||
pub mod master;
|
pub mod master;
|
||||||
|
|
||||||
/// message datatypes to interact with [MCaptcha] actor
|
/// message datatypes to interact with [MCaptcha] actor
|
||||||
|
#[cfg(feature = "full")]
|
||||||
pub mod cache;
|
pub mod cache;
|
||||||
|
#[cfg(feature = "minimal")]
|
||||||
pub mod mcaptcha;
|
pub mod mcaptcha;
|
||||||
|
#[cfg(feature = "full")]
|
||||||
pub mod pow;
|
pub mod pow;
|
||||||
|
#[cfg(feature = "full")]
|
||||||
pub mod system;
|
pub mod system;
|
||||||
|
#[cfg(feature = "full")]
|
||||||
mod utils;
|
mod utils;
|
||||||
|
|
||||||
|
#[cfg(feature = "full")]
|
||||||
pub use crate::cache::hashcache::HashCache;
|
pub use crate::cache::hashcache::HashCache;
|
||||||
|
|
||||||
|
#[cfg(feature = "minimal")]
|
||||||
pub use defense::{Defense, DefenseBuilder, LevelBuilder};
|
pub use defense::{Defense, DefenseBuilder, LevelBuilder};
|
||||||
|
#[cfg(feature = "full")]
|
||||||
pub use master::embedded::counter::Counter;
|
pub use master::embedded::counter::Counter;
|
||||||
|
#[cfg(feature = "minimal")]
|
||||||
pub use mcaptcha::{MCaptcha, MCaptchaBuilder};
|
pub use mcaptcha::{MCaptcha, MCaptchaBuilder};
|
||||||
|
|
Loading…
Reference in a new issue