envcrypt 0.5.0

Encrypt environment variables at compile-time and decrypt them at runtime.
Documentation
1
2
3
4
fn main() {
    println!("cargo:rustc-env=SECRET_KEY=SOME_FAKE_SECRET_KEY_FOR_DOCTESTS");
    println!("cargo:rustc-env=CLIENT_SECRET=ANOTHER_SECRET_FOR_DOCTESTS");
}