apfelkern
Why make this? Well, have you tried reading the official Apple documentation? To give you an example, try to figure out what mach_vm_map does.
If we look at the header files (no it's not in /usr/include) it turns out that they contain a lot of useful information that their documentation generation system ignores.
If you want me to add more components (Frameworks, XNU kernel parts), feel free to message me.
Recently added & changed
| new | Objective-C runtime | 9 pages |
| changed | Task restartable ranges | Task & thread coordination |
Guides
Frameworks
Mach
Tasks & threads
Ports & messages
Virtual memory
Host & processors
Exceptions
Vouchers & misc
Architecture
BSD / POSIX
Types & conventions
Threads & scheduling
Memory & IPC
Strings & text
Atomics, byte order & libkern
Data structures
Events & kqueue
Files & directories
Processes & signals
Networking
Time
Terminals
Audit (BSM)
Tracing & debugging
Misc
Kernel (KEXT)
TODO: extract C++ classes
kern/ primitives
Mach (kernel)
BSD (kernel)
Networking KPIs
libkern & os
IOKit
VM & pexpert
Architecture
Mach-O
File format
Runtime & dyld
Architecture
XPC
Objective-C runtime
Types & selectors
Classes, methods & metadata
Message dispatch
Synchronization & exceptions
Legacy utilities
Hypervisor
Dispatch
os/
EndpointSecurity
CommonCrypto
Neon (Arm SIMD)
Headers
Intrinsics
About & caveats
apfelkern hosts C API documentation generated from the macOS SDK headers installed on my own machine. It is not affiliated with, endorsed by, or reviewed by Apple.
Build environment:
| macOS | 26.4.1 |
| SDK | 26.4 (MacOSX.sdk, Command Line Tools) |
| architecture | arm64; Intel-only headers and preprocessor branches are excluded |
| configuration | userspace corpora: default userspace preprocessor context; Kernel (KEXT) corpus: -DKERNEL |
| compiler | Apple clang version 21.0.0 (clang-2100.0.123.102) |
| Neon headers | the compiler’s own arm_neon.h and the headers it includes (/Library/Developer/CommandLineTools/usr/lib/clang/21/include), parsed with the toolchain’s libclang |
| xnu source used for verification | apple-oss-distributions/xnu @ f6217f8 (2025-10-16) |
| generated | 2026-09-25 |
Unless specified otherwise, descriptions are extracted from macOS header comments, MIG .defs files and SDK man pages.
CMU/MIT Mach reference: Where applicable, description and notes from the Carnegie Mellon Mach kernel (CMU Mach) interface manual pages (fetched from <web.mit.edu/darwin/src/modules>) are supplied. This data is licensed under the free-use license (© Carnegie Mellon University) and may not apply to XNU.
GNU Mach reference: Where applicable, description and notes from the GNU Mach Reference Manual (fetched from http://gnu.org/software/hurd/gnumach-doc/) are supplied. This data is licensed under the GNU Free Documentation License 1.2+ (© Free Software Foundation) and may not apply to XNU.
LLVM project source: Selected LLDB debugserver source files (https://github.com/llvm/llvm-project), and the Neon declarations, which come from the compiler's own arm_neon.h (Apple clang's copy of the LLVM header, not part of the macOS SDK). Licensed under the Apache License v2.0 with LLVM Exceptions.
Apple open-source implementation sources: Selected XNU, Mach Interface Generator, and libpthread files from Apple OSS Distributions are hosted as implementation references. A pinned objc4 revision from the same source is cited for the Objective-C runtime example; the Objective-C corpus itself uses installed SDK headers. The Apple portions carry Apple Public Source License 2.0 notices. Individual files may carry additional copyright, license, and permission notices; consult the notices retained in each hosted source file or linked source repository. These source revisions may differ from the installed macOS components.
Generated descriptions: Functions with no documentation in any of these sources have an LLM-generated description shown below them showing the XNU source files consulted. These descriptions are unreviewed and may contain errors.