Documentation
¶
Overview ¶
Package canoto implements a canonical, compact, and fast serialization format that is read-compatible with Protocol Buffers. It provides both low-level primitives for reading and writing the wire format and high-level interfaces for marshaling and unmarshaling structured messages.
Index ¶
- Constants
- Variables
- func Append[T Bytes](w *Writer, v T)
- func AppendBool[T ~bool](w *Writer, b T)
- func AppendBytes[T Bytes](w *Writer, v T)
- func AppendFint32[T Int32](w *Writer, v T)
- func AppendFint64[T Int64](w *Writer, v T)
- func AppendInt[T Int](w *Writer, v T)
- func AppendUint[T Uint](w *Writer, v T)
- func CountBytes[T Bytes](bytes []byte, tag T) (uint64, error)
- func CountInts(bytes []byte) uint64
- func HasNext(r *Reader) bool
- func HasPrefix[T Bytes](bytes []byte, prefix T) bool
- func IsZero[T comparable](v T) bool
- func MakeEntry[S ~[]E, E any](_ S) (_ E)
- func MakeEntryNilPointer[S ~[]E, E any](_ S) *E
- func MakePointer[T any](_ *T) *T
- func MakeSlice[T any](_ []T, length uint64) []T
- func Marshal(s *Spec, a Any) ([]byte, error)
- func ReadBool[T ~bool](r *Reader, v *T) error
- func ReadBytes[T ~[]byte](r *Reader, v *T) error
- func ReadFint32[T Int32](r *Reader, v *T) error
- func ReadFint64[T Int64](r *Reader, v *T) error
- func ReadInt[T Int](r *Reader, v *T) error
- func ReadPointerPresence(b []byte) ([]byte, error)
- func ReadString[T ~string](r *Reader, v *T) error
- func ReadUint[T Uint](r *Reader, v *T) error
- func SizeBytes[T Bytes](v T) uint64
- func SizeInt[T Int](v T) uint64
- func SizeUint[T Uint](v T) uint64
- func Tag(fieldNumber uint32, wireType WireType) []byte
- func ValidString[T ~string](v T) bool
- type Any
- type AnyField
- type Bytes
- type Field
- type FieldPointer
- type FieldType
- func (c *FieldType) CachedCanotoSize() uint64
- func (c *FieldType) CachedWhichOneOfType() uint32
- func (c *FieldType) CalculateCanotoCache()
- func (*FieldType) CanotoSpec(types ...reflect.Type) *Spec
- func (c *FieldType) MarshalCanoto() []byte
- func (c *FieldType) MarshalCanotoInto(w Writer) Writer
- func (c *FieldType) UnmarshalCanoto(bytes []byte) error
- func (c *FieldType) UnmarshalCanotoFrom(r Reader) error
- func (c *FieldType) ValidCanoto() bool
- type Int
- type Int32
- type Int64
- type Message
- type Reader
- type SizeEnum
- type Spec
- func (c *Spec) CachedCanotoSize() uint64
- func (c *Spec) CalculateCanotoCache()
- func (*Spec) CanotoSpec(types ...reflect.Type) *Spec
- func (c *Spec) MarshalCanoto() []byte
- func (c *Spec) MarshalCanotoInto(w Writer) Writer
- func (c *Spec) UnmarshalCanoto(bytes []byte) error
- func (c *Spec) UnmarshalCanotoFrom(r Reader) error
- func (c *Spec) ValidCanoto() bool
- type Uint
- type WireType
- type Writer
Constants ¶
const ( // Varint represents the variable-length integer wire type. Varint WireType = iota // I64 represents the 64-bit fixed-length wire type. I64 // Len represents the length-delimited wire type. Len // I32 represents the 32-bit fixed-length wire type. I32 // SizeEnum8 indicates either an [int8] or [uint8]. SizeEnum8 SizeEnum = 1 // SizeEnum16 indicates either an [int16] or [uint16]. SizeEnum16 SizeEnum = 2 // SizeEnum32 indicates either an [int32] or [uint32]. SizeEnum32 SizeEnum = 3 // SizeEnum64 indicates either an [int64] or [uint64]. SizeEnum64 SizeEnum = 4 // SizeFint32 is the size of a 32-bit fixed size integer in bytes. SizeFint32 = 4 // SizeFint64 is the size of a 64-bit fixed size integer in bytes. SizeFint64 = 8 // SizeBool is the size of a boolean in bytes. SizeBool = 1 // FieldTypeInt is the field number of an int in the [FieldType] OneOf. FieldTypeInt = canotoNumber_FieldType__TypeInt // FieldTypeUint is the field number of a uint in the [FieldType] OneOf. FieldTypeUint = canotoNumber_FieldType__TypeUint // FieldTypeFixedInt is the field number of a fixed int in the [FieldType] // OneOf. FieldTypeFixedInt = canotoNumber_FieldType__TypeFixedInt // FieldTypeFixedUint is the field number of a fixed uint in the [FieldType] // OneOf. FieldTypeFixedUint = canotoNumber_FieldType__TypeFixedUint // FieldTypeBool is the field number of a bool in the [FieldType] OneOf. FieldTypeBool = canotoNumber_FieldType__TypeBool // FieldTypeString is the field number of a string in the [FieldType] OneOf. FieldTypeString = canotoNumber_FieldType__TypeString // FieldTypeBytes is the field number of bytes in the [FieldType] OneOf. FieldTypeBytes = canotoNumber_FieldType__TypeBytes // FieldTypeFixedBytes is the field number of fixed bytes in the [FieldType] // OneOf. FieldTypeFixedBytes = canotoNumber_FieldType__TypeFixedBytes // FieldTypeMessage is the field number of a message in the [FieldType] OneOf. FieldTypeMessage = canotoNumber_FieldType__TypeMessage // FieldTypeRecursive is the field number of a recursive type in the // [FieldType] OneOf. FieldTypeRecursive = canotoNumber_FieldType__TypeRecursive // MaxFieldNumber is the maximum field number allowed to be used in a Tag. MaxFieldNumber = 1<<29 - 1 // Version is the current version of the canoto library. Version = "v0.19.0" // VersionCompatibility is used to ensure generated code is compatible with // the library it is using. It is incremented whenever the library includes // a breaking change. VersionCompatibility = 1 // EmptyBytes is the length-prefixed encoding of empty bytes. EmptyBytes = "\x00" // AppendBytes(&Writer{}, []byte{}).B // PointerPresenceTag is the tag used to encode the presence of a non-nil // pointer element within repeated pointer fields. It encodes field number 1 // with the Len wire type. PointerPresenceTag = "\x0a" // Tag(1, Len) // SizePointerPresenceTag is the size of [PointerPresenceTag] in bytes. SizePointerPresenceTag = uint64(len(PointerPresenceTag)) )
Variables ¶
var ( // Code is the source of this file, embedded as a string. It can be used // during code generation to produce standalone copies of this library. // // This variable is not referenced internally, so the compiler omits it // from the binary if unused. // //go:embed canoto.go Code string // GeneratedCode is the source of the auto-generated canoto.canoto.go // file, embedded as a string. It can be used during code generation to // produce standalone copies of this library. // // This variable is not referenced internally, so the compiler omits it // from the binary if unused. // //go:embed canoto.canoto.go GeneratedCode string // ErrInvalidFieldOrder is returned when fields are not encoded in ascending // field number order. ErrInvalidFieldOrder = errors.New("invalid field order") // ErrUnexpectedWireType is returned when a field's wire type does not match // the expected wire type. ErrUnexpectedWireType = errors.New("unexpected wire type") // ErrDuplicateOneOf is returned when multiple fields in the same OneOf // group are set. ErrDuplicateOneOf = errors.New("duplicate oneof field") // ErrInvalidLength is returned when a decoded length is invalid. ErrInvalidLength = errors.New("decoded length is invalid") // ErrZeroValue is returned when a field contains a zero value, which is not // permitted in canoto encoding. ErrZeroValue = errors.New("zero value") // ErrUnknownField is returned when a field number is not recognized by the // message specification. ErrUnknownField = errors.New("unknown field") // ErrPaddedZeroes is returned when a varint contains unnecessary leading // zero bytes, violating canonical encoding. ErrPaddedZeroes = errors.New("padded zeroes") // ErrInvalidRecursiveDepth is returned when a recursive type references a // depth that exceeds the available specification stack. ErrInvalidRecursiveDepth = errors.New("invalid recursive depth") // ErrUnknownFieldType is returned when a field type is not recognized. ErrUnknownFieldType = errors.New("unknown field type") // ErrUnexpectedFieldSize is returned when a field's size does not match the // expected size for its type. ErrUnexpectedFieldSize = errors.New("unexpected field size") // ErrInvalidFieldType is returned when the value provided for a field does // not match the expected Go type. ErrInvalidFieldType = errors.New("invalid field type") // ErrOverflow is returned when a decoded integer overflows the target type. ErrOverflow = errors.New("overflow") // ErrInvalidWireType is returned when a wire type value is not valid. ErrInvalidWireType = errors.New("invalid wire type") // ErrInvalidBool is returned when a decoded boolean is neither 0 nor 1. ErrInvalidBool = errors.New("decoded bool is neither true nor false") // ErrStringNotUTF8 is returned when a decoded string is not valid UTF-8. ErrStringNotUTF8 = errors.New("decoded string is not UTF-8") )
Functions ¶
func Append ¶
func Append[T Bytes](w *Writer, v T)
Append writes raw bytes to the writer without a length prefix.
func AppendBool ¶
func AppendBool[T ~bool](w *Writer, b T)
AppendBool writes a boolean to the writer.
func AppendBytes ¶
func AppendBytes[T Bytes](w *Writer, v T)
AppendBytes writes a length-prefixed byte slice to the writer.
func AppendFint32 ¶
func AppendFint32[T Int32](w *Writer, v T)
AppendFint32 writes a 32-bit fixed size integer to the writer.
func AppendFint64 ¶
func AppendFint64[T Int64](w *Writer, v T)
AppendFint64 writes a 64-bit fixed size integer to the writer.
func AppendInt ¶
func AppendInt[T Int](w *Writer, v T)
AppendInt writes an integer to the writer as a zigzag encoded varint.
func AppendUint ¶ added in v0.13.1
func AppendUint[T Uint](w *Writer, v T)
AppendUint writes an unsigned integer to the writer as a varint.
func CountBytes ¶
CountBytes counts the consecutive number of length-prefixed fields with the given tag.
func IsZero ¶
func IsZero[T comparable](v T) bool
IsZero returns true if the value is the zero value for its type.
func MakeEntry ¶ added in v0.13.1
func MakeEntry[S ~[]E, E any](_ S) (_ E)
MakeEntry returns the zero value of an element in the provided slice.
This function is useful to use in auto-generated code, when the type of a variable is unknown. For example, if we have a variable `v` which we know to be a slice, but we do not know the type of the elements, we can use this function to leverage golang's type inference to create an element.
func MakeEntryNilPointer ¶ added in v0.15.0
func MakeEntryNilPointer[S ~[]E, E any](_ S) *E
MakeEntryNilPointer returns a nil pointer to an element in the provided slice.
This function is useful to use in auto-generated code, when the type of a variable is unknown. For example, if we have a variable `v` which we know to be a slice, but we do not know the type of the elements, we can use this function to leverage golang's type inference to create the pointer.
func MakePointer ¶ added in v0.5.0
func MakePointer[T any](_ *T) *T
MakePointer creates a new pointer. It is equivalent to `new(T)`.
This function is useful to use in auto-generated code, when the type of a variable is unknown. For example, if we have a variable `v` which we know to be a pointer, but we do not know the type of the pointer, we can use this function to leverage golang's type inference to create the new pointer.
func MakeSlice ¶
MakeSlice creates a new slice with the given length. It is equivalent to `make([]T, length)`.
This function is useful to use in auto-generated code, when the type of a variable is unknown. For example, if we have a variable `v` which we know to be a slice, but we do not know the type of the elements, we can use this function to leverage golang's type inference to create the new slice.
func Marshal ¶ added in v0.13.1
Marshal marshals the given message into bytes based on the specification.
This function is significantly slower than calling MarshalCanoto on the type directly. This function should only be used when the concrete type can not be known ahead of time.
func ReadFint32 ¶
ReadFint32 reads a 32-bit fixed size integer from the reader.
func ReadFint64 ¶
ReadFint64 reads a 64-bit fixed size integer from the reader.
func ReadPointerPresence ¶ added in v0.18.0
ReadPointerPresence unwraps a repeated pointer element by stripping the tag and length prefix that encodes the presence of a non-nil pointer.
func ReadString ¶
ReadString reads a string from the reader. The string is verified to be valid UTF-8.
func SizeUint ¶ added in v0.13.1
SizeUint calculates the size of an unsigned integer when encoded as a varint.
func Tag ¶
Tag calculates the tag for a field number and wire type.
This function should not typically be used during marshaling, as tags can be precomputed.
func ValidString ¶ added in v0.14.0
ValidString returns true if it is valid to encode the provided string. A string is valid to encode if it is valid UTF-8.
Types ¶
type Any ¶ added in v0.13.1
type Any struct {
Fields []AnyField
// contains filtered or unexported fields
}
Any is a generic representation of a Canoto message.
func Unmarshal ¶ added in v0.13.1
Unmarshal unmarshals the given bytes into a message based on the specification.
This function is significantly slower than calling UnmarshalCanoto on the type directly. This function should only be used when the concrete type can not be known ahead of time.
func (Any) MarshalJSON ¶ added in v0.13.1
MarshalJSON implements the json.Marshaler interface.
type AnyField ¶ added in v0.13.1
type AnyField struct {
Name string
// Value is the value of the field.
//
// It can be any of the following types:
// - int64, []int64
// - uint64, []uint64
// - bool, []bool
// - string, []string
// - []byte, [][]byte
// - Any, []Any
// - []*Any
//
// Notice that *Any is not allowed. A nil pointer should not have any
// field entry.
Value any
// contains filtered or unexported fields
}
AnyField is a generic representation of a field in a Canoto message.
type Field ¶
type Field interface {
// CanotoSpec returns the specification of this canoto message.
//
// If there is not a valid specification of this type, it returns nil.
CanotoSpec(types ...reflect.Type) *Spec
// MarshalCanotoInto writes the field into a [Writer] and returns the
// resulting [Writer].
//
// It is assumed that CalculateCanotoCache has been called since the
// last modification to this field.
//
// It is assumed that this field is ValidCanoto.
MarshalCanotoInto(w Writer) Writer
// CalculateCanotoCache populates internal caches based on the current
// values in the struct.
CalculateCanotoCache()
// CachedCanotoSize returns the previously calculated size of the Canoto
// representation from CalculateCanotoCache.
//
// If CalculateCanotoCache has not yet been called, or the field has
// been modified since the last call to CalculateCanotoCache, the
// returned size may be incorrect.
CachedCanotoSize() uint64
// UnmarshalCanotoFrom populates the field from a [Reader].
UnmarshalCanotoFrom(r Reader) error
// ValidCanoto validates that the field can be correctly marshaled into
// the Canoto format.
ValidCanoto() bool
}
Field defines a type that can be included in a Canoto message.
type FieldPointer ¶ added in v0.4.0
FieldPointer is a constraint that requires *T to implement Field.
This must be used as a type parameter when defining a generic struct that contains a Field value.
type FieldType ¶ added in v0.13.1
type FieldType struct {
FieldNumber uint32 `canoto:"uint,1" json:"fieldNumber"`
Name string `canoto:"string,2" json:"name"`
FixedLength uint64 `canoto:"uint,3" json:"fixedLength,omitempty"`
Repeated bool `canoto:"bool,4" json:"repeated,omitempty"`
OneOf string `canoto:"string,5" json:"oneOf,omitempty"`
Pointer bool `canoto:"bool,6" json:"pointer,omitempty"`
TypeInt SizeEnum `canoto:"uint,7,Type" json:"typeInt,omitempty"` // can be any of 8, 16, 32, or 64.
TypeUint SizeEnum `canoto:"uint,8,Type" json:"typeUint,omitempty"` // can be any of 8, 16, 32, or 64.
TypeFixedInt SizeEnum `canoto:"uint,9,Type" json:"typeFixedInt,omitempty"` // can be either 32 or 64.
TypeFixedUint SizeEnum `canoto:"uint,10,Type" json:"typeFixedUint,omitempty"` // can be either 32 or 64.
TypeBool bool `canoto:"bool,11,Type" json:"typeBool,omitempty"` // can only be true.
TypeString bool `canoto:"bool,12,Type" json:"typeString,omitempty"` // can only be true.
TypeBytes bool `canoto:"bool,13,Type" json:"typeBytes,omitempty"` // can only be true.
TypeFixedBytes uint64 `canoto:"uint,14,Type" json:"typeFixedBytes,omitempty"` // length of the fixed bytes.
TypeMessage *Spec `canoto:"pointer,15,Type" json:"typeMessage,omitempty"`
TypeRecursive uint64 `canoto:"uint,16,Type" json:"typeRecursive,omitempty"` // depth of the recursion.
// contains filtered or unexported fields
}
FieldType is the specification of a field in a Canoto message.
func FieldTypeFromField ¶ added in v0.13.1
func FieldTypeFromField[T Field]( field T, fieldNumber uint32, name string, fixedLength uint64, repeated bool, oneOf string, pointer bool, types []reflect.Type, ) FieldType
FieldTypeFromField creates a FieldType specification for a message or custom Field type. This is primarily used by generated code to build Spec values.
func FieldTypeFromFint ¶ added in v0.13.1
func FieldTypeFromFint[T integer]( field T, fieldNumber uint32, name string, fixedLength uint64, repeated bool, oneOf string, ) FieldType
FieldTypeFromFint creates a FieldType specification for a fixed-size integer field. This is primarily used by generated code to build Spec values.
func (*FieldType) CachedCanotoSize ¶ added in v0.13.1
func (c *FieldType) CachedCanotoSize() uint64
CachedCanotoSize returns the previously calculated size of the Canoto representation from CalculateCanotoCache.
If CalculateCanotoCache has not yet been called, it will return 0.
If the struct has been modified since the last call to CalculateCanotoCache, the returned size may be incorrect.
func (*FieldType) CachedWhichOneOfType ¶ added in v0.13.1
func (c *FieldType) CachedWhichOneOfType() uint32
CachedWhichOneOfType returns the previously calculated field number used to represent Type.
This field is cached by UnmarshalCanoto, UnmarshalCanotoFrom, and CalculateCanotoCache.
If the field has not yet been cached, it will return 0.
If the struct has been modified since the field was last cached, the returned field number may be incorrect.
func (*FieldType) CalculateCanotoCache ¶ added in v0.13.1
func (c *FieldType) CalculateCanotoCache()
CalculateCanotoCache populates size and OneOf caches based on the current values in the struct.
It is not safe to copy this struct concurrently.
func (*FieldType) CanotoSpec ¶ added in v0.13.1
CanotoSpec returns the specification of this canoto message.
func (*FieldType) MarshalCanoto ¶ added in v0.13.1
func (c *FieldType) MarshalCanoto() []byte
MarshalCanoto returns the Canoto representation of this struct.
It is assumed that this struct is ValidCanoto.
It is not safe to copy this struct concurrently.
func (*FieldType) MarshalCanotoInto ¶ added in v0.13.1
func (c *FieldType) MarshalCanotoInto(w Writer) Writer
MarshalCanotoInto writes the struct into a Writer and returns the resulting Writer. Most users should just use MarshalCanoto.
It is assumed that CalculateCanotoCache has been called since the last modification to this struct.
It is assumed that this struct is ValidCanoto.
It is not safe to copy this struct concurrently.
func (*FieldType) UnmarshalCanoto ¶ added in v0.13.1
UnmarshalCanoto unmarshals a Canoto-encoded byte slice into the struct.
During parsing, the canoto cache is saved.
func (*FieldType) UnmarshalCanotoFrom ¶ added in v0.13.1
func (c *FieldType) UnmarshalCanotoFrom(r Reader) error
UnmarshalCanotoFrom populates the struct from a Reader. Most users should just use UnmarshalCanoto.
During parsing, the canoto cache is saved.
This function enables configuration of reader options.
func (*FieldType) ValidCanoto ¶ added in v0.13.1
func (c *FieldType) ValidCanoto() bool
ValidCanoto validates that the struct can be correctly marshaled into the Canoto format.
Specifically, ValidCanoto ensures: 1. All OneOfs are specified at most once. 2. All strings are valid utf-8. 3. All custom fields are ValidCanoto.
type Message ¶
type Message interface {
Field
// MarshalCanoto returns the Canoto representation of this message.
//
// It is assumed that this message is ValidCanoto.
MarshalCanoto() []byte
// UnmarshalCanoto unmarshals a Canoto-encoded byte slice into the
// message.
UnmarshalCanoto(bytes []byte) error
}
Message defines a type that can be a stand-alone Canoto message.
type Reader ¶
type Reader struct {
// B is the remaining bytes to be read.
B []byte
// Unsafe, when true, avoids copying during unmarshaling. Decoded
// strings and byte slices will alias the original input buffer,
// which must not be modified after unmarshaling.
Unsafe bool
// Context is a user-defined value that can be used to pass additional
// state during the unmarshaling process.
Context any
}
Reader contains all the state needed to unmarshal a Canoto type.
The functions in this package are not methods on the Reader type to enable the usage of generics.
type SizeEnum ¶ added in v0.13.1
type SizeEnum uint8
SizeEnum indicates the size of an integer type in canoto specifications.
func SizeOf ¶ added in v0.13.1
func SizeOf[T integer](_ T) SizeEnum
SizeOf returns the size of the integer type.
func (SizeEnum) FixedWireType ¶ added in v0.13.1
func (s SizeEnum) FixedWireType() (WireType, bool)
FixedWireType returns the wire type for fixed-size integers of this size. It returns false if this size does not correspond to a fixed-size wire type.
type Spec ¶ added in v0.13.1
type Spec struct {
Name string `canoto:"string,1" json:"name"`
Fields []FieldType `canoto:"repeated value,2" json:"fields"`
// contains filtered or unexported fields
}
Spec is the specification of a Canoto message.
Given a message specification, Unmarshal can be used to parse bytes into an Any.
Spec is itself a message, to allow for implementations of universal canoto message interpreters.
func (*Spec) CachedCanotoSize ¶ added in v0.13.1
func (c *Spec) CachedCanotoSize() uint64
CachedCanotoSize returns the previously calculated size of the Canoto representation from CalculateCanotoCache.
If CalculateCanotoCache has not yet been called, it will return 0.
If the struct has been modified since the last call to CalculateCanotoCache, the returned size may be incorrect.
func (*Spec) CalculateCanotoCache ¶ added in v0.13.1
func (c *Spec) CalculateCanotoCache()
CalculateCanotoCache populates size and OneOf caches based on the current values in the struct.
It is not safe to copy this struct concurrently.
func (*Spec) CanotoSpec ¶ added in v0.13.1
CanotoSpec returns the specification of this canoto message.
func (*Spec) MarshalCanoto ¶ added in v0.13.1
func (c *Spec) MarshalCanoto() []byte
MarshalCanoto returns the Canoto representation of this struct.
It is assumed that this struct is ValidCanoto.
It is not safe to copy this struct concurrently.
func (*Spec) MarshalCanotoInto ¶ added in v0.13.1
func (c *Spec) MarshalCanotoInto(w Writer) Writer
MarshalCanotoInto writes the struct into a Writer and returns the resulting Writer. Most users should just use MarshalCanoto.
It is assumed that CalculateCanotoCache has been called since the last modification to this struct.
It is assumed that this struct is ValidCanoto.
It is not safe to copy this struct concurrently.
func (*Spec) UnmarshalCanoto ¶ added in v0.13.1
UnmarshalCanoto unmarshals a Canoto-encoded byte slice into the struct.
During parsing, the canoto cache is saved.
func (*Spec) UnmarshalCanotoFrom ¶ added in v0.13.1
func (c *Spec) UnmarshalCanotoFrom(r Reader) error
UnmarshalCanotoFrom populates the struct from a Reader. Most users should just use UnmarshalCanoto.
During parsing, the canoto cache is saved.
This function enables configuration of reader options.
func (*Spec) ValidCanoto ¶ added in v0.13.1
func (c *Spec) ValidCanoto() bool
ValidCanoto validates that the struct can be correctly marshaled into the Canoto format.
Specifically, ValidCanoto ensures: 1. All OneOfs are specified at most once. 2. All strings are valid utf-8. 3. All custom fields are ValidCanoto.
type WireType ¶
type WireType byte
WireType represents the Proto wire description of a field. Within Proto it is used to provide forwards compatibility. For Canoto, it exists to provide compatibility with Proto.
Directories
¶
| Path | Synopsis |
|---|---|
|
Canoto is a command to generate code for reading and writing the canoto format.
|
Canoto is a command to generate code for reading and writing the canoto format. |
|
cli
module
|
|
|
Package generate produces canoto serialization code, proto definitions, and standalone library copies from Go source files.
|
Package generate produces canoto serialization code, proto definitions, and standalone library copies from Go source files. |
|
canoto
Package canoto implements a canonical, compact, and fast serialization format that is read-compatible with Protocol Buffers.
|
Package canoto implements a canonical, compact, and fast serialization format that is read-compatible with Protocol Buffers. |