Skip to content

Commit 8be9f90

Browse files
committed
document new engines option
1 parent a24a8d3 commit 8be9f90

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

docs/computations/julia.qmd

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,9 @@ As an example, you could install the main branch of `QuartoNotebookRunner` into
218218

219219
### Rendering notebooks
220220

221-
To use the `julia` engine, you have to specify it in your frontmatter:
221+
To use the `julia` engine, you have to specifically enable it. For that, you have two options.
222+
223+
Either specify the engine in your frontmatter:
222224

223225
```` markdown
224226
---
@@ -231,6 +233,12 @@ engine: julia
231233
```
232234
````
233235

236+
Or, starting with Quarto 1.7, you can prioritize the julia engine project-wide by adding `julia` to the `engines` array in your project file, giving it priority over all unlisted engines (more under [Engine prioritization](#engine-prioritization)). Note that the project file approach is the only option in order to use the native Julia engine with percent-script files.
237+
238+
```{.yaml filename="_quarto.yml"}
239+
engines: ['julia']
240+
```
241+
234242
Rendering a notebook will start a persistent server process if it hasn't already started. This server process first loads QuartoNotebookRunner from Quarto's private environment. QuartoNotebookRunner then spins up a separate Julia worker process for each notebook you want to render.
235243

236244
#### Notebook environments

docs/projects/quarto-projects.qmd

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,19 @@ quarto_render()
195195

196196
{{< include _render-targets.md >}}
197197

198+
### Engine prioritization
199+
200+
Quarto supports different engines to execute code. Historically, the R, Python and Julia languages were only supported by one engine, each, so there was no need to choose an execution engine. With the addition of the native Julia engine, this changed.
201+
202+
When determining which execution engine to use for a given notebook, Quarto checks the available engines in a predefined order, which means that the Jupyter engine is always preferred for Julia over the native engine.
203+
204+
Starting with Quarto 1.7, instead of specifying `engine: julia` in the frontmatter of every notebook in a project, you can set a different prioritization order in your project file using the `engines` key.
205+
206+
All the engines you list there will be checked first in the order you provide. The remaining engines will be checked by Quarto in the usual predefined order. To enable the native Julia engine project-wide, it is therefore enough to add this line to your project file:
207+
208+
```{.yaml filename="_quarto.yml"}
209+
engines: ['julia']
210+
```
198211

199212
## Learning More
200213

0 commit comments

Comments
 (0)