Support for passing strings that contain nul accross the FFI boundary #94
Labels
c-core
Interoptopus Core Crate
enhancement
Make existing things better.
needs-discussion
Something rather fuzzy, input wanted.
In C all strings are terminated by a null byte (0x0), which means that strings using the idiomatic C representation cannot contain null.
However, many languages, including Python and C# support strings that store length as a separate value and can contain null. It would be nice if Interoptopus provided a canonical way to pass such strings accross the FFI boundary.
The only way to do this currently that I can figure out is to use a slice of bytes and convert manually whenever you cross the FFI boundary, which is incovenient and in for example Python requires copying the entire string for every conversion.
The text was updated successfully, but these errors were encountered: