Skip to content

godsarmy/zig-linux-cookbook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zig Linux System Programming Cookbook

Overview

This repository is a collection of practical examples and recipes of std.os.linux for developing applications and system tools using the Zig programming language on Linux.

It's designed to be a helpful resource for Zig developers of all levels who want to learn by example and quickly find solutions to port code of C system calls into Zig.

Examples

File Related Call
capget.zig capget
clock_gettime.zig clock_gettime
clone_thread.zig clone gettid
dup2.zig dup2
execve.zig execve
fork_waitpid.zig fork waitpid
getcwd.zig getcwd chdir
getdents64 getdents64
getgroups.zig getgroups
getrandom.zig getrandom
ioctl.zig ioctl
kill.zig kill
lstat.zig lstat
mmap.zig mmap munmap
open_errno.zig open
pipe.zig pipe read write
ptrace.zig ptrace
symlink.zig symlink readlink
unshare.zig getuid unshare
uname.zig uname

Usage

zig build

You will have binaries in zig-out/bin.

  • Build & Run all
zig build run-all

Other awesome zig learning materials

About

Cookbook examples for zig to call linux system call

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages