I wonder if the the command-line call
julia script.jl arg1 arg2…
can be done with a compiled C-code:
script.exe arg1 arg2…
Would this reduce start-up time/TTFP?
Looking at Embedding Julia there is only a small example
/* run Julia commands */
How to proceed? Another gap to fill.
Google finds jl_eval_strings in jl_exported_funcs.inc.
Is this the C-API? But where are the docs?
The answer is most likely no. But if you want to reduce precompilation time there is a package compiler.
Thx @dlakelan, interesting package with detailed description also of its principal limitations due to how Julia works. Apparently there are two modes:
Creating sysimages, would be needed for every new script.jl.
Compile time amortizes depending on actual runtime and total number of runs.
Creating “apps”, packing all necessary, type specialized functions into a runtime lib.
Possibly allowing to run scripts with different code, but same data types and operations,
would be very helpful.
Note that to use PackageCompiler.jl effectively some knowledge on how packages and “environments” work is required. If you are just starting out with Julia, it is unlikely that you would want to use PackageCompiler.jl
Definitively deserves a closer look!