{"repo":"xataio/pgzx","free":true,"listed":false,"github":"https://github.com/xataio/pgzx","clone":"git clone https://github.com/xataio/pgzx.git","description":"Create PostgreSQL extensions using Zig.","language":"Zig","stars":579,"topics":["extens","extensions","pgrx","postgres","postgresql","zig","ziglang","hacktoberfest"],"license":"Apache-2.0","category":"databases-storage","readme_excerpt":"&nbsp; &nbsp; &nbsp; pgzx - Create Postgres Extensions with Zig! pgzx is a library for developing PostgreSQL extensions written in Zig. It provides a set of utilities (e.g. error handling, memory allocators, wrappers) as well as a development environment that simplifies integrating with the Postgres code base. Why Zig? Zig is a small and simple language that aims to be a \"modern C\" and make system-level code bases easier to maintain. It provides safe memory management, compilation time code execution (comptime), and a rich standard library. Zig can interact with C code quite naturally: it supports the C ABI, can work with C pointers and types directly, it can import header files and even translate C code to Zig code. Thanks to this interoperability, a Postgres extension written in Zig can, theoretically, accomplish anything that a C extension can. This means you get full power AND a modern language and standard library to write your extension. While in theory you can write any extension in Zig that you could in C, in practice you will need to make sense of a lot of Postgres internals in order to know how to correctly use them from Zig. Also, Postgres makes extensive use of macros, and not all of them can be translated automatically. This is where pgzx comes in: it provides a set of Zig modules that make the development of Postgres Extensions in Zig much simpler. Examples The following sample extensions (ordered from simple to complex) show how to use pgzx: Extension Descripti","default_branch":null,"files":null,"tree":[],"storefront":"/r/xataio","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/xataio/pgzx/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}