https://github.com/konoui/lipo
This lipo is designed to be compatible with macOS lipo, written in golang.
https://github.com/konoui/lipo
fat-binaries fat-binary golang lipo macos universal-binary
Last synced: 19 days ago
JSON representation
This lipo is designed to be compatible with macOS lipo, written in golang.
- Host: GitHub
- URL: https://github.com/konoui/lipo
- Owner: konoui
- License: mit
- Created: 2022-04-05T13:56:22.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-01-21T12:36:44.000Z (3 months ago)
- Last Synced: 2025-04-09T21:18:18.296Z (19 days ago)
- Topics: fat-binaries, fat-binary, golang, lipo, macos, universal-binary
- Language: Go
- Homepage:
- Size: 227 KB
- Stars: 74
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## LIPO
This `lipo` is designed to be compatible with macOS `lipo`, which is a utility for creating Universal Binary as known as Fat Binary.
This can be useful in the following scenarios:
- When using a CI/CD platform (such as GitLab) that does not provide access to macOS or [macOS `lipo`](https://ss64.com/osx/lipo.html).
- When using GitHub Actions and looking for a [cost-effective](https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions) solution that doesn't involve using macOS.### Distro Packages
[](https://repology.org/project/lipo-go/versions)
#### Nix
You can try lipo from the nixpkgs by:
```sh
nix-shell --packages lipo-go
```### INSTALL
#### Download [a latest release from GitHub](https://github.com/konoui/lipo/releases/latest)
For example for Linux on amd64,
```
$ curl -L -o /tmp/lipo https://github.com/konoui/lipo/releases/latest/download/lipo_Linux_amd64
$ chmod +x /tmp/lipo
$ sudo mv /tmp/lipo /usr/local/bin
```#### Install with `go install`
```
$ go install github.com/konoui/lipo@latest
```### USAGE
```
$ lipo -output -create
```For example,
```
$ CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o amd64 example/main.go
$ CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -o arm64 example/main.go
$ lipo -output hello-world -create arm64 amd64
``````
$ ./hello-world
Hello World$ file hello-world
hello-world: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64]
hello-world (for architecture x86_64): Mach-O 64-bit executable x86_64
hello-world (for architecture arm64): Mach-O 64-bit executable arm64
```### Supported Options
`-archs`, `-create`, `-extract`, `-extract_family`, `-output`, `-remove`, `-replace`, `-segalign`, `-thin`, `-verify_arch`, `-arch`, `-info`, `-detailed_info`, `-hideARM64`, `-fat64`
Please run the `-help` command for more details.
```
$ lipo -help
```