rust

package
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 3, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Compiler

type Compiler struct {
	// contains filtered or unexported fields
}

Compiler implements Rust protobuf compiler

func New

func New(log *logger.Logger, options *Options) *Compiler

New creates a new Rust compiler

func (*Compiler) Compile

Compile compiles proto files to Rust

func (*Compiler) GetOutputPath

func (c *Compiler) GetOutputPath(file compiler.ProtoFile, opts compiler.CompileOptions) string

GetOutputPath returns the output path for a proto file

func (*Compiler) Name

func (c *Compiler) Name() string

Name returns the compiler name

func (*Compiler) RequiredTools

func (c *Compiler) RequiredTools() []string

RequiredTools returns the list of required external tools

func (*Compiler) Validate

func (c *Compiler) Validate() error

Validate checks if the compiler is properly configured

type Options

type Options struct {
	ProtocPath     string // Path to protoc executable
	Generator      string // Generator to use: "rust-protobuf" or "prost"
	GenerateGrpc   bool   // Generate gRPC code (using tonic with prost)
	CargoIntegrate bool   // Generate Cargo.toml integration
}

Options contains Rust compiler options

func DefaultOptions

func DefaultOptions() Options

DefaultOptions returns default Rust compiler options

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL