reconfigures stock GCC and Clang to output a POSIX-approved polyglot format that runs natively on Linux + Mac + Windows + FreeBSD + OpenBSD + NetBSD + BIOS with the best possible performance and the tiniest footprint imaginable.
Cosmopolitan makes C a build-once run-anywhere language, similar to Java, except it doesn’t require interpreters or virtual machines be installed beforehand.
For details on how this works, please read the αcτµαlly pδrταblε εxεcµταblε blog post.
I proposed the rather cool αcτµαlly pδrταblε εxεcµταblε way back for PackageCompiler.jl, but then the issue was closed (I do not recall if Cosmopolitan existed then and what I see now claimed), and possibly Cosmopolitan, building on it, makes portable Julia now more viable if anyone feels like trying a hack to make it work.
Platform Agnostic C / C++ / FORTRAN Tooling
Who could have predicted that cross-platform native builds would be this easy? As it turns out, they’re surprisingly cheap too.
Julia could be the first portable language/binary that includes fast JIT of native code.
I’m thinking of the showstoppers, Julia is implemented by several languages, C, C++ (not STL for itself? while “LLVM makes heavy use of the C++ Standard Template Library ( STL )” and others?), FemtoLisp (should probably work) and Fortran.
This wouldn’t make Julia fully portable, to e.g. ARM and POWER, but I can live with that. And it might even be possible ARM according to the docs; or MacOS ARM emulation could work, but Julia itself could generate ARM code…?
Also Linux, means traditional ELF binaries, doesn’t imply would work on Android. That would be cool, if you first install Ubuntu on Android, which already can run Julia, potentially such (ARM) Julia build could work?
At some point there was unofficial Julia-lite, without OpenBLAS if it would help (there are also some interesting (partial) Julia replacements or also system OpenBLAS could be used), similar could be done for problematic dependencies, e.g. using Fortran, and still be useful.
It’s a bit unclear (since issue open), but it seems Python 2.7 already works this way (and other languages close, e.g. PHP):
Cosmopolitan works great with C++ but very little effort has been made to integrate it with an existing STL.
STL will likely be a showstopper, unless we could use system LLVM and it’s the only STL using code? At one point there was Cfront “C with classes” (later renamed C++) to C transpiler, I guess nothing similar exists anymore…