Is it normal for juliac to still produce 280 MB of libraries for a "println" example?

Sorry, possibly coming from an “over-expectations” mind setting… I had a quick try on juliac, but compiling the trivial example, even with --trim=safe, produces yes an executable of ~1.7 MB, but also a set of libraries ~ 280MB.
Is this the expected outcome, or am I doing something wrong ?

That’s still normal, as far as I understand, although there is likely potential to trim the set of libraries as well.

Edit: The latter was based on relatively old experiments with juliac. When I try now with 1.12.0 on Linux I get a 1.7 MB binary and 92 MB of libraries.

5 Likes

When I compile a Hello World on Linux with v1.12.0 I get 1 1.6MB binary and 313MB of libraries.

EDIT: I just compiled another small program and got 91MB of libraries. Don’t know why I saw 313MB before.

2 Likes

It seems you don’t get the “full” size when you run juliac multiple times.

I run juliac on Julia v1.12.0 on the AppProject in the juliac repository:

~/.julia/bin/juliac --output-exe app_test_exe --project AppProject --bundle build --trim=safe --experimental --verbose AppProject/src/test.jl

If I run it once, I get “Total library file size: 272.985 MiB”, that is consistent with what I actually get on disk, but if I run it a second time I have “Total library file size: 182.938 MiB” that seems to consider only a subset of the base libraries, but the libraries on disk are still 280MB.

I never figured how the “Total library file size” information related to anything and only measured what I actually had on disk.

These libraries might often already exist on a Linux system. In that case, does juliac link to the existing libraries or still bundle its own? I am guessing the latter, given Julia likes to be as self-contained as possible.

The printing it does is currently not great :). So I would use du or similar to measure the actual disk space.