{"id":63593,"library":"environmental","title":"Environmental","description":"Sets scope-limited values that can be accessed statically.","status":"active","version":"1.1.4","language":"rust","source_language":null,"source_url":null,"tags":["thread-local","scope","static","environment"],"install":[{"cmd":"# Cargo.toml\n[dependencies]\nenvironmental = \"1.1.4\"","lang":"toml","label":"Cargo.toml"},{"cmd":"cargo add environmental","lang":"bash","label":"cargo add"}],"dependencies":[],"imports":[{"symbol":"environmental","correct":"use environmental::environmental;"}],"quickstart":{"code":"use environmental::environmental;\n\nenvironmental!(THREAD_LOCAL: u32);\n\nfn main() {\n    THREAD_LOCAL::set(|| 42);\n    assert_eq!(THREAD_LOCAL::get(|&x| x), Some(42));\n}","lang":"rust","description":"Define and use a thread-local scope-limited value."},"warnings":[{"fix":"Use `std::sync::OnceLock` or `lazy_static` for global state.","message":"Values are thread-local; not accessible across threads.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"search_vec":"'access':10 'environ':17 'environment':1 'limit':5 'local':14 'scope':4,15 'scope-limit':3 'set':2 'static':11,16 'thread':13 'thread-loc':12 'valu':6","created_at":"2026-06-17T16:45:43.791289+00:00","updated_at":"2026-06-17T16:45:43.791289+00:00","problems":[],"ecosystem":"crates","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":null,"github":null,"docs":"https://docs.rs/environmental/","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["utility"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-12-14","install_tag":null}}