An OCaml interface to the user-space API of the Mach 3.0 kernel that underlies macOS. This library targets the API defined in usr/include/mach
under the specific MacOSX sdk. eg /Library/Developer/CommandLineTools/SDKs/MacOSX15.2.sdk/usr/include/
This library does not target the kernel-space API of Mach 3.0 kernel exposed in /System/Library/Frameworks/Kernel.framework/Versions/A/Headers/mach
eg /Library/Developer/CommandLineTools/SDKs/MacOSX15.2.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/mach
This library is Under Development and should be considered unstable.
My motivations for writing this are to:
- Implement equivalent functionality to ptrace on Linux for macOS e.g. Reading/writing memory or registers.
- Write utilities to get process virtual memory mappings
- Finally learning ctypes under pressure.
OCaml examples can be found in the examples directory of this repository. The C versions have been sourced from various locations and have attribution where possible.
The following table describes the current CI set-up:
Target | XCode | build | ctest | run |
---|---|---|---|---|
x86_64-apple-darwin |
15.2.* | ✓ | ✓ | ✓ |
aarch64-apple-darwin |
15.4.* | ✓ | ✓ | ✓ |