Zinc ships as a shared library (libzinc_core) with per-language adapter packages. Build the core, then install the adapter for your language.
Windows is not supported. Zinc uses POSIX shared memory (shm_open + mmap). There are no plans to add Windows support.
Prerequisites
- Rust 1.82 or later
- A C compiler toolchain (Xcode on macOS, build-essential on Linux)
- For adapter packages: the corresponding language runtime
Build the core
The core library is a Rust crate at the core/ directory. It compiles to a cdylib that every language adapter loads at runtime.
git clone https://github.com/aspect-build/zinc
cd zinc
cargo build --release --manifest-path core/Cargo.toml
The output appears at:
- Linux:
core/target/release/libzinc_core.so
- macOS:
core/target/release/libzinc_core.dylib
The build also generates include/zinc.h via cbindgen. This header is the C ABI contract. All adapters derive their FFI bindings from it.
By language
# Add zinc-core as a dependency
cargo add zinc-core --path /path/to/zinc/core
# Or from crates.io (once published)
cargo add zinc-core
Library path
All adapters expect libzinc_core.{so,dylib} on the library search path. The easiest approach is to place the compiled library in a standard location:
sudo cp core/target/release/libzinc_core.so /usr/local/lib/
sudo ldconfig
Alternatively, set the library path via LD_LIBRARY_PATH (Linux) or DYLD_LIBRARY_PATH (macOS).
- Linux requires glibc 2.17 or later. The notify/wait backend uses the
futex syscall.
- macOS uses an adaptive spin-loop for wait (the
ulock API is private on Darwin).
Windows is not supported. Zinc uses shm_open and mmap, which are POSIX APIs not available on Windows.
Verify the installation
Build the core, then run the C ABI test:
cargo test --manifest-path core/Cargo.toml
All tests should pass on Linux and macOS.