#thread-local-storage #c-strings #local-cache #string #constant

raw-cstr

Keep raw-cstrings in thread local storage for reuse

3 releases

0.1.4 Jan 17, 2024
0.1.3 Jan 17, 2024
0.1.2 Jan 17, 2024
0.1.1 Jan 5, 2024

#14 in #thread-local-storage

Download history 69/week @ 2026-01-22 153/week @ 2026-01-29 21/week @ 2026-02-05 200/week @ 2026-02-12 105/week @ 2026-02-19 202/week @ 2026-02-26 105/week @ 2026-03-05 91/week @ 2026-03-12 8/week @ 2026-03-19 218/week @ 2026-03-26 44/week @ 2026-04-02 71/week @ 2026-04-09 166/week @ 2026-04-16 92/week @ 2026-04-23 22/week @ 2026-05-07

335 downloads per month
Used in 2 crates

Apache-2.0

6KB
83 lines

Raw C String conversion and conversion trait

If you want constant C strings, use c"Hello, World" as recently stabilized instead


Raw CStr

Utilities for working with raw C strings from Rust. This primarily is intended to provide a constant-like C-string at runtime by using a thread local cache. Its usage is extremely niche, and is intended to be used by tsffs and other crates which compile to cdylibs which are loaded by non-rust programs.

Dependencies

~105KB