zig/example
Andrew Kelley 7b57454cc1 clean up error return tracing
* error return tracing is disabled in release-fast mode
 * add @errorReturnTrace
 * zig build API changes build return type from `void` to `%void`
 * allow `void`, `noreturn`, and `u8` from main. closes #535
2018-01-15 00:01:02 -05:00
..
cat replace `a %% b` with `a catch b` 2018-01-07 17:28:20 -05:00
guess_number remove %% prefix operator 2018-01-09 00:51:51 -05:00
hello_world replace `%return` with `try` 2018-01-07 16:53:13 -05:00
mix_o_files clean up error return tracing 2018-01-15 00:01:02 -05:00
shared_library clean up error return tracing 2018-01-15 00:01:02 -05:00
README.md remove `?return` and `?defer` 2017-04-21 15:08:03 -04:00

README.md

Zig Examples

Working Examples

  • Tetris - A simple Tetris clone written in Zig. See andrewrk/tetris.
  • hello_world - demonstration of a printing a single line to stdout. One version depends on libc; one does not.
  • guess_number - simple console game where you guess the number the computer is thinking of and it says higher or lower. No dependency on libc.
  • cat - implementation of the cat UNIX utility in Zig, with no dependency on libc.
  • shared_library - demonstration of building a shared library and generating a header file for interop with C code.
  • mix_o_files - how to mix .zig and .c files together as object files