[]byte slice backed by the shared memory mapping.
Installation
zinc_core shared library at runtime. Place it on the library search path or link it at build time.
SharedRegion
Create
Open
Bytes
Returns a[]byte slice backed directly by the shared memory mapping. No copying occurs.
Notify
Wait
true if notified, false if timed out.
Close
Complete example
Cgo flags
The adapter uses#cgo LDFLAGS: -lzinc_core -L${SRCDIR}/../../core/target/release to locate the library during development. For production builds, ensure the library is on the system library path or pass -L and -l flags through CGO_LDFLAGS.
Safety
TheBytes() call returns a Go slice pointing to C memory. Go’s garbage collector does not manage this memory. The slice is valid as long as the SharedRegion handle is not closed. Calling Close() and then using the returned slice results in undefined behavior.