#string-literal #string #c-strings #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

#87 in FFI

Download history 605/week @ 2024-07-22 974/week @ 2024-07-29 1053/week @ 2024-08-05 1264/week @ 2024-08-12 1219/week @ 2024-08-19 1067/week @ 2024-08-26 1509/week @ 2024-09-02 1370/week @ 2024-09-09 1424/week @ 2024-09-16 1590/week @ 2024-09-23 1866/week @ 2024-09-30 1102/week @ 2024-10-07 699/week @ 2024-10-14 732/week @ 2024-10-21 487/week @ 2024-10-28 625/week @ 2024-11-04

2,565 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