mod easystack¶
- module easystack¶
Emit an EasyBuild easystack file from a solved lock.
A lock says what to install and in which order it was selected. An easystack is the format EasyBuild itself consumes for that,
eb --easystack file.yml, and the format EESSI’s software layer is built from, where the files live at easystacks/software.eessi.io/<version>/ and are the unit of a build PR. Emitting one turns a solve into something both a site pipeline and an upstream contribution can run without a human retyping the list.The format, since EasyBuild 4.7: a top-level
easyconfigskey whose entries are either a filename or a single-key mapping from filename tooptions, where each option is anebcommand-line flag without its dashes.Types
- type EasystackOptions¶
Per-easyconfig
eboptions, keyed by the easyconfig filename they apply to.Keys are written as they appear on the command line without the leading dashes, which is what EasyBuild reads:
from-commit,accept-eula-for,include-systems.
Variables
- const LLVM_FAMILY: &[&str]¶
Toolchain names a foss solve cannot see.
The LLVM family is
lfoss,lompi,lfbf, andllvm-compilers. OpenMPI underllvm-compilers-21.1.8is in that family. A foss solve’s universe is the foss hierarchy, so a package that exists only on one of these toolchains is absent from the foss lock and a later diff marks it site layer.data/eessi-generations.tomllistsllvm-compilers-20.1.8(generation 2025b) andllvm-compilers-21.1.8(generation 2026.1) by hand, because an LLVM release is not a generation name.
Functions
- fn easystack_from_paths(paths: &[&str], options: &EasystackOptions) -> String¶
Render an easystack from easyconfig paths in the order they are given.
A lock is sorted by name so two locks diff cleanly, which is the wrong order for a build. A sequence from
crate::build_orderis already the order to build in, and writing it out sorted would throw away the only thing it knows that a lock does not.
- fn eessi_easystacks(paths: &[&str], options: &EasystackOptions, layout: &EessiLayout) -> Result<BTreeMap<String, String>, String>¶
Split easyconfig paths into EESSI easystack files, keeping the given order inside each file. Keys are paths relative to the software-layer root.
- fn filename_toolchain(file: &str) -> Option<FilenameToolchain>¶
The toolchain an easyconfig filename names, with the name and version in front of it.
Nonefor a system recipe, whose filename names no toolchain.EasyBuild writes <name>-<version>-<toolchain>-<toolchainversion><suffix>.eb. The name ends before the first dash-separated part that opens with a digit. A version that does not open with one (
buildenv-default-foss-2025b.eb,OpenFOAM-v2506-foss-2025a.eb) is the part right before the toolchain.
- fn llvm_family_name(label: &str) -> Option<&'static str>¶
The LLVM family
labelnames, orNonewhen it is some other toolchain.labelis a toolchain name (lfoss) or aname-versionlabel whose version starts with a digit (llvm-compilers-21.1.8,lfoss-2026.1). The longest family name wins, sollvm-compilersis not cut at a shorter prefix.
- fn llvm_family_version(label: &str, family: &str) -> Option<String>¶
The version after
familyinlabel, whenlabelis that family.llvm-compilers-21.1.8andllvm-compilersyieldSome("21.1.8")andSome(""). A label that is only the family name has an empty version.
- fn lock_to_easystack(lock: &StackLock, options: &EasystackOptions) -> String¶
Render a lock as an easystack document.
Entries keep the order of the lock rather than being re-sorted, so a diff between two easystacks reads the same way as a diff between the locks they came from. A package whose lock entry names no easyconfig file is skipped: EasyBuild cannot be asked to build a file that was never on disk, and a silently wrong filename would fail deep in a pipeline rather than here.
- fn parse_easystack_entries(text: &str) -> Result<Vec<EasystackEntry>, serde_yaml::Error>¶
Read the entries of an easystack document, in file order.
Both entry shapes are read: a bare filename, and a single-key mapping from filename to
options. Anything under the top-leveleasyconfigskey that names no.ebfile is skipped rather than guessed at.
- fn parse_easystack_written(text: &str) -> Result<Vec<(String, EasystackEntry)>, serde_yaml::Error>¶
parse_easystack_entries, with each entry’s easyconfig as the file writes it. EasyBuild reads a written path such as an EESSIreprodcopy from that path rather than from the robot path.
Structs and Unions
- struct EasystackEntry¶
One entry of an easystack as written: the easyconfig file it names, and the commit that file comes from when the entry pins one with
from-commit.- file: String¶
Easyconfig filename. A path in the file (EESSI’s per-arch stacks write absolute reprod paths) is cut to its basename, which is what EasyBuild looks up on the robot path.
- from_commit: Option<String>¶
The easybuild-easyconfigs commit given as
from-commit, if any.
- include_easyblocks_from_commit: Option<String>¶
The easybuild-easyblocks commit given as
include-easyblocks-from-commit.
- include_easyblocks_from_pr: Option<String>¶
The easybuild-easyblocks pull request given as
include-easyblocks-from-pr.
- struct EessiLayout¶
Where entries go in EESSI’s software layer.
easystacks/software.eessi.io/<V>/eessi-<V>-eb-<X>-<generation>.yml for the generation’s toolchains,
...-001-system.ymlfor toolchain-free recipes, and the same names underaccel/nvidia/for CUDA builds. One file per EasyBuild release and generation is how the existing EESSI versions are laid out, and new entries go into the newest release’s file.- eessi_version: String¶
EESSI version,
2026.06.
- easybuild_version: String¶
EasyBuild release the entries are built with,
5.4.1.
- generation: String¶
Toolchain generation,
2026.1.
- members: Vec<String>¶
Toolchain labels of the generation:
GCCcore-15.2.0,foss-2026.1, …
Implementations
- impl EessiLayout¶
Functions
- fn path_for(&self, file: &str) -> Result<String, String>¶
The easystack path, relative to the software-layer root, for one easyconfig.
Errors when the file names a toolchain outside this generation: placing it would put a 2025b recipe into a 2026.1 file.