u/Terrible-Carrot-7437

Any Indian devs who've discovered Zig and have been enjoying it?

Zig's pitch is: C-level control, but with a much cleaner language and toolchain but without taking on Rust's complexity. And comptime is just wonderful. Instead of having separate systems for generics, macros, code generation, reflection, build scripts, etc., Zig lets you execute ordinary Zig code at compile time. Types are first-class compile-time values, and compile-time parameters provide generic programming.

What I really like is that Zig doesn't try to hide the machine from you. Memory, allocation, control flow, errors etc etc? They're all explicit. But at the same time, you don't have to deal with quite as much language machinery as you do in Rust.

I've been playing around with it lately and I'm honestly surprised by how pleasant it feels. I still feel like I'm talking to a machine like in C but without all the footguns that C creates.

Curious if there are other Indian devs here who are using Zig seriously, especially for systems programming, tooling, embedded, game dev, or just experimenting.

reddit.com
u/Terrible-Carrot-7437 — 3 days ago
▲ 22 r/Zig

I'm experimenting with a type-safe, libc-like Linux API in Zig. Any thoughts?

I've been working on a small project that builds a typed Linux userspace API directly on top of raw syscalls, rather than libc.

The idea is roughly:

raw syscall → errno translation → typed Zig API

For example, instead of exposing raw syscall results and integer constants, I'd like APIs along the lines of typed Fds, typed socket/address types, structured flags, and Zig error sets.

Right now I'm implementing the syscall layer myself with architecture specific backends and starting with sockets (socket, bind, listen, accept, connect, shutdown, etc.).

I'm interested in whether people think this abstraction is useful, what problems you see with it, and whether something like this would be valuable to the Zig ecosystem long-term.

Especially interested in feedback from people who've worked on std.os.linux, std.posix, libc, or Linux syscall interfaces.

reddit.com
u/Terrible-Carrot-7437 — 9 days ago