5 ms·
But your binaries run on Mac and every other system once you build them. It's got universal deployment down pat. Universal development is a different story beca
by jart 6y ago
But your binaries run on Mac and every other system once you build them. It's got universal deployment down pat. Universal development is a different story because Cosmopolitan isn't in the business of distributing GCC and Clang.
That's why it's designed to work great using the standard operating system provided compilers on Linux and BSD. There's a Linux toolchain binary available for Windows for convenience. One will be available for Mac soon, because the issue with Mac is that all the existing toolchains are configured to use the Apple linker and assembler rather than binutils or lld, and Apple's linker is designed to build binaries that only run on Apple.
Zig has accomplished a lot with toolchains and cross-compilers but you have to build your app multiple times. Cosmopolitan is also much newer. But it proves new things are possible, so as you said it's very exciting to think about where the project will be one year hence.
- lhorie 6y agoYeah, that's a good point. I didn't mean it as a criticism of cosmopolitan per se; more that depending on stock toolchains can add friction because they may be susceptible to breakage by random shenanigans by brew or xcode or who knows what else, whereas defaulting to curl -L [...] | tar -xz [...] into a hermetic space is generally less susceptible to yak shaving. (The Make setup in the cosmo repo is quite nice, btw) Zig compile times are definitely slower than Go's, for example (in release mode, anyways), but I guess that's LLVM for ya. Fast cross-platform binaries w/ fast compile times would be the holy grail for me. Looking forward to see where cosmo goes
- jart 6y agoI agree with you. Cosmo's Makefile is hermetically sealed and it works on every LInux distro. I don't do development on any other platform. I wanted a way to write my code on Linux be able to target other systems without ever having to use those systems tools. However I believe in supporting the development use cases other people have too! That's why there's the binary releases. You can take the .h and .a file and use any compiler / os for dev you want. But you can't use the Apple Linker.