Struct aws_build_lib::Builder[][src]

pub struct Builder {
    pub rust_version: String,
    pub mode: BuildMode,
    pub bin: Option<String>,
    pub strip: bool,
    pub launcher: Launcher,
    pub code_root: PathBuf,
    pub project_path: PathBuf,
    pub packages: Vec<String>,
    pub relabel: Option<Relabel>,
}
Expand description

Options for running the build.

Fields

rust_version: String

Rust version to install. Can be anything rustup understands as a valid version, e.g. “stable” or “1.45.2”.

mode: BuildMode

Whether to build for Amazon Linux 2 or AWS Lambda.

bin: Option<String>

Name of the binary target to build. Can be None if the project only has one binary target.

strip: bool

Strip the binary.

launcher: Launcher

Container launcher.

code_root: PathBuf

The root of the code that gets mounted in the container. All the source must live beneath this directory.

project_path: PathBuf

The project path is the path of the crate to build. It must be somewhere within the code_root directory (or the same path).

packages: Vec<String>

dev packages to install in container for build

relabel: Option<Relabel>

Relabel files before bind-mounting (z or Z volume option). Warning: this overwrites the current label on files on the host. Doing this to a system directory like /usr could break your system.

Implementations

Run the build in a container.

This will produce either a standalone executable (for Amazon Linux 2) or a zip file (for AWS Lambda). The file is given a unique name for convenient uploading to S3, and a short symlink to the file is also created (target/latest-al2 or target/latest-lambda).

The paths of the files are returned.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.