• Stars
    star
    241
  • Rank 167,643 (Top 4 %)
  • Language
    Ruby
  • License
    MIT License
  • Created over 9 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

πŸ”© A pure-Ruby library for parsing Mach-O files.

ruby-macho

Gem Version Build Status Coverage Status

A Ruby library for examining and modifying Mach-O files.

What is a Mach-O file?

The Mach-O file format is used by macOS and iOS (among others) as a general purpose binary format for object files, executables, dynamic libraries, and so forth.

Installation

ruby-macho can be installed via RubyGems:

$ gem install ruby-macho

Documentation

Full documentation is available on RubyDoc.

A quick example of what ruby-macho can do:

require 'macho'

file = MachO::MachOFile.new("/path/to/my/binary")

# get the file's type (object, dynamic lib, executable, etc)
file.filetype # => :execute

# get all load commands in the file and print their offsets:
file.load_commands.each do |lc|
  puts "#{lc.type}: offset #{lc.offset}, size: #{lc.cmdsize}"
end

# access a specific load command
lc_vers = file[:LC_VERSION_MIN_MACOSX].first
puts lc_vers.version_string # => "10.10.0"

What works?

  • Reading data from x86/x86_64/PPC Mach-O files
  • Changing the IDs of Mach-O and Fat dylibs
  • Changing install names in Mach-O and Fat files
  • Adding, deleting, and modifying rpaths.

What needs to be done?

  • Unit and performance testing.

Contributing, setting up overcommit and the linters

In order to keep the repo, docs and data tidy, we use a tool called overcommit to connect up the git hooks to a set of quality checks. The fastest way to get setup is to run the following to make sure you have all the tools:

gem install overcommit bundler
bundle install
overcommit --install

Attribution

License

ruby-macho is licensed under the MIT License.

For the exact terms, see the license file.

More Repositories

1

brew

🍺 The missing package manager for macOS (or Linux)
Ruby
40,651
star
2

legacy-homebrew

πŸ’€ The former home of Homebrew/homebrew (deprecated)
26,993
star
3

homebrew-cask

🍻 A CLI workflow for the administration of macOS applications distributed as binaries
Ruby
20,766
star
4

homebrew-core

🍻 Default formulae for the missing package manager for macOS (or Linux)
Ruby
13,556
star
5

homebrew-bundle

πŸ“¦ Bundler for non-Ruby dependencies from Homebrew, Homebrew Cask and the Mac App Store.
Ruby
5,276
star
6

homebrew-cask-fonts

πŸ’€ Casks of οΌ¦πŸ…Ύπ“π“πš‚ (deprecated)
2,862
star
7

install

πŸ“₯ Homebrew (un)installer
Shell
2,142
star
8

homebrew-services

πŸš€ Manage background services using the daemon manager launchctl on macOS or systemctl on Linux.
Ruby
1,983
star
9

formulae.brew.sh

🏎 An online formulae browser for Homebrew
HTML
1,463
star
10

homebrew-cask-versions

πŸ’€ Alternate versions of Casks (deprecated)
1,182
star
11

linuxbrew-core

πŸ’€Formerly the core formulae for the Homebrew package manager on Linux
Ruby
1,160
star
12

homebrew-cask-drivers

πŸ’€ Casks of Drivers (deprecated)
459
star
13

homebrew-command-not-found

πŸ” Ubuntu’s command-not-found equivalent for Homebrew on macOS
Ruby
398
star
14

discussions

πŸ—£ Public open-ended discussions. Replacement for our Discourse.
375
star
15

homebrew-aliases

➑️ Aliases for Homebrew
Ruby
149
star
16

brew.sh

πŸ”– The Homebrew homepage
HTML
133
star
17

homebrew-portable-ruby

πŸš— Versions of Ruby that can be installed and run from anywhere on the filesystem.
Ruby
129
star
18

actions

πŸš€ Homebrew's GitHub Actions
JavaScript
118
star
19

homebrew-livecheck

πŸ’€ Homebrew/homebrew-livecheck (deprecated)
96
star
20

homebrew-test-bot

🎰 Tests the full lifecycle of a Homebrew change.
Ruby
75
star
21

formula-patches

πŸ₯ Patches for Homebrew formulae
C
65
star
22

gsoc

πŸ’€ Homebrew's Google Summer of Code (deprecated)
52
star
23

homebrew-linux-fonts

πŸ–‹ Formula of οΌ¦πŸ…Ύπ“π“πš‚ (fork of Caskroom-fonts)
Ruby
48
star
24

.github

πŸ‘©β€βš•οΈ Default community health files for the Homebrew organisation on GitHub.
33
star
25

rubydoc.brew.sh

πŸ“– An online Ruby documentation browser for Homebrew/brew
Ruby
26
star
26

homebrew-linux-dev

πŸ’€ Homebrew/homebrew-linux-dev (deprecated)
Ruby
20
star
27

homebrew-formula-analytics

πŸ”’ Query Homebrew's analytics from the command-line.
Ruby
13
star
28

brew-pip-audit

πŸ“‹ Bulk auditing Python dependencies in Homebrew with pip-audit
Ruby
11
star
29

homebrew-governance

πŸ’€Homebrew's governance (deprecated)
10
star
30

glibc-bootstrap

πŸ₯Ύ Bootstrap binaries for compiling glibc from source
Shell
9
star
31

orka_api_client

πŸ’Ž A Ruby gem for interfacing with MacStadium's Orka API
Ruby
5
star
32

ci-orchestrator

🎻 Manager of CI machine deployment and teardown (for internal Homebrew use)
Ruby
5
star