Documentation
¶
Index ¶
- type Compiler
- func (c *Compiler) Compile(ctx context.Context, files []compiler.ProtoFile, opts compiler.CompileOptions) (*compiler.CompileResult, error)
- func (c *Compiler) GetOutputPath(file compiler.ProtoFile, opts compiler.CompileOptions) string
- func (c *Compiler) Name() string
- func (c *Compiler) RequiredTools() []string
- func (c *Compiler) Validate() error
- type Options
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 (*Compiler) Compile ¶
func (c *Compiler) Compile(ctx context.Context, files []compiler.ProtoFile, opts compiler.CompileOptions) (*compiler.CompileResult, error)
Compile compiles proto files to Rust
func (*Compiler) GetOutputPath ¶
GetOutputPath returns the output path for a proto file
func (*Compiler) RequiredTools ¶
RequiredTools returns the list of required external tools
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
Click to show internal directories.
Click to hide internal directories.