PackageCompiler bundled libraries

Yes, a lot can be stripped, and I assume from libraries too, I at least know of:

create_sysimage(packages::Vector{String}; kwargs...)

  • incremental::Bool: If true, build the new sysimage on top of the sysimage of the current process otherwise build a new sysimage from scratch. Defaults to true.
  • filter_stdlibs::Bool: If true, only include stdlibs that are in the project file. Defaults to false, only set to true if you know the potential pitfalls.
  • include_transitive_dependencies::Bool: If true, explicitly put all transitive dependencies into the sysimage. This only makes a difference if some packages do not load all their dependencies when themselves are loaded. Defaults to true.

Advanced keyword arguments

  • base_sysimage::Union{Nothing, String}: If a String, names an existing sysimage upon which to build the new sysimage incrementally, instead of the sysimage of the current process. Defaults to nothing. Keyword argument incremental must be true if base_sysimage is not nothing.

E.g. that filter_stdlibs is important. You build incrementally on the already rather large sysimage, and it can be trimmed to be much smaller.

I think you can already just delete libLLVM (and maybe OpenBLAS, at least could theoretically, to name some big offenders), if you do not need the compiler at runtime. I might be wrong, and it would bomb right away, or only later if you need it at runtime. Hypothetically you do not, e.g. LLVM is not used by (official, or will be) juliac, but it has not been released yet. The yet to be merged PR for it can be used, and then there are other unofficial projects, such as this Juliet language (not to be confused with https://www.kevinalbrecht.com/code/juliet/index.html the names chosen are kind of difficult to google for, see at least below), a fork of Julia (meant for hard-real-time robotics), statically typed that doesn’t use Julia’s runtime or LLVM, I just heard of, but I think it’s proprietary, and same with the Chinese Julia compiler that compiles to C++ (note a different Chinese company then Estun below).

Juliet may be a bit off-topic, since it’s a new static (no longer dynamic) language, with e.g. extra var keyword, but it seems it it can be “saved as Julia”, i.e. exported to run in the Julia environment, and maybe it can be used for libraries (it’s in many ways similar to the official upcoming juliac, except there no new keywords, only some of the dynamisim of Julia forbidden):

Short 8 min video on Juliet & Romeo very intriguing, and the parts before and after, I had seen this video separately before, and assume is the same one there at JuliaCon, the companies behind it are JuliaCon sponsors):

1 Like