Skip to main content

Module target

Module target 

Source
Expand description

The Cargo target a deploy builds and the builder image’s Rust version.

Structs§

CargoTarget
The resolved Cargo target.

Constants§

COMPILED_RUSTC_VERSION
The version of the compiler that built gadk-cli (build.rs), the third candidate of the builder-image version chain; empty when build.rs could not read it.
DEFAULT_BUILDER_RUST_VERSION
The last-resort, rolling builder tag.

Functions§

builder_image
rust:<version>-bookworm, or rust:bookworm for latest.
builder_rust_version
<workspace_root>/rust-toolchain.toml [toolchain] channel → target.rust_version → compiled (callers pass COMPILED_RUSTC_VERSION) → DEFAULT_BUILDER_RUST_VERSION; each candidate is used only when is_rust_version.
channel_from_toolchain_file
The [toolchain] channel of rust-toolchain.toml contents when it is a version number, else "". A minimal line reader (no TOML parser): section headers, channel = "<v>" or '<v>', trailing # comments.
check_path_dependencies
Rejects a path dependency of a workspace member outside staged_root (it would not be staged).
is_rust_version
A Rust version number: ^[0-9]+(\.[0-9]+){0,2}$.
resolve
Resolves -e/--entry_point_path (a package directory or its Cargo.toml, relative to env.cwd; empty means env.cwd) and --bin through cargo metadata --format-version 1 --no-deps --manifest-path <dir>/Cargo.toml on env.runner. Errors (gadk’s texts): missing package, zero binaries, unknown --bin, several binaries without --bin, no Cargo.lock at the workspace root.