Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix instructions for sysimage #64

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/src/userguide/compilesysimage.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ By default, all of the packages defined in the `Project.toml` file are included

Additional options can be passed to further tweak the compilation. In particular, one may want to include script containing the precompile statements or a file to execute certain julia function, which can further reduce the first-call latency. Please read the documentation of [PackageCompiler.jl](https://julialang.github.io/PackageCompiler.jl/stable/) for more details.

This file should be named `./.vscode/JuliaSysimage.toml` and be placed under the project root file. Its content should look like:
This file should be named `./.vscode/JuliaSysimage.toml` and be placed under the project root folder. For example, the global project root folder for julia 1.6 are found at `~/.julia/environments/v1.6`, so that the `.toml` file could be placed like this: `~/.julia/environments/v1.6/.vscode/JuliaSysimage.toml`. The contents of this file should look like the following:

```
[sysimage]
exclude=["Pkg1", "Pkg2"] # Additional packages to be excluded in the system image
statements_files=["relative/path/to/precompile_statements_file.jl", ]
execution_files=["relative/path/to/precompile_execution_file.jl", ]
statements_files=["precompile_statements_file.jl", ] # relative to Julia project folder
execution_files=["precompile_execution_file.jl", ] # relative to Julia project folder
```
The packages to be excluded have to be separated by commas, each with quotation marks and all inside square brackets.
The path should be relative to the currently active folder, which can be selected by the command `File: Open Folder...`. The statement or execution files can be given as a single relative path, or as a list of relative paths.
All path should be relative to the project root folder. This means that the filename is sufficient if the file is located in the project root folder. The statement or execution files can be given as a single relative path, or as a list of relative paths.

The statement files should contain precompile statements of the form `precompile(Tuple{typeof(Base.sin), Float64})`, and the execution files should contain function calls for which the methods should be compiled.
The statement files should contain precompile statements of the form `precompile(Tuple{typeof(Base.sin), Float64})`, and the execution files should contain function calls (an example workflow, e.g. making a plot) for which the methods should be compiled.

The build task creates a sysimage that includes all packages in the current Julia environment. This sysimage is saved in the same folder where the `Project.toml` and `Manifest.toml` of the current Julia environment are stored. The name of the sysimage file will be `JuliaSysimage.dll` (Windows) or `JuliaSysimage.so`.

Expand Down