Help us shape the future of Go! Take the 2026 Go Developer Survey

rust

package
v0.50.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Overview

Package rust implements a native Rust code generator.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(ctx context.Context, model *api.API, outdir string, cfg *parser.ModelConfig) error

Generate generates Rust code from the model.

func GenerateBigQueryBuilder added in v0.20.0

func GenerateBigQueryBuilder(ctx context.Context, outdir string, model *api.API, cfg *parser.ModelConfig) error

GenerateBigQueryBuilder generates Rust code for the bigquery query builder.

func GenerateStorage

func GenerateStorage(ctx context.Context, outdir string, storageModel *api.API, storageConfig *parser.ModelConfig, controlModel *api.API, controlConfig *parser.ModelConfig) error

GenerateStorage generates Rust code for the storage service.

func GrpcRootTypeIDs added in v0.43.0

func GrpcRootTypeIDs(model *api.API) []string

GrpcRootTypeIDs returns the root message type IDs for all generated gRPC methods in the model.

func PackageName

func PackageName(api *api.API, packageNameOverride string) string

PackageName returns the package name for the API.

Types

type FormattedResource added in v0.12.0

type FormattedResource struct {
	// The Rust format string, e.g., "projects/{project_id}/secrets/{secret_id}"
	FormatString string
	// The variables used in the format string.
	FormatArgs []string
}

FormattedResource contain the format string and the format arguments of a resource name.

type PathExtraction added in v0.39.0

type PathExtraction struct {
	// Rust code to take the leaf field.
	FieldTake string
}

PathExtraction represents the actions to extract path parameters from a request body.

Jump to

Keyboard shortcuts

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