Description
core::ffi::CStr and alloc::ffi::CString have been stabilized for Rust 1.64, which is due to become stable in 9 weeks from now.
Once that has landed, what remains for this crate to do?
- It provides some operations in a nightly-const fashion. (Some of that wouldn't even need nightly any more, eg.
from_bytes_with_nul_unchecked
; still, the corresponding core function does not spring to life as const). - It still provides dedicated types for libraries that have public cstr somewhere -- these can't just change their types to the new core ones without breaking API.
Do you intend to keep maintaining the crate as a staging ground for constification of the core library, or other experimentation? Is there any user base that can not go to 1.64 speedily, or that can not do the API change toward core library? (A quick survey of the most popular dependents of cstr_core shows they're all in pre-1.0 stage, and I didn't check which of them use CStr types publicly) Or will this library just be deprecated and development ceased?
If it is kept maintained as a staging ground, it may make sense to provide From and Into for the core types (they should be trivial as they can be unchecked); then APIs can pivot to core's interfaces, and whoever needs const methods can still into them and use cstr_core privately.
From the perspective of using it from riot-wrappers, I'm still checking whether there is any constness that I'm missing from the core library, push for constification if needed (pointing to this project to illustrate it works), and plan to make the API break as soon as 1.64 is available.