References

PackageCompiler.create_sysimageFunction
create_sysimage(packages::Union{Symbol, Vector{Symbol}}; kwargs...)

Create a system image that includes the package(s) in packages. An attempt to automatically find a compiler will be done but can also be given explicitly by setting the environment variable JULIA_CC to a path to a compiler

Keyword arguments:

  • sysimage_path::Union{String,Nothing}: The path to where the resulting sysimage should be saved. If set to nothing the keyword argument replace_defalt needs to be set to true.

  • project::String: The project that should be active when the sysimage is created, defaults to the current active project.

  • precompile_execution_file::Union{String, Vector{String}}: A file or list of files that contain code which precompilation statements should be recorded from.

  • precompile_statements_file::Union{String, Vector{String}}: A file or list of files that contains precompilation statements that should be included in the sysimage.

  • incremental::Bool: If true, build the new sysimage on top of the sysimage of the current process otherwise build a new sysimage from scratch. Defaults to true.

  • filter_stdlibs::Bool: If true, only include stdlibs that are in the project file. Defaults to false, only set to true if you know the potential pitfalls.

  • replace_default::Bool: If true, replaces the default system image which is automatically used when Julia starts. To replace with the one Julia ships with, use restore_default_sysimage()

Advanced keyword arguments

  • cpu_target::String: The value to use for JULIA_CPU_TARGET when building the system image.

  • script::String: Path to a file that gets executed in the --output-o process.

PackageCompiler.create_appFunction
create_app(app_source::String, compiled_app::String; kwargs...)

Compile an app with the source in app_source to the folder compiled_app. The folder app_source needs to contain a package where the package include a function with the signature

julia_main()::Cint
    # Perhaps do something based on ARGS
    ...
end

The executable will be placed in a folder called bin in compiled_app and when the executabl run the julia_main function is called.

An attempt to automatically find a compiler will be done but can also be given explicitly by setting the envirnment variable JULIA_CC to a path to a compiler.

Keyword arguments:

  • app_name::String: an alternative name for the compiled app. If not provided, the name of the package (as specified in Project.toml) is used.

  • precompile_execution_file::Union{String, Vector{String}}: A file or list of files that contain code which precompilation statements should be recorded from.

  • precompile_statements_file::Union{String, Vector{String}}: A file or list of files that contains precompilation statements that should be included in the sysimage for the app.

  • incremental::Bool: If true, build the new sysimage on top of the sysimage of the current process otherwise build a new sysimage from scratch. Defaults to false.

  • filter_stdlibs::Bool: If true, only include stdlibs that are in the project file. Defaults to false, only set to true if you know the potential pitfalls.

  • audit::Bool: Warn about eventual relocatability problems with the app, defaults to true.

  • force::Bool: Remove the folder compiled_app if it exists before creating the app.

Advanced keyword arguments

  • cpu_target::String: The value to use for JULIA_CPU_TARGET when building the system image.
PackageCompiler.audit_appFunction
audit_app(app_dir::String)

Check for possible problems with regards to relocatability for the project at app_dir.

Warning

This cannot guarantee that the project is free of relocatability problems, it can only detect some known bad cases and warn about those.