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: content/zls/guides/build-on-save.smd
+6-8Lines changed: 6 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ There are two ways to opt into Build-On-Save:
16
16
- The `build.zig` of your project defines a "check" step. (**recommended**)
17
17
- The `enable_build_on_save` config option has been manually set to `true`.
18
18
19
-
The first method avoids dealing with config options and can report compile errors quicker. Otherwise, enable the `enable_build_on_save` config option to use Build-On-Save even in projects that have no "check" step.
19
+
The first method avoids dealing with config options and can report compile errors quicker.
20
20
21
21
### Add a "check" step to your build.zig
22
22
@@ -75,15 +75,13 @@ zig build check --watch
75
75
76
76
If no "check" step has been found and `enable_build_on_save` has been enabled, it will fall back to the "install" step.
77
77
78
-
To further customize the build arguments, the `build_on_save_args` config option can be used.
78
+
To further customize the build arguments, the `build_on_save_args` config option can be used. Here are some arbitrary examples to showcase what could be done in theory:
79
79
80
-
Here are some arbitrary examples to showcase what could be done in theory:
80
+
- Override which build step(s) should be run: `"build_on_save_args": ["check", "test"]`
81
+
- Set project-specific build options: `"build_on_save_args": ["-Dtarget=wasm32-wasi"]`
82
+
- Set additional build system flags: `"build_on_save_args": ["-j4"]`
81
83
82
-
- Override which build step(s) should be run: `["check", "test"]`
83
-
- Set project-specific build options: `["-Dtarget=wasm32-wasi"]`
84
-
- Set additional build system flags: `["-j4"]`
85
-
86
-
Run `zig build --help` to see what build steps and build options are available in your project.
84
+
Run `zig build --help` to find out what build steps and build options are available in your project.
0 commit comments