deltachat-ffi for Zig
Find a file
2025-09-18 20:37:04 +01:00
src Dump all code so far 2025-09-18 20:37:04 +01:00
.gitignore Dump all code so far 2025-09-18 20:37:04 +01:00
build.zig Dump all code so far 2025-09-18 20:37:04 +01:00
build.zig.zon Dump all code so far 2025-09-18 20:37:04 +01:00
README.md Dump all code so far 2025-09-18 20:37:04 +01:00

zig-deltachat

deltachat-ffi for Zig

Build requirements

You need to have rustup and all the bells and whistles installed. Don't forget to use rustup to add your target, for example: rustup target add arm-unknown-linux-gnueabi.

Build

This is a pretty hackish build script, that sets up environment variables to force cargo to use zig to build libdeltachat. If it fails with no specific error message, try again. If it fails a second time then it might be a real issue.

# Just build
zig build

# It might support other targets
zig build -Dtarget=arm-linux-gnueabi.2.23

When building in Debug mode, libdeltachat is also built in debug mode. Use -Drelease to force a release build of libdeltachat.

To build a statically linked executable, use the -Dstatic argument. It is not possible to statically link against GNU libc for now.

This has only been tested on Linux systems, I do not know if it will work on Windows, MacOS, *BSD, or any other OS