rust-toolchain.eclass

Name

rust-toolchain.eclass -- helps map gentoo arches to rust ABIs

Description

This eclass contains a src_unpack default phase function, and helper functions, to aid in proper rust-ABI handling for various gentoo arches.

Supported EAPIs

6 7 8

Functions

rust_abi [CHOST-value]

Outputs the Rust ABI name from a CHOST value, uses CHOST in the environment if none is specified.

rust_all_abis

Outputs a list of all the enabled Rust ABIs

rust_arch_uri <rust-ABI> <base-uri> [alt-distfile-basename]

Output the URI for use in SRC_URI, combining ${RUST_TOOLCHAIN_BASEURL} and the URI suffix provided in ARG2 with the rust ABI in ARG1, and optionally renaming to the distfile basename specified in ARG3.

Example:

SRC_URI="amd64? (
    $(rust_arch_uri x86_64-unknown-linux-gnu rustc-${STAGE0_VERSION})
)"
rust_all_arch_uris <base-uri> [alt-distfile-basename]

Outputs the URIs for SRC_URI to help fetch dependencies, using a base URI provided as an argument. Optionally allows for distfile renaming via a specified basename.

Example:

SRC_URI="$(rust_all_arch_uris rustc-${STAGE0_VERSION})"

Variables

RUST_TOOLCHAIN_BASEURL ?= https://static.rust-lang.org/dist/

This variable specifies the base URL used by the rust_arch_uri and rust_all_arch_uris functions when generating the URI output list.

Maintainers

Rust Project <rust@gentoo.org>

Reporting Bugs

Please report bugs via https://bugs.gentoo.org/