Add api feature

Signed-off-by: trivernis <trivernis@protonmail.com>
pull/9/head
trivernis 2 years ago
parent e860f635d3
commit 180dd339ab
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

@ -20,6 +20,6 @@ itertools = { version = "0.10.3", optional = true }
lazy_static = { version = "1.4.0", optional = true }
[features]
default = ["include-data"]
default = ["include-data", "api"]
include-data = ["include_dir", "itertools", "lazy_static"]
api = ["include-data"]

@ -1,3 +1,4 @@
#![cfg(feature = "api")]
use crate::api::versions::{available_versions, versions};
use crate::api::Api;
use crate::models::version::Version;

@ -1,3 +1,4 @@
#![cfg(feature = "api")]
mod datapaths;
use crate::data::datapaths::Datapaths;

@ -4,7 +4,7 @@
extern crate serde_derive;
/// Provides data access methods
#[cfg(feature="include-data")]
#[cfg(feature = "api")]
pub mod api;
#[cfg(feature = "include-data")]
pub(crate) mod data;
@ -12,7 +12,8 @@ pub(crate) mod data;
pub mod models;
pub(crate) mod utils;
#[cfg(feature="include-data")]
#[cfg(feature = "api")]
pub use api::Api;
pub use utils::error::DataError;
pub use utils::error::DataResult;

Loading…
Cancel
Save