mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	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>
		
			
				
	
	
		
			13 lines
		
	
	
	
		
			421 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			13 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::*;
 |