libschnauzer
Schnauzer is both library and tool for parsing mach-o files
Features
- Zero copy. Does not loads whole binary into memory. Uses iterators to list potentially large amount of items
- Endian aware
- Implements derive macro for automatic field enumeration, that, for example, very convenient for printing arbitary load commands. There even no need to write large
matchblocks for any type of load command - Prints file structure in color for better user experience
Installation
cargo install schnauzer
Example output
Put something like in your console:
schnauzer /bin/cat
And you get:

Some info may be too big to be printed with other info that may be inconvenient. So there separate subcommand to print all nlists:
schnauzer syms /bin/cat

Documentation
docs.rs/schnauzer/0.1.9
Usage
[]
= "0.1.9"
Examples
Simple debug print
use ObjectType;
use Parser;
use Path;
Using AutoEnumFields derive (code taken from src/main.rs)
let h = macho.header;
for field in h.all_fields