On this page
rust/std/ffi
Prev: error_and_fmt | Up: std | Next: ownership_and_internals
Rel: rust/builtins, Ownership & Internals
Ref: Rust std โ ffi
Tags: #public #prog #rust #stdlib #ffi #index
Import
use std::ffi::{CStr, CString, c_void, c_int};
Overview
Safe C-string conversions and C ABI primitive types for zero-overhead FFI.
Specialized (#tier/specialized)
- `CString` โ NUL-terminated byte strings without interior NUL bytes for exchanging strings across the C ABI.
- `extern_C` โ Exports or imports functions using the platform C calling convention with
#[repr(C)]structs.
Linked from
Related notes
- tuts/rust/std Linked here; links to this page; shared tags: #index, #prog, #rust, #stdlib
- tuts/rust/std/error_and_fmt Linked here; links to this page; shared tags: #index, #prog, #rust, #stdlib
- tuts/rust/std/ffi/CString Linked here; links to this page; shared tags: #ffi, #prog, #rust, #stdlib
- tuts/rust/std/ffi/extern_C Linked here; links to this page; shared tags: #ffi, #prog, #rust, #stdlib
- tuts/rust/builtins Linked here; shared tags: #index, #prog, #rust
- tuts/rust/ownership_and_internals Linked here; shared tags: #index, #prog, #rust
- tuts/rust/ownership_and_internals/unsafe_rust_and_ffi_abi links to this page; shared tags: #ffi, #prog, #rust
- tuts/rust/std/error_and_fmt/format links to this page; shared tags: #prog, #rust, #stdlib
- tuts/rust/std/collections shared tags: #index, #prog, #rust, #stdlib
- tuts/rust/std/io_and_fs shared tags: #index, #prog, #rust, #stdlib