# \#c

**URL:** https://ziggit.dev/tag/c/8.md

[Latest](https://ziggit.dev/latest.md) · [Categories](https://ziggit.dev/categories.md) · [Tags](https://ziggit.dev/tags.md)

---

## [What is this type \`\[\*c\]VkPhysicalDevice\`?](https://ziggit.dev/t/what-is-this-type-c-vkphysicaldevice/18044)

<div class="topic-metadata">

**Author:** [@TrashBandit](https://ziggit.dev/u/TrashBandit)\
**Replies:** 2\
**Last updated:** [October 21, 2026, 6:26am UTC](https://ziggit.dev/t/what-is-this-type-c-vkphysicaldevice/18044 "2026-10-21T06:26:50Z")

</div>

I’m not having luck searching for this, though there’s a good chance it was in ziglings and I’ve simply forgotten. I’m using Vulkan as a system library and pulling it in via translate\_c with Zig 0.17.0. It produced this…

---

## [Why does \`printf\` work even though \`link\_libc = false\`?](https://ziggit.dev/t/why-does-printf-work-even-though-link-libc-false/17919)

<div class="topic-metadata">

**Author:** [@felixrabe](https://ziggit.dev/u/felixrabe)\
**Replies:** 6\
**Last updated:** [October 12, 2026, 11:35pm UTC](https://ziggit.dev/t/why-does-printf-work-even-though-link-libc-false/17919 "2026-10-12T23:35:39Z")

</div>

I’m trying to figure out what would prevent zig build from bringing in libc. (To satisfy my curiosity. Zig 0.17.0 on Macos from times past.) What do I have to change in build.zig to make zig build complain about either …

---

## [A mean to attach methods to C structs](https://ziggit.dev/t/a-mean-to-attach-methods-to-c-structs/17892)

<div class="topic-metadata">

**Author:** [@chung-leong](https://ziggit.dev/u/chung-leong)\
**Replies:** 7\
**Last updated:** [October 9, 2026, 5:24pm UTC](https://ziggit.dev/t/a-mean-to-attach-methods-to-c-structs/17892 "2026-10-09T17:24:41Z")

</div>

I’m currently in middle of refactoring the API code that I used for my PHP extension. The initial version was very low effort. For text strings I have this in php.zig: pub const String = c.zend\_string; And associated f…

---

## [How we are going to sell Zig?](https://ziggit.dev/t/how-we-are-going-to-sell-zig/7069)

<div class="topic-metadata">

**Author:** [@g41797](https://ziggit.dev/u/g41797)\
**Replies:** 44\
**Last updated:** [October 9, 2026, 5:15pm UTC](https://ziggit.dev/t/how-we-are-going-to-sell-zig/7069 "2026-10-09T17:15:37Z")

</div>

A New Era for C and C++? Goodbye, Rust? raised my attention. There have already been several discussion on “safe” topic on the forum. They all concerned technical side. And this is mainly marketing issue, because Zig …

---

## [Ronny: a self-hosted email → Telegram assistant in Zig 0.16, which now reads its own logs and fixes itself](https://ziggit.dev/t/ronny-a-self-hosted-email-telegram-assistant-in-zig-0-16-which-now-reads-its-own-logs-and-fixes-itself/17865)

<div class="topic-metadata">

**Author:** [@eddygarcas](https://ziggit.dev/u/eddygarcas)\
**Replies:** 0\
**Last updated:** [October 6, 2026, 6:50am UTC](https://ziggit.dev/t/ronny-a-self-hosted-email-telegram-assistant-in-zig-0-16-which-now-reads-its-own-logs-and-fixes-itself/17865 "2026-10-06T06:50:02Z")

</div>

Ronny: a self-hosted email → Telegram assistant in Zig 0.16, which now reads its own logs and fixes itself Hi all. I’ve been building Ronny, a personal assistant that watches my mailbox and talks to me on Telegram. It’s…

---

## [Zstd.zig - Native Zstandard Library for Zig](https://ziggit.dev/t/zstd-zig-native-zstandard-library-for-zig/17844)

<div class="topic-metadata">

**Author:** [@muhammadfiaz](https://ziggit.dev/u/muhammadfiaz)\
**Replies:** 2\
**Last updated:** [October 5, 2026, 3:26pm UTC](https://ziggit.dev/t/zstd-zig-native-zstandard-library-for-zig/17844 "2026-10-05T15:26:22Z")

</div>

zstd.zig zstd.zig is a native Zstandard implementation for Zig. This project originally started as C bindings to Zstandard, but I wanted to build something that felt more native to Zig, with direct control over memory, …

---

## [\`zig cc -g\` is ignoring me 😭](https://ziggit.dev/t/zig-cc-g-is-ignoring-me/17768)

<div class="topic-metadata">

**Author:** [@felixrabe](https://ziggit.dev/u/felixrabe)\
**Replies:** 2\
**Last updated:** [October 1, 2026, 3:10pm UTC](https://ziggit.dev/t/zig-cc-g-is-ignoring-me/17768 "2026-10-01T15:10:51Z")

</div>

tldr: -g works with mingw, but not zig cc. Why? I’m using Zig 0.16 now, but am open to try master. Story time: I fell into the Handmade Hero wormhole and started out using (on Arch Linux) x86\_64-w64-mingw32-g++ and w…

---

## [I have created a small abstraction library for PCRE2 compatiblity \[zig-pcre\] this is absolutely stable accross new versions of Zig](https://ziggit.dev/t/i-have-created-a-small-abstraction-library-for-pcre2-compatiblity-zig-pcre-this-is-absolutely-stable-accross-new-versions-of-zig/17693)

<div class="topic-metadata">

**Author:** [@rminol](https://ziggit.dev/u/rminol)\
**Replies:** 2\
**Last updated:** [September 29, 2026, 11:47am UTC](https://ziggit.dev/t/i-have-created-a-small-abstraction-library-for-pcre2-compatiblity-zig-pcre-this-is-absolutely-stable-accross-new-versions-of-zig/17693 "2026-09-29T11:47:45Z")

</div>

zig-pcre: Hi Community, I was developing a web application using http.zig (Purely from @karlseguin). At one moment, I wanted to validate user inputs using regular expressions. I searched the internet for most widely use…

---

## [Zig 0.16 Linux linker, bundled LLD bug?](https://ziggit.dev/t/zig-0-16-linux-linker-bundled-lld-bug/17489)

<div class="topic-metadata">

**Author:** [@Muzzle0979](https://ziggit.dev/u/Muzzle0979)\
**Replies:** 1\
**Last updated:** [September 24, 2026, 1:40am UTC](https://ziggit.dev/t/zig-0-16-linux-linker-bundled-lld-bug/17489 "2026-09-24T01:40:40Z")

</div>

I encountered what appears to be an extended ELF section-index handling issue in Zig 0.16.0. Environment Zig 0.16.0 Native x86\_64-linux-gnu Ubuntu 26.04.1 under WSL2 RayClay 0.8.11 compiled as a single-header C impleme…

---

## [Canceling \`Threaded\` operations from foreign C threads](https://ziggit.dev/t/canceling-threaded-operations-from-foreign-c-threads/17382)

<div class="topic-metadata">

**Author:** [@smj-edison](https://ziggit.dev/u/smj-edison)\
**Replies:** 3\
**Last updated:** [September 20, 2026, 10:48pm UTC](https://ziggit.dev/t/canceling-threaded-operations-from-foreign-c-threads/17382 "2026-09-20T22:48:16Z")

</div>

LLM disclosure: I use LLMs mainly to aid with debugging and for generating code for auxiliary parts of the system. I have used it in core areas on occasion though. Hello! I’ve been working on an interpreter for a while,…

---

## [Use @"0" instead of unnamed\_0 when translating anonymous unions/structs from C](https://ziggit.dev/t/use-0-instead-of-unnamed-0-when-translating-anonymous-unions-structs-from-c/17636)

<div class="topic-metadata">

**Author:** [@chung-leong](https://ziggit.dev/u/chung-leong)\
**Replies:** 1\
**Last updated:** [September 18, 2026, 2:03am UTC](https://ziggit.dev/t/use-0-instead-of-unnamed-0-when-translating-anonymous-unions-structs-from-c/17636 "2026-09-18T02:03:59Z")

</div>

Today I found myself not being able to remember the name of an anonymous union/struct after translation. Is it noname or unnamed? Is it prefixed with 1 or 2 underscores? Since such fields have no names, why not just not …

---

## [Last-llama.cpp.zig v0.1.0 - GGUF Inference for Zig on Windows](https://ziggit.dev/t/last-llama-cpp-zig-v0-1-0-gguf-inference-for-zig-on-windows/17610)

<div class="topic-metadata">

**Author:** [@neox](https://ziggit.dev/u/neox)\
**Replies:** 2\
**Last updated:** [September 14, 2026, 10:20pm UTC](https://ziggit.dev/t/last-llama-cpp-zig-v0-1-0-gguf-inference-for-zig-on-windows/17610 "2026-09-14T22:20:09Z")

</div>

Last-llama.cpp.zig My first public release of Last-llama.cpp.zig, a standalone Windows runtime and CLI for running local GGUF language models with Zig and llama.cpp. It provides separate CPU and NVIDIA CUDA workers, a …

---

## [Too many VMA with SMPAllocator](https://ziggit.dev/t/too-many-vma-with-smpallocator/17529)

<div class="topic-metadata">

**Author:** [@PauSolerValades](https://ziggit.dev/u/PauSolerValades)\
**Replies:** 4\
**Last updated:** [September 8, 2026, 12:31pm UTC](https://ziggit.dev/t/too-many-vma-with-smpallocator/17529 "2026-09-08T12:31:55Z")

</div>

Hello everyone! I want to explain to you a problem that I had and how did I solve it to get some feedback and check if my architecture might have been different! You can find the code I am describing at the repo, the b…

---

## [Static\_dynamic - static binaries with a dynamic loaded](https://ziggit.dev/t/static-dynamic-static-binaries-with-a-dynamic-loaded/17451)

<div class="topic-metadata">

**Author:** [@ShadowCurse](https://ziggit.dev/u/ShadowCurse)\
**Replies:** 0\
**Last updated:** [September 2, 2026, 7:42pm UTC](https://ziggit.dev/t/static-dynamic-static-binaries-with-a-dynamic-loaded/17451 "2026-09-02T19:42:28Z")

</div>

Hi all, want to share a project I have been working on for the last several weeks: static dynamic - the single header library to allow static binaries to get access to the dynamic loader (aka be able to dlopen dynamic li…

---

## [There has got to be a better way to deal with bitfields in C](https://ziggit.dev/t/there-has-got-to-be-a-better-way-to-deal-with-bitfields-in-c/17399)

<div class="topic-metadata">

**Author:** [@chung-leong](https://ziggit.dev/u/chung-leong)\
**Replies:** 14\
**Last updated:** [August 30, 2026, 8:03pm UTC](https://ziggit.dev/t/there-has-got-to-be-a-better-way-to-deal-with-bitfields-in-c/17399 "2026-08-30T20:03:55Z")

</div>

I just encountered a problem involving this MacOS header file: typedef struct { natural\_t pad1; mach\_msg\_size\_t pad2; unsigned int pad3 : 24; mach\_msg\_descriptor\_ty…

---

## [C (and C++\*) precompiled dependencies using Conan](https://ziggit.dev/t/c-and-c-precompiled-dependencies-using-conan/17401)

<div class="topic-metadata">

**Author:** [@Abril](https://ziggit.dev/u/Abril)\
**Replies:** 3\
**Last updated:** [August 28, 2026, 9:37am UTC](https://ziggit.dev/t/c-and-c-precompiled-dependencies-using-conan/17401 "2026-08-28T09:37:24Z")

</div>

C (and C++\*) precompiled dependencies using Conan Hi! I’m a maintainer for the Conan C and C++ package manager, but I’m also involved in the support of Zig in Compiler Explorer since the begining, and for some time now…

---

## [Translate-c vector types on macOS](https://ziggit.dev/t/translate-c-vector-types-on-macos/17366)

<div class="topic-metadata">

**Author:** [@nour](https://ziggit.dev/u/nour)\
**Replies:** 6\
**Last updated:** [August 26, 2026, 11:22pm UTC](https://ziggit.dev/t/translate-c-vector-types-on-macos/17366 "2026-08-26T23:22:07Z")

</div>

Hello, On macOS, I compile ObjC with all kind of frameworks and libs with the Zig Build System . But I cannot translate-c headers containing definitions from \<simd/vector\_types.h\>. Looking into it, it seems translate-c…

---

## [How to include libcpp with addTranslateC](https://ziggit.dev/t/how-to-include-libcpp-with-addtranslatec/17302)

<div class="topic-metadata">

**Author:** [@noahbald](https://ziggit.dev/u/noahbald)\
**Replies:** 6\
**Last updated:** [August 26, 2026, 10:31am UTC](https://ziggit.dev/t/how-to-include-libcpp-with-addtranslatec/17302 "2026-08-26T10:31:11Z")

</div>

Hey there, I’ve been playing around with Zig and want to try using a cpp library. Unfortunately I’m having a bit of a struggle getting it working even after follow a few other threads I found in the forum. I’ve just set…

---

## [Opaque Pointer leads to Segfault in zig (works in c)](https://ziggit.dev/t/opaque-pointer-leads-to-segfault-in-zig-works-in-c/17329)

<div class="topic-metadata">

**Author:** [@forge4007](https://ziggit.dev/u/forge4007)\
**Replies:** 4\
**Last updated:** [August 23, 2026, 3:44pm UTC](https://ziggit.dev/t/opaque-pointer-leads-to-segfault-in-zig-works-in-c/17329 "2026-08-23T15:44:57Z")

</div>

There is a library (that comes with a header.h) that runs fine with the c example, but segfaults in zig. The C Code: #include \<string.h\> #include "irohnet.h" int main() { Endpoint\_t \* ep = endpoint\_default(); endp…

---

## [Sideeye: crash-consistency testing for ordinary CLI tools](https://ziggit.dev/t/sideeye-crash-consistency-testing-for-ordinary-cli-tools/17341)

<div class="topic-metadata">

**Author:** [@yottayoshida](https://ziggit.dev/u/yottayoshida)\
**Replies:** 0\
**Last updated:** [August 23, 2026, 10:12am UTC](https://ziggit.dev/t/sideeye-crash-consistency-testing-for-ordinary-cli-tools/17341 "2026-08-23T10:12:21Z")

</div>

PROJECT NAME: sideeye sideeye kills a program between its state-changing operations and asks what survived: GitHub - yottayoshida/sideeye: A deterministic skeptic for the coding loop: breaks your software's world and bri…

---

## [Zig can't see Nix Includes](https://ziggit.dev/t/zig-cant-see-nix-includes/17298)

<div class="topic-metadata">

**Author:** [@izigit](https://ziggit.dev/u/izigit)\
**Replies:** 5\
**Last updated:** [August 20, 2026, 3:39pm UTC](https://ziggit.dev/t/zig-cant-see-nix-includes/17298 "2026-08-20T15:39:39Z")

</div>

This is sort of a workflow question for those of you who use both Nix and Zig together. I’ve been working on a games project with a friend using Nix as our development environment to ensure reproducible builds. Its my un…

---

## [Panic when printing after Raylib's InitWindow()](https://ziggit.dev/t/panic-when-printing-after-raylibs-initwindow/17160)

<div class="topic-metadata">

**Author:** [@njnj](https://ziggit.dev/u/njnj)\
**Replies:** 1\
**Last updated:** [August 9, 2026, 7:39pm UTC](https://ziggit.dev/t/panic-when-printing-after-raylibs-initwindow/17160 "2026-08-09T19:39:07Z")

</div>

Hello fellow Zig fans! First of all, thanks for this amazing language! It’s easy to use and it compiles fast (unlike some other languages). So, I’ve been experimenting with Zig and Raylib for some time and came across …

---

## [Wierd differnce between Vector and array on 0.17.0](https://ziggit.dev/t/wierd-differnce-between-vector-and-array-on-0-17-0/17061)

<div class="topic-metadata">

**Author:** [@Wunka](https://ziggit.dev/u/Wunka)\
**Replies:** 6\
**Last updated:** [August 5, 2026, 3:54pm UTC](https://ziggit.dev/t/wierd-differnce-between-vector-and-array-on-0-17-0/17061 "2026-08-05T15:54:30Z")

</div>

While trying to make a version of Cubyz that works with zig 0.17.0 (master) I got very weird graphical artifacts and could track it down to this reproduce: const std = @import("std"); pub fn glCall(a: \[\*c\]c\_int) void {…

---

## [Best way to handle optional values through C ABI](https://ziggit.dev/t/best-way-to-handle-optional-values-through-c-abi/16769)

<div class="topic-metadata">

**Author:** [@alberic89](https://ziggit.dev/u/alberic89)\
**Replies:** 17\
**Last updated:** [July 25, 2026, 10:05am UTC](https://ziggit.dev/t/best-way-to-handle-optional-values-through-c-abi/16769 "2026-07-25T10:05:23Z")

</div>

I am currently writing code to make a sort of Zig ↔ JS bridge thanks to WASM. But I face this issue : some JS function have facultative arguments, with a default value. I wrap them with a C ABI compatible JS function, …

---

## [Using C libraries in Zig](https://ziggit.dev/t/using-c-libraries-in-zig/16805)

<div class="topic-metadata">

**Author:** [@bongolin](https://ziggit.dev/u/bongolin)\
**Replies:** 3\
**Last updated:** [July 20, 2026, 8:00pm UTC](https://ziggit.dev/t/using-c-libraries-in-zig/16805 "2026-07-20T20:00:22Z")

</div>

Hi folks! Earlier this year I started working on a 2D platformer in C using raylib. The project has been going really well, but I’m starting to miss some of the features that modern languages provide. I’ve heard that Z…

---

## [Zig 0.16 cross-compiling with external uClibc toolchain: sysroot/libc linking and ELF interpreter issues](https://ziggit.dev/t/zig-0-16-cross-compiling-with-external-uclibc-toolchain-sysroot-libc-linking-and-elf-interpreter-issues/16328)

<div class="topic-metadata">

**Author:** [@Leuchak](https://ziggit.dev/u/Leuchak)\
**Replies:** 1\
**Last updated:** [July 18, 2026, 2:10am UTC](https://ziggit.dev/t/zig-0-16-cross-compiling-with-external-uclibc-toolchain-sysroot-libc-linking-and-elf-interpreter-issues/16328 "2026-07-18T02:10:01Z")

</div>

Hello, zig 0.16 I want to build an app that uses a library which links against the libc provided by the arm-buildroot-linux-uclibcgnueabihf-4.9.4 toolchain. I can compile my code with Zig, but I’m having trouble linkin…

---

## [Xtxf: binary matrix / screensaver](https://ziggit.dev/t/xtxf-binary-matrix-screensaver/4903)

<div class="topic-metadata">

**Author:** [@charlie](https://ziggit.dev/u/charlie)\
**Replies:** 8\
**Last updated:** [July 17, 2026, 5:01pm UTC](https://ziggit.dev/t/xtxf-binary-matrix-screensaver/4903 "2026-07-17T17:01:13Z")

</div>

This is a light binary matrix screensaver (CLI) GitHub - charlesrocket/xtxf: Two-dimensional matrix It uses termbox2 Clib directly to draw the animation, supports different patterns and dynamic terminal size.

---

## [Cast C struct to the same C struct but from another zig module](https://ziggit.dev/t/cast-c-struct-to-the-same-c-struct-but-from-another-zig-module/16705)

<div class="topic-metadata">

**Author:** [@ashley.h](https://ziggit.dev/u/ashley.h)\
**Replies:** 10\
**Last updated:** [July 15, 2026, 7:22am UTC](https://ziggit.dev/t/cast-c-struct-to-the-same-c-struct-but-from-another-zig-module/16705 "2026-07-15T07:22:34Z")

</div>

I don’t know what tool I really need but I would like (to shoot my leg again) and just have force cast So I have two C libraries (both of which I independently use) and one of them exposes API which takes as parameter t…

---

## [C import overflows](https://ziggit.dev/t/c-import-overflows/16665)

<div class="topic-metadata">

**Author:** [@charlie](https://ziggit.dev/u/charlie)\
**Replies:** 5\
**Last updated:** [July 15, 2026, 1:56am UTC](https://ziggit.dev/t/c-import-overflows/16665 "2026-07-15T01:56:21Z")

</div>

Trying to port one of my projects to 0.16 but getting a failure on C import: src/main.zig:986:12: error: C import failed const tb = @cImport({ thread 111408 panic: integer overflow /usr/local/lib/zig/std/zig/…

---

## [Thread panic when returning an error after initializing GLFW](https://ziggit.dev/t/thread-panic-when-returning-an-error-after-initializing-glfw/16567)

<div class="topic-metadata">

**Author:** [@ThomasPais](https://ziggit.dev/u/ThomasPais)\
**Replies:** 8\
**Last updated:** [July 12, 2026, 6:07am UTC](https://ziggit.dev/t/thread-panic-when-returning-an-error-after-initializing-glfw/16567 "2026-07-12T06:07:33Z")

</div>

Hi, I ran into an issue using GLFW with Zig 0.16.0 on Gentoo (Wayland/niri). I first hit this in a bigger project, where I could open a window and render OpenGL quads fine, so GLFW itself is working. The panic only show…

[Next page](https://ziggit.dev/tag/c/8.md?match_all_tags=true&page=1&tags%5B%5D=c)
