Expand description
apple-cf — safe, dependency-free Rust bindings for Apple’s shared
Core* frameworks.
This crate is the foundation of the doom-fish macOS Rust suite. It exists
so framework-agnostic types like cg::CGRect, iosurface::IOSurface,
and dispatch_queue::DispatchQueue don’t have to be re-vendored by every crate that
builds on top of CMSampleBuffer/CVPixelBuffer/etc.
§Modules
| Module | Framework | Feature flag |
|---|---|---|
cf | Core Foundation value, collection, locale, formatter, and runtime wrappers | — |
raw | Exhaustive low-level CoreFoundation/CoreMedia/CoreVideo/IOSurface/Dispatch bindings | — |
cg | CoreGraphics value types + bitmap drawing wrappers | cg |
iosurface | IOSurface (zero-copy GPU buffers) | iosurface |
dispatch_queue | Grand Central Dispatch | dispatch |
cm | CoreMedia time / sample / buffer wrappers | cm |
cv | CoreVideo pixel-buffer wrappers | cv |
utils | shared FFI helpers (always on) | — |
§Architecture
Safe Rust API (CGRect, CGContext, IOSurface, DispatchQueue, ...)
├── exhaustive raw bindings (src/raw)
├── direct Apple framework FFI (src/cg/mod.rs)
└── Swift @_cdecl bridge FFI (src/ffi/mod.rs)
└── swift-bridge/Sources/...
└── Apple Core* frameworksModules§
- cf
- Core Foundation value, collection, and runtime wrappers. Safe Core Foundation wrappers.
- cg
cg - Core Graphics geometry and bitmap-drawing wrappers. Core Graphics types for screen coordinates, dimensions, and bitmap drawing.
- cm
cm - Core Media time, buffer, and format-description wrappers.
CoreMediaprimitives —CMTime,CMSampleBuffer,CMBlockBuffer,CMFormatDescription, audio buffer list bridging. - cv
cv - Core Video buffer and pixel-buffer wrappers. Core Video types and wrappers.
- dispatch_
queue dispatch - Grand Central Dispatch queue and synchronization wrappers. Dispatch Queue wrapper for custom queue management
- ffi
- Low-level FFI declarations used by the safe wrappers. Raw FFI declarations for the Swift bridge.
- iosurface
iosurface - IOSurface ownership and access wrappers.
IOSurface- Hardware-accelerated surface - prelude
- Common imports for users of this crate.
- raw
- Exhaustive low-level Apple SDK bindings.
Exhaustive low-level bindings for the Apple Core* /
IOSurface/ Dispatch surface. - utils
- Shared helper utilities and FFI shims.
Shared utilities used by other modules in this crate and by downstream
crates that build on top of the
apple-cfbridge.
Structs§
- CFError
- Generic Core Foundation / Core Graphics creation error.
- Four
Char Code FourCharCoderepresents a 4-character code (used in Core Video/Media)