xref: /third_party/rust/crates/rustix/src/ffi/mod.rs (revision b8a62b91)
1//! Utilities related to FFI bindings.
2
3// If we have std, use it.
4#[cfg(feature = "std")]
5pub use {
6    std::ffi::{CStr, CString, FromBytesWithNulError, NulError},
7    std::os::raw::c_char,
8};
9
10// If we don't have std, we can depend on core and alloc having these features
11// in new versions of Rust.
12#[cfg(not(feature = "std"))]
13pub use {
14    alloc::ffi::{CString, NulError},
15    core::ffi::{c_char, CStr, FromBytesWithNulError},
16};
17