rust

package
v0.4.6 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateRustCargofile

func GenerateRustCargofile(signatureInfo *SignatureInfo, functionInfo *FunctionInfo) ([]byte, error)

func GenerateRustLib

func GenerateRustLib(scalefileSchema *scalefile.Schema, functionInfo *FunctionInfo) ([]byte, error)

Types

type Cargo

type Cargo struct {
	CargoFeatures     interface{}            `toml:"cargo-features,omitempty"`
	Package           interface{}            `toml:"package,omitempty"`
	Lib               interface{}            `toml:"lib,omitempty"`
	Bin               interface{}            `toml:"bin,omitempty"`
	Example           interface{}            `toml:"example,omitempty"`
	Test              interface{}            `toml:"test,omitempty"`
	Bench             interface{}            `toml:"bench,omitempty"`
	Dependencies      map[string]interface{} `toml:"dependencies,omitempty"`
	DevDependencies   interface{}            `toml:"dev-dependencies,omitempty"`
	BuildDependencies interface{}            `toml:"build-dependencies,omitempty"`
	Target            interface{}            `toml:"target,omitempty"`
	Badges            interface{}            `toml:"badges,omitempty"`
	Features          interface{}            `toml:"features,omitempty"`
	Patch             interface{}            `toml:"patch,omitempty"`
	Replace           interface{}            `toml:"replace,omitempty"`
	Profile           interface{}            `toml:"profile,omitempty"`
	Workspace         interface{}            `toml:"workspace,omitempty"`
}

type DependencyPath

type DependencyPath struct {
	Path    string `toml:"path"`
	Package string `toml:"package"`
}

type DependencyVersion

type DependencyVersion struct {
	Version  string `toml:"version"`
	Package  string `toml:"package"`
	Registry string `toml:"registry"`
}

type ExtensionInfo added in v0.4.6

type ExtensionInfo struct {
	// Local specifies whether the extension is a locally importable extension
	Local bool

	// PackageName is the name of the extension package
	PackageName string

	// ImportPath is the import path for the extension, if the extension is local this will be a path on disk
	ImportPath string

	// ImportVersion is the version of the extension to import, if the extension is local this will be ignored
	ImportVersion string
}

ExtensionInfo is the import information for an Extension

type FunctionInfo added in v0.4.6

type FunctionInfo struct {
	// PackageName is the name of the function package
	PackageName string

	// ImportPath is the import path for the function, always a path on disk
	ImportPath string
}

FunctionInfo is the import information for a Function

type Generator

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

func New

func New() *Generator

func (*Generator) GenerateRustCargofile

func (g *Generator) GenerateRustCargofile(signatureInfo *SignatureInfo, functionInfo *FunctionInfo) ([]byte, error)

func (*Generator) GenerateRustLib

func (g *Generator) GenerateRustLib(scalefileSchema *scalefile.Schema, functionInfo *FunctionInfo) ([]byte, error)

type Manifest

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

func ParseManifest

func ParseManifest(data []byte) (*Manifest, error)

func (*Manifest) AddDependencyWithPath

func (m *Manifest) AddDependencyWithPath(dependency string, path DependencyPath) error

func (*Manifest) AddDependencyWithVersion

func (m *Manifest) AddDependencyWithVersion(dependency string, version DependencyVersion) error

func (*Manifest) GetDependency

func (m *Manifest) GetDependency(dependency string) *ParsedDependency

func (*Manifest) HasDependency

func (m *Manifest) HasDependency(dependency string) bool

func (*Manifest) RemoveDependency

func (m *Manifest) RemoveDependency(dependency string) error

func (*Manifest) Write

func (m *Manifest) Write() ([]byte, error)

type ParsedDependency

type ParsedDependency struct {
	Version  string `toml:"version,omitempty"`
	Package  string `toml:"package,omitempty"`
	Registry string `toml:"registry,omitempty"`
	Path     string `toml:"path,omitempty"`
}

type SignatureInfo added in v0.4.6

type SignatureInfo struct {
	// Local specifies whether the signature is a locally importable signature
	Local bool

	// PackageName is the name of the signature package
	PackageName string

	// ImportPath is the import path for the signature, if the signature is local this will be a path on disk
	ImportPath string

	// ImportVersion is the version of the signature to import, if the signature is local this will be ignored
	ImportVersion string
}

SignatureInfo is the import information for a Signature

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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