| ... | ... | @@ -223,3 +223,26 @@ use stage 1. |
| 223 | 223 | ``` |
| 224 | 224 | ./stage2/bin/zig build --build-file ../build.zig install -Drelease-fast |
| 225 | 225 | ``` |
| 226 | |
| 227 | ## Developing Zig |
| 228 | |
| 229 | ### Standard Library |
| 230 | |
| 231 | First, build the Stage 1 compiler as described in [the Building section](#building). |
| 232 | Then, make your changes to the standard library files in `std` (note: not |
| 233 | `build/lib/zig/std`). To test changes to the standard library, do the following |
| 234 | from the build directory: |
| 235 | |
| 236 | 1. Run `make install` (on POSIX) or `msbuild -p:Configuration=Release INSTALL.vcxproj` |
| 237 | (on Windows). |
| 238 | 2. Test your changes with `bin/zig test lib/zig/std/<changed file>` (e.g. `bin/zig test lib/zig/std/heap.zig`). |
| 239 | |
| 240 | Once your changes are finished, run all the zig tests from the build directory: |
| 241 | |
| 242 | ``` |
| 243 | bin/zig build --build-file ../build.zig test -Dskip-release |
| 244 | ``` |
| 245 | |
| 246 | *Note: The `-Dskip-release` flag will skip running the longer test process that tests |
| 247 | all possible build configurations. This shorter test process is good enough when |
| 248 | submitting pull requests* |