#string-literal #string #macro #c

c_str_macro

c_str macro to create C-compatible string literals

4 stable releases

1.0.3 Apr 4, 2021
1.0.2 Nov 21, 2017
1.0.1 Nov 19, 2017

#102 in FFI

Download history 429/week @ 2024-03-13 363/week @ 2024-03-20 506/week @ 2024-03-27 444/week @ 2024-04-03 262/week @ 2024-04-10 275/week @ 2024-04-17 589/week @ 2024-04-24 279/week @ 2024-05-01 362/week @ 2024-05-08 481/week @ 2024-05-15 287/week @ 2024-05-22 240/week @ 2024-05-29 311/week @ 2024-06-05 531/week @ 2024-06-12 396/week @ 2024-06-19 743/week @ 2024-06-26

2,008 downloads per month
Used in 21 crates (15 directly)

Apache-2.0/MIT

8KB

c_str! macro for Rust

Maintenance Status

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.

License

Licensed under either of

at your option.

Contribution

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