Earlier quoted context omitted.
Which is why they changed the wording from "Apple-labeled" to "Apple-branded" around the time of Snow Leopard IIRC.
How much could a branding iron cost?
Show HN: macOS-cross-compiler – Compile binaries for macOS on Linux
61–70 of 76 posts
Re: Show HN: macOS-cross-compiler – Compile binaries for macOS on Linux
#62Speaking 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.
Zig ships all the bits you need for a C/C++ toolchain including things like the C library in some cases (IIUC).
Rust could use libclang to make a "rustc cc" just like zig's. But I get the sense that it is probably not a goal of the project to have this functionality.
Re: Show HN: macOS-cross-compiler – Compile binaries for macOS on Linux
#63If you want to codesign and notarize your binary from linux, you can also use rcodesign[0]! I've been using it in production for about a year, and it's been working great so far. [0]: https://gregoryszorc.com/docs/apple-codesign/stable/
Re: Show HN: macOS-cross-compiler – Compile binaries for macOS on Linux
#64Earlier quoted context omitted.
I'm commenting to add a critical mass around Zig. If you are prisoner of CMake, autoconf, templates, makefiles, etc.. please try the Zig toolchain for your c/c++ projects. It is worth every second of investment
I’m intrigued. Do you have a starting point? And how does it handle if I need to integrate with another language as well, like Swift?
https://github.com/floooh/sokol-tools/blob/master/build.zig
Here is a tutorial: https://www.zvm.app/tutorials/zig-build-cpp.html
Re: Show HN: macOS-cross-compiler – Compile binaries for macOS on Linux
#65If you want to codesign and notarize your binary from linux, you can also use rcodesign[0]! I've been using it in production for about a year, and it's been working great so far. [0]: https://gregoryszorc.com/docs/apple-codesign/stable/
Re: Show HN: macOS-cross-compiler – Compile binaries for macOS on Linux
#66Earlier quoted context omitted.
I'm commenting to add a critical mass around Zig. If you are prisoner of CMake, autoconf, templates, makefiles, etc.. please try the Zig toolchain for your c/c++ projects. It is worth every second of investment
Zig build is somewhat poorly documented currently, which can lead to some annoyance (also some other annoyances with dependency hashes), but in my experimentation: Dependencies in build.zig.zon are downloaded in to ~/.cache/zig/p/ (incidentally, this means you need to mangle the hash if you are copying and pasting the hash for a dependency, at least currently. Dependency hashes are a sore spot tbh, and needs to be be…
.dependencies = .{
.zstd = .{
.url = "git+https://github.com/facebook/zstd.git#v1.5.5",
.hash = "1220185ad79a437fd9f148d1422ff756287534c79a0712105039b4034031480e41a9",
},
},
You then refer to that with dep = b.dependency(...) and can get paths to the unpacked source with dep.path(...)Re: Show HN: macOS-cross-compiler – Compile binaries for macOS on Linux
#67Speaking 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
#68Re: Show HN: macOS-cross-compiler – Compile binaries for macOS on Linux
#69The 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...
I used a Hackintosh for a number of years and Apple could have easily shut down the entire community with enough cease and desists. In fact there were engineers that helped provide valuable information. They don't mind what people do for personal use. Just don't try and turn it into a commercial product.
Re: Show HN: macOS-cross-compiler – Compile binaries for macOS on Linux
#70Earlier quoted context omitted.
I used a Hackintosh for a number of years and Apple could have easily shut down the entire community with enough cease and desists. In fact there were engineers that helped provide valuable information. They don't mind what people do for personal use. Just don't try and turn it into a commercial product.
They have shut that down by moving into their own CPUs.