crate-plugin-kit 0.3.2

Installs and loads cdylib plugins and builds their prebuilt assets.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
//! Injects the target triple at compile time, for
//! [`crate::KitConfig::effective_target`] to use.
//!
//! An environment variable rather than a `cfg!` check, because prebuilt asset names
//! need the full triple (`x86_64-pc-windows-msvc`) while `std::env::consts` only
//! gives `windows` / `x86_64`.

fn main() {
    let target = std::env::var("TARGET").unwrap_or_else(|_| "unknown".to_string());
    println!("cargo:rustc-env=CPK_TARGET={target}");
    println!("cargo:rerun-if-changed=build.rs");
}