#str #c-str #const #compile-time #create #safely #const-c-str

macro const-c-str-impl

Implementation detail, see https://crates.io/crates/const-c-str

1 unstable release

0.1.0 Mar 5, 2019

#9 in #c-str


Used in const-c-str

MIT/Apache

3KB

Crates.io api

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!");

Dependencies

~2MB
~45K SLoC