diff options
author | Martin Wickham <spexguy070@gmail.com> | 2021-02-11 22:04:36 -0600 |
---|---|---|
committer | Martin Wickham <spexguy070@gmail.com> | 2021-02-11 22:10:55 -0600 |
commit | 971ab7f49836dc21b8f7d6fbed4320e37d503697 (patch) | |
tree | 62a829f488b9b4c0fc47c7509aa7b3a6c3708b46 /README.md | |
parent | 0ad4a0b3dbcc78273d0d15ef96b0e7839129b6a6 (diff) | |
download | ziglings-971ab7f49836dc21b8f7d6fbed4320e37d503697.tar.gz ziglings-971ab7f49836dc21b8f7d6fbed4320e37d503697.tar.bz2 ziglings-971ab7f49836dc21b8f7d6fbed4320e37d503697.tar.xz ziglings-971ab7f49836dc21b8f7d6fbed4320e37d503697.zip |
Use a zig build script to run ziglings
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 24 |
1 files changed, 19 insertions, 5 deletions
@@ -43,20 +43,35 @@ git clone https://github.com/ratfactor/ziglings cd ziglings ``` -Then run the `ziglings` script and follow the instructions to begin! +Then run `zig build` and follow the instructions to begin! ```bash -./ziglings +zig build ``` ## Manual Usage -If you can't (or don't want to) use the script, you can manually verify each -exercise with the Zig compiler: +If you want to run a single file for testing, you can do so with this command: ```bash zig run exercises/01_hello.zig ``` +or, alternatively +```bash +zig build 01_test +``` + +To verify a single file, use + +```bash +zig build 01_only +``` + +To prepare an executable for debugging, install it to zig-cache/bin with + +```bash +zig build 01_install +``` ## TODO @@ -66,7 +81,6 @@ the learning resource I wished for. There will be tons of room for improvement: * Wording of explanations * Idiomatic usage of Zig * Additional exercises -* Re-write the `ziglings` script using the Zig build system (or just a Zig application) Planned exercises: |