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 Learning Zig
  • Table Of Contents Toc
  • Feedback & Rating feedback
Learning Zig

Learning Zig

By : Alex Rios
close
close
Learning Zig

Learning Zig

By: Alex Rios

Overview of this book

System programming has long forced developers to choose between safety and performance, but Zig changes the game with its no hidden control flow philosophy and explicit resource management. If you've struggled with memory leaks, undefined behavior, or cryptic compiler errors, Zig offers an alternative that puts you back in control. Alex Rios, a seasoned software engineer with experience building high-throughput systems across fintech, telecom, and gaming industries, brings his unconventional system design approach and offers insight into Zig, as someone who's seen the limitations of existing languages firsthand. You’ll get to grips with Zig's safety-centric design fundamentals, which will guide you through setting up your app development environment and writing your first programs. You'll then explore Zig's distinctive features in depth, such as explicit error handling, manual memory management, and compile-time execution. The book tackles each topic with a blend of technical depth and wit, ensuring you grasp not just the how but also the why behind Zig's design decisions. By the end of this book, you'll be ready to build a complete application that interacts with the OS, third-party libraries, and C dependencies, as well as engage with Zig's growing community and contribute to its ecosystem.
Table of Contents (20 chapters)
close
close
Lock Free Chapter
1
Zig Fundamentals
9
Data, Memory, and Tools
14
Advanced Zig and Real-World Application
18
Other Books You May Enjoy
19
Index
chevron up

Index

Symbols

@alignCast

using, with @ptrCast 226

@cImport 381-383

[*c]T 388

features 388

@import 334, 335

@setEvalBranchQuota() 371, 372

@Type 361, 362

@typeInfo 361

@typeOf 361

A

advanced error recovery 280

allocators 229, 231

interface 230

testing 235

anyopaque

versus void 256

anytype keyword 365, 366

pitfalls 366-370

append 267

application binary interface (ABI) 380

arena allocator 248

benefits 251

drawbacks 251

features 249, 250

ArrayList 266, 269

append 267

init 266

ArrayListUnmanaged 267

arrays 186, 187

compile-time array 188

initializing 189

iterating 187

modifying 188

multidimensional arrays 189

sentinel-terminated array 190

size 187

ASCII control characters 62

atomic actions, build pipeline 318

DAG 318

declarative syntax 319

taxonomy of steps 318

atomic logger 278

atomics 375, 377

AutoHashMap 270...

Visually different images
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.
Learning 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