Creating fully self-contained and pre-compiled library

Update:

Julia not being able to call juliac-compiled library: See the progress on the issue linked above:

This is a known limitation currently, as each system image thinks it’s the only one that should be loaded. Soon we will have a workaround for this by allowing you to give a library its own private copy of the julia runtime.

juliac vs. binding partitions: I run into the same problems as reported here: Segmentation fault in executable after compilation with juliac including --trim --experimental arguments - General Usage - Julia Programming Language.

  • As long as I have a simple example that does not rely on other packages (no using or import statements), I can use --experimental --trim.
  • As soon as I rely on other packages (JSON.jl in my PoC), I cannot use --trim anymore. Errors similar to the ones reported in the referenced thread occur.
  • This seems to be due to a regression between the two experimental features “trimming during binary generation” and “binding partitions”.
  • I can compile and successfully run (on Windows and in a Docker container under ubuntu:latest) examples relying on other packages, just without --trim and thus a ~200 MB instead of 1.8 MB library. But for my PoC, that’s OK for the moment.
3 Likes