Note possible, (large) binaries that support all Julia code; also with a different approach tiny binaries:
Since we’re only including what we need, binaries can be quite small (e.g. 8.4K for Hello World)
I’m trying to me mindful of: We as a community should be more understanding of Julia's flaws
So, note, that’s an exception, but since I think the small binary, as opposed to just binary option, is overblown, I’ll not take much time explaining, the limitations and potential workarounds.
I think JIT is not necessary for the actual final executable
Yes, the JIT is handled by LLVM, and the LLVM (Julia’s largest dependency at 79MB + 41M (libjulia-codegen) = 120 MB, besides the sysimage at 221M, that can be made smaller, 4th largest at 32MB OpenBLAS can be dropped) can be excluded as of just released Julia 1.8.0. From its NEWS:
The LLVM-based compiler has been separated from the run-time library into a new library,
libjulia-codegen
. It is loaded by default, so normal usage should see no changes. In deployments that do not need the compiler (e.g. system images where all needed code is precompiled), this library (and its LLVM dependency) can simply be excluded (#41936).
and:
New option
--strip-ir
to remove the compiler’s IR (intermediate representation) of source code when building a system image. The resulting image will only work if--compile=all
is used, or if all needed code is precompiled (#42925).
See more links here: