@ -15,6 +15,11 @@ thiserror = "1.0.31"
serde_json = "1.0.81"
serde_derive = "1.0.137"
serde = "1.0.137"
include_dir = "0.7.2"
itertools = "0.10.3"
lazy_static = "1.4.0"
include_dir = { version = "0.7.2", optional = true }
itertools = { version = "0.10.3", optional = true }
lazy_static = { version = "1.4.0", optional = true }
[features]
default = ["include_data"]
include_data = ["include_dir", "itertools", "lazy_static"]
@ -4,6 +4,11 @@ This repository is a rust library to access minecraft data.
The data itself hosted in the [minecraft-data](https://github.com/PrismarineJS/minecraft-data) repository
and included into the library at compile time.
### Excluding the minecraft-data at compile time
By adding `default-features=false` to the dependency in your `Cargo.toml` file, you can exclude the minecraft-data from the library.
## Usage
```rust
@ -4,12 +4,15 @@
extern crate serde_derive;
/// Provides data access methods
#[cfg(feature="include_data")]
pub mod api;
pub(crate) mod data;
/// Contains the type definitions for the data
pub mod models;
pub(crate) mod utils;
pub use api::Api;
pub use utils::error::DataError;
pub use utils::error::DataResult;