zig/example
Andrew Kelley 28bf768883 export _mh_execute_header with weak linkage
* also fix extern variables with initialiaztion values to generate runtime code
 * remove the workaround in example/shared_library/mathtest.zig
 * introduce the ability for global variables to have Weak and LinkOnce
   linkage
 * fix `@export` to work for non-functions. this code needs to be
   audited though.
 * fix comptime ptrcast not keeping bigger alignment
 * fix linker warnings when targeting darwin

closes #1903
2019-02-18 16:47:30 -05:00
..
cat
guess_number breaking API changes to all readInt/writeInt functions & more 2018-12-12 20:35:04 -05:00
hello_world hello world example can use const instead of var 2018-12-23 13:57:37 -05:00
mix_o_files
shared_library export _mh_execute_header with weak linkage 2019-02-18 16:47:30 -05:00
README.md delete rogue file 2018-11-16 14:26:53 -05:00

Zig 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