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 [DispatchQueue] don’t have to be re-vendored by every crate that
builds on top of CMSampleBuffer/CVPixelBuffer/etc.
§Modules
| Module | Framework | Feature flag |
|---|---|---|
cg | CoreGraphics value types | cg |
iosurface | IOSurface (zero-copy GPU buffers) | iosurface |
dispatch_queue | Grand Central Dispatch | dispatch |
utils | shared FFI helpers (always on) | — |
Future frameworks (CoreMedia, CoreVideo, Metal) will be added as separate
features so that downstream crates only pull in what they need.
§Architecture
Safe Rust API (CGRect, IOSurface, DispatchQueue, ...)
└── extern "C" FFI declarations (src/ffi/mod.rs)
└── Swift @_cdecl bridge (swift-bridge/Sources/...)
└── Apple Core* frameworksRe-exports§
pub use utils::FourCharCode;
Modules§
- cg
cg - Core Graphics types for screen coordinates and dimensions
- cm
cm CoreMediaprimitives —CMTime,CMSampleBuffer,CMBlockBuffer,CMFormatDescription, audio buffer list bridging.- cv
cv - Core Video types and wrappers.
- dispatch_
queue dispatch - Dispatch Queue wrapper for custom queue management
- ffi
- Raw FFI declarations for the Swift bridge.
- iosurface
iosurface IOSurface- Hardware-accelerated surface- prelude
- Common imports for users of this crate.
- utils
- Shared utilities used by other modules in this crate and by downstream crates that build on top of the apple-cf bridge.