#Building DuckDB extensions with Zig

1 messages · Page 1 of 1 (latest)

noble parcel
dusky zealot
#

While you are in there working with Duckdb - any luck getting static linking working using the duckdb_static lib with zig ? Seems like an excellent tool, but I’m still stuck on that bit.

Only semi related to your project, just duck + zig in general issue

noble parcel
#

Haven’t tried that yet. What error are you running into? If it’s related to linking libcxx check out the nix flake and the input repo duckdb-nix. If you can compile duckdb and zig against the same version of clang it should work.

dusky zealot
#

Ok cool, will revisit the problem with rebuilding the DuckDB libs.

https://github.com/karlseguin/zuckdb.zig/issues/2

Not trying to derail your thread at all … but it’s all sort of related because it’s using duck and zig. Being able to write duck extensions in zig completes the loop !

GitHub

I haven't really done any work with Zig + external C libs yet, so please excuse the noob question about linking. This is all on Mac / M1 / Sonoma, with zig 0.11. It may be a Mac issue, don'...

noble parcel
#

No dramas. Taking a look at that issue I'd imagine the version of libcxx will cause problems. There's no stable ABI for C++ so it's a common source of errors when linking against different versions of libcxx.

In the ideal world we would build everything from source with Zig but that will take too much time and effort away from other stuff I want to get done.