mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-12-29 09:16:33 +00:00
d072acda48
Currently FFI integer types are defined in libcore. This commit creates the `ffi` crate and asks bindgen to use that crate for FFI integer types instead of `core::ffi`. This commit is preparatory and no type changes are made in this commit yet. Signed-off-by: Gary Guo <gary@garyguo.net> Link: https://lore.kernel.org/r/20240913213041.395655-4-gary@garyguo.net [ Added `rustdoc`, `rusttest` and KUnit tests support. Rebased on top of `rust-next` (e.g. migrated more `core::ffi` cases). Reworded crate docs slightly and formatted. - Miguel ] Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
14 lines
421 B
Rust
14 lines
421 B
Rust
// SPDX-License-Identifier: GPL-2.0
|
|
|
|
//! Foreign function interface (FFI) types.
|
|
//!
|
|
//! This crate provides mapping from C primitive types to Rust ones.
|
|
//!
|
|
//! The Rust [`core`] crate provides [`core::ffi`], which maps integer types to the platform default
|
|
//! C ABI. The kernel does not use [`core::ffi`], so it can customise the mapping that deviates from
|
|
//! the platform default.
|
|
|
|
#![no_std]
|
|
|
|
pub use core::ffi::*;
|