Registry / utility / cstr
library0.2.12rscratesunverified

Macro for building static CStr references at compile time, ensuring null-terminated strings.

# Cargo.toml [dependencies] cstr = "0.2.12"
INSTALL
IMPORT
SIG · CSTR
C
cstr
utilityrustv0.2.12
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

cstr
✓ use cstr::cstr;

Creates a static CStr reference from a string literal using the cstr! macro.

use cstr::cstr; use std::ffi::CStr; fn main() { let s: &'static CStr = cstr!("hello"); println!("C string: {:?}", s); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.2.12latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
cstr — cargo add cstr · libregistry