3.2 KiB
zmq4 - LuxFi Fork
zmq4 is a pure-Go implementation of ØMQ (ZeroMQ), version 4.
This is the LuxFi fork of the original go-zeromq/zmq4 project, maintained for use in the Lux Network ecosystem.
See zeromq.org for more information about ZeroMQ.
Installation
go get github.com/luxfi/zmq/v4
Usage
import "github.com/luxfi/zmq/v4"
Version
This fork maintains compatibility with ZeroMQ v4.2.0 and follows Go module versioning with the /v4 suffix.
Development
This fork is maintained by the LuxFi team for use in the Lux Network consensus and networking layers.
Build Modes
This package automatically selects the implementation based on CGO:
- CGO_ENABLED=0 (or unset): Pure Go implementation (default, no C dependencies)
- CGO_ENABLED=1: CZMQ compatibility layer (requires libczmq)
Testing
# Run tests with pure Go implementation
CGO_ENABLED=0 go test ./...
# or simply:
make test
# Run tests with CZMQ compatibility layer
CGO_ENABLED=1 go test ./...
# or:
make test-czmq
# Run tests with verbose output
make test-verbose
# Run tests with race detector
make test-race
# Run tests with coverage
make test-cover
License
zmq4 is released under the BSD-3 license.
Documentation
Documentation for zmq4 is served by GoDoc.
Dependencies
Pure Go (Default)
By default, this package is a pure-Go implementation with no external dependencies.
Optional CZMQ Compatibility
For compatibility testing with the C implementation, this package optionally depends on:
- github.com/luxfi/czmq/v4 v4.2.0 (only when using
czmq4build tag)
Contributing
Contributions are welcome! Please submit issues and pull requests to the LuxFi ZMQ repository.
Original Project
This is a fork of go-zeromq/zmq4. The original project is licensed under BSD-3.