#C #string #macro


c_str macro to create C-compatible string literals

3 stable releases

1.0.2 Nov 21, 2017
1.0.1 Nov 19, 2017

#58 in FFI

Download history 16/week @ 2019-12-02 35/week @ 2019-12-09 11/week @ 2019-12-16 10/week @ 2019-12-23 6/week @ 2019-12-30 7/week @ 2020-01-06 52/week @ 2020-01-13 57/week @ 2020-01-20 12/week @ 2020-01-27 21/week @ 2020-02-03 18/week @ 2020-02-10 15/week @ 2020-02-17 38/week @ 2020-02-24 9/week @ 2020-03-02 16/week @ 2020-03-09 15/week @ 2020-03-16

70 downloads per month
Used in sm-ext



c_str! macro for Rust

This macro-only crate provides the c_str! macro to facilitate creation of C-compatible string values from Rust string literals.

Legacy code

This repository also contains source code for crate c_string, which is no longer maintained. It provided some utility types to facilitate working with C-compatible strings in Rust, but most of them were poorly designed or do not fit well with the evolution of the language. The topmost commit for that crate is available under branch c-string.


Licensed under either of

at your option.


Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

No runtime deps