https://github.com/jahkeup/nachos
Nachos makes universal Mach-Os available elsewhere
https://github.com/jahkeup/nachos
executable go lipo macho macos universal-binary
Last synced: 8 months ago
JSON representation
Nachos makes universal Mach-Os available elsewhere
- Host: GitHub
- URL: https://github.com/jahkeup/nachos
- Owner: jahkeup
- License: lgpl-2.1
- Created: 2021-11-26T23:37:17.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-02-18T02:45:04.000Z (almost 4 years ago)
- Last Synced: 2025-04-04T15:45:03.667Z (8 months ago)
- Topics: executable, go, lipo, macho, macos, universal-binary
- Language: Go
- Homepage:
- Size: 23.4 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# nachos: a library to FAT-en Mach-O binaries
`nachos` is a library that provides a Mach-O FAT binary creation API.
The library creates a universal, or FAT, binary for a set of given Mach-O binaries, compiled for a number of platforms - currently `ppc`, `x86_64` (or `amd64`), and `arm64`.
## example
``` go
// Read Mach-O headers from files to be nachoed into a universal binary.
files := []fs.File{arm, amd}
exes := []nachos.Executable{}
for i := range files {
exe, err := nachos.NewFileExe(files[i])
if err != nil {
panic(err)
}
exes = append(exes, exe)
}
// Build a universal binary from the individual binaries.
res, err := nachos.NewUniversalBinary(exes...)
if err != nil { /* TODO */ }
// Write to an output file, the universal binary file itself.
io.Copy(out, res)
```