chore: add static feature as default
This commit is contained in:
parent
1088a53903
commit
7d4c549272
7 changed files with 10 additions and 11 deletions
|
@ -1,7 +1,7 @@
|
|||
# itconfig
|
||||
[![Build Status](https://travis-ci.org/icetemple/itconfig-rs.svg?branch=master)](https://travis-ci.org/icetemple/itconfig-rs)
|
||||
[![Documentation](https://docs.rs/itconfig/badge.svg)](https://docs.rs/itconfig)
|
||||
[![Crates.io](https://img.shields.io/badge/crates.io-v0.11.0-orange.svg?longCache=true)](https://crates.io/crates/itconfig)
|
||||
[![Crates.io](https://img.shields.io/badge/crates.io-v0.11.1-orange.svg?longCache=true)](https://crates.io/crates/itconfig)
|
||||
[![Join the chat at https://gitter.im/icetemple/itconfig-rs](https://badges.gitter.im/icetemple/itconfig-rs.svg)](https://gitter.im/icetemple/itconfig-rs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
Easy build a configs from environment variables and use it in globally.
|
||||
|
@ -119,7 +119,7 @@ cargo test
|
|||
|
||||
## Available features
|
||||
|
||||
* **default** - ["macro", "primitives"]
|
||||
* **default** - ["macro", "primitives", "static"]
|
||||
* **macro** - Activates `config!` macros for easy configure web application.
|
||||
* **static** - Add `static` option to `config!` macros (uses optional `lazy_static` package).
|
||||
* **array** - Add EnvString impl for vector type (uses optional `serde_json` package).
|
||||
|
|
|
@ -13,4 +13,4 @@ serde_json = "1.0"
|
|||
tokio = { version = "0.2", features = ["macros"] }
|
||||
bytes = "0.5"
|
||||
futures-util = { version = "0.3", default-features = false }
|
||||
pretty_env_logger = "0.3"
|
||||
pretty_env_logger = "0.3"
|
||||
|
|
|
@ -14,9 +14,8 @@ criterion = "0.3.1"
|
|||
lazy_static = "1.4.0"
|
||||
|
||||
[features]
|
||||
default = ["meta_namespace", "static"]
|
||||
default = ["meta_namespace"]
|
||||
meta_namespace = []
|
||||
static = ["itconfig/static"]
|
||||
|
||||
[[bench]]
|
||||
name = "main_benches"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "itconfig"
|
||||
version = "0.11.0"
|
||||
version = "0.11.1"
|
||||
authors = ["Dmitriy Pleshevskiy <dmitriy@ideascup.me>"]
|
||||
description = "Easy build a configs from environment variables and use it in globally."
|
||||
categories = ["config", "web-programming"]
|
||||
|
@ -20,7 +20,7 @@ lazy_static = { version = "1.4.0", optional = true }
|
|||
serde_json = { version = "1.0.44", optional = true }
|
||||
|
||||
[features]
|
||||
default = ["macro", "primitives"]
|
||||
default = ["macro", "primitives", "static"]
|
||||
|
||||
macro = []
|
||||
static = ["lazy_static"]
|
||||
|
|
|
@ -100,7 +100,7 @@ fn main() {
|
|||
|
||||
## Available features
|
||||
|
||||
* **default** - ["macro", "primitives"]
|
||||
* **default** - ["macro", "primitives", "static"]
|
||||
* **macro** - Activates `config!` macros for easy configure web application.
|
||||
* **static** - Add `static` option to `config!` macros (uses optional `lazy_static` package).
|
||||
* **array** - Add EnvString impl for vector type (uses optional `serde_json` package).
|
||||
|
|
|
@ -89,7 +89,7 @@
|
|||
//!
|
||||
//! ## Available features
|
||||
//!
|
||||
//! * **default** - ["macro", "primitives"]
|
||||
//! * **default** - ["macro", "primitives", "static"]
|
||||
//! * **macro** - Activates `config!` macros for easy configure web application.
|
||||
//! * **static** - Add `static` option to `config!` macros (uses optional `lazy_static` package).
|
||||
//! * **array** - Add EnvString impl for vector type (uses optional `serde_json` package).
|
||||
|
@ -130,7 +130,7 @@
|
|||
#[macro_use]
|
||||
extern crate failure;
|
||||
#[cfg(feature = "static")]
|
||||
extern crate lazy_static;
|
||||
pub extern crate lazy_static;
|
||||
|
||||
mod enverr;
|
||||
mod getenv;
|
||||
|
|
|
@ -665,7 +665,7 @@ macro_rules! __itconfig_impl_namespace {
|
|||
pub mod $mod_name {
|
||||
#![allow(non_snake_case)]
|
||||
#[cfg(feature = "static")]
|
||||
use lazy_static::lazy_static;
|
||||
use $crate::lazy_static::lazy_static;
|
||||
|
||||
$(__itconfig_impl_namespace! {
|
||||
variables = $ns_variable,
|
||||
|
|
Reference in a new issue