Project:Rust

From Gentoo Wiki
Jump to:navigation Jump to:search
Rust Project
Description The Rust Project maintains the Rust toolchain and its related packages.
Project email rust@gentoo.org
Packages p.g.o/rust@gentoo.org


IRC channel #gentoo-rust (webchat)
Lead(s)
No lead election date set
Member(s)
Subproject(s)
(and inherited member(s))
(none)
Parent Project Gentoo
Project listing

The goal of this project is to provide proper packaging of Rust and Cargo for use within the Gentoo ecosystem. The project also maintains cargo.eclass for use in ebuilds.

There are two tools for writing ebuilds for Rust software: app-portage/pycargoebuild (recommended) and dev-util/cargo-ebuild.

Bumping Rust and Cargo

Network-less builds

It is important to ensure that users of network-less builds or network sandboxing are able to build Rust and Cargo so you should test your ebuilds with the following:

FILE /etc/portage/make.confAdding network-sandbox to FEATURES in Portage
FEATURES="network-sandbox"

Ensure the binary is up to date

When bumping dev-lang/rust, please ensure that dev-lang/rust-bin is kept at the same release. This avoids issues with people mixing versions that Portage can't reason around (note: add the bug #).

Cargo based projects

This includes Cargo itself (and soon Rust itself).

Always use app-portage/pycargoebuild (github) or dev-util/cargo-ebuild (github) to gather the proper dependencies that need to appear in your ebuild.

More than likely, either of these utilities will generate a proper ebuild for you. If the package in question contains a Cargo.lock file, the dependencies that the tool creates MUST not be changed because offline installs will be broken.

rust-dev overlay

The rust-dev overlay is a prototype experiment for building crates as individual crate units.

This overlay handles each crate similarly to how non-binary programming languages like Perl, Python and Ruby work, by installing (possibly augmented) copies of the extracted crate archives, constructing a local directory registry source as described in source replacement in the cargo book, while deferring actual binary compilation to the relevant target leaves, leveraging slot-operator deps for automatic rebuilds.

But it's currently a very complicated mountain of work and not quite ready for prime-time.

More details