cstr
cstr copied to clipboard
Supporting no_std
trafficstars
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.
Would you consider making this crate no_std? AIU all it'd need to do is to
- lib.rs needs a
#![cfg_attr(not(proc_macro), no_std)] - guard content in lib.rs with
#[cfg(proc_macro)]. Given that it's almost every line that needs guarding, this might best be done by moving code from src/lib.rs into a module. - change the quoted
::std::ffi::CStrto `::core::ffi::CStr``.
I can offer a PR, but it's probably all more a matter of chosen style and how to handle the MSRV increase than of the actual change.
This crate doesn't have a MSRV policy, and I would simply be tracing the latest stable version. I think the code of this crate should be stable enough that anyone needs to support an old version can just pin to an old version of this crate without having much problem.
That is to say, PR welcome :)