#env #apply #env-var #applier

bin+lib env_applier

Apply environment variables on an object

3 releases

0.1.2 May 3, 2020
0.1.1 Mar 22, 2020
0.1.0 Mar 22, 2020

#559 in Configuration

Download history 8/week @ 2023-12-28 6/week @ 2024-01-04 13/week @ 2024-01-11 4/week @ 2024-01-25 1/week @ 2024-02-01 32/week @ 2024-02-22 17/week @ 2024-02-29 4/week @ 2024-03-07 1/week @ 2024-03-14 3/week @ 2024-03-21 37/week @ 2024-03-28 58/week @ 2024-04-04

98 downloads per month
Used in chewdata

GPL-3.0 license

19KB
66 lines

env_applier

Actions Status

Apply environment variables on an object.

Getting Started

Quick Start

extern crate env_applier;

use env_applier::*;
use std::env::*;

fn main() -> () {
    let mut config = r#"{"test":"{{ HOME }}"}"#.to_string();
    config = Vars::apply(config);

    println!("My new config : {:?}", config);
}

Bench

time:   [233.55 us 233.94 us 234.35 us]
change: [-4.4260% -2.9642% -1.5991%] (p = 0.00 < 0.05)

Dependencies

~2.1–3MB
~53K SLoC