Skip to content

Commit 82b07ef

Browse files
authored
document new engines option (#1577)
1 parent 8ca6b2e commit 82b07ef

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
@@ -225,7 +225,9 @@ As an example, you could install the main branch of `QuartoNotebookRunner` into
225225

226226
### Rendering notebooks
227227

228-
To use the `julia` engine, you have to specify it in your frontmatter:
228+
To use the `julia` engine, you have to specifically enable it. For that, you have two options.
229+
230+
Either specify the engine in your frontmatter:
229231

230232
```` markdown
231233
---
@@ -238,6 +240,12 @@ engine: julia
238240
```
239241
````
240242

243+
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.
244+
245+
```{.yaml filename="_quarto.yml"}
246+
engines: ['julia']
247+
```
248+
241249
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.
242250

243251
#### 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)