rustix/ffi.rs
1//! Utilities related to FFI bindings.
2//!
3//! This module re-exports a small set of types for backwards compatibility.
4//! New code should prefer importing these items directly from
5//! `core::ffi`, `alloc::ffi`, or `std::ffi` as appropriate.
6
7#[cfg(not(windows))]
8#[cfg(any(feature = "alloc", feature = "std"))]
9pub use alloc::ffi::{CString, NulError};
10
11pub use core::ffi::{
12 c_char, c_int, c_long, c_longlong, c_short, c_uint, c_ulong, c_ulonglong, c_ushort, c_void,
13};
14
15#[cfg(not(windows))]
16pub use core::ffi::{CStr, FromBytesWithNulError};