2 releases

0.2.2 Jan 21, 2022
0.2.1 Dec 22, 2021
0.2.0 Dec 22, 2021
0.1.0 Dec 9, 2021

#834 in Configuration

MIT license

6KB
127 lines

CTC - Compile-Time-Config

Crates.io

load config files on compile time.

Usage

  • 1: add dependencies
[dependencies]
ctc = "0.2"
  • 2: import config files like this:
ctc::import_conf!("Cargo.toml", cargo);

fn main() {
    println!("package.name: {}", cargo::package::name);
    println!("package.version: {}", cargo::package::version);
    println!("package.edition: {}", cargo::package::edition);
}

See the example project.

Dependencies

~350–610KB
~13K SLoC