{"id":58574,"library":"cstr","title":"CStr","description":"Macro for building static CStr references at compile time, ensuring null-terminated strings.","status":"active","version":"0.2.12","language":"rust","source_language":null,"source_url":"https://github.com/upsuper/cstr","tags":["ffi","cstr","macro","string"],"install":[{"cmd":"# Cargo.toml\n[dependencies]\ncstr = \"0.2.12\"","lang":"toml","label":"Cargo.toml"},{"cmd":"cargo add cstr","lang":"bash","label":"cargo add"}],"dependencies":[],"imports":[{"symbol":"cstr","correct":"use cstr::cstr;"}],"quickstart":{"code":"use cstr::cstr;\nuse std::ffi::CStr;\n\nfn main() {\n    let s: &'static CStr = cstr!(\"hello\");\n    println!(\"C string: {:?}\", s);\n}","lang":"rust","description":"Creates a static CStr reference from a string literal using the cstr! macro."},"warnings":[],"env_vars":null,"search_vec":"'build':4 'compil':9 'cstr':1,6,17 'ensur':11 'ffi':16 'macro':2,18 'null':13 'null-termin':12 'refer':7 'static':5 'string':15,19 'termin':14 'time':10","created_at":"2026-06-16T16:30:00.226737+00:00","updated_at":"2026-06-16T16:30:00.226737+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":"https://github.com/upsuper/cstr","github":"https://github.com/upsuper/cstr","docs":"https://docs.rs/cstr/","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-16","next_check":"2026-12-13","install_tag":null}}