{"id":13648466,"url":"https://github.com/Homebrew/ruby-macho","last_synced_at":"2025-04-22T11:32:37.204Z","repository":{"id":35041109,"uuid":"39162633","full_name":"Homebrew/ruby-macho","owner":"Homebrew","description":"🔩 A pure-Ruby library for parsing Mach-O files.","archived":false,"fork":false,"pushed_at":"2025-04-14T14:05:59.000Z","size":1988,"stargazers_count":249,"open_issues_count":6,"forks_count":36,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-04-18T13:34:23.340Z","etag":null,"topics":["apple","homebrew","mach","macos","ruby","ruby-gem","ruby-library"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/ruby-macho","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Homebrew.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"Homebrew","open_collective":"homebrew","patreon":"homebrew"}},"created_at":"2015-07-15T21:40:05.000Z","updated_at":"2025-04-14T17:47:53.000Z","dependencies_parsed_at":"2024-02-16T16:29:00.191Z","dependency_job_id":"9b9bf9a4-d60d-4bc6-bfe2-603a5bf0aa7b","html_url":"https://github.com/Homebrew/ruby-macho","commit_stats":{"total_commits":960,"total_committers":20,"mean_commits":48.0,"dds":0.6572916666666666,"last_synced_commit":"629d3e753832153f9c6791849d902eddb7e7baca"},"previous_names":[],"tags_count":44,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Homebrew%2Fruby-macho","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Homebrew%2Fruby-macho/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Homebrew%2Fruby-macho/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Homebrew%2Fruby-macho/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Homebrew","download_url":"https://codeload.github.com/Homebrew/ruby-macho/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249590400,"owners_count":21296179,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apple","homebrew","mach","macos","ruby","ruby-gem","ruby-library"],"created_at":"2024-08-02T01:04:16.885Z","updated_at":"2025-04-22T11:32:37.136Z","avatar_url":"https://github.com/Homebrew.png","language":"Ruby","funding_links":["https://github.com/sponsors/Homebrew","https://opencollective.com/homebrew","https://patreon.com/homebrew"],"categories":["Ruby"],"sub_categories":[],"readme":"ruby-macho\n================\n\n[![Gem Version](https://badge.fury.io/rb/ruby-macho.svg)](http://badge.fury.io/rb/ruby-macho)\n[![CI](https://github.com/Homebrew/ruby-macho/actions/workflows/tests.yml/badge.svg)](https://github.com/Homebrew/ruby-macho/actions/workflows/tests.yml)\n[![Coverage Status](https://codecov.io/gh/Homebrew/ruby-macho/branch/master/graph/badge.svg)](https://codecov.io/gh/Homebrew/ruby-macho)\n\nA Ruby library for examining and modifying Mach-O files.\n\n### What is a Mach-O file?\n\nThe [Mach-O file format](https://en.wikipedia.org/wiki/Mach-O) is used by macOS\nand iOS (among others) as a general purpose binary format for object files,\nexecutables, dynamic libraries, and so forth.\n\n### Installation\n\nruby-macho can be installed via RubyGems:\n\n```bash\n$ gem install ruby-macho\n```\n\n### Documentation\n\nFull documentation is available on [RubyDoc](http://www.rubydoc.info/gems/ruby-macho/).\n\nA quick example of what ruby-macho can do:\n\n```ruby\nrequire 'macho'\n\nfile = MachO::MachOFile.new(\"/path/to/my/binary\")\n\n# get the file's type (object, dynamic lib, executable, etc)\nfile.filetype # =\u003e :execute\n\n# get all load commands in the file and print their offsets:\nfile.load_commands.each do |lc|\n  puts \"#{lc.type}: offset #{lc.offset}, size: #{lc.cmdsize}\"\nend\n\n# access a specific load command\nlc_vers = file[:LC_VERSION_MIN_MACOSX].first\nputs lc_vers.version_string # =\u003e \"10.10.0\"\n```\n\n### What works?\n\n* Reading data from x86/x86_64/PPC Mach-O files\n* Changing the IDs of Mach-O and Fat dylibs\n* Changing install names in Mach-O and Fat files\n* Adding, deleting, and modifying rpaths.\n\n### What needs to be done?\n\n* Unit and performance testing.\n\n### Contributing, setting up `overcommit` and the linters\n\nIn order to keep the repo, docs and data tidy, we use a tool called [`overcommit`](https://github.com/sds/overcommit)\nto connect up the git hooks to a set of quality checks.  The fastest way to get setup is to run the following to make\nsure you have all the tools:\n\n```shell\ngem install overcommit bundler\nbundle install\novercommit --install\n```\n\n### Attribution\n\n* Constants were taken from Apple, Inc's\n[`loader.h` in `cctools/include/mach-o`](https://opensource.apple.com/source/cctools/cctools-973.0.1/include/mach-o/loader.h.auto.html).\n(Apple Public Source License 2.0).\n* Binary files used for testing were taken from The LLVM Project. ([Apache License v2.0 with LLVM Exceptions](test/bin/llvm/LICENSE.txt)).\n\n### License\n\n`ruby-macho` is licensed under the MIT License.\n\nFor the exact terms, see the [license](LICENSE) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHomebrew%2Fruby-macho","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FHomebrew%2Fruby-macho","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHomebrew%2Fruby-macho/lists"}