Expand description
FFI safety utilities
Provides safe wrappers for unsafe FFI operations including:
- Pointer validation
- Tracked allocations with safe deallocation
- SAFETY documentation patterns
Structs§
- Tracked
Allocation - A tracked allocation that stores its layout for safe deallocation.
Constants§
- MAX_
FFI_ BUFFER_ SIZE - Maximum buffer size for FFI operations (256 MB)
Functions§
- slice_
from_ ⚠ptr - Safely creates a slice from a raw pointer after validation.
- slice_
from_ ⚠ptr_ mut - Safely creates a mutable slice from a raw pointer after validation.
- validate_
ptr - Validates a raw pointer before use in unsafe code.
- validate_
ptr_ mut - Validates a mutable raw pointer before use.
Type Aliases§
- FfiError
- Error type for FFI operations