You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/apps.md
+61-1Lines changed: 61 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@ end # module
42
42
[apps]
43
43
reverse = {}
44
44
```
45
-
The empty table `{}` is to allow for giving metadata about the app but it is currently unused.
45
+
The empty table `{}` is to allow for giving metadata about the app.
46
46
47
47
After installing this app one could run:
48
48
@@ -95,6 +95,66 @@ This will create two executables:
95
95
-`main-app` that runs `julia -m MyMultiApp`
96
96
-`cli-app` that runs `julia -m MyMultiApp.CLI`
97
97
98
+
## Configuring Julia Flags
99
+
100
+
Apps can specify default Julia command-line flags that will be passed to the Julia process when the app is run. This is useful for configuring performance settings, threading, or other Julia options specific to your application.
101
+
102
+
### Default Julia Flags
103
+
104
+
You can specify default Julia flags in the `Project.toml` file using the `julia_flags` field:
-`myapp` will run with 4 threads and optimization level 2
117
+
-`performance-app` will run with automatic thread detection, startup file enabled, and deprecation warnings disabled
118
+
-`debug-app` will run with bounds checking enabled and no optimization
119
+
120
+
### Runtime Julia Flags
121
+
122
+
You can override or add to the default Julia flags at runtime using the `--` separator. Everything before `--` will be passed as flags to Julia, and everything after `--` will be passed as arguments to your app:
1. Fixed flags (like `--startup-file=no` and `-m ModuleName`)
140
+
2. Default flags from `julia_flags` in Project.toml
141
+
3. Runtime flags specified before `--`
142
+
4. App arguments specified after `--`
143
+
144
+
### Overriding the Julia Executable
145
+
146
+
By default, apps run with the same Julia executable that was used to install them. You can override this globally using the `JULIA_APPS_JULIA_CMD` environment variable:
set JULIA_APPS_JULIA_CMD=C:\path\to\different\julia.exe
155
+
myapp input.txt
156
+
```
157
+
98
158
## Installing Julia apps
99
159
100
160
The installation of Julia apps is similar to [installing Julia libraries](@ref Managing-Packages) but instead of using e.g. `Pkg.add` or `pkg> add` one uses `Pkg.Apps.add` or `pkg> app add` (`develop` is also available).
0 commit comments