refactor: add feature gates for use as a model library
This commit is contained in:
parent
480ebe983e
commit
3efcba2d65
18
Cargo.toml
18
Cargo.toml
@ -7,11 +7,21 @@ authors = ["Kyle Clemens <git@kyleclemens.com>"]
|
|||||||
|
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
|
[features]
|
||||||
|
default-features = []
|
||||||
|
|
||||||
|
logic = [
|
||||||
|
"cssparser",
|
||||||
|
"failure",
|
||||||
|
"lazy_static",
|
||||||
|
"scraper",
|
||||||
|
]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
cssparser = "0.23"
|
cssparser = { version = "0.23", optional = true }
|
||||||
failure = "0.1"
|
failure = { version = "0.1", optional = true }
|
||||||
lazy_static = "1"
|
lazy_static = { version = "1", optional = true }
|
||||||
scraper = "0.7"
|
scraper = { version = "0.7", optional = true }
|
||||||
serde = "1"
|
serde = "1"
|
||||||
serde_derive = "1"
|
serde_derive = "1"
|
||||||
serde_json = "1"
|
serde_json = "1"
|
||||||
|
@ -1,9 +1,12 @@
|
|||||||
#![feature(macro_at_most_once_rep)]
|
#![feature(macro_at_most_once_rep)]
|
||||||
|
|
||||||
#[macro_use] extern crate failure;
|
#[cfg(feature = "logic")] #[macro_use] extern crate failure;
|
||||||
#[macro_use] extern crate lazy_static;
|
#[cfg(feature = "logic")] #[macro_use] extern crate lazy_static;
|
||||||
#[macro_use] extern crate serde_derive;
|
#[macro_use] extern crate serde_derive;
|
||||||
|
|
||||||
|
#[cfg(feature = "logic")]
|
||||||
pub mod error;
|
pub mod error;
|
||||||
|
#[cfg(feature = "logic")]
|
||||||
pub mod logic;
|
pub mod logic;
|
||||||
|
|
||||||
pub mod models;
|
pub mod models;
|
||||||
|
Loading…
Reference in New Issue
Block a user