Okay but how do you distribute the program that depends on Julia to clients? You then also need to ensure that they have the right Julia available on their system. That's much heavier than dynamic binaries (which rely only on some shared libraries). My point was that it's not always "easy" to call Julia. That it's easy in HPC is a reasonable statement since you probably have full control over the system and it has loads of RAM available, but I wouldn't call it easy in general.
> You are mistaken.
I guess we're both right. I was talking about the "libraries" functionality [1].
[1]: https://julialang.github.io/PackageCompiler.jl/dev/libs.html
That's not the question that was asked though. The question the person asked as "Can you call Julia routines from other languages?" and the answer to that is "yes, you can easily do that".
__________________________________________________
> I guess we're both right. I was talking about the "libraries" functionality
I'm confused, what functionality exactly are you saying is missing from the libraries functionality? That very example you link to shows one using the julia runtime via printing.
And yes, dynamic dispatch and dynamic code generation do work from libraries created by PackageCompiler.jl as well...
That said, I think the bridges are actually pretty developed compared to what exists between many pairs of high-level languages. They are clearly working for some people since you will find Python-wrapper packages for Julia code. I'm not so sure it's so important to have a single `.so` package. There are solutions which allow Python to be-in-charge and bundle Julia to various extents. There are at least:
1. https://github.com/jlapeyre/julia_project
2. Usage of Conda and https://github.com/JuliaPy/pyjuliapkg
edit: just found https://docs.julialang.org/en/v1/manual/embedding/#Thread-sa...
Ok, so, it's tricky, but at least you can start an interpreter per thread...
It produces quite big binaries, but the more involved and complicated your application is, the less that matters.
Calling julia from another language does not in general require AOT compilation, though it does help to make things more portable and self contained. If one wants, they can literally just spawn a julia process, define a function on the fly and then hook into that process and call that function from another language.
> PackageCompiler.jl [2] has the same limitations if I'm not mistaken
You are mistaken. PackageCompiler works by basically bundling an entire julia system image with your program and the whole compiler, runtime, and stdlib compiled into one bundle together. If a piece of code works in the REPL it'll work from PackageCompiler