Thanks to visit codestin.com
Credit goes to lib.rs

#string #c-abi #ffi

no-std xstring

An immutable owned string that could be cheaply cloned and passed through FFI

2 releases

Uses new Rust 2024

0.1.1 Jun 11, 2025
0.1.0 May 12, 2025

#2762 in Rust patterns

Codestin Search App Codestin Search App Codestin Search App Codestin Search App

85 downloads per month

MIT/Apache

22KB
636 lines

XString

XString is an immutable owned string (and also bytes), sized 2 pointers, that may conditionally hold the data inlined, statically, or within ref counted heap allocated memory, which makes it cheap to clone and pass around.

It has a certain memory representation and could be easily passed through FFI boundaries.

Crates.io Docs.rs MIT Or Apache-2.0 licensed Build Status

Dependencies

~165–485KB
~10K SLoC