Live data from Hacker News

Show HN: macOS-cross-compiler – Compile binaries for macOS on Linux

github.com

11–20 of 76 posts

Re: Show HN: macOS-cross-compiler – Compile binaries for macOS on Linux

#12
post #4
post #3

What is happening with that first picture?? Is that an extra penguin arm coming out of the apple?

The penguin is holding the apple, unfortunately rather than commissioning an actual artist they've seemingly gone for AI art, so the penguin also has three arms. The left foot with the third arm there is also a bit... weird and deformed.

These are volunteers providing hundreds (at a guess) of hours of unpaid labor to a project they're giving away for free. You also expect them to pay an artist out of their own pockets?

Maybe an artist (for example, you) could donate his or her time and provide them with a better logo for free.

Re: Show HN: macOS-cross-compiler – Compile binaries for macOS on Linux

#13
post #9

Does this not need any xcode/macos license?

Why would it? You can cross compile for macos with the go toolchain on Linux too and that doesn't even require an additional compiler. Just GOOS=darwin GOARCH=arm64 and then the regular command. Apple can't regulate everything

Re: Show HN: macOS-cross-compiler – Compile binaries for macOS on Linux

#15

Speaking of cross compilers - I was able to use the zig toolchain in order to cross compile for macos apple silicon, arm Linux, windows x64, windows arm and x86_64 Linux musl (statically linked). It's super handy and works as a drop in.

Interestingly you can use zig within your Rust build to more easily cross-compile: https://github.com/rust-cross/cargo-zigbuild

I’m curious what the blockers are for rustc to cross-compile like zig does natively.

Re: Show HN: macOS-cross-compiler – Compile binaries for macOS on Linux

#17
post #14

The problem with this is licensing: the macOS SDK license says that it's only to be used on an "Apple-branded computer". That said I wonder what Apple would do if this is used outside of that case...

Apple ships extra stickers with their logo in the box with a lot of their products, maybe slap one on your computer and see how far it gets you in court?

Re: Show HN: macOS-cross-compiler – Compile binaries for macOS on Linux

#18
post #16

> Code signing (but not notarizing) should be possible with this project, but it is untested Code signing is required for aarch64 macs unless they have SIP disabled, so this is kind of important.

This vastly depends on how you intend to distribute your binaries.

I get away with distributing internal tools to my team completely ad-hoc signed, as long as I download them with cURL or SFTP. Downloading with a browser taints them, of course, and gatekeeper will prevent you from running them.

Re: Show HN: macOS-cross-compiler – Compile binaries for macOS on Linux

#19
post #14

The problem with this is licensing: the macOS SDK license says that it's only to be used on an "Apple-branded computer". That said I wonder what Apple would do if this is used outside of that case...

Apple ships extra stickers with their logo in the box with a lot of their products, maybe slap one on your computer and see how far it gets you in court?

Which is why they changed the wording from "Apple-labeled" to "Apple-branded" around the time of Snow Leopard IIRC.

Re: Show HN: macOS-cross-compiler – Compile binaries for macOS on Linux

#20

Speaking of cross compilers - I was able to use the zig toolchain in order to cross compile for macos apple silicon, arm Linux, windows x64, windows arm and x86_64 Linux musl (statically linked). It's super handy and works as a drop in.

Interestingly you can use zig within your Rust build to more easily cross-compile: https://github.com/rust-cross/cargo-zigbuild I’m curious what the blockers are for rustc to cross-compile like zig does natively.

Just add another arch with rustup. Am I missing something?
Post reply on HN