#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

#97 in FFI

Download history 341/week @ 2023-11-28 352/week @ 2023-12-05 239/week @ 2023-12-12 342/week @ 2023-12-19 146/week @ 2023-12-26 210/week @ 2024-01-02 403/week @ 2024-01-09 368/week @ 2024-01-16 422/week @ 2024-01-23 202/week @ 2024-01-30 516/week @ 2024-02-06 522/week @ 2024-02-13 545/week @ 2024-02-20 408/week @ 2024-02-27 386/week @ 2024-03-05 456/week @ 2024-03-12

1,876 downloads per month
Used in 22 crates (16 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