Registry / utility / c-str-macro

c-str-macro

JSON →
library1.0.3rscratesunverified

Provides a `c_str!` macro to create null-terminated C-compatible string literals at compile time.

# Cargo.toml [dependencies] c_str_macro = "1.0.3"
INSTALL
IMPORT
SIG · C-STR-MACRO
C
c-str-macro
utilityrustv1.0.3
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.

c_str
use c_str_macro::c_str;

Creates a C string literal from a Rust string literal.

use c_str_macro::c_str; use std::ffi::CStr; let s: &CStr = c_str!("hello"); println!("{:?}", s);
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.0.3latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
Amazon
1
Resources
c-str-macro — cargo add c-str-macro · libregistry