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"
|
||||
|
||||
[features]
|
||||
default-features = []
|
||||
|
||||
logic = [
|
||||
"cssparser",
|
||||
"failure",
|
||||
"lazy_static",
|
||||
"scraper",
|
||||
]
|
||||
|
||||
[dependencies]
|
||||
cssparser = "0.23"
|
||||
failure = "0.1"
|
||||
lazy_static = "1"
|
||||
scraper = "0.7"
|
||||
cssparser = { version = "0.23", optional = true }
|
||||
failure = { version = "0.1", optional = true }
|
||||
lazy_static = { version = "1", optional = true }
|
||||
scraper = { version = "0.7", optional = true }
|
||||
serde = "1"
|
||||
serde_derive = "1"
|
||||
serde_json = "1"
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
#![feature(macro_at_most_once_rep)]
|
||||
|
||||
#[macro_use] extern crate failure;
|
||||
#[macro_use] extern crate lazy_static;
|
||||
#[cfg(feature = "logic")] #[macro_use] extern crate failure;
|
||||
#[cfg(feature = "logic")] #[macro_use] extern crate lazy_static;
|
||||
#[macro_use] extern crate serde_derive;
|
||||
|
||||
#[cfg(feature = "logic")]
|
||||
pub mod error;
|
||||
#[cfg(feature = "logic")]
|
||||
pub mod logic;
|
||||
|
||||
pub mod models;
|
||||
|
|
Loading…
Reference in New Issue
Block a user