Skip to content

Commit b5f121f

Browse files
committed
update build on save guide
1 parent e88d421 commit b5f121f

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

content/zls/guides/build-on-save.smd

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ There are two ways to opt into Build-On-Save:
1616
- The `build.zig` of your project defines a "check" step. (**recommended**)
1717
- The `enable_build_on_save` config option has been manually set to `true`.
1818

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.
2020

2121
### Add a "check" step to your build.zig
2222

@@ -75,15 +75,13 @@ zig build check --watch
7575

7676
If no "check" step has been found and `enable_build_on_save` has been enabled, it will fall back to the "install" step.
7777

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:
7979

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"]`
8183

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.
8785

8886
## Special Thanks
8987

0 commit comments

Comments
 (0)