rust

package
v0.0.0-...-3792e47 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2024 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package rust is the build planner for Rust projects.

Index

Constants

View Source
const ConfigPreStartCommand = "pre_start_command"

ConfigPreStartCommand is the key for the command before `CMD`. Useful for installing dependencies for runtime.

View Source
const ConfigRustAppDir = "rust.app_dir"

ConfigRustAppDir is the key for the directory of the application.

If this key is not set, the default value is the current directory – "/".

View Source
const ConfigRustAssets = "rust.assets"

ConfigRustAssets is the key for the assets of the application. It is an array.

The assets will be copied to the root of the application.

View Source
const ConfigRustEntry = "rust.entry"

ConfigRustEntry is the key for the binary entry name of the application.

If this key is not set, the default value is the binary with the submodule name. If there is no such submodule, it picks the first binary it found.

Variables

This section is empty.

Functions

func GenerateDockerfile

func GenerateDockerfile(meta types.PlanMeta) (string, error)

GenerateDockerfile generates the Dockerfile for the Rust project.

func GetMeta

func GetMeta(options GetMetaOptions) types.PlanMeta

GetMeta gets the metadata of the Rust project.

func NewIdentifier

func NewIdentifier() plan.Identifier

NewIdentifier returns a new Rust identifier.

func NewPacker

func NewPacker() packer.Packer

NewPacker returns a new Rust packer.

Types

type GetMetaOptions

type GetMetaOptions struct {
	Src    afero.Fs
	Config plan.ImmutableProjectConfiguration
	// In Rust, the submodule name is the binary name.
	SubmoduleName string
}

GetMetaOptions is the options for GetMeta.

type TemplateContext

type TemplateContext struct {
	OpenSSL    bool
	Serverless bool
	Entry      string
	AppDir     string
	Assets     []string

	BuildCommand    string
	StartCommand    string
	PreStartCommand string
}

TemplateContext is the context for the Dockerfile template.

Jump to

Keyboard shortcuts

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