| 1 | //! Utilities related to FFI bindings. |
| 2 | |
| 3 | // If we have std, use it. |
| 4 | #[cfg(not(windows))] |
| 5 | #[cfg(feature = "std")] |
| 6 | pub use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::ffirust-analyzer cargo std https://github.com/rust-lang/rust/library/std ffi/::{CStrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/c_str/CStr#, CStringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc ffi/c_str/CString#, FromBytesWithNulErrorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/c_str/FromBytesWithNulError#, NulErrorrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc ffi/c_str/NulError#}; |
| 7 | #[cfg(feature = "std")] |
| 8 | pub use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::osrust-analyzer cargo std https://github.com/rust-lang/rust/library/std os/::rawrust-analyzer cargo std https://github.com/rust-lang/rust/library/std os/raw/::{ |
| 9 | c_charrust-analyzer cargo std https://github.com/rust-lang/rust/library/std os/raw/c_char#, c_intrust-analyzer cargo std https://github.com/rust-lang/rust/library/std os/raw/c_int#, c_longrust-analyzer cargo std https://github.com/rust-lang/rust/library/std os/raw/c_long#, c_longlongrust-analyzer cargo std https://github.com/rust-lang/rust/library/std os/raw/c_longlong#, c_shortrust-analyzer cargo std https://github.com/rust-lang/rust/library/std os/raw/c_short#, c_uintrust-analyzer cargo std https://github.com/rust-lang/rust/library/std os/raw/c_uint#, c_ulongrust-analyzer cargo std https://github.com/rust-lang/rust/library/std os/raw/c_ulong#, c_ulonglongrust-analyzer cargo std https://github.com/rust-lang/rust/library/std os/raw/c_ulonglong#, c_ushortrust-analyzer cargo std https://github.com/rust-lang/rust/library/std os/raw/c_ushort#, c_voidrust-analyzer cargo std https://github.com/rust-lang/rust/library/std os/raw/c_void#, |
| 10 | }; |
| 11 | |
| 12 | // If we don't have std, we can depend on core and alloc having these features |
| 13 | // in Rust 1.64+. |
| 14 | #[cfg(not(windows))] |
| 15 | #[cfg(all(feature = "alloc", not(feature = "std")))] |
| 16 | pub use allocrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc crate/::ffirust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc ffi/::{CStringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc ffi/c_str/CString#, NulErrorrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc ffi/c_str/NulError#}; |
| 17 | #[cfg(not(feature = "std"))] |
| 18 | pub use corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::ffirust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/::{ |
| 19 | c_charrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_char#, c_intrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_int#, c_longrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_long#, c_longlongrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_longlong#, c_shortrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_short#, c_uintrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_uint#, c_ulongrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_ulong#, c_ulonglongrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_ulonglong#, c_ushortrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/primitives/c_ushort#, c_voidrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/c_void#, |
| 20 | }; |
| 21 | #[cfg(not(windows))] |
| 22 | #[cfg(not(feature = "std"))] |
| 23 | pub use corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::ffirust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/::{CStrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/c_str/CStr#, FromBytesWithNulErrorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ffi/c_str/FromBytesWithNulError#}; |