mod target#

module target#

Declarative transport, executor, runtime, and EasyBuild workload routing.

Variables

const TARGET_CONFIG_SCHEMA_VERSION: u32#

Functions

fn doctor_target(target: &BuildTarget) -> Result<TargetDoctorReport, TargetError>#
fn resolve_target_layers(layers: &[TargetConfigLayer]) -> Result<Vec<BuildTarget>, TargetError>#

Enums

enum TargetError#
UnsupportedSchema(u32)#
Toml(toml::de::Error)#
Io(String, std::io::Error)#
EmptyName#
MissingLayer(String, &'static str)#
Spawn(String, std::io::Error)#
CommandFailed#
program: String#
exit_code: Option<i32>#
stderr: String#
enum TargetExecutor#
Direct#
Slurm#
command: String#
partition: Option<String>#
account: Option<String>#
cpus: Option<u32>#
memory: Option<String>#
time: Option<String>#
gres: Option<String>#
enum TargetRuntime#
Host#
Podman#
image: String#
command: String#
args: Vec<String>#
mounts: Vec<String>#
workdir: Option<String>#
Docker#
image: String#
command: String#
args: Vec<String>#
mounts: Vec<String>#
workdir: Option<String>#
enum TargetTransport#
Local#
Ssh#
host: String#
port: Option<u16>#
command: String#
sync_command: String#

Structs and Unions

struct BuildTarget#
name: String#
transport: TargetTransport#
executor: TargetExecutor#
runtime: TargetRuntime#
easybuild: EasyBuildWorkload#

Implementations

impl BuildTarget#

Functions

fn build_command(&self, recipe: &str) -> CommandPlan#
fn stage_bundle(&self, local_bundle: &Path) -> Result<String, TargetError>#
fn staged_bundle_path(&self, local_bundle: &Path) -> String#
fn verification_command(&self, program: &str, args: &[String]) -> CommandPlan#
struct CommandPlan#
program: String#
args: Vec<String>#

Implementations

impl CommandPlan#

Functions

fn execute(&self) -> Result<std::process::Output, TargetError>#
struct DoctorCheck#
layer: String#
command: CommandPlan#
success: bool#
exit_code: Option<i32>#
stdout: String#
stderr: String#
struct EasyBuildWorkload#
command: String#
robot_paths: Vec<String>#
work_root: String#
tmp_root: String#
environment: BTreeMap<String, String>#
struct TargetConfigLayer#
schema_version: u32#
targets: Vec<TargetPatch>#

Implementations

impl TargetConfigLayer#

Functions

fn from_path(path: &Path) -> Result<Self, TargetError>#
fn from_toml_str(input: &str) -> Result<Self, TargetError>#
struct TargetDoctorReport#
target: String#
checks: Vec<DoctorCheck>#

Implementations

impl TargetDoctorReport#

Functions

fn ok(&self) -> bool#
struct TargetPatch#
name: String#
transport: Option<TargetTransport>#
executor: Option<TargetExecutor>#
runtime: Option<TargetRuntime>#
easybuild: Option<EasyBuildWorkload>#