I use juliac to generate small binaries from julia code. It is a great tool.
There are unfortunately only little packages that can be applied when using juliac (e.g. DataStructures.).
Applying other useful packages (e.g. TOML, XML, CSV, DataFrames) result in errors when compiling: Verifier errors occur
(e.g. “unresolved call from statement DataFrames.length”).
What is the reason for failing when compiling?
Is it, because the packages are not type-stable enough, for juliac?
It would be very beneficial to use packages when generating stand-alone binaries using juliac.
Is it possible, or is there interest, to re-implement some of the packages, for applying in juliac?
Yeah those packages are type unstable. Maybe something like TypedTables works? But dealing with formats like those in a static way that’s looks like what Julia usually does is quite tricky sadly. You would need to implement something that’s more akin to what the C++ or even the C version of libraries look like. The sciml ecosystem mostly works for example, due to years of getting rid of all type instabilities in it.
Direct reimplementation to 100% type-stable, generic code would often cause other compilation problems, see: Why DataFrame is not type stable and when it matters | juliabloggers.com. Even statically typed languages will handle similar situations dynamically, just fundamentally limited (single dispatch, designated dynamically dispatched methods, sum types, pattern matching) to the point a compiler can compile every possible call and those can be looked up in an extensible way. Julia chose different limitations, but that also means we can’t reasonably make a lookup table of compiled functions (not the same as the global method table) in advance for a lot of things out there. I expect actively developed packages to follow base Julia in the shift toward supporting JuliaC, but it’s very likely that different, more limited implementations will crop up. Limited doesn’t mean simple here, a lot can happen within limitations.
File IO packages like those fundamentally need a special design to be type-stable. In particular, the user needs to explicitly pass types for the expected structure, be it CSV column names + types or TOML tree structure.
Naturally, this wasn’t a priority or focus of many people before, and even now there’s only a relatively small subset of Julia users who really need full type-stability end-to-end. But it’s possible!
After data is loaded, the situation is different – there’s no shortage of type-stable tables and operations on them!
Types include at least base Julia vector-of-namedtuple, StructArrays, TypedTables; tabular operations – base Julia map/filter/…, and SplitApplyCombine, DataManipulation, etc packages.
I have no idea whether these work with juliac out of the box, but at least they are mostly designed to be type-stable already.