Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Systems Programming with Zig
  • Table Of Contents Toc
Systems Programming with Zig

Systems Programming with Zig

By : Mihalis Tsoukalos
close
close
Systems Programming with Zig

Systems Programming with Zig

By: Mihalis Tsoukalos

Overview of this book

Build reliable systems software with Zig through a project-driven approach focused on practical engineering challenges. Guided by UNIX systems engineer & bestselling author Mihalis Tsoukalos, you will learn modern systems programming techniques while creating production-ready applications, UNIX tools, & network services. This book takes you from essential UNIX tooling and build infrastructure to advanced topics such as direct memory access, binary formats, filesystem monitoring, networking, concurrency, asynchronous I/O, & database integration. Through hands-on projects, you will create command-line utilities, TCP and UDP services, HTTP applications, file indexing tools, cache servers, & a domain-specific language interpreter that combines memory management, comptime metaprogramming, parsing, evaluation, & error handling. Each chapter demonstrates how Zig features solve practical systems programming problems. You will work with memory management, process control, synchronization primitives, event-driven architectures, SQLite integration, protocol design, & performance-focused data structures while learning the reasoning behind key engineering decisions. By the end of this book, you will be able to build efficient and maintainable systems software in Zig & confidently apply the language to production projects.
Table of Contents (18 chapters)
close
close
Lock Free Chapter
1
Part 1: Zig Foundations
6
Part 2: Systems Programming in Practice
17
Index

Summary

In this chapter, you learned how to program TCP/IP applications in Zig. You realized how TCP and UDP differ in code and how the HTTP protocol can be programmed. We concluded the chapter by applying these concepts to a real-world scenario: building a system monitoring API, serializing live system data into JSON responses, and serving them over a minimal web server. These patterns — listen, accept, read, write, close — repeat themselves endlessly across networked software, and having implemented them by hand means you now understand what every higher-level library is doing underneath.

In the next chapter, we turn our attention to threads, processes, commands, and signals — the building blocks of concurrent and parallel systems programming in Zig. You will see how to use std.Thread(), how to fork child processes using the C interoperability layer, and how to handle UNIX signals for graceful shutdown and inter-process communication. We will put all these...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Systems Programming with Zig
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon