On Sunday, December 13, 2015 at 4:07:55 PM UTC-5, Leonardo wrote: > > Thanks, but I have still some trouble. > > I try to better explain my problems: > > 1. .*ji file creation*: I can create a .ji file for a module with > precompilation (e.g. with Base.compilecache()); attempting to create > .ji file from a julia source using julia executable with command: > $JULIA_HOME/bin/julia --output-ji out.ji -- src.jl > it complains with following message: > ERROR: could not open file boot.jl > > Here is how compilecache runs julia --output-ji:
https://github.com/JuliaLang/julia/blob/eb172070217bf9ca8daef41092991f5a2e2c49eb/base/loading.jl#L449-L453 > 1. *.ji file execution*: I don't know how to start a julia program > precompiled in .ji > > The undocumented low-level call to load a .ji file is, I believe: Base._include_from_serialized(open(readbytes, "myfile.ji")) However, this does not actually execute any code, it just loads the functions and constants and modules defined in that .ji file. You still need to run some code in a .jl file that actually calls one of these functions. You have to realize that the .ji file is not really the equivalent of a precompiled executable program. It is more like a precompiled shared library.
