embed-licensing-core 0.3.1

Core implementation of embed-licensing
Documentation
// SPDX-FileCopyrightText: 2024 Simon Bruder <simon@sbruder.de>
//
// SPDX-License-Identifier: MPL-2.0

#[cfg(feature = "current_platform")]
use std::collections::HashMap;

#[cfg(feature = "current_platform")]
fn main() {
    let mut cfg = HashMap::new();
    for (k, v) in std::env::vars() {
        if let Some(opt) = k.strip_prefix("CARGO_CFG_") {
            cfg.insert(opt.to_lowercase().to_string(), v);
        }
    }

    println!(
        "cargo::rustc-env=CFG_OPTIONS_JSON={}",
        serde_json::to_string(&cfg).expect("could not serialize cfg options")
    );
}

#[cfg(not(feature = "current_platform"))]
fn main() {}