From 002047cf0cf66dbd578eeca376587dac181bac06 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Mon, 22 Aug 2022 14:41:06 -0700 Subject: [PATCH] doc/..rust.section.md: add section overview This commit adds a brief five-bullet outline for the manual's Rust section, which has grown extremely large. It's easy for a reader to be overwhelmed by it, especially because the manual's HTML formatting doesn't include any kind of TOC outline below second-level headers. The goal here is to get across to the user that: - You can install rustc and cargo from nixpkgs - Nixpkgs supports two approaches to packaging crates - There are community-supported overlays outside of Nixpkgs --- doc/languages-frameworks/rust.section.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/languages-frameworks/rust.section.md b/doc/languages-frameworks/rust.section.md index e19783e29e6a8..ef05a6101beb5 100644 --- a/doc/languages-frameworks/rust.section.md +++ b/doc/languages-frameworks/rust.section.md @@ -1,5 +1,14 @@ # Rust {#rust} +## Overview +* Nixpkgs includes packages for the Rust compiler and Cargo build tool, described in [the next section](#compiling-rustc-and-cargo). +* Nixpkgs includes two low-level primitives for packaging Rust crate: + * [`buildRustPackage`](#compiling-rust-applications-with-cargo) creates a single monolithic Nix derivation which invokes Cargo. + * [`buildRustCrate`](#compiling-rust-crates-using-nix-instead-of-cargo) creates a separate Nix derivation for each crate dependency; these derivations invoke `rustc` directly. +* There are also several [community-maintained alternative overlays](#using-community-rust-overlays). + +## Compiling `rustc` and `cargo` {#compiling-rustc-and-cargo} + To install the rust compiler and cargo put ```nix