9d4eaf1e07
std.io.FileInStream -> std.os.File.InStream std.io.FileInStream.init(file) -> file.inStream() std.io.FileOutStream -> std.os.File.OutStream std.io.FileOutStream.init(file) -> file.outStream() remove a lot of error code possibilities from os functions std.event.net.socketRead -> std.event.net.read std.event.net.socketWrite -> std.event.net.write add std.event.net.readv add std.event.net.writev add std.event.net.readvPosix add std.event.net.writevPosix add std.event.net.OutStream add std.event.net.InStream add std.event.io.InStream add std.event.io.OutStream |
||
---|---|---|
.. | ||
cat | ||
guess_number | ||
hello_world | ||
mix_o_files | ||
shared_library | ||
README.md |
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