mirror of
https://github.com/luxfi/zmq.git
synced 2026-10-30 15:11:11 +00:00
- Pure Go when CGO_ENABLED=0 (default) - CZMQ when CGO_ENABLED=1 (automatic) - Replaced manual build tags with CGO detection - Comprehensive documentation and tooling - Added benchmarks and integration tests - Cleaned up repository structure
25 lines
581 B
Go
25 lines
581 B
Go
//go:build cgo && czmq
|
|
// +build cgo,czmq
|
|
|
|
// Copyright 2025 The go-zeromq Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package zmq4
|
|
|
|
// #cgo LDFLAGS: -lczmq -lzmq
|
|
// #include <czmq.h>
|
|
import "C"
|
|
|
|
// When CGO is enabled and czmq tag is set, this file provides the optimized implementation
|
|
|
|
// BackendName returns the name of the current backend
|
|
func BackendName() string {
|
|
return "czmq"
|
|
}
|
|
|
|
// IsCZMQAvailable returns true when CZMQ is available
|
|
func IsCZMQAvailable() bool {
|
|
return true
|
|
}
|