rebos 3.5.2

NixOS-like repeatability for any Linux distro.
1
2
3
4
5
6
7
8
9
10
11
const ID_ENV_NAME: &str = "__REBOS_PROC_ID_THIS_ENV_VAR_SHOULD_NOT_BE_OVERWRITTEN__";

pub fn init_proc_id() {
    let proc_id = format!("{}_{}", nanoid::nanoid!(), nanoid::nanoid!());

    std::env::set_var(ID_ENV_NAME, proc_id);
}

pub fn get_proc_id() -> String {
    std::env::var(ID_ENV_NAME).unwrap()
}