const-c-str Safely create &CStr at compile time checked with from_bytes_with_nul Examples use const_c_str::c_str; #[cfg(feature = "const_cstr_unchecked")] const greeting: &std::ffi::CStr = c_str!("Hello World!");