mirror of
https://github.com/hanzoai/proto.git
synced 2026-10-30 18:23:28 +00:00
main
Modules declare go 1.27.1 and the build images follow. The module holds no Go code yet, so go fix had nothing to change. Co-authored-by: Hanzo Dev <[email protected]>
hanzoai/proto
Schema definitions for the Hanzo platform. Mirrors github.com/luxfi/proto
in layout — zap/ is the canonical default, pb/ is the legacy protobuf
opt-in.
Layout
proto/
├── zap/ ZAP-native schema (canonical default — no build tag)
│ └── <pkg>/ e.g. proto/zap/o11y/, proto/zap/trace/
└── pb/ protobuf schema (legacy — //go:build grpc)
└── <pkg>/ e.g. proto/pb/o11y/, proto/pb/trace/
For any schema, both directories carry the same package path so importers
do import "hanzo.ai/proto/zap/o11y" and the Go build picks the
right file based on the build tag at the top of each file.
Build tags
| Default (no tag) | -tags grpc |
|---|---|
Compiles zap/<pkg>/*_zap.go (//go:build !grpc) |
Compiles pb/<pkg>/*_pb.go (//go:build grpc) |
| ZAP-native types and codecs | Protobuf-generated types and codecs |
Zero google.golang.org/grpc in dep graph |
Includes google.golang.org/grpc |
ZAP is the canonical wire — the protobuf path exists only for external integrations that mandate OTLP-over-gRPC. Internal Hanzo services use ZAP exclusively.
Conventions
- File suffix
_zap.goand_pb.goto make the parallelism obvious. - Same exported types in both — the build tag selects which definition wins.
- Conversion helpers live alongside (one direction only — ZAP → pb when an external bridge needs it; never the reverse, since pb is legacy-only).
See ~/work/lux/proto and ~/work/lux/p2p/proto/{zap,pb}/ for the same pattern
on the Lux side.
Licensed under MIT or Apache-2.0, at your option — per HIP-0137.
Description
Canonical schema definitions for the Hanzo platform (ZAP canonical, pb/ for -tags grpc legacy)
40 KiB
Languages
SVG
100%