| Crates.io | envl |
| lib.rs | envl |
| version | 0.11.3 |
| created_at | 2025-08-16 11:24:31.269033+00 |
| updated_at | 2026-01-02 21:47:29.954999+00 |
| description | load .envl and .envlconf |
| homepage | |
| repository | https://github.com/ROBOTofficial/envl |
| max_upload_size | |
| id | 1798328 |
| size | 43,097 |
This is an envl lib for Rust.
cargo add envl
For more details, please see here.
Install
cargo add envl
cargo add envl --build
.envlconf
settings {}
vars {
a: string,
b: int,
c: bool,
d: Array<int>,
e: struct {
v: struct {
a: string;
};
w: Array<struct {
a: string;
}>;
x: int;
y: bool;
z: Array<string>;
},
f: Array<Array<bool>>
}
.envl
a = "123";
b = 123;
c = true;
d = [123, 456];
e = struct {
v: struct {
a: "hello world"
},
w: [
struct {
a: "hi!"
}
],
x: 111,
y: false,
z: ["hello", "world"],
};
f = [
[true],
[false]
];
Cargo.toml
[package]
...
build = "build.rs"
build.rs
use envl::load_envl;
fn main() {
if let Err(err) = load_envl("src/envl.rs".to_string()) {
panic!("{:?}", err);
};
}
src/main.rs
pub mod envl;
pub fn main() {
let env = envl::envl();
println!("{}", env.a);
println!("{}", env.b);
println!("{}", env.c);
println!("{:?}", env.d);
}