Skip to content

feat(mach): parse minimum macOS version from load commands (fixes #514)#536

Closed
wyf027 wants to merge 2 commits into
m4b:masterfrom
wyf027:feat/mach-macos-version-514
Closed

feat(mach): parse minimum macOS version from load commands (fixes #514)#536
wyf027 wants to merge 2 commits into
m4b:masterfrom
wyf027:feat/mach-macos-version-514

Conversation

@wyf027

@wyf027 wyf027 commented May 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add MacOSVersion with from_packed() for Mach-O xxxx.yy.zz version encoding.
  • Add VersionMinCommand::macos_min_version() and BuildVersionCommand::macos_min_version().
  • Add MachO::min_macos_version() scanning LC_VERSION_MIN_MACOSX and macOS LC_BUILD_VERSION, returning the highest minimum version found.

Fixes #514.

Test plan

  • cargo test macos_version
  • cargo test --lib

wyf027 and others added 2 commits May 25, 2026 15:43
Add MacOSVersion with packed-version parsing, helpers on
LC_VERSION_MIN_MACOSX / LC_BUILD_VERSION, and MachO::min_macos_version()
(fixes #514).

Co-authored-by: Cursor <[email protected]>
@wyf027

wyf027 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

Resolved the rustfmt CI failure in commit 3a17801 by applying the formatter to src/mach/mod.rs. Local verification: cargo fmt -- --check.

@wyf027 wyf027 closed this by deleting the head repository Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mach-O: Parse macOS version

1 participant