Rust

From Gentoo Wiki
Jump to:navigation Jump to:search
This article is a stub. You can help by expanding it.

Rust is a general-purpose, multi-paradigm, compiled programming language.

Installation

USE flags

A recommended use flag to enable is system-llvm, but it can lead into a failed build due to possible LLVM version differences

USE flags for dev-lang/rust Systems programming language from Mozilla

clippy Install clippy, Rust code linter
debug Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces
doc Add extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally
miri Install miri, an interpreter for Rust's mid-level intermediate representation (requires USE=nightly)
nightly Enable nightly (UNSTABLE) features
parallel-compiler Build a multi-threaded rustc
rls Install rls, Rust Language Server (used with IDEs supporting RLS protocol)
rustfmt Install rustfmt, Rust code formatter
system-bootstrap Bootstrap using installed rust compiler
system-llvm Use the system LLVM install
test Enable dependencies and/or preparations necessary to run tests (usually controlled by FEATURES=test but can be toggled independently)
verify-sig Verify upstream signatures on distfiles
wasm Build support for the wasm32-unknown-unknown target

Emerge

Emerge the package base

root #emerge --ask dev-lang/rust

There's also an binary package provided due to the long compile times.

root #emerge --ask dev-lang/rust-bin