Skip to main content
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/ossl-dev/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
pip install zinc-shm

# Or install from source
cd adapters/python
pip install -e .
go get github.com/ossl/zinc/adapters/go

# Or use a local path
# In go.mod: replace zinc => ./adapters/go
npm install @ossl/zinc
bun add @ossl/zinc-bun
deno add @ossl/zinc
# Header-only. Copy include/zinc.hpp into your project.
# Link against libzinc_core at build time.
<!-- Maven Central (pending) -->
<dependency>
  <groupId>dev.zinc</groupId>
  <artifactId>zinc-java</artifactId>
  <version>0.1.0</version>
</dependency>
dotnet add package Zinc

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
cp core/target/release/libzinc_core.dylib /usr/local/lib/
Alternatively, set the library path via LD_LIBRARY_PATH (Linux) or DYLD_LIBRARY_PATH (macOS).

Platform notes

  • 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.