diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 47 |
1 files changed, 27 insertions, 20 deletions
@@ -32,54 +32,61 @@ Verify the installation and version of `zig` like so: ```bash $ zig version -0.8.0-dev.1065+<some hexadecimal string> +0.8.0-dev.1065+xxxxxxxxx ``` Clone this repository with Git: ```bash -git clone https://github.com/ratfactor/ziglings -cd ziglings +$ git clone https://github.com/ratfactor/ziglings +$ cd ziglings ``` Then run `zig build` and follow the instructions to begin! ```bash -zig build +$ zig build ``` -## A Note About Compiler Versions +## A Note About Versions The Zig language is under very active development. Ziglings will attempt to be current, but not bleeding-edge. However, sometimes fundamental changes -will happen. Ziglings will check for a minimum version and build number -(which is this one: `0.x.x-dev.<build number>`) and exit if your version of -Zig is too old. It is likely that you'll download a build which is greater -than the number in the example shown above in this README. That's okay! +will happen. Ziglings will check for a minimum version and build number. + +(See Getting Started above for the current minimum.) + +It is likely that you'll download a build which is _greater_ than the minimum. Once you have a version of the Zig compiler that works with your copy of -Ziglings, they'll continue to work together forever. But if you update one, -keep in mind that you may need to also update the other. +Ziglings, they'll continue to work together. But if you update one, you may +need to also update the other. -## Manual Usage +## Advanced Usage -If you want to run a single file for testing, you can do so with this command: +It can be handy to check just a single exercise or _start_ from a single +exercise: ```bash -zig run exercises/01_hello.zig +zig build 19 +zig build 19_start ``` -or, alternatively + +You can also run without checking for correctness: + ```bash zig build 01_test ``` -To verify a single file, use +Or skip the build system entirely and interact directly with the compiler +if you're into that sort of thing: ```bash -zig build 01_only +zig run exercises/01_hello.zig ``` -To prepare an executable for debugging, install it to zig-cache/bin with +Calling all wizards: To prepare an executable for debugging, install it +to zig-cache/bin with: ```bash zig build 01_install @@ -112,13 +119,13 @@ Planned exercises: * [x] Enums * [x] Structs * [x] Pointers -* [ ] Multi pointers +* [ ] Optionals * [ ] Slices +* [ ] Multi pointers * [ ] Unions * [ ] Numeric types (integers, floats) * [ ] Labelled blocks and loops * [ ] Loops as expressions -* [ ] Optionals * [ ] Comptime * [ ] Inline loops (how to DEMO this?) * [ ] Anonymous structs |