I have a custom Julia package (only local) inside an R project. I’m interacting with the Julia package via https://github.com/stefan-m-lenz/JuliaConnectoR.
I’d like to precompile this package and its functions since their use is quite static and with similar inputs.
I understood how to create a custom sysimage using PackageCompiler.jl but I don’t know how to use it.
Since JuliaConnectoR does not allow setting up flags on Julia startup is there another way to use the custom sysimage? like an environment variable or a Julia function to load the .so file after startup?
The package requires that Julia (version ≥ 1.0) is installed and that the Julia executable is in the system search PATH or that the JULIA_BINDIR environment variable is set to the bin directory of the Julia installation.
so I guess if call my script julia, make it executable and put it in a folder in PATH it should pick it up.
After speaking with the package author (a friend of mine), while he implements the possibility to pass flags at startup he suggested me to use aliases.
I’m now trying to understand how to since it seems the aliases disappear between command-line sessions.
e.g. in R:
> system("alias julia2='julia'")
> system("julia2")
sh: julia2: command not found