1.1 KiB
1.1 KiB
Meshtastic Protocol Buffers Generation
This internal package manages the generation of Go types from the official Meshtastic protocol buffer definitions.
Upstream Source
The protobuf definitions are included as a git submodule at:
protocol/meshtastic/internal/pbgen/upstream
Tracked repository: https://github.com/meshtastic/protobufs.git
Generating Go Code
To regenerate the Go protobuf types after updating the submodule:
# Update the submodule to latest (optional)
git submodule update --remote protocol/meshtastic/internal/pbgen/upstream
# Regenerate Go code
go generate ./protocol/meshtastic/internal/pbgen
Requirements
protoc(Protocol Buffers compiler)protoc-gen-go(install viago install google.golang.org/protobuf/cmd/protoc-gen-go@latest)
Generated Package
Generated Go types are placed in:
protocol/meshtastic/pb/
Import path:
import meshtasticpb "git.maze.io/go/ham/protocol/meshtastic/pb"
All Meshtastic protocol buffer messages (Position, User, Data, etc.) are available from this package.