1
0
Fork 0
mirror of https://github.com/kotovalexarian/jsonapis.rs.git synced 2025-04-21 17:52:45 -04:00

Use Cargo features

This commit is contained in:
Alex Kotov 2021-09-28 15:34:38 +05:00
parent f85274a6b8
commit 01b15aff7c
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
3 changed files with 31 additions and 2 deletions

View file

@ -1,3 +1,26 @@
language: rust
rust: [stable, beta, nightly]
env:
- FEATURES=''
- FEATURES='--no-default-features'
install: cargo build --verbose $FEATURES
script: cargo test --verbose $FEATURES
jobs:
include:
- rust: stable
env: FEATURES=''
- rust: beta
env: FEATURES=''
- rust: nightly
env: FEATURES=''
- rust: stable
env: FEATURES='--no-default-features'
- rust: beta
env: FEATURES='--no-default-features'
- rust: nightly
env: FEATURES='--no-default-features'

View file

@ -12,9 +12,13 @@ keywords = ["api", "deserialization", "json", "serialization", "jsonapi"]
categories = ["web-programming"]
publish = true
[features]
default = ["client"]
client = ["reqwest", "url"]
[dependencies]
regex = "1.5.4"
reqwest = { version = "0.11.4", features = ["blocking", "json"] }
reqwest = { version = "0.11.4", optional = true, features = ["blocking", "json"] }
serde = { version = "1.0.129", features = ["derive"] }
serde_json = "1.0.66"
url = "2.2.2"
url = { version = "2.2.2", optional = true }

View file

@ -1,7 +1,9 @@
mod builders;
#[cfg(client)]
mod client;
mod entities;
pub use builders::*;
#[cfg(client)]
pub use client::*;
pub use entities::*;