How it works
The Rust core callsshm_open and mmap. The first page holds a 64-byte metadata header and padding. Usable data begins at the next page boundary.
Views access mapped bytes without a serialization step or a copy through a transport. Memory reads, writes, page faults, cache coherence, and notifications still have costs. The benchmarks page explains what each benchmark measures.
Where it fits
Zinc can share tensors, video frames, point clouds, or application state between cooperating processes. Every participant must agree on the region name, byte layout, and synchronization protocol. Python can view the bytes as a NumPy array, Go as a byte slice, and Node as a Buffer. Native views avoid an extra transfer, but they do not make incompatible layouts or concurrent plain-data access safe. A socket or message queue is often easier for occasional messages or independently managed services. Use a database or file for persistent data, and a network protocol for processes on different machines. Zinc provides no automatic crash recovery or durability.Ownership and notifications
Closing the creator unlinks the region’s name. Processes that already opened it keep their mappings until they close. Node buffers and Python views retain mappings; other borrowed views require the caller to keep the region open.notify() publishes preceding writes. wait() and try_wait() consume changes to a per-region sequence counter. Notifications can coalesce. They do not stop a producer from overwriting data that a reader is still using, so repeated updates need an acknowledgement or atomic data.
